Files
kernel/include/linux/usb
William Wu 42086e08cd usb: core: hub: ensure power on hcd if attempt power cycle
When do USB hot plug test in USB EHCI/OHIC interface, we
meet a problem that USB HS device can't be recognized with
the following error log:

Cannot enable. Maybe the USB cable is bad?
Cannot enable. Maybe the USB cable is bad?
attempt power cycle
Cannot enable. Maybe the USB cable is bad?
Cannot enable. Maybe the USB cable is bad?

It's hard to reproduce this issue, but the "attempt power
cycle" logic does have a problem for EHCI.

When do USB hot plug test with a USB HS device, the HS
handshake may fail at some time due to unknown reason,
and the USB controller driver will set the PORT_OWNER flag
in EHCI register to change to OHCI companion first. Then
hub_port_connect() calls the usb_hub_set_port_power() to
attempt power cycle the EHCI. However, it fail to power on
the EHCI because the EHCI driver check the PORT_OWNER flag
is true and return immediately.

This patch adds a HCD_FLAG_POWER_ON flag to ensure power on
the EHCI in this case.

Change-Id: I33f5fbaca5d9fbaa978f831db18ff7b20ea70bd8
Signed-off-by: William Wu <william.wu@rock-chips.com>
2023-02-24 14:24:18 +08:00
..