PROBLEM: /sbin/hotplug does not receive PRODUCT and ACTION
environment vars on Visor USB hotplug
The hotplug documentation states that whenever a hot-pluggable
device is connected (SCSI/USB), the
/sbin/hotplug program is invoked and the PRODUCT and ACTION
variables are set in the environment. Indeed
this works properly on my Red Hat 8 system, using kernel
2.4.23-pre5. However, the same system fails to
set the variables when kernel 2.6.0-test7-bk5 is used.
Keywords: hotplug usb visor
Kernel version (/proc/version): Linux version 2.6.0-test7-bk5
([EMAIL PROTECTED]) (gcc versi�n 3.2 20020903 (Red Hat
Linux 8.0 3.2-7)) #2 Wed Oct 15 11:24:26 ECT 2003
Software: (output of ver_linux)
-------------------------------
If some fields are empty or look unusual you may have an old
version.
Compare to the current minimal requirements in
Documentation/Changes.
Linux srv64.palosanto.com 2.6.0-test7-bk5 #2 Wed Oct 15 11:24:26
ECT 2003 i686 i686 i386 GNU/Linux
Gnu C 3.2
Gnu make 3.79.1
util-linux 2.11r
mount 2.11r
module-init-tools 0.9.14
e2fsprogs 1.27
jfsutils 1.0.17
reiserfsprogs 3.6.2
pcmcia-cs 3.1.31
quota-tools 3.06.
PPP 2.4.1
isdn4k-utils 3.1pre4
nfs-utils 1.0.1
Linux C Library 2.2.93
Dynamic linker (ldd) 2.2.93
Procps 2.0.7
Net-tools 1.60
Kbd 1.06
Sh-utils 2.0.12
Modules Loaded visor usbserial ipt_REJECT 3c59x
af_packet iptable_filter ip_tables parport_pc parport floppy
nls_iso8859_1 nls_cp850 vfat fat hid uhci_hcd usbcore rtc
Processor information (/proc/cpuinfo)
-------------------------------------
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Pentium III (Coppermine)
stepping : 3
cpu MHz : 736.278
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 mmx fxsr sse
bogomips : 1449.98
Module information (/proc/modules)
----------------------------------
visor 15532 1 - Live 0xd886e000
usbserial 26220 1 visor, Live 0xd88c8000
ipt_REJECT 5632 2 - Live 0xd88ab000
3c59x 35400 0 - Live 0xd88b4000
af_packet 17636 0 - Live 0xd88a2000
iptable_filter 2080 1 - Live 0xd886c000
ip_tables 16624 2 ipt_REJECT,iptable_filter, Live 0xd8873000
parport_pc 32556 0 - Live 0xd8899000
parport 36736 1 parport_pc, Live 0xd888f000
floppy 55988 0 - Live 0xd8880000
nls_iso8859_1 3648 2 - Live 0xd8803000
nls_cp850 4480 2 - Live 0xd8826000
vfat 12512 2 - Live 0xd8867000
fat 40512 1 vfat, Live 0xd8809000
hid 31360 0 - Live 0xd881d000
uhci_hcd 30856 0 - Live 0xd8814000
usbcore 107764 6 visor,usbserial,hid,uhci_hcd, Live 0xd8829000
rtc 10920 0 - Live 0xd8805000
Contents of /proc/ioports:
-------------------------
0000-001f : dma1
0020-0021 : pic1
0040-005f : timer
0060-006f : keyboard
0070-0077 : rtc
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
01f0-01f7 : ide0
02f8-02ff : serial
0376-0376 : ide1
0378-037a : parport0
037b-037f : parport0
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial
0cf8-0cff : PCI conf1
a800-a81f : 0000:00:0c.0
b000-b01f : 0000:00:0c.0
b400-b47f : 0000:00:0b.0
b400-b47f : 0000:00:0b.0
b800-b807 : 0000:00:09.1
d000-d01f : 0000:00:09.0
d400-d41f : 0000:00:04.2
d400-d41f : uhci_hcd
d800-d80f : 0000:00:04.1
d800-d807 : ide0
d808-d80f : ide1
Contents of /proc/iomem:
------------------------
00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000cc000-000cc7ff : Extension ROM
000f0000-000fffff : System ROM
00100000-17ffbfff : System RAM
00100000-002d94f2 : Kernel code
002d94f3-003958ff : Kernel data
17ffc000-17ffefff : ACPI Tables
17fff000-17ffffff : ACPI Non-volatile Storage
ce800000-ce800fff : 0000:00:0c.0
cf000000-cf000fff : 0000:00:0c.0
cf800000-cf80007f : 0000:00:0b.0
d0000000-dfdfffff : PCI Bus #01
d0000000-d3ffffff : 0000:01:00.0
d4000000-d7ffffff : 0000:01:00.0
d8000000-dbffffff : 0000:01:00.0
df000000-df07ffff : 0000:01:00.0
dff00000-e3ffffff : PCI Bus #01
e0000000-e3ffffff : 0000:01:00.0
e4000000-e7ffffff : 0000:00:00.0
ffff0000-ffffffff : reserved
PCI information (lspci -vvv):
-----------------------------
00:00.0 Host bridge: VIA Technologies, Inc. VT82C693A/694x
[Apollo PRO133x] (rev c4)
Subsystem: Asustek Computer, Inc.: Unknown device 8017
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 0
Region 0: Memory at e4000000 (32-bit, prefetchable) [size=64M]
Capabilities: [a0] AGP version 2.0
Status: RQ=31 SBA+ 64bit- FW+ Rate=x1,x2,x4
Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo
MVP3/Pro133x AGP] (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 0000e000-0000dfff
Memory behind bridge: d0000000-dfdfffff
Prefetchable memory behind bridge: dff00000-e3ffffff
BridgeCtl: Parity- SERR- NoISA- VGA+ MAbort- >Reset- FastB2B-
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:04.0 ISA bridge: VIA Technologies, Inc. VT82C596 ISA [Mobile
South] (rev 23)
Subsystem: Asustek Computer, Inc.: Unknown device 8017
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping+ SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
00:04.1 IDE interface: VIA Technologies, Inc. VT82C586B PIPC Bus
Master IDE (rev 10) (prog-if 8a [Master SecP PriP])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping+ SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Region 4: I/O ports at d800 [size=16]
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:04.2 USB Controller: VIA Technologies, Inc. USB (rev 11)
(prog-if 00 [UHCI])
Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32, cache line size 08
Interrupt: pin D routed to IRQ 5
Region 4: I/O ports at d400 [size=32]
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:04.3 Host bridge: VIA Technologies, Inc. VT82C596 Power
Management (rev 30)
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
00:09.0 Multimedia audio controller: Creative Labs SB Live!
EMU10k1 (rev 08)
Subsystem: Creative Labs CT4832 SBLive! Value
Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (500ns min, 5000ns max)
Interrupt: pin A routed to IRQ 5
Region 0: I/O ports at d000 [disabled] [size=32]
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:09.1 Input device controller: Creative Labs SB Live!
MIDI/Game Port (rev 08)
Subsystem: Creative Labs Gameport Joystick
Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Region 0: I/O ports at b800 [disabled] [size=8]
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:0b.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M
[Tornado] (rev 74)
Subsystem: 3Com Corporation 3C905C-TX Fast Etherlink for PC
Management NIC
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (2500ns min, 2500ns max), cache line size 08
Interrupt: pin A routed to IRQ 10
Region 0: I/O ports at b400 [size=128]
Region 1: Memory at cf800000 (32-bit, non-prefetchable) [size=128]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=2 PME-
00:0c.0 Multimedia audio controller: Quicknet Technologies Inc:
Unknown device 0500
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Region 0: I/O ports at b000 [disabled] [size=32]
Region 1: Memory at cf000000 (32-bit, non-prefetchable)
[disabled] [size=4K]
Region 2: I/O ports at a800 [disabled] [size=32]
Region 3: Memory at ce800000 (32-bit, non-prefetchable)
[disabled] [size=4K]
01:00.0 VGA compatible controller: S3 Inc. 86C410 Savage 2000
(rev 02) (prog-if 00 [VGA])
Subsystem: Diamond Multimedia Systems Viper II Z200
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (3000ns min, 4000ns max), cache line size 08
Interrupt: pin A routed to IRQ 11
Region 0: Memory at df000000 (32-bit, non-prefetchable) [size=512K]
Region 1: Memory at e0000000 (32-bit, prefetchable) [size=64M]
Region 2: Memory at d8000000 (32-bit, non-prefetchable) [size=64M]
Region 3: Memory at d4000000 (32-bit, non-prefetchable) [size=64M]
Region 4: Memory at d0000000 (32-bit, non-prefetchable) [size=64M]
Expansion ROM at dfff0000 [disabled] [size=64K]
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [80] AGP version 2.0
Status: RQ=31 SBA+ 64bit- FW- Rate=x1,x2,x4
Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>
Notes:
This is the output on the system log when the Visor is plugged:
Oct 3 16:05:21 srv64 kernel: hub 1-1:1.0: new USB device on
port 1, assigned address 3
Oct 3 16:05:21 srv64 kernel: usb 1-1.1: Product: Palm Handheld
Oct 3 16:05:21 srv64 kernel: usb 1-1.1: Manufacturer: Palm, Inc.
Oct 3 16:05:21 srv64 /etc/hotplug/usb.agent: Bad USB agent
invocation (PRODUCT = ACTION = add)
Oct 3 16:05:21 srv64 kernel: usb 1-1.1: SerialNumber: 00JUP8K29377
Oct 3 16:05:25 srv64 /etc/hotplug/usb.agent: ... no modules for
USB product 830/20/100
Oct 3 16:06:00 srv64 modprobe: FATAL: Module ide_probe_mod not
found.
Oct 3 16:06:00 srv64 modprobe: FATAL: Module ide_probe not found.
Oct 3 16:06:00 srv64 /etc/hotplug/usb.agent: Bad USB agent
invocation (PRODUCT
= ACTION = remove)
Oct 3 16:06:00 srv64 kernel: usb 1-1.1: USB disconnect, address 3
Oct 3 16:06:00 srv64 kernel: updfstab: numerical sysctl 1 23 is
obsolete.
I modified the hotplug scripts to capture the environment.
On 2.4.23-pre5 the environment looks like this:
DEVFS=/proc/bus/usb
OLDPWD=/etc/hotplug
PATH=/bin:/sbin:/usr/sbin:/usr/bin
ACTION=add
PWD=/etc/hotplug
HOME=/
SHLVL=1
DEVICE=/proc/bus/usb/001/004
INTERFACE=255/0/0
PRODUCT=830/20/100
TYPE=0/0/0
_=/bin/env
On 2.6.0-test7-bk5 the environment looks like this:
OLDPWD=/etc/hotplug
DEVPATH=/devices/pci0000:00/0000:00:04.2/usb1/1-1/1-1.1
PATH=/bin:/sbin:/usr/sbin:/usr/bin
ACTION=remove
PWD=/etc/hotplug
HOME=/
SHLVL=1
SEQNUM=120
_=/bin/env
------------------------------------------------------------------------
Mail enviado desde PortalMail 1.4.2 Web based email system.
PaloSanto Solutions, Sunnyvale CA.
http://www.palosanto.com
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users