[quoted lines by Alan Stern on 2007/06/17 at 10:48 -0400] >> >You can tell whether you have the right entry by reading >> >/sys/bus/usb/devices/.../devnum, which contains the usbfs device number >> >without leading zeros. >> >> Is it guaranteed that two busses can't have a device with the same number. In >> other words, is the following impossibble? >> >> /proc/bus/usb/001/001 >> /proc/bus/usb/002/001 > >It isn't impossible. In fact it happens all the time.
Maybe I missed something then. .../devnum confirms that the device number is right, but how does one additionally confirm that the bus number is correct? >> So we can write -1, and if that fails then write 0? > >Yes. But as we discussed, it might be more productive to see if adding >a short delay after the open is enough to get the device working again. It turns out that a delay of 550 (ms) starts to work, albeit intermittently, and a delay of 700 seems to work all the time. That's a bit long for the autodetect loop, but it's certainly the cleanest approach. Another thing, though, is that suspending this particular device has an undesirable side-effect, i.e. it puts the device into its internal menu mode. Would you consider adding a way, perhaps an ioctl, to tell an open usbfs device that it's not to suspend when closed? It'd only need to be a temporary state, i.e. it'd just apply to the close of the currently open file descriptor. I believe this'd help to resolve both problems. -- Dave Mielke | 2213 Fox Crescent | I believe that the Bible is the Phone: 1-613-726-0014 | Ottawa, Ontario | Word of God. Please contact me EMail: [EMAIL PROTECTED] | Canada K2A 1H7 | if you're concerned about Hell. http://FamilyRadio.com/ | http://Mielke.cc/bible/ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users