Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7758545rwb; Wed, 23 Nov 2022 10:19:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf7YQgP4w6T860Q9Dq0n2AGIWDSZwTc1780gchzRqkxGiDf4tixTaRC/1wNHrfEFu51RmR1f X-Received: by 2002:a50:f602:0:b0:469:4e4f:4827 with SMTP id c2-20020a50f602000000b004694e4f4827mr18714744edn.214.1669227551984; Wed, 23 Nov 2022 10:19:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669227551; cv=none; d=google.com; s=arc-20160816; b=0zv+/sJEnaU7L9yY+TZMFguyYzz48b7dBk1GMR73RBhscCKJSa52RT7YJ6380wZqeX 5BKzn1hv8MKpJjINF335uPaRfwTaRinHbJo4IAtUcvomDwpI/MbQE0VmqDFkZog6TKPu QkBFn05i7KwwFMuXiwzKR+GDD1qJqe3LJstaqypXmZ3uHCpa4d+iRPCQpRbr61XrH8yJ DEOwCAHrtzXNl278vgUvltkNwa1C80xPW8b4wN/F4oZWCq9jomfOQcnyiwyhoTbFB3/s 32Vs8EymPxFFxl87z94CnQWDdOl+lcLO+BXIV26O8F/CLblPOVETg+C3u77MUMVjKKJS 3g+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YTCYfeFIDfjaXYfyhuMzXOKcR3j9k0MucdfkVJjbSv4=; b=pD6Mlq99vGDKSXhAdazN3+Lndv3vsWRxeN1j0rvjvoCvVaextZwSLR0e9KxBEmbO+7 wTk4ns9qlyK74dU8hncBrILy6QGpMU3jkiYiDvajp71cgL6gMY78m4DXqX0mSUOWWB3z jyN/ms40w8H2+czRAXQGTZH0QZ5lmMRO3G4a/6FRG0Q+aDAg9JzyeqT7yjs3fHj2bn6n WEUU1tuZp5ms3WiDCVNeeO5WELPrdtW4JK5x6EFOXVrzjV4ziQr2egrjqrUjx9V5sKxF Lfhe59CPMA07EY7yr0R1nOY4hINOGlk63tProlGR+U4CYzRJs8vVIQWaQgt/Y2UxiY2H 5j7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CSSGDzQi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g13-20020aa7c58d000000b00461c9edc3a5si786598edq.77.2022.11.23.10.18.48; Wed, 23 Nov 2022 10:19:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CSSGDzQi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237556AbiKWR53 (ORCPT + 89 others); Wed, 23 Nov 2022 12:57:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239281AbiKWR5H (ORCPT ); Wed, 23 Nov 2022 12:57:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC776C6629 for ; Wed, 23 Nov 2022 09:57:06 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7B38EB81FE3 for ; Wed, 23 Nov 2022 17:57:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FE2DC433D7; Wed, 23 Nov 2022 17:57:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669226224; bh=wxKRNQqmydSopaq3yHKk8toN/2zOQmC1pkaLy1+Ehkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CSSGDzQiXa2ILS4WGGBSKvACOhV6QvQI9xRgiwSxlGfkV2yyeixoS4SdtPoL7s7bf 8TNDr2zLF14QRyI88mOpNJ6huU5kny68Y06DWco4M2iFrnoj6jpTfmdFybwo2nKNWE f2aotYGVayYV7QAkW/uHhH97x+fDPIzVGm9NDGyzV7+66P0TXPJ68+bshMVPVj5sc1 fd3SN6HOzG4ir2BQsfuMa2WrVKl7k/r8JBOYCJc4Jd+MPZcBeG3IDcoa6p/0DOJz6b Bcvf8za3qfB52rQWxtOumI6d4ykEtiT5MZMpfM54MBvrE1zTlrPw4N0SmpJmdMrOMd QjbBln1SVarEA== From: Conor Dooley To: Conor Dooley , Jassi Brar Cc: Daire McNamara , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/2] soc: microchip: mpfs: handle failed system service requests Date: Wed, 23 Nov 2022 17:56:51 +0000 Message-Id: <20221123175652.327859-2-conor@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221123175652.327859-1-conor@kernel.org> References: <20221123175652.327859-1-conor@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Conor Dooley If a service request fails, a non-zero, per-service error code will be set. Since the individual service drivers may wish to handle things differently, there's little point trying to do anything intelligent in the system controller driver. Let the caller know that things went wrong & leave the details of handling the error to it. Fixes: d0054a470c33 ("soc: add microchip polarfire soc system controller") Signed-off-by: Conor Dooley --- drivers/soc/microchip/mpfs-sys-controller.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/soc/microchip/mpfs-sys-controller.c b/drivers/soc/microchip/mpfs-sys-controller.c index 6e20207b5756..539fc24b397d 100644 --- a/drivers/soc/microchip/mpfs-sys-controller.c +++ b/drivers/soc/microchip/mpfs-sys-controller.c @@ -52,6 +52,12 @@ int mpfs_blocking_transaction(struct mpfs_sys_controller *sys_controller, struct mutex_unlock(&transaction_lock); + if (ret) + return ret; + + if (msg->response->resp_status) + ret = -EIO; + return ret; } EXPORT_SYMBOL(mpfs_blocking_transaction); -- 2.38.1