From 7df66fb98d68861d76b2c582730576de4bb19f41 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Tue, 28 Feb 2006 10:16:12 -0500 Subject: [PATCH] --- yaml --- r: 22079 b: refs/heads/master c: ae55717584431761b70215d3d574c13fe97093f2 h: refs/heads/master i: 22077: b07e8ff416f85e6ca283ce7952259f7fe37d9466 22075: 28f033c26ad3370397786a6761eb2ea6f6c4b7c6 22071: f5d8e9c699c4c03a70300349ddcff633c2967e43 22063: a0b49ba275d94199dd9836efa29cbe9930cab9a0 22047: 53d5c547791eb1f03a8b1263562c919412d7553f 22015: 0b2d1d1a030522a54f30c07aa5c207688504e60f v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/uhci-hub.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 656f5e36488e..331ce5992122 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 491b04ce1c9adfa0cd73f095086f3c37da81b667 +refs/heads/master: ae55717584431761b70215d3d574c13fe97093f2 diff --git a/trunk/drivers/usb/host/uhci-hub.c b/trunk/drivers/usb/host/uhci-hub.c index a71e48a66805..152971d16769 100644 --- a/trunk/drivers/usb/host/uhci-hub.c +++ b/trunk/drivers/usb/host/uhci-hub.c @@ -99,6 +99,21 @@ static void uhci_finish_suspend(struct uhci_hcd *uhci, int port, } } +/* Wait for the UHCI controller in HP's iLO2 server management chip. + * It can take up to 250 us to finish a reset and set the CSC bit. + */ +static void wait_for_HP(unsigned long port_addr) +{ + int i; + + for (i = 10; i < 250; i += 10) { + if (inw(port_addr) & USBPORTSC_CSC) + return; + udelay(10); + } + /* Log a warning? */ +} + static void uhci_check_ports(struct uhci_hcd *uhci) { unsigned int port; @@ -113,6 +128,12 @@ static void uhci_check_ports(struct uhci_hcd *uhci) CLR_RH_PORTSTAT(USBPORTSC_PR); udelay(10); + /* HP's server management chip requires + * a longer delay. */ + if (to_pci_dev(uhci_dev(uhci))->vendor == + PCI_VENDOR_ID_HP) + wait_for_HP(port_addr); + /* If the port was enabled before, turning * reset on caused a port enable change. * Turning reset off causes a port connect