Linux USB
 help / color / mirror / Atom feed
From: justin.chen@broadcom.com
To: linux-usb@vger.kernel.org
Cc: bcm-kernel-feedback-list@broadcom.com, alcooperx@gmail.com,
	stern@rowland.harvard.edu, gregkh@linuxfoundation.org,
	Justin Chen <justin.chen@broadcom.com>
Subject: [PATCH] usb: ehci-brcm: fix sleep during atomic
Date: Thu, 12 Mar 2026 12:08:25 -0700	[thread overview]
Message-ID: <20260312190825.3596757-1-justin.chen@broadcom.net> (raw)

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


             reply	other threads:[~2026-03-12 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 19:08 justin.chen [this message]
2026-03-12 19:58 ` [PATCH] usb: ehci-brcm: fix sleep during atomic Florian Fainelli
2026-03-18 14:13 ` Greg KH
2026-03-18 14:14 ` Greg KH
2026-03-18 16:31   ` Justin Chen
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=20260312190825.3596757-1-justin.chen@broadcom.net \
    --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