Skip to contentSkip to conversation

[2.4.31] - USB device numbering in /proc/bus/usb

DISCUSSION Paul Rolland 4 participants 4 messages Aug 23, 2005

lore
Share & tools
lore
#0 lore raw

Hello,

I've just rebooted a machine, and the eagle ADSL modem I was using, presented as /proc/bus/usb/002/005 in now presented as /proc/bus/usb/002/003 (same bus, but device ID changed from 5 to 3).

Is this an expected behavior, when running a 2.4.31 kernel ? I would have been expecting some more stability in the numbering across reboot, the same way IDE disks numbers are stable.

Paul

#1 lore raw
Quoted 5 lines · On Tue, 23 Aug 2005 15:14:38 +0200 Paul Rolland wrote:

I've just rebooted a machine, and the eagle ADSL modem I was using, presented as /proc/bus/usb/002/005 in now presented as /proc/bus/usb/002/003 (same bus, but device ID changed from 5 to 3).

Is this an expected behavior, when running a 2.4.31 kernel ?

Yes. Addresses for USB devices are assigned dynamically. If you disconnect the modem from USB and connect it again, its address will change.

Quoted 2 lines

I would have been expecting some more stability in the numbering across reboot, the same way IDE disks numbers are stable.

Use some other identifier which is stable - e.g., serial number of the USB device (unfortunately, many devices don't have it).

#2 lore raw

Hello Sergey,

Quoted 3 lines

Yes. Addresses for USB devices are assigned dynamically. If you disconnect the modem from USB and connect it again, its address will change.

The problem I've is that nothing changed on the machine except that I did a reboot. Nothing (USB device) added, nothing removed, so with a stable hardware config, USB numbering should have stayed stable, IMHO.

Quoted 6 lines
Quoted 1 line

I would have been expecting some more stability in the

numbering across

Quoted 1 line

reboot, the same way IDE disks numbers are stable.

Use some other identifier which is stable - e.g., serial number of the USB device (unfortunately, many devices don't have it).

Well yes, I'm going to try to convert to some other identifiers space as this seems to be the only way to go.

Thanks for the confirmation,
Regards,
Paul

#3 lore raw
Quoted 9 lines · Paul Rolland

Hello Sergey,

Quoted 3 lines

Yes. Addresses for USB devices are assigned dynamically. If you disconnect the modem from USB and connect it again, its address will change.

The problem I've is that nothing changed on the machine except that I did a reboot. Nothing (USB device) added, nothing removed, so with a stable hardware config, USB numbering should have stayed stable, IMHO.

Basically, no it shouldn't.

Quoted 10 lines
Quoted 9 lines
Quoted 2 lines

I would have been expecting some more stability in the

numbering across

Quoted 1 line

reboot, the same way IDE disks numbers are stable.

Use some other identifier which is stable - e.g., serial number of the USB device (unfortunately, many devices don't have it).

Quoted 6 lines

Well yes, I'm going to try to convert to some other identifiers space as this seems to be the only way to go.

Thanks for the confirmation,
Regards,
Paul

/proc/bus/usb/devices (which tells you where a device is located in the tree). This should work on 2.4 kernels, 2.6 kernels should be using sysfs by now.

Signature · 6 lines
Cheers,
Alistair.

'No sense being pessimistic, it probably wouldn't work anyway.'
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.