aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-12-21 17:28:11 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-21 17:46:35 -0500
commit5a9191ff683ce4ebfd2c6a15e2989f5b1f420321 (patch)
treee4b18ed80e48bfd01560f44dfc61e9fab57c71cb /drivers/usb/core
parent28120be5d6830cd7c7777d8bf570bdb20abef58a (diff)
[PATCH] usbcore: allow suspend/resume even if drivers don't support it
This patch (as618) changes usbcore to prevent derailing the suspend/resume sequence when a USB driver doesn't include support for it. This is a workaround rather than a true fix; the core needs to be changed so that URB submissions from suspended drivers can be refused and outstanding URBs cancelled. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/usb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index e197ce9353de..e80ef9467825 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -1432,7 +1432,8 @@ static int usb_generic_suspend(struct device *dev, pm_message_t message)
1432 mark_quiesced(intf); 1432 mark_quiesced(intf);
1433 } else { 1433 } else {
1434 // FIXME else if there's no suspend method, disconnect... 1434 // FIXME else if there's no suspend method, disconnect...
1435 dev_warn(dev, "no %s?\n", "suspend"); 1435 dev_warn(dev, "no suspend for driver %s?\n", driver->name);
1436 mark_quiesced(intf);
1436 status = 0; 1437 status = 0;
1437 } 1438 }
1438 return status; 1439 return status;
@@ -1460,8 +1461,10 @@ static int usb_generic_resume(struct device *dev)
1460 } 1461 }
1461 1462
1462 if ((dev->driver == NULL) || 1463 if ((dev->driver == NULL) ||
1463 (dev->driver_data == &usb_generic_driver_data)) 1464 (dev->driver_data == &usb_generic_driver_data)) {
1465 dev->power.power_state.event = PM_EVENT_FREEZE;
1464 return 0; 1466 return 0;
1467 }
1465 1468
1466 intf = to_usb_interface(dev); 1469 intf = to_usb_interface(dev);
1467 driver = to_usb_driver(dev->driver); 1470 driver = to_usb_driver(dev->driver);
@@ -1481,7 +1484,7 @@ static int usb_generic_resume(struct device *dev)
1481 mark_quiesced(intf); 1484 mark_quiesced(intf);
1482 } 1485 }
1483 } else 1486 } else
1484 dev_warn(dev, "no %s?\n", "resume"); 1487 dev_warn(dev, "no resume for driver %s?\n", driver->name);
1485 return 0; 1488 return 0;
1486} 1489}
1487 1490