[PATCH] UHCI:adjust zhaoxin UHCI controllers OverCurrent bit value

From: Weitao Wang
Date: Wed Apr 19 2023 - 23:15:02 EST


Over Current condition is not standardized in the UHCI spec.
Zhaoxin UHCI controllers report OverCurrent bit active off.
Intel controllers report it active on, so we'll adjust the bit value.

Signed-off-by: Weitao Wang <WeitaoWang-oc@xxxxxxxxxxx>
---
drivers/usb/host/uhci-pci.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/uhci-pci.c b/drivers/usb/host/uhci-pci.c
index 3592f757fe05..177e3c2aa287 100644
--- a/drivers/usb/host/uhci-pci.c
+++ b/drivers/usb/host/uhci-pci.c
@@ -126,6 +126,10 @@ static int uhci_pci_init(struct usb_hcd *hcd)
if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA)
uhci->oc_low = 1;

+ /* ZHAOXIN controllers report OverCurrent bit active off. */
+ if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_ZHAOXIN)
+ uhci->oc_low = 1;
+
/* HP's server management chip requires a longer port reset delay. */
if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_HP)
uhci->wait_for_hp = 1;
--
2.32.0