On Mon, 2015-05-11 at 10:54 +0200, Oliver Neukum wrote: > On Fri, 2015-05-08 at 10:01 -0500, Peter E. Berger wrote: > > +#ifdef CONFIG_PM > > +static int edge_suspend(struct usb_serial *serial, pm_message_t > > message) > > +{ > > + struct edgeport_serial *edge_serial = > > usb_get_serial_data(serial); > > + > > + dev_dbg(&serial->dev->dev, "%s: serial:%s\n", __func__, > > + serial->dev->serial); > > + cancel_delayed_work_sync(&edge_serial->heartbeat_task); > > + return 0; > > +} > > + > > +/* Since usb-serial unbinds and reprobes on resume, the > > re-initialization > > + * (including re-scheduling heartbeat_task) is handled by > > edge_startup(). > > + */ > > +static int edge_resume(struct usb_serial *serial) > > +{ > > + dev_dbg(&serial->dev->dev, "%s: serial:%s\n", __func__, > > + serial->dev->serial); > > + return 0; > > +} > > +#endif > > Hi, > > you cancel the work on suspend, but what brings it back > on resume? > > Regards > Oliver Hi Oliver: The devices get disconnected and reprobed during resume, so edge_startup() restarts the heartbeats. Thanks. --Peter -- 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