[PATCH v2] firmware: arm_scmi: Queue in scmi layer for mailbox implementation
Florian Fainelli
florian.fainelli at broadcom.com
Fri Oct 11 09:58:06 PDT 2024
On 10/11/24 06:43, Cristian Marussi wrote:
> On Wed, Oct 09, 2024 at 12:26:37PM -0700, Justin Chen wrote:
>> send_message() does not block in the MBOX implementation. This is
>> because the mailbox layer has its own queue. However, this confuses
>> the per xfer timeouts as they all start their timeout ticks in
>> parallel.
>>
>> Consider a case where the xfer timeout is 30ms and a SCMI transaction
>> takes 25ms.
>>
>> 0ms: Message #0 is queued in mailbox layer and sent out, then sits
>> at scmi_wait_for_message_response() with a timeout of 30ms
>> 1ms: Message #1 is queued in mailbox layer but not sent out yet.
>> Since send_message() doesn't block, it also sits at
>> scmi_wait_for_message_response() with a timeout of 30ms
>> ...
>> 25ms: Message #0 is completed, txdone is called and Message #1 is
>> sent out
>> 31ms: Message #1 times out since the count started at 1ms. Even
>> though it has only been inflight for 6ms.
>>
>> Fixes: b53515fa177c ("firmware: arm_scmi: Make MBOX transport a standalone driver")
>> Signed-off-by: Justin Chen <justin.chen at broadcom.com>
>> ---
>>
>> Changes in v2:
>
> Hi Justin,
>
> thanks.
>
> A few nitpicks and one remark down below.
Since there will likely be a v3, the Fixes tag should IMHO go way back
to when this problem has been in existence, maybe:
Fixes: 5c8a47a5a91d ("firmware: arm_scmi: Make scmi core independent of
the transport type")
--
Florian
More information about the linux-arm-kernel
mailing list