linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Peter B. West" <lists@pbw.id.au>
To: linux-hotplug@vger.kernel.org
Subject: Questions on hotplug with 2.6 kernels
Date: Thu, 09 Sep 2004 00:00:26 +0000	[thread overview]
Message-ID: <413F9D1A.2020001@pbw.id.au> (raw)

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

             reply	other threads:[~2004-09-09  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-09  0:00 Peter B. West [this message]
2004-09-09  1:52 ` Questions on hotplug with 2.6 kernels Marco d'Itri

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=413F9D1A.2020001@pbw.id.au \
    --to=lists@pbw.id.au \
    --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).