linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Questions on hotplug with 2.6 kernels
@ 2004-09-09  0:00 Peter B. West
  2004-09-09  1:52 ` Marco d'Itri
  0 siblings, 1 reply; 2+ messages in thread
From: Peter B. West @ 2004-09-09  0:00 UTC (permalink / raw)
  To: linux-hotplug

I am attempting to set up hotplug for my USB adsl modem on a Fedora 2 
system.  I notice that FC2 does not include a /etc/rc.s/init.d/hotplug 
file.  Any idea why not?  Any idea what process FC2 uses to set up hotplug?

I have a number of questions about the 2.6 kernel support in hotplug. 
If this is completely unnecessary to getting hotplug working well, 
please just refer me to what I need to get that going, and ignore the 
questions that follow.

In /etc/hotplug/usb.rc is the following:

usb_boot_events ()
{
         #
         # FIXME on 2.5, /sys/bus/usb/devices/* gives all of the
         # info we need.  Interface hotplug events come from the
         # "*:*" files, and device events (do them first) come
         # from the others.
         #
         # don't expect usbmodules to exist!!  and remove the
         # dependency (below) on usbfs to decide whether we should
         # be synthesizing coldplug events.
         #

         # synthesize hotplug events if we can
         # we need (non-bash) programs to parse descriptors.
         LISTER=`which usbmodules`
         if [ "$LISTER" = "" -o ! -f /proc/bus/usb/devices ]; then
                 echo $"** can't synthesize root hub events"
                 return
         fi

I have some questions about this.  Is the "dependency (below) on usbfs" 
the "[ "$LISTER" = "" -o ! -f /proc/bus/usb/devices ]" test?

What changes do I need to make to support the 2.6 kernel?  What is made 
redundant by /sys/bus/usb/devices/* ?  Is usbmodules required in 2.6?

On my system, /sys/bus/usb/devices/ has
1-0:1.0  2-0:1.0  2-3  2-3:1.0  3-0:1.0  usb1  usb2  usb3

According to the comment, "device events (do them first)" come from the 
usb[1-3] files.  Does the "do them first" refer to the changes to the 
code, or the order of processing the files?  What code is made redundant 
by these device events?  How do I extract device events from these files?

The 1-0:1.0, 2-0:1.0, 2-3, 2-3:1.0, 3-0:1.0 files provide the interface 
hotplug events.  How do I access these?  What code is made redundant by 
them?

In the above configuration, I have only one device connected.  From 
/proc/bus/usb/devices
T:  Bus\x02 Lev\x01 Prnt\x01 Port\x02 Cnt\x01 Dev#=  2 Spd\x12  MxCh= 0
D:  Ver= 1.10 Clsÿ(vend.) Subÿ Protÿ MxPSd #Cfgs=  1
P:  Vendor 01 ProdIDQ00 Rev= 1.00
S:  Manufacturer=GlobespanVirata, Inc.
S:  Product=USB-ADSL Modem

I presume that the Bus\x02, Port\x02, Dev#= 2 translates into 2-3:1.0.

All hints gratefully received.

Peter


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id\x10808&op=click
_______________________________________________
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

* Re: Questions on hotplug with 2.6 kernels
  2004-09-09  0:00 Questions on hotplug with 2.6 kernels Peter B. West
@ 2004-09-09  1:52 ` Marco d'Itri
  0 siblings, 0 replies; 2+ messages in thread
From: Marco d'Itri @ 2004-09-09  1:52 UTC (permalink / raw)
  To: linux-hotplug

On Sep 09, "Peter B. West" <lists@pbw.id.au> wrote:

> What changes do I need to make to support the 2.6 kernel?  What is made 
> redundant by /sys/bus/usb/devices/* ?  Is usbmodules required in 2.6?
It's not. If you want decent support for USB cold plugging I suggest you
look at the patches in the debian package (which I still had no time to
rediff against the latest hotplug release and submit for merging, sorry)
because currently it's badly broken.

http://ftp.au.debian.org/debian/pool/main/h/hotplug/hotplug_0.0.20040329-15.diff.gz

(Look in the debian/patches/ directory.)

-- 
ciao, |
Marco | [7873 praXhmDf0i4aM]


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id\x10808&op=click
_______________________________________________
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:[~2004-09-09  1:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-09  0:00 Questions on hotplug with 2.6 kernels Peter B. West
2004-09-09  1:52 ` Marco d'Itri

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