On Sat, Jan 30, 2010 at 07:24:27PM +0530, Himanshu Chauhan wrote: > Sorry, I am not quite able to digest this :( > Do the USB ports on a system have representation in sysfs? Um, you can look to see if they do, right? :) Hint, no they do not. > If they do, does each port has a subdirectory of its own? Nope. > When I say VHCI ports, I am refering to same kind of USB ports that we > have on a system to which USB devices can connect. The difference > being the devices attached on VHCI ports are over IP. Ah, that's what vhci is, sorry, forgot about usb-ip. Then you are just fine, use the usb code and you should not have to add any new support for stuff like this. With USB, you have a representation in sysfs for the devices that are attached to the USB bus, which then shows the actual port the device is connected to. > The following is the output of "/sys/devices/platform/vhci_hcd/status" file. > > prt sta spd bus dev socket local_busid > 000 004 000 000 000 0000000000000000 0-0 > 001 004 000 000 000 0000000000000000 0-0 > 002 004 000 000 000 0000000000000000 0-0 > 003 004 000 000 000 0000000000000000 0-0 > 004 004 000 000 000 0000000000000000 0-0 > 005 004 000 000 000 0000000000000000 0-0 > 006 004 000 000 000 0000000000000000 0-0 > 007 004 000 000 000 0000000000000000 0-0 That's wrong :) You should move that to debugfs if you need to watch the status of things. > As you can see, I am trying to divide this output in a way that I can > group sta, spd, bus, dev, socket, local_busid as files under ports[N] > directory under /sys/devices/platform/vhci_hcd/status I don't think you need this except for debugging stuff, so put it in debugfs instead, like the other usb files in debugfs for host controllers. > I think ports cannot be taken as "devices" and have their representation > in sysfs. But I believe they can very well be put under vhci_hcd > directory as /sys/devices/platform/vhci_hcd/status/port[N]/<attributes> Why, who needs to know this information? "regular" users? thanks, greg k-h -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ