From: Pete Zaitcev <zaitcev@redhat.com>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org
Subject: "block" symlink in sysfs for a multifunction device
Date: Mon, 12 Dec 2005 13:49:04 -0800 [thread overview]
Message-ID: <20051212134904.225dcc5d.zaitcev@redhat.com> (raw)
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
next reply other threads:[~2005-12-12 21:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-12 21:49 Pete Zaitcev [this message]
2005-12-12 21:53 ` "block" symlink in sysfs for a multifunction device 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051212134904.225dcc5d.zaitcev@redhat.com \
--to=zaitcev@redhat.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).