linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* usb-storage bug in 2.6.12-rc3
@ 2005-04-27 20:21 David Zeuthen
  2005-04-27 21:21 ` [linux-usb-devel] " Alan Stern
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: David Zeuthen @ 2005-04-27 20:21 UTC (permalink / raw)
  To: linux-hotplug


(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­d PWD=/etc/hotplug UDEV_LOG=3 MANAGED_EVENT=1 UDEVD_EVENT=1 SHLVL=1 HOME=/ PHYSDEVDRIVER=usb DEBUG=yes PHYSDEVBUS=usb SEQNUMr8 _=/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­d PWD=/etc/hotplug UDEV_LOG=3 MANAGED_EVENT=1 UDEVD_EVENT=1 SHLVL=1 HOME=/ DEBUG=yes SEQNUMr9 _=/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­d 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 PRODUCTff/8000/1 TYPE=0/0/0 DEBUG=yes PHYSDEVBUS=usb SEQNUMs0 _=/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­d PWD=/etc/hotplug UDEV_LOG=3 MANAGED_EVENT=1 UDEVD_EVENT=1 SHLVL=1 HOME=/ PHYSDEVDRIVER=sd DEBUG=yes PHYSDEVBUS=scsi SEQNUMs3 _=/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­d 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 SEQNUMs1 _=/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­d 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 SEQNUMs2 _=/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­d PWD=/etc/hotplug UDEV_LOG=3 MANAGED_EVENT=1 UDEVD_EVENT=1 SHLVL=1 HOME=/ PHYSDEVDRIVER=sd DEBUG=yes PHYSDEVBUS=scsi SEQNUMs4 _=/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\x105hix
_______________________________________________
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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2005-05-18 17:03 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-27 20:21 usb-storage bug in 2.6.12-rc3 David Zeuthen
2005-04-27 21:21 ` [linux-usb-devel] " Alan Stern
2005-04-27 23:14 ` Patrick Mansfield
2005-04-28  0:47 ` Kay Sievers
2005-04-28  4:34 ` Greg KH
2005-04-28 10:21 ` Kay Sievers
2005-04-28 13:35 ` E. Oltmanns
2005-04-28 14:15 ` Patrick Mansfield
2005-04-29 14:23 ` E. Oltmanns
2005-04-29 18:23 ` [linux-usb-devel] " Roman Kagan
2005-04-29 19:28 ` David Brownell
2005-04-29 19:35 ` Oliver Neukum
2005-04-29 20:00 ` Greg KH
2005-04-29 20:01 ` Greg KH
2005-04-29 20:16 ` Oliver Neukum
2005-04-29 20:50 ` David Brownell
2005-04-29 21:07 ` David Zeuthen
2005-05-04  7:05 ` Roman Kagan
2005-05-18 14:19 ` David Zeuthen
2005-05-18 17:03 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).