On Mon, 4 Sep 2006, Fabian Steiner wrote:

> Hello!
> I am not quite sure whether this is the right place to ask, but if I am
> wrong feel free to correct me.
> I am just trying to understand how sysfs adresses work and what the
> different parts of it mean. I have got a usb hub for example whose sysfs
> address is /sys/devices/pci0000:00/0000:00:1d.1/usb3/3-2. Now I am
> wondering what the parts "usb3" and "3-2" correspond to.
> Moreover, whenever I plug in a memory stick it is assigned a sysfs
> address of the following kind:
> /sys/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.2,
> /sys/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.1, etc. Does the part
> "3-2.2" and "3-2.1" tell us something about the port of the usb hub
> where the memory stick is connected to? What is the meaning of colons,
> such as "/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.2/3-2.2:1.0"
> (3-2.2:1.0)?

I'm going to skip the PCI parts of those pathnames and concentrate on just 
the USB portions.

"usb3" means the third USB controller in your computer, according to a 
more or less arbitrary numbering scheme.  That is, the "3" doesn't mean 
anything in itself -- it's just a way to distinguish this controller from 
controllers 1 and 2.

The "3-2" part means controller 3 port 2.  Assuming the device attached to 
that port is a hub, then "3-2.1" means port 1 of that hub.  So if you have 
a memory stick plugged into port 1 of a hub which is itself plugged into 
port 2 of controller 3, the path for that stick will be "usb3/3-2/3-2.1".

The final part following the colons, like ":1.0" refers to the device 
configuration and interface.  In this example, it means configuration 1, 
interface 0.  Although memory sticks generally have only one configuration 
(number 1) and that configuration generally has only one interface (number 
0), other sorts of devices may have several configurations and each 
configuration may have several interfaces.  Only one configuration can be 
installed at any given time, but then all the interfaces in that 
configuration will be available and will have entries in sysfs.

Alan Stern

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
To unsubscribe, use the last form field at:

Reply via email to