Oliver Neukum <oliver@xxxxxxxxxx> writes: > On Friday 04 January 2013 19:26:33 Dan Williams wrote: > >> I'd previously done a patch to handle this all in sierra_net, but the >> problem there is suspend/resume: without directly accessing the usbnet >> structure's ->suspend_count member (icky!) sierra_net can't correctly >> kill/submit the URB itself. So I went with a flag to usbnet that Sierra >> can set. > > That is absolutely the right way to do it. Yes. Just a comment regarding the ->suspend_count: Are you absolutely sure you need to look at that, Dan? usbnet uses it to handle suspend/resume for minidrivers with an unknown number of interfaces, without knowing whether it is the control or data interface which is suspended or resumed first. By using the counter it can ensure that the correct action is taken exactly once regardless of this. The sierra_net minidriver has the advantage of knowing that there always is only *one* USB interface being suspended and resumed. So you don't have to care about ->suspend_count. Just do whatever you need to do on suspend and resume. Bjørn -- 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