[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0908131117130.2940-100000@iolanthe.rowland.org>
Date: Thu, 13 Aug 2009 11:22:44 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Matthew Garrett <mjg59@...f.ucam.org>
cc: "Rafael J. Wysocki" <rjw@...k.pl>, Greg KH <gregkh@...e.de>,
LKML <linux-kernel@...r.kernel.org>,
Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>,
<linux-pci@...r.kernel.org>, <linux-usb@...r.kernel.org>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists