Re: [RFC] usb: Add support for runtime power management of the hcd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux