On Fri, Mar 23, 2007 at 12:36:11PM -0700, John wrote: > Here two solutions are possible: > 1. Keep port range (ttyUSB0 and ttyUSB1 in this case) > reserved until all files are closed. > This is what the current code attempts to do. > But this means that if the same device is re-plugged, > it will be registered as ttyUSB2,ttyUSB3, > even if it is the only connected device. > I had seen applications (in embedded solutions), > which had ttyUSB0 hardcoded because they expected > only single USB peripheral at a time. > Such applications will be broken by this approach. > > 2. Unregister ports in usb_serial_disconnect > (by calling device_del). Mark such ports as > dead, so all further calls to serial_* routines > on these ports will fail (this was already > implemented by Oliver's and my patches). > Allow newly plugged devices to reuse the same > ttyUSB0-ttyUSB1 range. Allow applications > to open files to this new device. > Allow applications to keep open files > to long disappeared devices as long as they want - > they will not interfere with new devices and > newly opened files. > > Please, vote on #1 or #2.
I say #1 as I implemented it :) If userspace still has the device node open, then we need to keep the number still in use. As for applications that foolishly use ttyUSB0 only, well, they kind of deserve the breakage. It is pretty trivial to work around that issue with udev if they want to (and it's recommended that they fix it that way...) thanks, greg k-h ------------------------------------------------------------------------- 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