History

usb: host: ehci-platform: add a quirk to avoid stuck

Since EHCI/OHCI controllers on R-Car Gen3 SoCs are possible to be getting stuck very rarely after a full/low usb device was disconnected. To detect/recover from such a situation, the controllers require a special way which poll the EHCI PORTSC register and changes the OHCI functional state. So, this patch adds a polling timer into the ehci-platform driver, and if the ehci driver detects the issue by the EHCI PORTSC register, the ehci driver removes a companion device (= the OHCI controller) to change the OHCI functional state to USB Reset once. And then, the ehci driver adds the companion device again.

Yoshihiro Shimoda committed 6 years ago

Commit cc7eac11 parent bb6d3fb2 files · +128 −1Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/usb/ehci_def.h+1−1
@@ -151,7 +151,7 @@ struct ehci_regs { · 150 unmodified lines
151#define PORT_OWNER (1<<13) /* true: companion hc owns this port */151#define PORT_OWNER (1<<13) /* true: companion hc owns this port */
152#define PORT_POWER (1<<12) /* true: has power (see PPC) */152#define PORT_POWER (1<<12) /* true: has power (see PPC) */
153#define PORT_USB11(x) (((x)&(3<<10)) == (1<<10)) /* USB 1.1 device */153#define PORT_USB11(x) (((x)&(3<<10)) == (1<<10)) /* USB 1.1 device */
154/* 11:10 for detecting lowspeed devices (reset vs release ownership) */154#define PORT_LS_MASK (3<<10) /* Link status (SE0, K or J */
155/* 9 reserved */155/* 9 reserved */
156#define PORT_LPM (1<<9) /* LPM transaction */156#define PORT_LPM (1<<9) /* LPM transaction */
157#define PORT_RESET (1<<8) /* reset port */157#define PORT_RESET (1<<8) /* reset port */