(please keep me Cc'ed, I'm not subscribed to linux-usb-devel)
Hi,
it seems that recent kernels (I'm using the Fedora 2.6.11-1.1268_FC4
kernel which I believe is based off 2.6.12-rc3 and AFAIK it doesn't have
any invasive patches in that area) has changed behavior wrt hotplug
event ordering. In [1], I've attached the debug output from
linux-hotplug. Here are the interesting bits:
728 usb path=/devices/pci0000:00/0000:00:1d.1/usb3/3-2
729 scsi_host path=/class/scsi_host/host9
physdevpath=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9
730 usb (interface)
path=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0
731 scsi
path=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:0/9:0:0:0
732 block path=/block/sda
physdevpath=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:0/9:0:0:0
733 block path=/block/sda1
physdevpath=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:0/9:0:0:0
734 scsi_device path=/class/scsi_device/9:0:0:0
physdevpath=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:0/9:0:0:0
The change I'm seeing from earlier kernels (recent I believe) is that
the hotplug events for scsi_host comes before the one for the USB
interface. Earlier behavior was a lot more sane as the PHYSDEVPATH for
scsi_host references the path that the USB interface gives. Now, for
event 729, we're referencing this path
/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9
but we haven't got the hotplug event for
/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0
yet since we only get that in event 730.
Can anyone confirm that this is a bug? It sure breaks hal, and probably
other user space software, in pretty marvelous ways as user space needs
to process the hotplug events in order without waiting for future
events.
Thank you,
David
[1] :
Apr 27 15:41:22 daxter kernel: usb 3-2: new full speed USB device using
uhci_hcd and address 11
Apr 27 15:41:22 daxter kernel: scsi9 : SCSI emulation for USB Mass Storage
devices
Apr 27 15:41:22 daxter default.hotplug[16525]: arguments (usb) env
(SUBSYSTEM=usb OLDPWD=/ DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug UDEV_LOG=3
MANAGED_EVENT=1 UDEVD_EVENT=1 SHLVL=1 HOME=/ PHYSDEVDRIVER=usb DEBUG=yes
PHYSDEVBUS=usb SEQNUM=728 _=/bin/env)
Apr 27 15:41:22 daxter default.hotplug[16525]: invoke /etc/hotplug/usb.agent ()
Apr 27 15:41:22 daxter default.hotplug[16536]: arguments (scsi_host) env
(PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9
SUBSYSTEM=scsi_host OLDPWD=/ DEVPATH=/class/scsi_host/host9
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug UDEV_LOG=3
MANAGED_EVENT=1 UDEVD_EVENT=1 SHLVL=1 HOME=/ DEBUG=yes SEQNUM=729 _=/bin/env)
Apr 27 15:41:22 daxter default.hotplug[16536]: no runnable
/etc/hotplug/scsi_host.agent is installed
Apr 27 15:41:22 daxter default.hotplug[16544]: arguments (usb) env
(SUBSYSTEM=usb OLDPWD=/
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add
MODALIAS=usb:v066Fp8000dl0001dh0001dc00dsc00dp00ic08isc06ip50 PWD=/etc/hotplug
UDEV_LOG=3 MANAGED_EVENT=1 UDEVD_EVENT=1 SHLVL=1 HOME=/
DEVICE=/proc/bus/usb/003/011 PHYSDEVDRIVER=usb-storage INTERFACE=8/6/80
PRODUCT=66f/8000/1 TYPE=0/0/0 DEBUG=yes PHYSDEVBUS=usb SEQNUM=730 _=/bin/env)
Apr 27 15:41:22 daxter default.hotplug[16544]: invoke /etc/hotplug/usb.agent ()
Apr 27 15:41:24 daxter usb.agent[16544]: Setup usb-storage usb-storage for USB
product 66f/8000/1
Apr 27 15:41:27 daxter kernel: Vendor: Model: JetFlash
Rev: 0001
Apr 27 15:41:27 daxter kernel: Type: Direct-Access
ANSI SCSI revision: 04
Apr 27 15:41:27 daxter kernel: SCSI device sda: 251903 512-byte hdwr sectors
(129 MB)
Apr 27 15:41:27 daxter kernel: sda: Write Protect is off
Apr 27 15:41:27 daxter kernel: sda: assuming drive cache: write through
Apr 27 15:41:27 daxter kernel: SCSI device sda: 251903 512-byte hdwr sectors
(129 MB)
Apr 27 15:41:27 daxter kernel: sda: Write Protect is off
Apr 27 15:41:27 daxter kernel: sda: assuming drive cache: write through
Apr 27 15:41:27 daxter kernel: sda: sda1
Apr 27 15:41:27 daxter kernel: Attached scsi removable disk sda at scsi9,
channel 0, id 0, lun 0
Apr 27 15:41:27 daxter default.hotplug[16585]: arguments (scsi) env
(SUBSYSTEM=scsi OLDPWD=/
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:0/9:0:0:0
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug UDEV_LOG=3
MANAGED_EVENT=1 UDEVD_EVENT=1 SHLVL=1 HOME=/ PHYSDEVDRIVER=sd DEBUG=yes
PHYSDEVBUS=scsi SEQNUM=733 _=/bin/env)
Apr 27 15:41:27 daxter default.hotplug[16595]: arguments (block) env
(PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:0/9:0:0:0
SUBSYSTEM=block OLDPWD=/ DEVPATH=/block/sda MINOR=0
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug UDEV_LOG=3
MAJOR=8 MANAGED_EVENT=1 UDEVD_EVENT=1 DEVNAME=/dev/sda SHLVL=1 HOME=/
PHYSDEVDRIVER=sd DEBUG=yes PHYSDEVBUS=scsi SEQNUM=731 _=/bin/env)
Apr 27 15:41:27 daxter default.hotplug[16595]: no runnable
/etc/hotplug/block.agent is installed
Apr 27 15:41:27 daxter default.hotplug[16585]: invoke /etc/hotplug/scsi.agent ()
Apr 27 15:41:27 daxter scsi.agent[16585]: disk at
/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:0/9:0:0:0
Apr 27 15:41:28 daxter default.hotplug[16617]: arguments (block) env
(PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:0/9:0:0:0
SUBSYSTEM=block OLDPWD=/ DEVPATH=/block/sda/sda1 MINOR=1
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug UDEV_LOG=3
MAJOR=8 MANAGED_EVENT=1 UDEVD_EVENT=1 DEVNAME=/dev/sda1 SHLVL=1 HOME=/
PHYSDEVDRIVER=sd DEBUG=yes PHYSDEVBUS=scsi SEQNUM=732 _=/bin/env)
Apr 27 15:41:28 daxter default.hotplug[16617]: no runnable
/etc/hotplug/block.agent is installed
Apr 27 15:41:28 daxter default.hotplug[16610]: arguments (scsi_device) env
(PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:0/9:0:0:0
SUBSYSTEM=scsi_device OLDPWD=/ DEVPATH=/class/scsi_device/9:0:0:0
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug UDEV_LOG=3
MANAGED_EVENT=1 UDEVD_EVENT=1 SHLVL=1 HOME=/ PHYSDEVDRIVER=sd DEBUG=yes
PHYSDEVBUS=scsi SEQNUM=734 _=/bin/env)
Apr 27 15:41:28 daxter default.hotplug[16610]: no runnable
/etc/hotplug/scsi_device.agent is installed
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel