Re: [PATCH 13/21] soundwire: amd: Check ping command response for timeout

From: Lee Jones

Date: Fri Oct 30 2026 - 08:05:02 EST


On Fri, 30 Oct 2026, Mukunda,Vijendar wrote:

>
>
> On 10/30/26 16:16, Lee Jones wrote:
> > [You don't often get email from lee@xxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> >
> > When amd_sdw_send_cmd_get_resp() times out, it returns -ETIMEDOUT as a
> > sign-extended 64-bit value. amd_sdw_read_and_process_ping_status() and
> > amd_sdw_read_ping_status() extract peripheral status bits directly from
> > the returned value without checking for -ETIMEDOUT, interpreting the
> > error code bits as peripheral status values.
> >
> > Check for -ETIMEDOUT before extracting peripheral status from the ping
> > response, matching amd_program_scp_addr() and amd_sdw_fill_msg_resp().
> >
> > Fixes: d8f48fbdfd9a ("soundwire: amd: Add support for AMD Manager driver")
> > Closes: https://sashiko.dev/#/bug/linux-c3a53ed5-eb8f-4982-a3b6-db189e009b68
> > Cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
> > ---
> > drivers/soundwire/amd_manager.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
> > index a3316efdf8ac..a8220235a2ae 100644
> > --- a/drivers/soundwire/amd_manager.c
> > +++ b/drivers/soundwire/amd_manager.c
> > @@ -448,6 +448,8 @@ static void amd_sdw_read_and_process_ping_status(struct amd_sdw_manager *amd_man
> > mutex_lock(&amd_manager->bus.msg_lock);
> > response = amd_sdw_send_cmd_get_resp(amd_manager, 0, 0);
> > mutex_unlock(&amd_manager->bus.msg_lock);
> > + if (response == -ETIMEDOUT)
> > + return;
> ++
>
> Response should be u64.
> This patch can be dropped.
> Please refer below fix.
> https://lore.kernel.org/alsa-devel/20261013085111.2009061-6-Vijendar.Mukunda@xxxxxxx/T/#m786cce22308c97d055566dce17be5a38b5d98e9e
> I am going to post V4 patch set.

Excellent. Will do. Thanks again.

--
Lee Jones