linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "block" symlink in sysfs for a multifunction device
@ 2005-12-12 21:49 Pete Zaitcev
  2005-12-12 21:53 ` Russell King
  2005-12-14  5:50 ` Greg KH
  0 siblings, 2 replies; 11+ messages in thread
From: Pete Zaitcev @ 2005-12-12 21:49 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel

Hi, Greg,

When I plug a USB card reader with multiply LUNs, the following happens:

[zaitcev@niphredil ~]$ ls -l /sys/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0
total 0
-r--r--r-- 1 root root 4096 Dec 12 12:47 bAlternateSetting
-r--r--r-- 1 root root 4096 Dec 12 12:46 bInterfaceClass
-r--r--r-- 1 root root 4096 Dec 12 12:46 bInterfaceNumber
-r--r--r-- 1 root root 4096 Dec 12 12:46 bInterfaceProtocol
-r--r--r-- 1 root root 4096 Dec 12 12:46 bInterfaceSubClass
lrwxrwxrwx 1 root root    0 Dec 12 12:47 block -> ../../../../../../block/ubd
lrwxrwxrwx 1 root root    0 Dec 12 12:47 block -> ../../../../../../block/ubd
lrwxrwxrwx 1 root root    0 Dec 12 12:47 block -> ../../../../../../block/ubd
lrwxrwxrwx 1 root root    0 Dec 12 12:47 block -> ../../../../../../block/ubd
-r--r--r-- 1 root root 4096 Dec 12 12:46 bNumEndpoints
lrwxrwxrwx 1 root root    0 Dec 12 12:46 bus -> ../../../../../../bus/usb
-r--r--r-- 1 root root 4096 Dec 12 12:47 diag
lrwxrwxrwx 1 root root    0 Dec 12 12:46 driver -> ../../../../../../bus/usb/drivers/ub
-r--r--r-- 1 root root 4096 Dec 12 12:46 modalias
drwxr-xr-x 2 root root    0 Dec 12 12:46 power
[zaitcev@niphredil ~]$ cat /proc/version
Linux version 2.6.14-nip (zaitcev@niphredil) (gcc version 4.0.2 20051109 (Red Hat 4.0.2-6)) #5 Tue Dec 6 23:10:53 PST 2005
[zaitcev@niphredil ~]$

The usb-storage produces this:

[root@niphredil linux-2.6.14-nip]# find /sys -name block
/sys/block
/sys/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0/host0/target0:0:0/0:0:0:3/block
/sys/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0/host0/target0:0:0/0:0:0:2/block
/sys/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0/host0/target0:0:0/0:0:0:1/block
/sys/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0/host0/target0:0:0/0:0:0:0/block
/sys/devices/pci0000:00/0000:00:07.1/ide0/0.0/block
[root@niphredil linux-2.6.14-nip]# ls -l /sys/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0/host0/target0:0:0/0:0:0:0/block
lrwxrwxrwx 1 root root 0 Dec 12 13:44 /sys/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0/host0/target0:0:0/0:0:0:0/block -> ../../../../../../../../../block/sda
[root@niphredil linux-2.6.14-nip]#

Each "block" is in its own subdirectory.

Do you have a suggestion about the fastest way to accomplish the same
effect with ub?

Thank you,
-- Pete

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-12-15 16:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 21:49 "block" symlink in sysfs for a multifunction device Pete Zaitcev
2005-12-12 21:53 ` Russell King
2005-12-14  5:50 ` Greg KH
2005-12-14  6:58   ` Pete Zaitcev
2005-12-14 23:26   ` Pete Zaitcev
2005-12-14 23:42     ` Greg KH
2005-12-15  0:10       ` Pete Zaitcev
2005-12-15  0:44         ` Greg KH
2005-12-15  2:47           ` Bill Nottingham
2005-12-15  4:47       ` Jeremy Katz
2005-12-15 16:53         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).