On Tue, 13 Dec 2005, Greg KH wrote:
> Alan, I'm starting to get some complaints about this issue (almost no
> usb drivers have a suspend/resume function, nor should they be required
> to.)
>
> Mind if I add the patch below to the tree?
Feel free.
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.
Alan Stern
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
---
Index: linux-2.6.15-rc3/drivers/usb/core/usb.c
===================================================================
--- linux-2.6.15-rc3.orig/drivers/usb/core/usb.c
+++ linux-2.6.15-rc3/drivers/usb/core/usb.c
@@ -1414,8 +1414,10 @@ static int usb_generic_suspend(struct de
}
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);
@@ -1433,6 +1435,7 @@ static int usb_generic_suspend(struct de
} else {
// FIXME else if there's no suspend method, disconnect...
dev_warn(dev, "no %s?\n", "suspend");
+ mark_quiesced(intf);
status = 0;
}
return status;
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel