On Wed, Jun 13, 2012 at 4:28 PM, Bjørn Mork <bjorn@xxxxxxx> wrote: > > BTW, does the "&& (dev->net->flags & IFF_UP)" really make any > difference, or could the test be simplified to > > (netif_running(dev->net)) Neither netif_running(dev->net) nor (dev->net->flags & IFF_UP) is enough. In the start of usbnet_open(), the usb device may be waken up and usbnet_resume will see netif_running(dev->net) in the situation, so may cause problem since the interface hasn't been UP yet. If just checking on (dev->net->flags & IFF_UP), it still may cause problem in usbnet_resume as pointed by Oliver. So looks only checking on both netif_running(dev->net) and (dev->net->flags & IFF_UP) is OK. Thanks, -- Ming Lei -- 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