On Sun, 17 Jun 2007, Dave Mielke wrote: > [quoted lines by Alan Stern on 2007/06/16 at 18:04 -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. On my computer: $ ls -R /proc/bus/usb /proc/bus/usb: 001/ 002/ 003/ 004/ 005/ 006/ devices /proc/bus/usb/001: 001 /proc/bus/usb/002: 001 /proc/bus/usb/003: 001 /proc/bus/usb/004: 001 /proc/bus/usb/005: 001 /proc/bus/usb/006: 001 > >> Is there a way, other than inspecting the kernel release, to know which > >> value > >> is the one to use? What's the effect of writing -1 with a 2.6.21 kernel? > > > >The write will fail. > > 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. Alan Stern ------------------------------------------------------------------------- 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