Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: bdc: fix sleep during atomic

bdc_run() can be ran during atomic context leading to a sleep during
atomic warning. Fix this by replacing read_poll_timeout() with
read_poll_timeout_atomic().

Fixes: 75ae051efc9b ("usb: gadget: bdc: use readl_poll_timeout() to simplify code")
Signed-off-by: Justin Chen <justin.chen@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20260120200754.2488765-1-justin.chen@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Justin Chen and committed by
Greg Kroah-Hartman
f1195ca3 db7fd195

+2 -2
+2 -2
drivers/usb/gadget/udc/bdc/bdc_core.c
··· 35 35 u32 status; 36 36 int ret; 37 37 38 - ret = readl_poll_timeout(bdc->regs + BDC_BDCSC, status, 39 - (BDC_CSTS(status) != BDC_OIP), 10, usec); 38 + ret = readl_poll_timeout_atomic(bdc->regs + BDC_BDCSC, status, 39 + (BDC_CSTS(status) != BDC_OIP), 10, usec); 40 40 if (ret) 41 41 dev_err(bdc->dev, "operation timedout BDCSC: 0x%08x\n", status); 42 42 else