aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/pci-quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/pci-quirks.c')
-rw-r--r--drivers/usb/host/pci-quirks.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 3ce71cbfbb58..477c863b82c3 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -627,6 +627,9 @@ EXPORT_SYMBOL_GPL(usb_amd_pt_check_port);
*/
void uhci_reset_hc(struct pci_dev *pdev, unsigned long base)
{
+#ifdef CONFIG_MIPS_MALTA
+ int timeout = 10;
+#endif
/* Turn off PIRQ enable and SMI enable. (This also turns off the
* BIOS's USB Legacy Support.) Turn off all the R/WC bits too.
*/
@@ -640,9 +643,16 @@ void uhci_reset_hc(struct pci_dev *pdev, unsigned long base)
outw(UHCI_USBCMD_HCRESET, base + UHCI_USBCMD);
mb();
udelay(5);
- if (inw(base + UHCI_USBCMD) & UHCI_USBCMD_HCRESET)
- dev_warn(&pdev->dev, "HCRESET not completed yet!\n");
+#ifdef CONFIG_MIPS_MALTA
+ while (inw(base + UHCI_USBCMD) & UHCI_USBCMD_HCRESET) {
+ if (--timeout < 0) {
+ dev_warn(&pdev->dev, "HCRESET timed out!\n");
+ break;
+ }
+ udelay(5);
+ }
+#endif
/* Just to be safe, disable interrupt requests and
* make sure the controller is stopped.
*/