Commit 8ae141b2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: Don't try to suspend devices that do not support it.

Patch originally from luming.yu@intel.com and closes bug #1557
parent 17d5007f
...@@ -284,6 +284,11 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state) ...@@ -284,6 +284,11 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state)
dev_dbg (hcd->self.controller, "suspend D%d --> D%d\n", dev_dbg (hcd->self.controller, "suspend D%d --> D%d\n",
dev->current_state, state); dev->current_state, state);
if (pci_find_capability(dev, PCI_CAP_ID_PM)) {
dev_dbg(hcd->self.controller, "No PM capability\n");
return 0;
}
switch (hcd->state) { switch (hcd->state) {
case USB_STATE_HALT: case USB_STATE_HALT:
dev_dbg (hcd->self.controller, "halted; hcd not suspended\n"); dev_dbg (hcd->self.controller, "halted; hcd not suspended\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment