diff options
author | Etienne Carriere <etienne.carriere@foss.st.com> | 2024-07-25 09:53:17 +0300 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2024-08-09 16:21:51 +0300 |
commit | eedc060cff725ff53f284c63d55a42f49e6d2b3c (patch) | |
tree | 24180b24c37b2084f2a4859c129c9b78b9016fe5 /drivers/firmware/arm_scmi | |
parent | bd02b0737f3816073e7a37a667190dea3c195e4a (diff) | |
download | linux-eedc060cff725ff53f284c63d55a42f49e6d2b3c.tar.xz |
firmware: arm_scmi: Fix voltage description in failure cases
Reset the reception buffer max size when a voltage domain description
request fails, for example when the voltage domain returns an access
permission error (SCMI_ERR_ACCESS) unless what only a single 32bit
word is read back for the remaining voltage description requests
responses leading to invalid information. The side effect of this
issue is that the voltage regulators registered from those remaining
SCMI voltage domain were assigned a wrong regulator name.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240725065317.3758165-1-etienne.carriere@foss.st.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi')
-rw-r--r-- | drivers/firmware/arm_scmi/voltage.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firmware/arm_scmi/voltage.c b/drivers/firmware/arm_scmi/voltage.c index 2175ffd6cef5..f1a7c04ae820 100644 --- a/drivers/firmware/arm_scmi/voltage.c +++ b/drivers/firmware/arm_scmi/voltage.c @@ -229,8 +229,10 @@ static int scmi_voltage_descriptors_get(const struct scmi_protocol_handle *ph, /* Retrieve domain attributes at first ... */ put_unaligned_le32(dom, td->tx.buf); /* Skip domain on comms error */ - if (ph->xops->do_xfer(ph, td)) + if (ph->xops->do_xfer(ph, td)) { + ph->xops->reset_rx_to_maxsz(ph, td); continue; + } v = vinfo->domains + dom; v->id = dom; |