Commit eedc060c authored by Etienne Carriere's avatar Etienne Carriere Committed by Sudeep Holla

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: default avatarEtienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: default avatarCristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240725065317.3758165-1-etienne.carriere@foss.st.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent bd02b073
...@@ -229,8 +229,10 @@ static int scmi_voltage_descriptors_get(const struct scmi_protocol_handle *ph, ...@@ -229,8 +229,10 @@ static int scmi_voltage_descriptors_get(const struct scmi_protocol_handle *ph,
/* Retrieve domain attributes at first ... */ /* Retrieve domain attributes at first ... */
put_unaligned_le32(dom, td->tx.buf); put_unaligned_le32(dom, td->tx.buf);
/* Skip domain on comms error */ /* 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; continue;
}
v = vinfo->domains + dom; v = vinfo->domains + dom;
v->id = dom; v->id = dom;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment