aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/uhci-hcd.c11
-rw-r--r--drivers/usb/host/uhci-hcd.h4
-rw-r--r--drivers/usb/host/uhci-hub.c6
3 files changed, 17 insertions, 4 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 83344d688ff0..214851a6244f 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -546,6 +546,17 @@ static int uhci_init(struct usb_hcd *hcd)
546 } 546 }
547 uhci->rh_numports = port; 547 uhci->rh_numports = port;
548 548
549 /* Intel controllers report the OverCurrent bit active on.
550 * VIA controllers report it active off, so we'll adjust the
551 * bit value. (It's not standardized in the UHCI spec.)
552 */
553 if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA)
554 uhci->oc_low = 1;
555
556 /* HP's server management chip requires a longer port reset delay. */
557 if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_HP)
558 uhci->wait_for_hp = 1;
559
549 /* Kick BIOS off this hardware and reset if the controller 560 /* Kick BIOS off this hardware and reset if the controller
550 * isn't already safely quiescent. 561 * isn't already safely quiescent.
551 */ 562 */
diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h
index 49bf2790f9c2..f86db61cf085 100644
--- a/drivers/usb/host/uhci-hcd.h
+++ b/drivers/usb/host/uhci-hcd.h
@@ -415,6 +415,10 @@ struct uhci_hcd {
415 415
416 struct timer_list fsbr_timer; /* For turning off FBSR */ 416 struct timer_list fsbr_timer; /* For turning off FBSR */
417 417
418 /* Silicon quirks */
419 unsigned int oc_low:1; /* OverCurrent bit active low */
420 unsigned int wait_for_hp:1; /* Wait for HP port reset */
421
418 /* Support for port suspend/resume/reset */ 422 /* Support for port suspend/resume/reset */
419 unsigned long port_c_suspend; /* Bit-arrays of ports */ 423 unsigned long port_c_suspend; /* Bit-arrays of ports */
420 unsigned long resuming_ports; 424 unsigned long resuming_ports;
diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c
index 6d59c0f77f25..75418265488d 100644
--- a/drivers/usb/host/uhci-hub.c
+++ b/drivers/usb/host/uhci-hub.c
@@ -149,8 +149,7 @@ static void uhci_check_ports(struct uhci_hcd *uhci)
149 149
150 /* HP's server management chip requires 150 /* HP's server management chip requires
151 * a longer delay. */ 151 * a longer delay. */
152 if (to_pci_dev(uhci_dev(uhci))->vendor == 152 if (uhci->wait_for_hp)
153 PCI_VENDOR_ID_HP)
154 wait_for_HP(port_addr); 153 wait_for_HP(port_addr);
155 154
156 /* If the port was enabled before, turning 155 /* If the port was enabled before, turning
@@ -266,8 +265,7 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
266 * VIA controllers report it active off, so we'll adjust the 265 * VIA controllers report it active off, so we'll adjust the
267 * bit value. (It's not standardized in the UHCI spec.) 266 * bit value. (It's not standardized in the UHCI spec.)
268 */ 267 */
269 if (to_pci_dev(hcd->self.controller)->vendor == 268 if (uhci->oc_low)
270 PCI_VENDOR_ID_VIA)
271 status ^= USBPORTSC_OC; 269 status ^= USBPORTSC_OC;
272 270
273 /* UHCI doesn't support C_RESET (always false) */ 271 /* UHCI doesn't support C_RESET (always false) */