linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ajay <a_ajay_sr@yahoo.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: config questions - the hub
Date: Wed, 28 Aug 2002 13:59:47 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-103054341018960@msgid-missing> (raw)

> 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

             reply	other threads:[~2002-08-28 13:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-28 13:59 Ajay [this message]
2002-08-29 23:35 ` config questions - the hub 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=marc-linux-hotplug-103054341018960@msgid-missing \
    --to=a_ajay_sr@yahoo.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).