Message ID | 20211129191156.29322-3-cristian.marussi@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Introduce atomic support for SCMI transports | expand |
On 11/29/21 11:11 AM, Cristian Marussi wrote: > Use transport specific transmission timeout (max_rx_timeout_ms) also for > polling transactions. > > Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
On Mon, Nov 29, 2021 at 07:11:42PM +0000, Cristian Marussi wrote: > Use transport specific transmission timeout (max_rx_timeout_ms) also for > polling transactions. > > Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> > --- > drivers/firmware/arm_scmi/driver.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c > index 3cf161f3bcc7..568562121f64 100644 > --- a/drivers/firmware/arm_scmi/driver.c > +++ b/drivers/firmware/arm_scmi/driver.c > @@ -724,8 +724,6 @@ static void xfer_put(const struct scmi_protocol_handle *ph, > __scmi_xfer_put(&info->tx_minfo, xfer); > } > > -#define SCMI_MAX_POLL_TO_NS (100 * NSEC_PER_USEC) > - While there are no users of SCMI polling now in sched context, it was added and the choice of 100uS was that it was called in sched context. I will update this and merge patches 1-5 as they are ready to go.
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 3cf161f3bcc7..568562121f64 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -724,8 +724,6 @@ static void xfer_put(const struct scmi_protocol_handle *ph, __scmi_xfer_put(&info->tx_minfo, xfer); } -#define SCMI_MAX_POLL_TO_NS (100 * NSEC_PER_USEC) - static bool scmi_xfer_done_no_timeout(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer, ktime_t stop) { @@ -799,7 +797,8 @@ static int do_xfer(const struct scmi_protocol_handle *ph, } if (xfer->hdr.poll_completion) { - ktime_t stop = ktime_add_ns(ktime_get(), SCMI_MAX_POLL_TO_NS); + ktime_t stop = ktime_add_ms(ktime_get(), + info->desc->max_rx_timeout_ms); spin_until_cond(scmi_xfer_done_no_timeout(cinfo, xfer, stop)); if (ktime_before(ktime_get(), stop)) {
Use transport specific transmission timeout (max_rx_timeout_ms) also for polling transactions. Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> --- drivers/firmware/arm_scmi/driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)