Questions on hotplug with 2.6 kernels
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 Lev Prnt Port Cnt Dev#= 2 Spd 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, Port, 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_id808&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Peter B. West
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.)
Signature · 13 lines
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_id808&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel