Skip to content

Commit dddb342

Browse files
Weitao Wanggregkh
authored andcommitted
USB: UHCI: adjust zhaoxin UHCI controllers OverCurrent bit value
OverCurrent condition is not standardized in the UHCI spec. Zhaoxin UHCI controllers report OverCurrent bit active off. In order to handle OverCurrent condition correctly, the uhci-hcd driver needs to be told to expect the active-off behavior. Suggested-by: Alan Stern <[email protected]> Cc: [email protected] Signed-off-by: Weitao Wang <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4e8ef34 commit dddb342

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/usb/host/uhci-pci.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,13 @@ static int uhci_pci_init(struct usb_hcd *hcd)
119119

120120
uhci->rh_numports = uhci_count_ports(hcd);
121121

122-
/* Intel controllers report the OverCurrent bit active on.
123-
* VIA controllers report it active off, so we'll adjust the
124-
* bit value. (It's not standardized in the UHCI spec.)
122+
/*
123+
* Intel controllers report the OverCurrent bit active on. VIA
124+
* and ZHAOXIN controllers report it active off, so we'll adjust
125+
* the bit value. (It's not standardized in the UHCI spec.)
125126
*/
126-
if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA)
127+
if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA ||
128+
to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_ZHAOXIN)
127129
uhci->oc_low = 1;
128130

129131
/* HP's server management chip requires a longer port reset delay. */

0 commit comments

Comments
 (0)