Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes: > In fact, I would say that the three loops in stop_read_write_urbs() and > usb_wwan_release() could be combined into a single loop that should run > in the port_remove callback. Maybe something like this would do? It is based on usb-3.6-rc1, but will also apply to the current linux-next (next-20120726). I did not know exactly how to handle the suspend/resume issues, so I took the absolute minimum approach to avoid Ooopsing if the device is suspended when the module is unloaded. This is split out in a separate patch. Should probably be polished a bit. And I could not entirely get rid of the stop_read_write_urbs() with its loop over all ports, as it is used during suspend. But I've moved it inside the #ifdef CONFIG_PM. Hopefully without breaking the build. I haven't built it without CONFIG_PM yet.. I've done a basic test of the option and qcserial drivers, and this seems to do the job for me. The ipw driver is merely build tested. Bjørn Mork (2): usb: usb_wwan: replace release and disconnect with a port_remove hook usb: usb_wwan: port may be gone on device resume drivers/usb/serial/ipw.c | 3 +- drivers/usb/serial/option.c | 4 +-- drivers/usb/serial/qcserial.c | 5 +-- drivers/usb/serial/usb-wwan.h | 3 +- drivers/usb/serial/usb_wwan.c | 66 +++++++++++++++++------------------------ 5 files changed, 32 insertions(+), 49 deletions(-) -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html