aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2013-01-25 17:09:49 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 18:06:01 -0500
commitf292e7f9fb0e4bec68bbd83443407d6bb7922d36 (patch)
treee7af79b85994472cc075741131ca653548391f71 /drivers/usb/host
parentda0aa7169b97d90f4af39a9dc84d58bbe19d7e78 (diff)
USB: EHCI: notify usbcore about port resumes
This patch (as1650) adds calls to the new usb_hcd_{start,end}_port_resume() functions to ehci-hcd. Now EHCI root hubs won't be runtime suspended while they are sending a resume signal to one of their ports. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-hcd.c1
-rw-r--r--drivers/usb/host/ehci-hub.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 09537b2f1002..b416a3fc9959 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -797,6 +797,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
797 ehci->reset_done[i] = jiffies + msecs_to_jiffies(25); 797 ehci->reset_done[i] = jiffies + msecs_to_jiffies(25);
798 set_bit(i, &ehci->resuming_ports); 798 set_bit(i, &ehci->resuming_ports);
799 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); 799 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
800 usb_hcd_start_port_resume(&hcd->self, i);
800 mod_timer(&hcd->rh_timer, ehci->reset_done[i]); 801 mod_timer(&hcd->rh_timer, ehci->reset_done[i]);
801 } 802 }
802 } 803 }
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 4ccb97c0678f..f88be801d60c 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -851,6 +851,7 @@ static int ehci_hub_control (
851 /* resume signaling for 20 msec */ 851 /* resume signaling for 20 msec */
852 ehci->reset_done[wIndex] = jiffies 852 ehci->reset_done[wIndex] = jiffies
853 + msecs_to_jiffies(20); 853 + msecs_to_jiffies(20);
854 usb_hcd_start_port_resume(&hcd->self, wIndex);
854 /* check the port again */ 855 /* check the port again */
855 mod_timer(&ehci_to_hcd(ehci)->rh_timer, 856 mod_timer(&ehci_to_hcd(ehci)->rh_timer,
856 ehci->reset_done[wIndex]); 857 ehci->reset_done[wIndex]);
@@ -862,6 +863,7 @@ static int ehci_hub_control (
862 clear_bit(wIndex, &ehci->suspended_ports); 863 clear_bit(wIndex, &ehci->suspended_ports);
863 set_bit(wIndex, &ehci->port_c_suspend); 864 set_bit(wIndex, &ehci->port_c_suspend);
864 ehci->reset_done[wIndex] = 0; 865 ehci->reset_done[wIndex] = 0;
866 usb_hcd_end_port_resume(&hcd->self, wIndex);
865 867
866 /* stop resume signaling */ 868 /* stop resume signaling */
867 temp = ehci_readl(ehci, status_reg); 869 temp = ehci_readl(ehci, status_reg);
@@ -950,6 +952,7 @@ static int ehci_hub_control (
950 ehci->reset_done[wIndex] = 0; 952 ehci->reset_done[wIndex] = 0;
951 if (temp & PORT_PE) 953 if (temp & PORT_PE)
952 set_bit(wIndex, &ehci->port_c_suspend); 954 set_bit(wIndex, &ehci->port_c_suspend);
955 usb_hcd_end_port_resume(&hcd->self, wIndex);
953 } 956 }
954 957
955 if (temp & PORT_OC) 958 if (temp & PORT_OC)