USB: add do_wakeup parameter for PCI HCD suspend
This patch (as1385) adds a "do_wakeup" parameter to the pci_suspend method used by PCI-based host controller drivers. ehci-hcd in particular needs to know whether or not to enable wakeup when suspending a controller. Although that information is currently available through device_may_wakeup(), when support is added for runtime suspend this will no longer be true. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
057c58bfb1
commit
4147200d25
@@ -277,7 +277,7 @@ done:
|
||||
* Also they depend on separate root hub suspend/resume.
|
||||
*/
|
||||
|
||||
static int ehci_pci_suspend(struct usb_hcd *hcd)
|
||||
static int ehci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
|
||||
{
|
||||
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
|
||||
unsigned long flags;
|
||||
@@ -291,7 +291,7 @@ static int ehci_pci_suspend(struct usb_hcd *hcd)
|
||||
* the root hub is either suspended or stopped.
|
||||
*/
|
||||
spin_lock_irqsave (&ehci->lock, flags);
|
||||
ehci_prepare_ports_for_controller_suspend(ehci);
|
||||
ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup);
|
||||
ehci_writel(ehci, 0, &ehci->regs->intr_enable);
|
||||
(void)ehci_readl(ehci, &ehci->regs->intr_enable);
|
||||
|
||||
|
Reference in New Issue
Block a user