]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: ehci-brcm: fix sleep during atomic
authorJustin Chen <justin.chen@broadcom.com>
Wed, 18 Mar 2026 18:57:07 +0000 (11:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Mar 2026 15:04:13 +0000 (17:04 +0200)
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")
Cc: stable <stable@kernel.org>
Signed-off-by: Justin Chen <justin.chen@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20260318185707.2588431-1-justin.chen@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-brcm.c

index 888e8f6670d2a10fd1dde56221628b3cfe487391..5e3156f94cc6900a807aa6bf3c6a2fae3d20543d 100644 (file)
@@ -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);