diff options
| author | Drew Hamilton <[email protected]> | 2025-07-01 15:41:26 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2025-07-07 08:58:15 +0000 |
| commit | 67a59f82196c8c4f50c83329f0577acfb1349b50 (patch) | |
| tree | debdd02781b25317b0a618336d22a16f4fa0e514 /drivers/fpga/altera-fpga2sdram.c | |
| parent | Merge tag 'thunderbolt-for-v6.16-rc4' of ssh://gitolite.kernel.org/pub/scm/li... (diff) | |
| download | kernel-67a59f82196c8c4f50c83329f0577acfb1349b50.tar.gz kernel-67a59f82196c8c4f50c83329f0577acfb1349b50.zip | |
usb: musb: fix gadget state on disconnect
When unplugging the USB cable or disconnecting a gadget in usb peripheral mode with
echo "" > /sys/kernel/config/usb_gadget/<your_gadget>/UDC,
/sys/class/udc/musb-hdrc.0/state does not change from USB_STATE_CONFIGURED.
Testing on dwc2/3 shows they both update the state to USB_STATE_NOTATTACHED.
Add calls to usb_gadget_set_state in musb_g_disconnect and musb_gadget_stop
to fix both cases.
Fixes: 49401f4169c0 ("usb: gadget: introduce gadget state tracking")
Cc: [email protected]
Co-authored-by: Yehowshua Immanuel <[email protected]>
Signed-off-by: Yehowshua Immanuel <[email protected]>
Signed-off-by: Drew Hamilton <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/fpga/altera-fpga2sdram.c')
0 files changed, 0 insertions, 0 deletions
