From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Thu, 22 Jan 2004 23:42:36 +0000 Subject: Re: how to determine physical bus of a device and find it there Message-Id: <20040122234236.GA2233@vrfy.org> List-Id: References: <20040120025230.GA26199@vrfy.org> In-Reply-To: <20040120025230.GA26199@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, Jan 22, 2004 at 02:40:46PM -0800, Greg KH wrote: > On Tue, Jan 20, 2004 at 03:52:30AM +0100, Kay Sievers wrote: > > > > but the really interesting attributes are on the usb bus: > > /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1': > > > > SYSFS_manufacturer="SMSC" > > SYSFS_product="USB 2 Flash Media Device" > > SYSFS_serial="0305037000C2" > > > > > > So, how do I reliable get there? > > We need to set up a "stack" (for lack of a better word) of sysfs > devices. We can now do this with some libsysfs calls. Oh, my english is not quite good, but for me it sounds like a 'chain'? > So what udev needs to do is look at each device along that "stack" in > order to get a match. If a user specifies a idProduct sysfs file that > is on the usb device at > /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1:1.0 we should be able > to match that up with this scsi block device, if so asked. > > Does that make more sense now? Yes, I'm happy now. And libsysfs is very helpful here. Nice work, guys. thanks, Kay ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel