On Tue, 25 Jul 2006, Peter Chubb wrote: > The RTL8150 driver currently crashes the kernel if the USB lead is unplugged > while the device is active. The attached patch adds error handling to > tell the network layer that the device has gone away when the device is > unplugged. With this patch, the device can be plugged and unplugged > to one's hearts' content, without crashing anything.
I get the feeling that your patch does much more testing for -ENODEV than necessary, and likewise for calls to netif_device_detach(). Do you really have to call that routine from anywhere but the disconnect() method? Note that under normal circumstances, you won't start seeing -ENODEV return codes until shortly before disconnect() runs. 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. Alan Stern ------------------------------------------------------------------------- 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 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
