[linux-pm] Re: uhci-hcd suspend/resume under the new driver model

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

 



Hi!

> One of the problems Suspend2 is running into with the driver model
> changes, is uhci-hcd doesn't suspend and resume correctly. The
> problem is that in the changes to usb_hcd_pci_suspend in hcd-pci.c,
> we now use pci_choose_state to obtain the PCI power state to put the
> machine into. It affects uhci-hcd because it does not have the
> PCI_CAP_ID_PM capability bit set.
> 
> Before the new driver model, state would be 3 (passed directly to
> the function), and the function would run with state D3hot, and
> has_pci_pm false.  With these changes however, pci_choose_state sees
> the lack of PCI_CAP_ID_PM and returns state D0 instead of D3hot.
> Hence the function runs as if suspending into D0, and doesn't do the
> suspend as it should.
> 
> My hack (attached), fixes the suspend function to proceed with the
> suspend even if state is D0, if it sees that has_pci_pm is false. It
> resolves the suspend/resume issues, but it's probably not the
> cleanest solution, as it relies on the fact that the suspend
> function is only there to put the device into D3hot (and not any
> other power state).
> 
> Other drivers that lack PCI_CAP_ID_PM probably have the same
> problem, and I thought you might have a cleaner solution. Any
> suggestions? :)

I guess has_pci_pm check should be killed from pci_choose_state. It is
probably going to create some problems elsewhere....

								Pavel


-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

[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