Commit c1bb81b
committed
usb: dwc2: hcd: Fix GetPortStatus & SetPortFeature
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: raspberrypi/linux#6247
Fixes: 7359d48 ("staging: HCD files for the DWC2 driver")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>1 parent cc4134d commit c1bb81b
1 file changed
+6
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3546 | 3546 | | |
3547 | 3547 | | |
3548 | 3548 | | |
3549 | | - | |
| 3549 | + | |
3550 | 3550 | | |
3551 | | - | |
3552 | | - | |
3553 | | - | |
| 3551 | + | |
3554 | 3552 | | |
3555 | 3553 | | |
3556 | 3554 | | |
| |||
3620 | 3618 | | |
3621 | 3619 | | |
3622 | 3620 | | |
3623 | | - | |
| 3621 | + | |
3624 | 3622 | | |
3625 | | - | |
3626 | | - | |
3627 | | - | |
3628 | | - | |
3629 | | - | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
3630 | 3626 | | |
3631 | 3627 | | |
3632 | 3628 | | |
| |||
0 commit comments