From: Conor Dooley <conor@kernel.org>
To: Conor Dooley <conor.dooley@microchip.com>,
Jassi Brar <jassisinghbrar@gmail.com>
Cc: Daire McNamara <daire.mcnamara@microchip.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] soc: microchip: mpfs: handle failed system service requests
Date: Fri, 18 Nov 2022 22:07:58 +0000 [thread overview]
Message-ID: <20221118220758.1101409-2-conor@kernel.org> (raw)
In-Reply-To: <20221118220758.1101409-1-conor@kernel.org>
From: Conor Dooley <conor.dooley@microchip.com>
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 <conor.dooley@microchip.com>
---
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
next prev parent reply other threads:[~2022-11-18 22:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 22:07 [PATCH 0/2] mpfs: fix handling failed service requests Conor Dooley
2022-11-18 22:07 ` Conor Dooley [this message]
2022-11-18 22:07 ` [PATCH 2/2] mailbox: mpfs: read the system controller's status Conor Dooley
2022-11-18 22:13 ` Conor.Dooley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221118220758.1101409-2-conor@kernel.org \
--to=conor@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=jassisinghbrar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox