mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
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>
This commit is contained in:
parent
da0aa7169b
commit
f292e7f9fb
@ -797,6 +797,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
|
|||||||
ehci->reset_done[i] = jiffies + msecs_to_jiffies(25);
|
ehci->reset_done[i] = jiffies + msecs_to_jiffies(25);
|
||||||
set_bit(i, &ehci->resuming_ports);
|
set_bit(i, &ehci->resuming_ports);
|
||||||
ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
|
ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
|
||||||
|
usb_hcd_start_port_resume(&hcd->self, i);
|
||||||
mod_timer(&hcd->rh_timer, ehci->reset_done[i]);
|
mod_timer(&hcd->rh_timer, ehci->reset_done[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -851,6 +851,7 @@ static int ehci_hub_control (
|
|||||||
/* resume signaling for 20 msec */
|
/* resume signaling for 20 msec */
|
||||||
ehci->reset_done[wIndex] = jiffies
|
ehci->reset_done[wIndex] = jiffies
|
||||||
+ msecs_to_jiffies(20);
|
+ msecs_to_jiffies(20);
|
||||||
|
usb_hcd_start_port_resume(&hcd->self, wIndex);
|
||||||
/* check the port again */
|
/* check the port again */
|
||||||
mod_timer(&ehci_to_hcd(ehci)->rh_timer,
|
mod_timer(&ehci_to_hcd(ehci)->rh_timer,
|
||||||
ehci->reset_done[wIndex]);
|
ehci->reset_done[wIndex]);
|
||||||
@ -862,6 +863,7 @@ static int ehci_hub_control (
|
|||||||
clear_bit(wIndex, &ehci->suspended_ports);
|
clear_bit(wIndex, &ehci->suspended_ports);
|
||||||
set_bit(wIndex, &ehci->port_c_suspend);
|
set_bit(wIndex, &ehci->port_c_suspend);
|
||||||
ehci->reset_done[wIndex] = 0;
|
ehci->reset_done[wIndex] = 0;
|
||||||
|
usb_hcd_end_port_resume(&hcd->self, wIndex);
|
||||||
|
|
||||||
/* stop resume signaling */
|
/* stop resume signaling */
|
||||||
temp = ehci_readl(ehci, status_reg);
|
temp = ehci_readl(ehci, status_reg);
|
||||||
@ -950,6 +952,7 @@ static int ehci_hub_control (
|
|||||||
ehci->reset_done[wIndex] = 0;
|
ehci->reset_done[wIndex] = 0;
|
||||||
if (temp & PORT_PE)
|
if (temp & PORT_PE)
|
||||||
set_bit(wIndex, &ehci->port_c_suspend);
|
set_bit(wIndex, &ehci->port_c_suspend);
|
||||||
|
usb_hcd_end_port_resume(&hcd->self, wIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp & PORT_OC)
|
if (temp & PORT_OC)
|
||||||
|
Loading…
Reference in New Issue
Block a user