All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Paul Cercueil" <paul.cercueil@bootlin.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 3/3] scmi: driver: Increase timeout for rx response
Date: Thu, 19 Nov 2026 15:38:13 +0000	[thread overview]
Message-ID: <sashiko-outbox-223396@kernel.org> (raw)
In-Reply-To: <20261119152944.276763-4-paul.cercueil@bootlin.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] scmi: global max_rx_timeout_ms increase instead of per-SoC DT
  property
--

commit a587b3cdc57b99607cd614c8d305614227ccea74
Author: George Cherian <gcherian@marvell.com>

scmi: driver: Increase timeout for rx response

This commit increases the default max_rx_timeout_ms in scmi_mailbox_desc
from 30ms to 500ms to accommodate the Marvell CN10K firmware response
time.

> diff --git a/drivers/firmware/arm_scmi/transports/mailbox.c b/drivers/firmware/arm_scmi/transports/mailbox.c
> index 308736c3ead9c..78c38d2644aa0 100644
> --- a/drivers/firmware/arm_scmi/transports/mailbox.c
> +++ b/drivers/firmware/arm_scmi/transports/mailbox.c
> @@ -380,7 +380,7 @@ static const struct scmi_transport_ops scmi_mailbox_ops = {
>  
>  static struct scmi_desc scmi_mailbox_desc = {
>  	.ops = &scmi_mailbox_ops,
> -	.max_rx_timeout_ms = 30, /* We may increase this if required */
> +	.max_rx_timeout_ms = 500, /* We may increase this if required */
>  	.max_msg = 20, /* Limited by MBOX_TX_QUEUE_LEN */
>  	.max_msg_size = SCMI_SHMEM_MAX_PAYLOAD_SIZE,
>  };

[Severity: Medium]
Should the 500ms timeout for Marvell CN10K be configured via the
"arm,max-rx-timeout-ms" DeviceTree property instead of raising
scmi_mailbox_desc.max_rx_timeout_ms for all mailbox platforms?

scmi_transport_setup() already parses "arm,max-rx-timeout-ms" to override
trans->desc.max_rx_timeout_ms per platform:

drivers/firmware/arm_scmi/driver.c:scmi_transport_setup() {
    ...
	ret = of_property_read_u32(dev->of_node, "arm,max-rx-timeout-ms",
				   &trans->desc.max_rx_timeout_ms);
    ...
}

Raising the default in scmi_mailbox_desc affects every mailbox platform,
increasing the worst-case busy-wait in shmem_tx_prepare() (2 *
cinfo->rx_timeout_ms, called from mailbox_send_message() -> msg_submit()
under spin_lock_irqsave(&chan->lock)) from 60ms to 1000ms with interrupts
disabled when a channel is busy, as well as the worst-case atomic busy-spin
in scmi_wait_for_reply() from 30ms to 500ms.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119152944.276763-1-paul.cercueil@bootlin.com?part=3

  reply	other threads:[~2026-11-19 15:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 15:29 [PATCH 0/3] mailbox: Add Marvell MHU driver Paul Cercueil
2026-11-19 15:29 ` [PATCH 1/3] dt-bindings: mailbox: add Marvell MHU Paul Cercueil
2026-11-19 15:38   ` sashiko-bot
2026-11-19 15:29 ` [PATCH 2/3] mailbox: marvell-mhu: add Marvell MHU driver Paul Cercueil
2026-11-19 15:49   ` sashiko-bot
2026-11-19 15:29 ` [PATCH 3/3] scmi: driver: Increase timeout for rx response Paul Cercueil
2026-11-19 15:38   ` sashiko-bot [this message]
2026-11-19 17:32   ` Sudeep Holla
2026-11-19 15:54 ` [PATCH 0/3] mailbox: Add Marvell MHU driver Paul Cercueil

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=sashiko-outbox-223396@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=paul.cercueil@bootlin.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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: link
Be 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.