From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Peter B. West" Date: Thu, 09 Sep 2004 00:00:26 +0000 Subject: Questions on hotplug with 2.6 kernels Message-Id: <413F9D1A.2020001@pbw.id.au> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org I am attempting to set up hotplug for my USB adsl modem on a Fedora 2=20 system. I notice that FC2 does not include a /etc/rc.s/init.d/hotplug=20 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.=20 If this is completely unnecessary to getting hotplug working well,=20 please just refer me to what I need to get that going, and ignore the=20 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=3D`which usbmodules` if [ "$LISTER" =3D "" -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"=20 the "[ "$LISTER" =3D "" -o ! -f /proc/bus/usb/devices ]" test? What changes do I need to make to support the 2.6 kernel? What is made=20 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=20 usb[1-3] files. Does the "do them first" refer to the changes to the=20 code, or the order of processing the files? What code is made redundant=20 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=20 hotplug events. How do I access these? What code is made redundant by=20 them? In the above configuration, I have only one device connected. From=20 /proc/bus/usb/devices T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=3D 2 Spd=12 MxCh=3D 0 D: Ver=3D 1.10 Cls=FF(vend.) Sub=FF Prot=FF MxPSd #Cfgs=3D 1 P: Vendor 01 ProdIDQ00 Rev=3D 1.00 S: Manufacturer=3DGlobespanVirata, Inc. S: Product=3DUSB-ADSL Modem I presume that the Bus=02, Port=02, Dev#=3D 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=10808&op=3Dclick _______________________________________________ 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