linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: config questions - the hub
@ 2002-08-28 13:59 Ajay
  2002-08-29 23:35 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Ajay @ 2002-08-28 13:59 UTC (permalink / raw)
  To: linux-hotplug

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-29 23:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-28 13:59 config questions - the hub Ajay
2002-08-29 23:35 ` Greg KH

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).