From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?q?Ajay?= Date: Wed, 28 Aug 2002 13:59:47 +0000 Subject: Re: config questions - the hub Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org > Why do you want to talk to the root uhci hub? Why > would you want to > talk to _any_ hub for that matter? You can't really > do anything with > them. I am trying to make a utility that is VID-PID independent, checks if a device is a storage device, issues SCSI commands to check the number of LUNS, issues SCSI commands to check media presence, and mounts the media. This is because I had trouble with a SCM Orca reader - I had to enter a vid - pid match in usb.usermap and a corresponding driver in /etc/hotplug/usb, but I dont want to do that for every storage device. This is simply because my system _has_ the necessary driver (usb-storage) that works for most storage devices. I wasnted to go the extra step and automate everything - mount the media and put the icon on the desktop and anything else necessary without the (naive) user having to do anything, provided the device is a storage device. I'm not sure if this can be achieved in hotplug straightaway - AFAICS we have to enter the VID-PID (if the system doesn't have it already.) So my thought process was this: 1. Communicate with the hub and check the devices plugged in at present. 2. Check if any of them are storage devices (is this possible using ioctls?) 3. Check if a corresponding SCSI enumeration is found in /proc/scsi/usb-strorage-#. 4. Then issue SCSI commands and verify stuff - LUNs, Media presence, etc. 5. Mount, put icon , do whatever necessary. I wanted to communicate with the hub simply because I thought it would be faster than opening /proc/bus/usb/devices everytime and reading each line. I'm not sure if I'm right in this regard though. I would appreciate any insight into this. > > And device 180 0 is for a USB printer, not a USB > hub. See the list at: > http://www.linux-usb.org/usb.devices.txt > for more info on the reserved USB major:minor > numbers. But /proc/devices lists 180 usb and 180 is the major device number. I did not have any other usb device plugged in at the time, so I reasoned it must have been the hub. Guess I was wrong :(. Thanks and regards - Ajay ==/*------------------------------*\ *----A Ajay Srinivasan ----* * a_ajay_sr@yahoo.com * \*------------------------------*/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in! http://www.jabber.com/osdn/xim _______________________________________________ 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