Hello Everyone,
We've started out testing of suspend / resume support for the Sierra
Wireless modem driver. For the testing, we're just putting the laptop
into hibernate mode. Suse 10.2 with the 2.6.21 kernel from kernel.org.
However, things aren't working quite as expected with the USB serial
subsystem.
I don't know if this is correct, but we ended up also creating suspend
and resume entries in the usb_driver structure:
static struct usb_driver sierra_driver = {
.name = "sierra",
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
.id_table = id_table,
.no_dynamic_id = 1,
.suspend = sierra_interface_suspend,
.resume = sierra_interface_resume,
};
Even though there are entries for suspend in the usb_serial_driver
structure, they don't seem to be used. It doesn't look like
usb_serial_suspend() is being called either.
The sierra_interface_suspend() routine is just a wrapper around the
existing suspend routine:
static int sierra_interface_suspend(struct usb_interface *iface,
pm_message_t message)
{
struct usb_serial *serial = usb_get_intfdata (iface);
info("%s", __FUNCTION__);
return sierra_serial_suspend(serial, message);
}
static int sierra_serial_suspend(struct usb_serial *serial,
pm_message_t message)
{
info("%s", __FUNCTION__);
if (serial)
kill_all_ports_urbs(serial);
return 0;
}
At any rate, the sierra_interface_suspend() routine is called, which
kills the URBs for all ports. So that's OK.
However, upon resume, the system appears to be completely disconnecting
the modem, which isn't exactly what we want.
I'm seeing this:
kernel: usb 1-1: resuming
kernel: usbdev1.2_ep00: PM: resume from 0, parent 1-1 still 1
kernel: sierra 1-1:1.0: PM: resume from 1, parent 1-1 still 1
kernel: sierra 1-1:1.0: resuming
kernel: sierra3 ttyUSB0: PM: resume from 0, parent 1-1:1.0 still 1
kernel: sierra3 ttyUSB1: PM: resume from 0, parent 1-1:1.0 still 1
kernel: sierra3 ttyUSB2: PM: resume from 0, parent 1-1:1.0 still 1
kernel: usb 1-1: USB disconnect, address 2
kernel: usb 1-1: unregistering device
kernel: usb 1-1: usb_disable_device nuking all URBs
kernel: bus usb: remove device 1-1:1.0
kernel: sierra 1-1:1.0: device disconnected
And then after that it is re-doing the probe and initializing everything
from the beginning.
I'll be spending some time trying to figure out how exactly the suspend
/ resume code works in the rest of the USB subsystem. And why the
suspend code in usb-serial isn't apparently called. And also why
usb_disable_device() is being called for the modem.
I've got a giant log file (lots of kernel debugging turned on) but
that's too big to post to the list. It is here if anyone is interested:
http://www.deltamobile.com/Downloads/sierra_suspend_resume_1.log
Any suggestions welcome.
Cheers,
James Graves
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel