summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-12-21 14:28:11 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-21 14:46:35 -0800
commit5a9191ff683ce4ebfd2c6a15e2989f5b1f420321 (patch)
treee4b18ed80e48bfd01560f44dfc61e9fab57c71cb /drivers/usb/core
parent28120be5d6830cd7c7777d8bf570bdb20abef58a (diff)
downloadtalos-obmc-linux-5a9191ff683ce4ebfd2c6a15e2989f5b1f420321.tar.gz
talos-obmc-linux-5a9191ff683ce4ebfd2c6a15e2989f5b1f420321.zip
[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)
mark_quiesced(intf);
} else {
// FIXME else if there's no suspend method, disconnect...
- dev_warn(dev, "no %s?\n", "suspend");
+ dev_warn(dev, "no suspend for driver %s?\n", driver->name);
+ mark_quiesced(intf);
status = 0;
}
return status;
@@ -1460,8 +1461,10 @@ static int usb_generic_resume(struct device *dev)
}
if ((dev->driver == NULL) ||
- (dev->driver_data == &usb_generic_driver_data))
+ (dev->driver_data == &usb_generic_driver_data)) {
+ dev->power.power_state.event = PM_EVENT_FREEZE;
return 0;
+ }
intf = to_usb_interface(dev);
driver = to_usb_driver(dev->driver);
@@ -1481,7 +1484,7 @@ static int usb_generic_resume(struct device *dev)
mark_quiesced(intf);
}
} else
- dev_warn(dev, "no %s?\n", "resume");
+ dev_warn(dev, "no resume for driver %s?\n", driver->name);
return 0;
}
OpenPOWER on IntegriCloud