On Thu, 11 Nov 2010, Chris Frey wrote: > Hi, > > When plugging in a device on Linux, I notice that the bus numbers and > device numbers under /proc or /sys change each time it is plugged in. If you plug a device into the same port, the bus number will be the same each time (provided you don't reboot in between). Device numbers are assigned sequentially; they will be different every time. > Is it even possible to determine which physical socket a device is > currently plugged into? Say, on a 5 port USB hub, can you tell which > socket a device is plugged into? We prefer to say "port" rather than "socket". The port number is fixed, but it's not related to the device number. Instead the port number is related to the device's sysfs path. For example, a device's sysfs path might be "/sys/bus/usb/devices/3-1.2" -- the last component says (reading backward) that the device is plugged into port 2 of an external hub, which is plugged into the computer's port 1 on bus 3. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html