kernel_samsung_a53x/drivers/usb/dwc2
Stefan Wahren 2a56fa583b usb: dwc2: hcd: Fix GetPortStatus & SetPortFeature
commit a8d3e4a734599c7d0f6735f8db8a812e503395dd upstream.

On Rasperry Pis without onboard USB hub the power cycle during
power connect init only disable the port but never enabled it again:

  usb usb1-port1: attempt power cycle

The port relevant part in dwc2_hcd_hub_control() is skipped in case
port_connect_status = 0 under the assumption the core is or will be soon
in device mode. But this assumption is wrong, because after ClearPortFeature
USB_PORT_FEAT_POWER the port_connect_status will also be 0 and
SetPortFeature (incl. USB_PORT_FEAT_POWER) will be a no-op.

Fix the behavior of dwc2_hcd_hub_control() by replacing the
port_connect_status check with dwc2_is_device_mode().

Link: https://github.com/raspberrypi/linux/issues/6247
Fixes: 7359d482eb4d ("staging: HCD files for the DWC2 driver")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20241202001631.75473-3-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-02 17:00:49 +01:00
..
core.c
core.h usb: dwc2: gadget: LPM flow fix 2024-11-19 09:22:43 +01:00
core_intr.c usb: dwc2: gadget: LPM flow fix 2024-11-19 09:22:43 +01:00
debug.h
debugfs.c
drd.c
gadget.c usb: dwc2: gadget: LPM flow fix 2024-11-19 09:22:43 +01:00
hcd.c usb: dwc2: hcd: Fix GetPortStatus & SetPortFeature 2025-01-02 17:00:49 +01:00
hcd.h
hcd_ddma.c usb: dwc2: host: Fix dereference issue in DDMA completion flow. 2024-11-19 11:32:23 +01:00
hcd_intr.c
hcd_queue.c
hw.h usb: dwc2: host: Fix ISOC flow in DDMA mode 2024-11-19 09:22:43 +01:00
Kconfig
Makefile
params.c
pci.c
platform.c Revert "usb: dwc2: Adjust the timing of USB Driver Interrupt Registration in the Crashkernel Scenario" 2024-11-24 00:22:58 +01:00