Commit f292e7f9fb0e4bec68bbd83443407d6bb7922d36

Authored by Alan Stern
Committed by Greg Kroah-Hartman
1 parent da0aa7169b

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>

Showing 2 changed files with 4 additions and 0 deletions Side-by-side Diff

drivers/usb/host/ehci-hcd.c
... ... @@ -797,6 +797,7 @@
797 797 ehci->reset_done[i] = jiffies + msecs_to_jiffies(25);
798 798 set_bit(i, &ehci->resuming_ports);
799 799 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
  800 + usb_hcd_start_port_resume(&hcd->self, i);
800 801 mod_timer(&hcd->rh_timer, ehci->reset_done[i]);
801 802 }
802 803 }
drivers/usb/host/ehci-hub.c
... ... @@ -851,6 +851,7 @@
851 851 /* resume signaling for 20 msec */
852 852 ehci->reset_done[wIndex] = jiffies
853 853 + msecs_to_jiffies(20);
  854 + usb_hcd_start_port_resume(&hcd->self, wIndex);
854 855 /* check the port again */
855 856 mod_timer(&ehci_to_hcd(ehci)->rh_timer,
856 857 ehci->reset_done[wIndex]);
... ... @@ -862,6 +863,7 @@
862 863 clear_bit(wIndex, &ehci->suspended_ports);
863 864 set_bit(wIndex, &ehci->port_c_suspend);
864 865 ehci->reset_done[wIndex] = 0;
  866 + usb_hcd_end_port_resume(&hcd->self, wIndex);
865 867  
866 868 /* stop resume signaling */
867 869 temp = ehci_readl(ehci, status_reg);
... ... @@ -950,6 +952,7 @@
950 952 ehci->reset_done[wIndex] = 0;
951 953 if (temp & PORT_PE)
952 954 set_bit(wIndex, &ehci->port_c_suspend);
  955 + usb_hcd_end_port_resume(&hcd->self, wIndex);
953 956 }
954 957  
955 958 if (temp & PORT_OC)