Skip to contentSkip to conversation

usb: bdc: fix sleep during atomic

PATCH In review Justin Chen 2 participants 2 messages Jan 20

Subsystems (2)
lore
Share & tools
lore

Justin Chen

author maintainer
#0 lore raw

PATCH 1/1 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")
---
 drivers/usb/gadget/udc/bdc/bdc_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/gadget/udc/bdc/bdc_core.c +2 -2
index 5c3d8b64c0e7..f47aac078f6b 100644
@@ -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
Signature · 1 line
2.34.1