linux/drivers/usb/dwc2
Francesco Lavra bf1e90189a usb: dwc2: gadget: Exit partial power down state when changing USB pull-up
When a USB host suspends a connected device, the DWC2 USB device controller
enters a partial power down state where controller registers are not
accessible. If the USB gadget is then disconnected or deactivated
(e.g. when a gadget function is unbound from the controller), the `pullup`
callback in struct usb_gadget_ops is invoked; if the controller is kept in
partial power down, the register write in dwc2_hsotg_core_disconnect() does
not take effect; as a result, the USB host keeps seeing the device as
connected, even though the device is disabled.

Properly exit partial power down state in the pullup callback, so that the
USB host detects a device disconnection as intended.

Fixes: 97861781da ("usb: dwc2: Allow entering hibernation from USB_SUSPEND interrupt")
Cc: stable@vger.kernel.org
Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Link: https://patch.msgid.link/20260728154420.2021519-1-flavra@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-14 10:48:41 +09:00
..
core_intr.c usb: dwc2: add missing @remotewakeup kernel-doc parameter 2026-07-10 15:56:06 +02:00
core.c usb: dwc2: fix resume failure if dr_mode is host 2026-02-05 17:16:24 +01:00
core.h usb: dwc2: Add include defining struct pci_device_id 2026-07-03 07:38:15 +02:00
debug.h USB: dwc2: Use the correct style for SPDX License Identifier 2020-05-05 10:58:50 +03:00
debugfs.c usb: dwc2: debugfs: Print parameter no_clock_gating 2024-07-31 10:47:10 +02:00
drd.c usb: dwc2: drd: fix clock gating on USB role switch 2024-09-11 15:35:33 +02:00
gadget.c usb: dwc2: gadget: Exit partial power down state when changing USB pull-up 2026-08-14 10:48:41 +09:00
hcd_ddma.c usb: dwc2: host: Fix dereference issue in DDMA completion flow. 2024-04-09 17:29:38 +02:00
hcd_intr.c usb: dwc2: remove WARN in dwc2_hcd_save_data_toggle 2026-05-22 11:35:56 +02:00
hcd_queue.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
hcd.c usb: dwc2: Fix use after free in debug code 2026-05-22 11:21:07 +02:00
hcd.h usb: dwc2: Remove redundant license text 2022-09-22 15:52:29 +02:00
hw.h Merge 6.9-rc2 into usb-next 2024-04-01 17:02:18 +02:00
Kconfig usb: use "prompt" instead of "bool" for choice prompts 2024-11-04 17:53:09 +09:00
Makefile usb: dwc2: override PHY input signals with usb role switch support 2020-10-02 13:29:13 +03:00
params.c usb: dwc2: Add support for 'maximum-speed' property 2025-09-12 14:03:10 +02:00
pci.c usb: dwc2: add pci_device_id driver_data parse support 2023-08-22 14:49:12 +02:00
platform.c usb: dwc2: fix hang during suspend if set as peripheral 2025-11-21 15:10:38 +01:00