mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-04 20:32:27 -04:00
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: 75ae051efc ("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
db7fd1955e
commit
f1195ca3b4
@@ -35,8 +35,8 @@ static int poll_oip(struct bdc *bdc, u32 usec)
|
||||
u32 status;
|
||||
int ret;
|
||||
|
||||
ret = readl_poll_timeout(bdc->regs + BDC_BDCSC, status,
|
||||
(BDC_CSTS(status) != BDC_OIP), 10, usec);
|
||||
ret = readl_poll_timeout_atomic(bdc->regs + BDC_BDCSC, status,
|
||||
(BDC_CSTS(status) != BDC_OIP), 10, usec);
|
||||
if (ret)
|
||||
dev_err(bdc->dev, "operation timedout BDCSC: 0x%08x\n", status);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user