aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/uhci-hub.c')
-rw-r--r--drivers/usb/host/uhci-hub.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c
index a71e48a66805..152971d16769 100644
--- a/drivers/usb/host/uhci-hub.c
+++ b/drivers/usb/host/uhci-hub.c
@@ -99,6 +99,21 @@ static void uhci_finish_suspend(struct uhci_hcd *uhci, int port,
99 } 99 }
100} 100}
101 101
102/* Wait for the UHCI controller in HP's iLO2 server management chip.
103 * It can take up to 250 us to finish a reset and set the CSC bit.
104 */
105static void wait_for_HP(unsigned long port_addr)
106{
107 int i;
108
109 for (i = 10; i < 250; i += 10) {
110 if (inw(port_addr) & USBPORTSC_CSC)
111 return;
112 udelay(10);
113 }
114 /* Log a warning? */
115}
116
102static void uhci_check_ports(struct uhci_hcd *uhci) 117static void uhci_check_ports(struct uhci_hcd *uhci)
103{ 118{
104 unsigned int port; 119 unsigned int port;
@@ -113,6 +128,12 @@ static void uhci_check_ports(struct uhci_hcd *uhci)
113 CLR_RH_PORTSTAT(USBPORTSC_PR); 128 CLR_RH_PORTSTAT(USBPORTSC_PR);
114 udelay(10); 129 udelay(10);
115 130
131 /* HP's server management chip requires
132 * a longer delay. */
133 if (to_pci_dev(uhci_dev(uhci))->vendor ==
134 PCI_VENDOR_ID_HP)
135 wait_for_HP(port_addr);
136
116 /* If the port was enabled before, turning 137 /* If the port was enabled before, turning
117 * reset on caused a port enable change. 138 * reset on caused a port enable change.
118 * Turning reset off causes a port connect 139 * Turning reset off causes a port connect