Beffe | 30 Aug 2002 23:51
Picon

help for loading pwc module


Hi List,

first thanks for your great work on hotplug, i like it.

Now i have a Philips Webcam, the PCVC680K "Vesta Pro" and i don't know
how to tell hotplug to load the pwc module.

when i plug it in, hotplug says: 
{syslog}/etc/hotplug/usb.agent: ... no modules for USB product 471/308/6

the entry in /proc/bus/usb/devices looks like this:

T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#=  6 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0471 ProdID=0308 Rev= 0.06
S:  SerialNumber=02130211A0105BF5
C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=(none)
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 0 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=(none)
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 196 Ivl=1ms
I:  If#= 0 Alt= 2 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=(none)
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 292 Ivl=1ms
I:  If#= 0 Alt= 3 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=(none)
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 448 Ivl=1ms
(Continue reading)

Greg KH | 26 Aug 2002 20:07
Gravatar

[ANNOUNCE] 2002-08-26 release of hotplug scripts

I've just packaged up the latest Linux hotplug scripts into a release,
which can be found at:
 	http://sourceforge.net/project/showfiles.php?group_id=17679

Or from your favorite kernel.org mirror at:
	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2002_08-26.tar.gz

I've also packaged up a Red Hat 7.3 based rpm:
	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2002_08-26-1.noarch.rpm

The source rpm is available if you want to rebuild it for other distros
at:
	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2002_08_26-1.src.rpm

The main web site for the linux-hotplug project can be found at:
	http://linux-hotplug.sf.net/
which contains lots of documentation on the whole linux-hotplug
process.  There are also links to kernel patches, not currently in the
main kernel tree, that provide hotplug functionality to new subsystems
(like CPU, SCSI, Memory, etc.)

The main changes in this release are the following:
	- fix for USB hotplugging to search /etc/hotplug/usb/*.usermap

Here's the changes (and who made them) from the last release:
    Changes from David Brownell
        - load_drivers(): variables are local, and doesn't try
          usbmodules unless the $DEVICE file exists (it'd fail)
        - update hotplug.8 manpage to mention Max'patch
        - patch from Max Krasnyanskiy, now  usb hotplugging also
(Continue reading)

Greg KH | 26 Aug 2002 20:52
Gravatar

Re: [ANNOUNCE] 2002-08-26 release of hotplug scripts

On Mon, Aug 26, 2002 at 11:07:30AM -0700, Greg KH wrote:
> 
> Or from your favorite kernel.org mirror at:
> 	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2002_08-26.tar.gz

Oops, that should be:
	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2002_08_26.tar.gz

> I've also packaged up a Red Hat 7.3 based rpm:
> 	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2002_08-26-1.noarch.rpm

and:
	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2002_08_26-1.noarch.rpm

Thanks to Stephen Gowdy for pointing this out to me.

greg k-h
Ian Walters | 26 Aug 2002 07:50

config questions

Hi,

Sorry if this sounds like a newbie question, but the search on the archives 
kind of suck.

I just finished (successfully after much pain) get hotplug to initialize a 
device for me when it was plugged in.  But to do this I had to bypass all of 
the existing net.agent script.

I am guessing I didn't find the right documentation.  I will tell you what I 
did and hopefully someone can tell me what I should have done.

Have usbnet loaded as a module.

in /etc/hotplug/net.agent  before anything, do 

mesg Checking for subscript for $INTERFACE $ACTION
if [ -x "/etc/hotplug/interfaces/$INTERFACE" ] ; then
    mesg Calling subscript for $INTERFACE $ACTION
    /etc/hotplug/interfaces/$INTERFACE $ACTION
    exit 0
fi

and in /etc/hotplug/interfaces reacted to the arguments registered and 
derigistered to do what I needed for /dev/usb0

Ideally I would always like to say... for devX put file into interfaces/devX 
and in that file do X for plugged in and Y for unplugged.  Just like the 
init.d scripts.

(Continue reading)

David Brownell | 27 Aug 2002 16:53

Re: config questions

> I just finished (successfully after much pain) get hotplug to initialize a 
> device for me when it was plugged in.  But to do this I had to bypass all of 
> the existing net.agent script.

Hmm, you didn't say what Linux distro you're using.  They differ
in how they manage network interfaces ... though there does seem
to be a common failing of requring interfaces to be predefined,
combined with inadequate (or even incorrect) documentation on
how to predefine them.

But then it's complicated by the fact that different network devices
all have different initialization models.  At least some of those
issues are already noted in the net.agent script.

> I am guessing I didn't find the right documentation.  I will tell you what I 
> did and hopefully someone can tell me what I should have done.
> 
> Have usbnet loaded as a module.

Not necessary, it'll be modprobed when needed.  Did you look at

         http://www.linux-usb.org/usbnet/

for information about this driver?  Your question made me push out
some pending updates, which should get synced to the mirrors sometime
tonight (document date 28 August).  More examples, including zcip,
but not yet a complete "out of the box" config example (except for a
simple laptop/desktop setup).

The configuration I'd like to see work is basically combining the
(Continue reading)

Ajay | 28 Aug 2002 06:13
Picon
Favicon

Re: config questions


> > and in /etc/hotplug/interfaces reacted to the
> arguments registered and 
> > derigistered to do what I needed for /dev/usb0
> 
> There's no such thing as /dev/usb0!  :)

Is this the usb hub? I can't find usb0 in my system
either(RHL 7.3), but /proc/devices lists "180 usb". I
tried 
mknod /dev/usb/hub c 180 0 
but it didn't seem to point to the hub ('open' failed
: "No such device"). What is the device file for the
USB-UHCI hub?

AFAICS hotplug checks the file /proc/bus/usb/devices.
Why not communicate with the hub directly using ioctl
calls? 

Thanks and regards
-Ajay

__________________________________________________
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 
(Continue reading)

Greg KH | 28 Aug 2002 07:21
Gravatar

Re: config questions

On Wed, Aug 28, 2002 at 05:13:04AM +0100, Ajay wrote:
> 
> > > and in /etc/hotplug/interfaces reacted to the
> > arguments registered and 
> > > derigistered to do what I needed for /dev/usb0
> > 
> > There's no such thing as /dev/usb0!  :)
> 
> Is this the usb hub? I can't find usb0 in my system
> either(RHL 7.3), but /proc/devices lists "180 usb". I
> tried 
> mknod /dev/usb/hub c 180 0 
> but it didn't seem to point to the hub ('open' failed
> : "No such device"). What is the device file for the
> USB-UHCI hub?

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.

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.

> AFAICS hotplug checks the file /proc/bus/usb/devices.
> Why not communicate with the hub directly using ioctl
> calls? 

If you _really_ want to send an ioctl command to a USB hub, you have to
do it through usbfs, which is mounted at /proc/bus/usb usually.  You
(Continue reading)

Ajay | 28 Aug 2002 15:59
Picon
Favicon

Re: config questions - the hub

> 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?)
(Continue reading)

Greg KH | 30 Aug 2002 01:35
Gravatar

Re: config questions - the hub

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

(Continue reading)

Ian Walters | 28 Aug 2002 01:50

Re: config questions

On Wed, 28 Aug 2002 12:53 am, David Brownell wrote:
> > I just finished (successfully after much pain) get hotplug to initialize
> > a device for me when it was plugged in.  But to do this I had to bypass
> > all of the existing net.agent script.
>
> Hmm, you didn't say what Linux distro you're using.  They differ
> in how they manage network interfaces ... though there does seem
> to be a common failing of requring interfaces to be predefined,
> combined with inadequate (or even incorrect) documentation on
> how to predefine them.
>

Using SuSE 8.0 at the moment.

> But then it's complicated by the fact that different network devices
> all have different initialization models.  At least some of those
> issues are already noted in the net.agent script.
>
> > I am guessing I didn't find the right documentation.  I will tell you
> > what I did and hopefully someone can tell me what I should have done.
> >
> > Have usbnet loaded as a module.
>
> Not necessary, it'll be modprobed when needed.  Did you look at
>
>          http://www.linux-usb.org/usbnet/

admittedly not.  It was already part of my kernel source code and worked 
without me having to do anything, so I didn't do anything :)

(Continue reading)


Gmane