> I get the feeling that your patch does much more testing for -ENODEV than
> necessary, and likewise for calls to netif_device_detach().

Paranoia?  :)

> Do you really 
> have to call that routine from anywhere but the disconnect() method?  

That routine is how the network layer knows not to send packets to/from
an interface any more.  When the new class.suspend()/class.resume()
methods go upstream, those calls can/should be made by the network core;
but until then, every driver needs to have those calls.


> Note that under normal circumstances, you won't start seeing -ENODEV
> return codes until shortly before disconnect() runs.

And you'll probably get -ESHUTDOWN sooner ... I think some of the places
you're testing ENODEV should be ESHUTDOWN instead.


> A simpler approach would be to avoid resubmissions when you get -ENODEV
> (and also avoid logging error messages since it is an expected sort of
> error), but otherwise don't treat it specially.

In fact, see how "usbnet" handles those things.  That's pretty much the
canonical solution to this problem for usbe network drivers.  This patch
doesn't exactly mirror usbnet...

... in fact, it'd be a good thing to convert rtl8150 to run in that
driver framework, much like asix.c does already.  You'd probably get
better throughput too.  That's only if you have the time... :)

- Dave


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to