On Fri, 18 Jul 2003, Alan Stern wrote: > On Fri, 18 Jul 2003, Martin Diehl wrote: > > > Agreed, the oops doesn't come from usb. But again, once we have the block > > and scsi layer behaving with disappearing devices, there will still be fs > > corruption - do we want this to happen because the hcd *appears* unused? > > I agree. On the other hand, increasing the HCD's use count for _every_ > interface claimed may be going too far. There are plenty of drivers that > won't cause any problems at all if the controller driver is removed out > from under them. That includes usb-storage, provided the storage device > isn't mounted.
It's exactly this provision I'm concerned with. And I think this applies to all drivers. Technically, any sane driver could be removed at any time: just make the disconnect safe (needed anyway) and make rmmod trigger a disconnect. This might not be what the user want or expects if the use count is zero. If the use count were reported zero there would always be some need to check somewhere else, depending on the driver: storage might have mounted fs, usbnet might have operational interfaces with network connections, usbserial might have a ppp dialin session - heck, you might have an usb keyboard and the hcd appears unused 8-) > Maybe a good compromise would be to increment the use count only for > interfaces claimed by usb-storage. That's not perfect; ideally we should > do it only when the drive is mounted. But usb-storage has no way to know > when that happens. Personally, I'd prefer usbcore doing try_module_get/module_put pairs on intf->dev->bus->controller->owner when interfaces get claimed and released respectively. > I'm more intrigued by the second oops in your original message, the one > that occurred when you re-installed the HC driver. The oops happened > inside the SCSI code, which is rather surprising. And it occurred at a > spot which ought to be trouble-free. I'm going to have to try and > duplicate that on my system. Ok, Thanks! > By the way, unplugging (or just turning off) the drive ought to have the > same effect as rmmod-ing the HCD. Absolutely. But from a users POV I think s/he will expect different things to happen when a) unplugging a live device b) removing an unused (apparently) module Martin ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel