Messages in this thread | | | Date | Thu, 13 Aug 2009 11:22:44 -0400 (EDT) | From | Alan Stern <> | Subject | Re: [RFC] usb: Add support for runtime power management of the hcd |
| |
On Thu, 13 Aug 2009, Matthew Garrett wrote:
> --- a/drivers/usb/core/hcd-pci.c > +++ b/drivers/usb/core/hcd-pci.c > @@ -363,6 +363,18 @@ static int hcd_pci_restore(struct device *dev) > return resume_common(dev, true); > } > > +static int hcd_pci_runtime_suspend(struct device *dev) > +{ > + struct pci_dev *pci_dev = to_pci_dev(dev); > + struct usb_hcd *hcd = pci_get_drvdata(pci_dev); > + struct usb_device *rhdev = hcd->self.root_hub; > + > + if (!(hcd->driver->flags & HCD_RUNTIME_PM)) > + return -EINVAL; > + > + return 0; > +}
You have to call the HCD's pci_suspend method! Not to mention calling synchronize_irq and all the other stuff in hcd_pci_suspend and hcd_pci_suspend_noirq.
Ditto for resuming.
Alan Stern
| |