linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: config questions - the hub
Date: Thu, 29 Aug 2002 23:35:50 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-103066443911356@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-103054341018960@msgid-missing>

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

      reply	other threads:[~2002-08-29 23:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-28 13:59 config questions - the hub Ajay
2002-08-29 23:35 ` Greg KH [this message]

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=marc-linux-hotplug-103066443911356@msgid-missing \
    --to=greg@kroah.com \
    --cc=linux-hotplug@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).