public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] UHCI:adjust zhaoxin UHCI controllers OverCurrent bit value
@ 2023-04-20 11:14 Weitao Wang
  2023-04-20  8:05 ` Greg KH
  2023-04-20 14:49 ` Alan Stern
  0 siblings, 2 replies; 6+ messages in thread
From: Weitao Wang @ 2023-04-20 11:14 UTC (permalink / raw)
  To: stern, gregkh, linux-usb, linux-kernel; +Cc: tonywwang, weitaowang

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@zhaoxin.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-21  3:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20 11:14 [PATCH] UHCI:adjust zhaoxin UHCI controllers OverCurrent bit value Weitao Wang
2023-04-20  8:05 ` Greg KH
2023-04-20 17:14   ` WeitaoWang-oc
2023-04-20  9:23     ` Greg KH
2023-04-20 14:49 ` Alan Stern
2023-04-21 10:59   ` WeitaoWang-oc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox