-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. Delay time 10usec is decided from detection time of connection (2.5usec) plus margin time. If it is difficult to read every 10usec by S/W, the shortest time (but more than 10usec) which is feasible by S/W is applicable. Using sleepable function like usleep_range() is possible to do long time delay, it may cause increasing misdetection rate. So, udelay() should be used in this case. This patch is cherry-picked from cc7eac1("usb: host: ehci-platform: add a quirk to avoid stuck") Signed-off-by: Yoshihiro Shimoda <[email protected]> [thovu: update commit log] Signed-off-by: Tho Vu <[email protected]>
- Loading branch information
Showing
2 changed files
with
128 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters