]> git.hungrycats.org Git - linux/commitdiff
[PATCH] USB: Don't try to suspend devices that do not support it.
authorGreg Kroah-Hartman <greg@kroah.com>
Thu, 22 Apr 2004 05:10:05 +0000 (22:10 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Thu, 22 Apr 2004 05:10:05 +0000 (22:10 -0700)
Patch originally from luming.yu@intel.com and closes bug #1557

drivers/usb/core/hcd-pci.c

index 7b9fab144050793f00b2c84e9c32c85221e714f6..5cba0648ec7dfcf91987d0efc590732df513fb5b 100644 (file)
@@ -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->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) {
        case USB_STATE_HALT:
                dev_dbg (hcd->self.controller, "halted; hcd not suspended\n");