[PATCH] EHCI: fix remote wakeup regression in 2.6.21-rc
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
There is one significant difference between the behavior of root hubs (as embodied in host controller hardware) and external hubs: When a remote-wakeup signal is received, an external hub sends an interrupt message at the _end_ of the resume sequence but a root hub generates and interrupt at the _beginning_ of the resume sequence. The host system must poll for the end of the sequence. When ehci-hcd was converted to interrupt-driven operation instead of using polling, the remaining need for this particular poll was overlooked. This patch (as894) fixes the problem. Signed-off-by: Alan Stern <[email protected]> --- Greg: This needs to go into 2.6.21. You can demonstrate the regression quite easily, as follows: Plug in a high-speed device, like a USB flash drive, to prevent the root hub from suspending. Then plug in an unpopulated high-speed hub. Wait a couple of seconds for the hub to be suspended, then try plugging anything into the hub. Without this patch, nothing will happen. There still remains a 20-ms race between remote wakeup and suspend. But fixing it will require more work; this patch is necessary in any case and it will be fine for 2.6.21. Alan Stern Index: usb-2.6/drivers/usb/host/ehci-hcd.c =================================================================== --- usb-2.6.orig/drivers/usb/host/ehci-hcd.c +++ usb-2.6/drivers/usb/host/ehci-hcd.c @@ -671,6 +671,7 @@ static irqreturn_t ehci_irq (struct usb_ */ ehci->reset_done [i] = jiffies + msecs_to_jiffies (20); ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); + mod_timer(&hcd->rh_timer, ehci->reset_done[i]); } } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel