[PATCH] OHCI: delay 1 us minimum after controller reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch (as1549) fixes a rare problem affecting at least one OHCI
controller: The controller requires a delay of at least 1 microsecond
following a reset, even though it says that it is ready immediately.

The fix is to do the delay first, before checking whether the reset is
complete in the retry loop.

Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
Reported-by: Calin Demian <c.demian20@xxxxxxxxx>
CC: <stable@xxxxxxxxxxxxxxx>

---

 drivers/usb/host/pci-quirks.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: usb-3.4/drivers/usb/host/pci-quirks.c
===================================================================
--- usb-3.4.orig/drivers/usb/host/pci-quirks.c
+++ usb-3.4/drivers/usb/host/pci-quirks.c
@@ -520,9 +520,10 @@ static void __devinit quirk_usb_handoff_
 
 	/* reset requires max 10 us delay */
 	for (cnt = 30; cnt > 0; --cnt) {	/* ... allow extra time */
+		/* Some controllers enable HCR too soon, so always delay some */
+		udelay(1);
 		if ((readl(base + OHCI_CMDSTATUS) & OHCI_HCR) == 0)
 			break;
-		udelay(1);
 	}
 	writel(fminterval, base + OHCI_FMINTERVAL);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux