From: Cristian Marussi <cristian.marussi@arm.com> To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, cristian.marussi@arm.com Subject: [PATCH 5/6] firmware: arm_scmi: Fix asynchronous reset requests Date: Wed, 17 Aug 2022 18:27:30 +0100 [thread overview] Message-ID: <20220817172731.1185305-6-cristian.marussi@arm.com> (raw) In-Reply-To: <20220817172731.1185305-1-cristian.marussi@arm.com> SCMI Reset protocol specification allows for asynchronous reset request only when an Autonomous Reset action is specified: reset requests based on explicit assert/deassert of signals should not be served asynchronously. Current implementation will instead issue an asynchronous request in any case, as long as the reset domain had advertised to support asynchronous resets. Avoid requesting asynchronous resets when the reset action is not of the Autonomous type, even if the target reset-domain does, in general, support asynchronous requests. Fixes: 95a15d80aa0d ("firmware: arm_scmi: Add RESET protocol in SCMI v2.0") Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> --- drivers/firmware/arm_scmi/reset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/arm_scmi/reset.c b/drivers/firmware/arm_scmi/reset.c index b0494165b1cb..e9afa8cab730 100644 --- a/drivers/firmware/arm_scmi/reset.c +++ b/drivers/firmware/arm_scmi/reset.c @@ -172,7 +172,7 @@ static int scmi_domain_reset(const struct scmi_protocol_handle *ph, u32 domain, return -EINVAL; rdom = pi->dom_info + domain; - if (rdom->async_reset) + if (rdom->async_reset && flags & AUTONOMOUS_RESET) flags |= ASYNCHRONOUS_RESET; ret = ph->xops->xfer_get_init(ph, RESET, sizeof(*dom), 0, &t); @@ -184,7 +184,7 @@ static int scmi_domain_reset(const struct scmi_protocol_handle *ph, u32 domain, dom->flags = cpu_to_le32(flags); dom->reset_state = cpu_to_le32(state); - if (rdom->async_reset) + if (flags & ASYNCHRONOUS_RESET) ret = ph->xops->do_xfer_with_response(ph, t); else ret = ph->xops->do_xfer(ph, t); -- 2.32.0
WARNING: multiple messages have this Message-ID (diff)
From: Cristian Marussi <cristian.marussi@arm.com> To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, cristian.marussi@arm.com Subject: [PATCH 5/6] firmware: arm_scmi: Fix asynchronous reset requests Date: Wed, 17 Aug 2022 18:27:30 +0100 [thread overview] Message-ID: <20220817172731.1185305-6-cristian.marussi@arm.com> (raw) In-Reply-To: <20220817172731.1185305-1-cristian.marussi@arm.com> SCMI Reset protocol specification allows for asynchronous reset request only when an Autonomous Reset action is specified: reset requests based on explicit assert/deassert of signals should not be served asynchronously. Current implementation will instead issue an asynchronous request in any case, as long as the reset domain had advertised to support asynchronous resets. Avoid requesting asynchronous resets when the reset action is not of the Autonomous type, even if the target reset-domain does, in general, support asynchronous requests. Fixes: 95a15d80aa0d ("firmware: arm_scmi: Add RESET protocol in SCMI v2.0") Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> --- drivers/firmware/arm_scmi/reset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/arm_scmi/reset.c b/drivers/firmware/arm_scmi/reset.c index b0494165b1cb..e9afa8cab730 100644 --- a/drivers/firmware/arm_scmi/reset.c +++ b/drivers/firmware/arm_scmi/reset.c @@ -172,7 +172,7 @@ static int scmi_domain_reset(const struct scmi_protocol_handle *ph, u32 domain, return -EINVAL; rdom = pi->dom_info + domain; - if (rdom->async_reset) + if (rdom->async_reset && flags & AUTONOMOUS_RESET) flags |= ASYNCHRONOUS_RESET; ret = ph->xops->xfer_get_init(ph, RESET, sizeof(*dom), 0, &t); @@ -184,7 +184,7 @@ static int scmi_domain_reset(const struct scmi_protocol_handle *ph, u32 domain, dom->flags = cpu_to_le32(flags); dom->reset_state = cpu_to_le32(state); - if (rdom->async_reset) + if (flags & ASYNCHRONOUS_RESET) ret = ph->xops->do_xfer_with_response(ph, t); else ret = ph->xops->do_xfer(ph, t); -- 2.32.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-08-17 17:28 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-17 17:27 [PATCH 0/6] Misc fixes for v5.20 Cristian Marussi 2022-08-17 17:27 ` Cristian Marussi 2022-08-17 17:27 ` [PATCH 1/6] firmware: arm_scmi: Fix missing kernel-doc in optee Cristian Marussi 2022-08-17 17:27 ` Cristian Marussi 2022-08-17 17:27 ` [PATCH 2/6] firmware: arm_scmi: Improve checks on .info_get operations Cristian Marussi 2022-08-17 17:27 ` Cristian Marussi 2022-08-17 17:27 ` [PATCH 3/6] firmware: arm_scmi: Harden accesses to Sensor domains Cristian Marussi 2022-08-17 17:27 ` Cristian Marussi 2022-08-17 17:27 ` [PATCH 4/6] firmware: arm_scmi: Harden accesses to Reset domains Cristian Marussi 2022-08-17 17:27 ` Cristian Marussi 2022-08-17 17:27 ` Cristian Marussi [this message] 2022-08-17 17:27 ` [PATCH 5/6] firmware: arm_scmi: Fix asynchronous reset requests Cristian Marussi 2022-08-17 17:27 ` [PATCH 6/6] [RFC] firmware: arm_scmi: Add SCMI PM driver remove routine Cristian Marussi 2022-08-17 17:27 ` Cristian Marussi 2022-08-31 13:25 ` [PATCH 0/6] Misc fixes for v5.20 Sudeep Holla 2022-08-31 13:25 ` Sudeep Holla
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=20220817172731.1185305-6-cristian.marussi@arm.com \ --to=cristian.marussi@arm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=sudeep.holla@arm.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.