From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Zeuthen Date: Wed, 27 Apr 2005 20:21:23 +0000 Subject: usb-storage bug in 2.6.12-rc3 Message-Id: <1114633284.16803.17.camel@daxter.boston.redhat.com> 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 (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=3D/devices/pci0000:00/0000:00:1d.1/usb3/3= -2 729 scsi_host path=3D/class/scsi_host/host9 = =20 physdevpath=3D/devices/pci0000:00/0000:00:1d.1/usb3/3= -2/3-2:1.0/host9 730 usb (interface) path=3D/devices/pci0000:00/0000:00:1d.1/usb3/3= -2/3-2:1.0 731 scsi path=3D/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=3D/block/sda physdevpath=3D/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=3D/block/sda1 physdevpath=3D/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=3D/class/scsi_device/9:0:0:0 physdevpath=3D/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=20 /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9 but we haven't got the hotplug event for=20 /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=20 [1] : Apr 27 15:41:22 daxter kernel: usb 3-2: new full speed USB device using uhc= i_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 (SUBSYST= EM=3Dusb OLDPWD=3D/ DEVPATH=3D/devices/pci0000:00/0000:00:1d.1/usb3/3-2 PAT= H=3D/bin:/sbin:/usr/sbin:/usr/bin ACTION=ADd PWD=3D/etc/hotplug UDEV_LOG=3D= 3 MANAGED_EVENT=3D1 UDEVD_EVENT=3D1 SHLVL=3D1 HOME=3D/ PHYSDEVDRIVER=3Dusb = DEBUG=3Dyes PHYSDEVBUS=3Dusb SEQNUMr8 _=3D/bin/env) Apr 27 15:41:22 daxter default.hotplug[16525]: invoke /etc/hotplug/usb.agen= t () Apr 27 15:41:22 daxter default.hotplug[16536]: arguments (scsi_host) env (P= HYSDEVPATH=3D/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9 SUBSYS= TEM=3Dscsi_host OLDPWD=3D/ DEVPATH=3D/class/scsi_host/host9 PATH=3D/bin:/sb= in:/usr/sbin:/usr/bin ACTION=ADd PWD=3D/etc/hotplug UDEV_LOG=3D3 MANAGED_EV= ENT=3D1 UDEVD_EVENT=3D1 SHLVL=3D1 HOME=3D/ DEBUG=3Dyes SEQNUMr9 _=3D/bin/en= v) Apr 27 15:41:22 daxter default.hotplug[16536]: no runnable /etc/hotplug/scs= i_host.agent is installed Apr 27 15:41:22 daxter default.hotplug[16544]: arguments (usb) env (SUBSYST= EM=3Dusb OLDPWD=3D/ DEVPATH=3D/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2= :1.0 PATH=3D/bin:/sbin:/usr/sbin:/usr/bin ACTION=ADd MODALIAS=3Dusb:v066Fp8= 000dl0001dh0001dc00dsc00dp00ic08isc06ip50 PWD=3D/etc/hotplug UDEV_LOG=3D3 M= ANAGED_EVENT=3D1 UDEVD_EVENT=3D1 SHLVL=3D1 HOME=3D/ DEVICE=3D/proc/bus/usb/= 003/011 PHYSDEVDRIVER=3Dusb-storage INTERFACE=3D8/6/80 PRODUCTff/8000/1 TYP= E=3D0/0/0 DEBUG=3Dyes PHYSDEVBUS=3Dusb SEQNUMs0 _=3D/bin/env) Apr 27 15:41:22 daxter default.hotplug[16544]: invoke /etc/hotplug/usb.agen= t () 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 sector= s (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 sector= s (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, c= hannel 0, id 0, lun 0 Apr 27 15:41:27 daxter default.hotplug[16585]: arguments (scsi) env (SUBSYS= TEM=3Dscsi OLDPWD=3D/ DEVPATH=3D/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3= -2:1.0/host9/target9:0:0/9:0:0:0 PATH=3D/bin:/sbin:/usr/sbin:/usr/bin ACTIO= N=ADd PWD=3D/etc/hotplug UDEV_LOG=3D3 MANAGED_EVENT=3D1 UDEVD_EVENT=3D1 SHL= VL=3D1 HOME=3D/ PHYSDEVDRIVER=3Dsd DEBUG=3Dyes PHYSDEVBUS=3Dscsi SEQNUMs3 _= =3D/bin/env) Apr 27 15:41:27 daxter default.hotplug[16595]: arguments (block) env (PHYSD= EVPATH=3D/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:= 0/9:0:0:0 SUBSYSTEM=3Dblock OLDPWD=3D/ DEVPATH=3D/block/sda MINOR=3D0 PATH= =3D/bin:/sbin:/usr/sbin:/usr/bin ACTION=ADd PWD=3D/etc/hotplug UDEV_LOG=3D3= MAJOR=3D8 MANAGED_EVENT=3D1 UDEVD_EVENT=3D1 DEVNAME=3D/dev/sda SHLVL=3D1 H= OME=3D/ PHYSDEVDRIVER=3Dsd DEBUG=3Dyes PHYSDEVBUS=3Dscsi SEQNUMs1 _=3D/bin/= env) Apr 27 15:41:27 daxter default.hotplug[16595]: no runnable /etc/hotplug/blo= ck.agent is installed Apr 27 15:41:27 daxter default.hotplug[16585]: invoke /etc/hotplug/scsi.age= nt () 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 (PHYSD= EVPATH=3D/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/target9:0:= 0/9:0:0:0 SUBSYSTEM=3Dblock OLDPWD=3D/ DEVPATH=3D/block/sda/sda1 MINOR=3D1 = PATH=3D/bin:/sbin:/usr/sbin:/usr/bin ACTION=ADd PWD=3D/etc/hotplug UDEV_LOG= =3D3 MAJOR=3D8 MANAGED_EVENT=3D1 UDEVD_EVENT=3D1 DEVNAME=3D/dev/sda1 SHLVL= =3D1 HOME=3D/ PHYSDEVDRIVER=3Dsd DEBUG=3Dyes PHYSDEVBUS=3Dscsi SEQNUMs2 _= =3D/bin/env) Apr 27 15:41:28 daxter default.hotplug[16617]: no runnable /etc/hotplug/blo= ck.agent is installed Apr 27 15:41:28 daxter default.hotplug[16610]: arguments (scsi_device) env = (PHYSDEVPATH=3D/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9/targ= et9:0:0/9:0:0:0 SUBSYSTEM=3Dscsi_device OLDPWD=3D/ DEVPATH=3D/class/scsi_de= vice/9:0:0:0 PATH=3D/bin:/sbin:/usr/sbin:/usr/bin ACTION=ADd PWD=3D/etc/hot= plug UDEV_LOG=3D3 MANAGED_EVENT=3D1 UDEVD_EVENT=3D1 SHLVL=3D1 HOME=3D/ PHYS= DEVDRIVER=3Dsd DEBUG=3Dyes PHYSDEVBUS=3Dscsi SEQNUMs4 _=3D/bin/env) Apr 27 15:41:28 daxter default.hotplug[16610]: no runnable /etc/hotplug/scs= i_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 _______________________________________________ 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