Skip to contentSkip to conversation

USB: EHCI: Fix resume signalling on remote wakeup

PATCH In review Roger Quadros 2 participants 2 messages Jul 9, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: EHCI: Fix resume signalling on remote wakeup

Set the ehci->resuming flag for the port we receive a remote wakeup on so that resume signalling can be completed.

Without this, the root hub timer will not fire again to check if the resume was completed and there will be a never-ending wait on on the port.

This effect is only observed if the HUB IRQ IN does not come after we have initiated the port resume.

---
 drivers/usb/host/ehci-hub.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/usb/host/ehci-hub.c +1 -0
index 9ab4a4d..ca6289b 100644
@@ -858,6 +858,7 @@ static int ehci_hub_control (
 				ehci->reset_done[wIndex] = jiffies
 						+ msecs_to_jiffies(20);
 				usb_hcd_start_port_resume(&hcd->self, wIndex);
+				set_bit(wIndex, &ehci->resuming_ports);
 				/* check the port again */
 				mod_timer(&ehci_to_hcd(ehci)->rh_timer,
 						ehci->reset_done[wIndex]);
Signature · 1 line
1.7.4.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 20 lines · Roger Quadros

Set the ehci->resuming flag for the port we receive a remote wakeup on so that resume signalling can be completed.

Without this, the root hub timer will not fire again to check if the resume was completed and there will be a never-ending wait on on the port.

This effect is only observed if the HUB IRQ IN does not come after we have initiated the port resume.

---
 drivers/usb/host/ehci-hub.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/usb/host/ehci-hub.c +0 -0
index 9ab4a4d..ca6289b 100644

drivers/usb/host/ehci-hub.c static int ehci_hub_control ( · line 864

Quoted 7 lines
drivers/usb/host/ehci-hub.c +1 -0
@@ -858,6 +858,7 @@ static int ehci_hub_control (
 				ehci->reset_done[wIndex] = jiffies
 						+ msecs_to_jiffies(20);
 				usb_hcd_start_port_resume(&hcd->self, wIndex);
+				set_bit(wIndex, &ehci->resuming_ports);
 				/* check the port again */
 				mod_timer(&ehci_to_hcd(ehci)->rh_timer,
 						ehci->reset_done[wIndex]);