ChangeSet 1.1927, 2004/04/22 12:10:05-07:00, greg@kroah.com

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

Patch originally from luming.yu@intel.com and closes bug #1557


 drivers/usb/core/hcd-pci.c |    5 +++++
 1 files changed, 5 insertions(+)


diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
--- a/drivers/usb/core/hcd-pci.c	Thu Apr 22 14:41:44 2004
+++ b/drivers/usb/core/hcd-pci.c	Thu Apr 22 14:41:44 2004
@@ -284,6 +284,11 @@
 	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");
