On Wed, 7 Dec 2005, Carl-Daniel Hailfinger wrote:
> Alan Stern schrieb:
> > On Wed, 7 Dec 2005, Carl-Daniel Hailfinger wrote:
> >
> >>Sorry, this patch didn't help. Anthing else I can try?
> >
> > What does the dmesg log say?
>
> Same as before:
>
> usb 1-2: new full speed USB device using uhci_hcd and address 2
> drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0
> proto 2 vid 0x04E8 pid 0x3242
> usbcore: registered new driver usblp
> drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
> [...]
> PM: Preparing system for mem sleep
> Stopping tasks: ===================================================|
> usblp 1-2:1.0: no suspend?
> Could not suspend device 1-2: error -16
> Some devices failed to suspend
> Restarting tasks... done
Darn it. There were two problem pathways in that code and the patch
changed the wrong one. Okay, this patch changes both.
Bear in mind that this is just a temporary band-aid. The real problem is
that the usblp driver doesn't have any suspend/resume support. That still
needs to be fixed.
If you don't feel like using the patch below, you can simply rmmod usblp
before suspending and modprobe usblp after resuming. That's actually a
safer approach.
Alan Stern
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