Alan Jenkins wrote: > That won't fix hibernation though. The disconnect method can still get > called in resume from hibernation, before the workqueue gets unfrozen. > To be honest, I'm far more interested in suspend-to-disk than > suspend-to-ram. Does this patch fix your problem? It works here, but I only did one test. The patch is for wireless-testing. Larry Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c =================================================================== --- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c @@ -1464,6 +1464,32 @@ static int __devinit rtl8187_probe(struc return err; } +#ifdef CONFIG_PM + +static int rtl8187_suspend(struct usb_interface *intf, pm_message_t state) +{ + struct ieee80211_hw *dev = usb_get_intfdata(intf); + struct rtl8187_priv *priv; + int time; + + if (!dev) + return 0; + + priv = dev->priv; + + time = usb_wait_anchor_empty_timeout(&priv->anchored, 1000); + if (!time) + usb_kill_anchored_urbs(&priv->anchored); + return 0; +} + +static int rtl8187_resume(struct usb_interface *intf) +{ + return 0; +} + +#endif /* CONFIG_PM */ + static void __devexit rtl8187_disconnect(struct usb_interface *intf) { struct ieee80211_hw *dev = usb_get_intfdata(intf); @@ -1484,6 +1510,10 @@ static struct usb_driver rtl8187_driver .id_table = rtl8187_table, .probe = rtl8187_probe, .disconnect = __devexit_p(rtl8187_disconnect), +#ifdef CONFIG_PM + .suspend = rtl8187_suspend, + .resume = rtl8187_resume, +#endif /* CONFIG_PM */ }; static int __init rtl8187_init(void) -- 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