From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Thu, 29 Aug 2002 23:35:50 +0000 Subject: Re: config questions - the hub Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Aug 28, 2002 at 02:59:47PM +0100, Ajay wrote: > > So my thought process was this: > 1. Communicate with the hub and check the devices > plugged in at present. No, you can not talk to a USB hub directly. Look for the devices themselves, if they are present, you can talk to them. > 2. Check if any of them are storage devices (is this > possible using ioctls?) Look at the info in /proc/bus/usb/devices (the descriptor). That will tell you if they are storage devices. You can also read the USB descriptor through usbfs by doing a simple read(). > 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 :(. Heh, the USB core registers that number, and then doles out the minor numbers as they are needed (or when drivers that need them are registered.) It doesn't mean that someone is actually using that number at that time. Hope this helps, greg k-h ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ 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