From: Justin Chen <justin.chen@broadcom.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com,
alcooperx@gmail.com, stern@rowland.harvard.edu
Subject: Re: [PATCH] usb: ehci-brcm: fix sleep during atomic
Date: Wed, 18 Mar 2026 09:31:10 -0700 [thread overview]
Message-ID: <df80ab6c-69fd-4473-ac1f-2819e5d01e1a@broadcom.com> (raw)
In-Reply-To: <2026031801-spinster-scraggly-7504@gregkh>
On 3/18/2026 7:14 AM, Greg KH wrote:
> On Thu, Mar 12, 2026 at 12:08:25PM -0700, justin.chen@broadcom.com wrote:
>> From: Justin Chen <justin.chen@broadcom.com>
>>
>> echi_brcm_wait_for_sof() gets called after disabling interrupts
>> in ehci_brcm_hub_control(). Use the atomic version of poll_timeout
>> to fix the warning.
>>
>> Fixes: ("9df231511bd6 usb: ehci: Add new EHCI driver for Broadcom STB SoC's")
>> Signed-off-by: Justin Chen <justin.chen@broadcom.com>
>> ---
>> drivers/usb/host/ehci-brcm.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/usb/host/ehci-brcm.c b/drivers/usb/host/ehci-brcm.c
>> index 888e8f6670d2..5e3156f94cc6 100644
>> --- a/drivers/usb/host/ehci-brcm.c
>> +++ b/drivers/usb/host/ehci-brcm.c
>> @@ -31,8 +31,8 @@ static inline void ehci_brcm_wait_for_sof(struct ehci_hcd *ehci, u32 delay)
>> int res;
>>
>> /* Wait for next microframe (every 125 usecs) */
>> - res = readl_relaxed_poll_timeout(&ehci->regs->frame_index, val,
>> - val != frame_idx, 1, 130);
>> + res = readl_relaxed_poll_timeout_atomic(&ehci->regs->frame_index,
>> + val, val != frame_idx, 1, 130);
>> if (res)
>> ehci_err(ehci, "Error waiting for SOF\n");
>> udelay(delay);
>> --
>> 2.34.1
>>
>>
>
> Why is something that has been around for so long just now suddenly
> being seen? What changed to trigger this?
>
The edge case occurs in rare occasions and predates my time maintaining
this driver. So we just so happened to run into it recently in our
tests. Guess in the past we just never hit the edge case with the
warnings enabled. I had the same question when the warning was reported.
Will fix the Fixes tag in v2.
Thanks,
Justin
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2026-03-18 16:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 19:08 [PATCH] usb: ehci-brcm: fix sleep during atomic justin.chen
2026-03-12 19:58 ` Florian Fainelli
2026-03-18 14:13 ` Greg KH
2026-03-18 14:14 ` Greg KH
2026-03-18 16:31 ` Justin Chen [this message]
2026-03-20 17:27 ` Florian Fainelli
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=df80ab6c-69fd-4473-ac1f-2819e5d01e1a@broadcom.com \
--to=justin.chen@broadcom.com \
--cc=alcooperx@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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