lkml.org 
[lkml]   [2003]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectDoes sysfs really provides persistent hardware path to devices?
Date

As far as I can tell sysfs device names include logical bus numbers which
means, if hardware is added or removed it is possible names do change.

Example:

/sys/devices/pci0000:00/0000:00:1f.4/usb2/2-2/2-2.1/2-2.1:0/host1/1:0:0:0

PCI part reflects bus number. Now this example is trivial in that it is
integrated USB controller so it is unlikely to ever change its number - but
if it were external controller (and even worse with PCI-to-PCI bridge) it is
likely that adding extra card would shift all numbers.

And USB part of name starts with logical USB bus number i.e. it is obvious
that adding one more USB adapter will definitely change it.

So apparently I cannot rely on sysfs to get reliable persistent information
about physical location of devices.

the point is - I want to create aliases that would point to specific slots.
I.e. when I plug USB memory stick in upper slot on front panel I'd like to
always create the same device alias for it.

TIA

-andrey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.070 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site