Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1207174rwb; Fri, 18 Nov 2022 14:35:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf6smWBefbzDX4CW3iqFQpEzCCeub+XLgIUAgpv4xKAACPAi3c5TLQqVRg9cfxnMd3gFUEKC X-Received: by 2002:a05:6a00:1310:b0:561:a494:b299 with SMTP id j16-20020a056a00131000b00561a494b299mr9585220pfu.34.1668810957880; Fri, 18 Nov 2022 14:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668810957; cv=none; d=google.com; s=arc-20160816; b=QZdIELochjnwR2zeeo6ga8pEkNLmt7sW9WkQndenIgjVggxHQnVKFhyOIZpAhK31UL JkmKGjtnj6CjtjnRjl6Dy8Zv+Xvrr9cM85oKvFfg7ZDTojamqTk4Q56gdy1eVDyKDGlJ llV6hX7+jyLTqRB/Ezm5vuB5e8mz+ttRJGsGkZqTs9ICY/sskxW56/iL1rULrPyzUTr8 MAfsvmjdnfb7UuslrRL8RzbZ3ElrbNlt4CN2kiW5Z1KIsEH3D0j+n61OaSgaLB6gO1JD 3X0I3y0xjqQ9cgdWLS2UixdW0koQuA0kh9pP6h8VridzuBp68Sn5JVhZurZa/0Aj/mSq lE+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=q2nP9uCfDBevFmEtTcMQJc0hWbBrYXC+dJVLWwDHDY4=; b=D4lv4mKt+LdlIPTyyGbDl7wkJVo8B+iexqHgMZvI0Pshv/TEI9ooYmjKWeRShgtkYm B4B5jghXc0se9fKXpNjJH/wEvfMlKv16bCICEsro73CLq9iGfIJfpd5YCTZ+SJjYB/TB YuGmmIjXcIBaOerMSgp+ZBHjiGOvAe+8KN8xMTMEq+FANOJ0rMDplZygMQPE2NnJ60jr PEEXPkUX8mwzemplfx5AdgFTOcQfZxmz7Pv3MGc4GuhA/w+tJm44+tMGXBMo28uVFcvD 9j8+i9xQiwz9HiD5c/juiRfhVYlrC4pkwN8tXB/j4YfCggFg+yGCmGP969o20MLCrFF5 dgGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="RifEh9b/"; 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 m12-20020a656a0c000000b00476f5ad5027si5009065pgu.114.2022.11.18.14.35.37; Fri, 18 Nov 2022 14:35:57 -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="RifEh9b/"; 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 S231640AbiKRWWa (ORCPT + 91 others); Fri, 18 Nov 2022 17:22:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231991AbiKRWVw (ORCPT ); Fri, 18 Nov 2022 17:21:52 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE7CEB7E80 for ; Fri, 18 Nov 2022 14:21:10 -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 62911B82568 for ; Fri, 18 Nov 2022 22:21:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED2F7C433D6; Fri, 18 Nov 2022 22:21:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668810068; bh=E9ca8QoCrIeSP5fRU5kfdctSssLXX9ouXkKzqOBNjD4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RifEh9b/d10HRwrBCx6g393UiIXtOcsAjsOlWfzmYu2iNwN2VuhW2aQqyWMhp0R1t ceKq7ZUUcKR/IzGWAGqh/VRoeEi1pTgpSDBi5fqY1iMGNZyHcNjqDfbWuHK8u38zOw VwAXmC4x9igXN/1CrbD9uc7A6CnVL9B/2Zly8E48NsfeiY+iNsvktPbaiLjnlhD16f rMSEYdSDvZmjaZW1+hywyW5kTwPLG+fj/SMd1c80lSS63qwCY4gFURKonF0EigCyJU 8suUaTx9TrCQj2hxoUlbvbHRhjK1tScv0OalgK6XDQee3G6feAbwkwQyeQsjatNjLh dn+hUA/R1bdQQ== From: Conor Dooley To: Conor Dooley , Jassi Brar Cc: Daire McNamara , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] soc: microchip: mpfs: handle failed system service requests Date: Fri, 18 Nov 2022 22:20:43 +0000 Message-Id: <20221118222043.1214776-2-conor@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221118222043.1214776-1-conor@kernel.org> References: <20221118222043.1214776-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.37.2