}
uhci->rh_numports = port;
+ /* Intel controllers report the OverCurrent bit active on.
+ * VIA controllers report it active off, so we'll adjust the
+ * bit value. (It's not standardized in the UHCI spec.)
+ */
+ if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA)
+ 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;
+
/* Kick BIOS off this hardware and reset if the controller
* isn't already safely quiescent.
*/
struct timer_list fsbr_timer; /* For turning off FBSR */
+ /* Silicon quirks */
+ unsigned int oc_low:1; /* OverCurrent bit active low */
+ unsigned int wait_for_hp:1; /* Wait for HP port reset */
+
/* Support for port suspend/resume/reset */
unsigned long port_c_suspend; /* Bit-arrays of ports */
unsigned long resuming_ports;
/* HP's server management chip requires
* a longer delay. */
- if (to_pci_dev(uhci_dev(uhci))->vendor ==
- PCI_VENDOR_ID_HP)
+ if (uhci->wait_for_hp)
wait_for_HP(port_addr);
/* If the port was enabled before, turning
* VIA controllers report it active off, so we'll adjust the
* bit value. (It's not standardized in the UHCI spec.)
*/
- if (to_pci_dev(hcd->self.controller)->vendor ==
- PCI_VENDOR_ID_VIA)
+ if (uhci->oc_low)
status ^= USBPORTSC_OC;
/* UHCI doesn't support C_RESET (always false) */