From: Breno Leitao <leitao@debian.org>
To: Sudeep Holla <sudeep.holla@kernel.org>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com, stable@vger.kernel.org,
Michael van der Westhuizen <rmikey@meta.com>
Subject: Re: [PATCH] mailbox: pcc: Complete the transfer when the platform flags an error
Date: Wed, 28 Oct 2026 06:11:53 -0700 [thread overview]
Message-ID: <auH0RK4oBOd3JxFU@gmail.com> (raw)
In-Reply-To: <20261027-impartial-nano-sheep-5ccf53@sudeepholla>
Hello Sudeep,
On Tue, Oct 27, 2026 at 04:47:39PM +0000, Sudeep Holla wrote:
> On Tue, Oct 27, 2026 at 08:19:14AM -0700, Breno Leitao wrote:
> > Clients that wait for the rx callback still time out on the failed
> > transfer, but the channel works again afterwards.
> >
>
> Nice, finally good to see this driver and various error paths being tested
> on real platforms. Thanks for finding the issues and the fix.
Cool, this will definitely get more eyes now on.
Michael deserves the credit for finding this and proposing this fix,
honestly. He is looking at all of this.
> > @@ -333,8 +334,20 @@ static irqreturn_t pcc_mbox_irq(int irq, void *p)
> > if (!pcc_mbox_cmd_complete_check(pchan))
> > return IRQ_NONE;
> >
> > - if (pcc_mbox_error_check_and_clear(pchan))
> > - return IRQ_NONE;
> > + ret = pcc_mbox_error_check_and_clear(pchan);
> > + if (ret) {
> > + /*
> > + * No other interrupt arrives for this transfer, so complete
> > + * it here or the channel stalls. Skip the rx callback, as the
> > + * shared memory holds no valid response.
> > + */
> > + dev_err_ratelimited(chan->mbox->dev,
> > + "PCC subspace %td: transfer error %d\n",
> > + pchan - chan_info, ret);
> > + WRITE_ONCE(pchan->chan_in_use, false);
> > + mbox_chan_txdone(chan, -EIO);
> > + return IRQ_HANDLED;
>
> Since we are returning IRQ_HANDLED, can we merge this path with the code
> below ?
>
> if (ret)
> dev_err_...
>
> ..
> if(!ret)
> mbox_chan_received_data();
>
> That should work right ? The reason I prefer this way is the comment for
> WRITE_ONCE() applies above as well. Instead we can reuse the path. Let me
> know what you think.
Ack. Let me update and respin.
Thanks for the feedback,
--breno
next prev parent reply other threads:[~2026-10-28 13:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 15:19 Breno Leitao
2026-10-27 16:47 ` Sudeep Holla
2026-10-28 13:11 ` Breno Leitao [this message]
2026-10-28 13:19 ` Sudeep Holla
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=auH0RK4oBOd3JxFU@gmail.com \
--to=leitao@debian.org \
--cc=jassisinghbrar@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmikey@meta.com \
--cc=stable@vger.kernel.org \
--cc=sudeep.holla@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®