diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-02-28 10:16:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:50:00 -0500 |
commit | ae55717584431761b70215d3d574c13fe97093f2 (patch) | |
tree | adbda118e9f5c8e0179b07e3cfa714f08405f8bb /drivers/usb | |
parent | 491b04ce1c9adfa0cd73f095086f3c37da81b667 (diff) |
[PATCH] USB: UHCI: Increase port-reset completion delay for HP controllers
This patch (as657) increases the port-reset completion delay in uhci-hcd
for HP's embedded controllers. Unlike other UHCI controllers, the HP
chips can take as long as 250 us to carry out the processing associated
with finishing a port reset.
This fixes Novell bug #148761.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/uhci-hub.c | 21 |
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 | */ | ||
105 | static 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 | |||
102 | static void uhci_check_ports(struct uhci_hcd *uhci) | 117 | static 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 |