]> git.ipfire.org Git - thirdparty/linux.git/commit
usb: dwc3: gadget: Move vbus draw to workqueue context
authorPrashanth K <prashanth.k@oss.qualcomm.com>
Wed, 4 Feb 2026 05:41:55 +0000 (11:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Feb 2026 16:13:48 +0000 (17:13 +0100)
commit54aaa3b387c2f580a99dc86a9cc2eb6dfaf599a7
treecb59ce44277c7de87a9031d823a2097158427940
parent6dbc394fa51dfa43ed648fb95045ace57596b6f5
usb: dwc3: gadget: Move vbus draw to workqueue context

Currently dwc3_gadget_vbus_draw() can be called from atomic
context, which in turn invokes power-supply-core APIs. And
some these PMIC APIs have operations that may sleep, leading
to kernel panic.

Fix this by moving the vbus_draw into a workqueue context.

Fixes: 99288de36020 ("usb: dwc3: add an alternate path in vbus_draw callback")
Cc: stable <stable@kernel.org>
Tested-by: Samuel Wu <wusamuel@google.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Prashanth K <prashanth.k@oss.qualcomm.com>
Link: https://patch.msgid.link/20260204054155.3063825-1-prashanth.k@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c