Bug 8770

Summary: Regression: hotplug events for usb-storage broken in 2.6.22
Product: Drivers Reporter: Alex Villacis Lasso (avillaci)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Status: REJECTED INVALID    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.22 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Config file used to compile kernel

Description Alex Villacis Lasso 2007-07-16 15:31:13 UTC
Most recent kernel where this bug did not occur: 2.6.21
Distribution: Fedora 7
Hardware Environment:

[alex@srv64 linux-2.6.22]$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Celeron(R) CPU 2.80GHz
stepping        : 9
cpu MHz         : 2800.507
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
bogomips        : 5604.47
clflush size    : 64


Software Environment:

[alex@srv64 linux-2.6.22]$ sh scripts/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.22 #1 PREEMPT Mon Jul 16 15:47:10 ECT 2007 i686 i686 i386 GNU/Linux
 
Gnu C                  4.1.2
Gnu make               3.81
binutils               2.17.50.0.12-4
util-linux             2.13-pre7
mount                  2.13-pre7
module-init-tools      3.3-pre11
e2fsprogs              1.39
pcmciautils            014
quota-tools            3.14.
PPP                    2.4.4
Linux C Library        > libc.2.6
Dynamic linker (ldd)   2.6
Procps                 3.2.7
Net-tools              1.60
Kbd                    1.12
oprofile               0.9.2
Sh-utils               6.9
udev                   106
wireless-tools         28
Modules Loaded         vfat fat usb_storage hidp rfcomm l2cap bluetooth dm_mirror dm_multipath dm_mod video sbs button dock battery ac ipv6 lp loop snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event 8139cp snd_seq snd_seq_device snd_pcm_oss 8139too mii snd_mixer_oss snd_pcm parport_pc parport snd_timer snd soundcore rtc_cmos serio_raw i2c_piix4 snd_page_alloc i2c_core sr_mod cdrom sg pata_atiixp sata_sil ata_generic libata sd_mod scsi_mod ext3 jbd mbcache ehci_hcd ohci_hcd uhci_hcd
[alex@srv64 linux-2.6.22]$ 

Problem Description:

With distro kernel (2.6.21-1.3228.fc7) hotplug events work normally. gnome-volume-manager works normally with haldaemon and udevd.

With 2.6.22, kernel does not fire required hotplug event on insertion of USB flash drive. Apparently the stick is detected and no obvious errors are displayed in the log, but it is never automounted, even with haldaemon, udevd, and gnome-volume-manager running.

A workaround is to manually rmmod usb-storage, then modprobe usb-storage , without removing the stick. Then event gets fired and stick is "automounted".

Hotplug events for IDE CD-ROM (/dev/scd0) work normally even in 2.6.22.

This is what appears in the log on 2.6.22:

On plugin:

Jul 16 16:49:59 srv64 kernel: usb 3-2: new high speed USB device using ehci_hcd and address 2
Jul 16 16:49:59 srv64 kernel: usb 3-2: configuration #1 chosen from 1 choice
Jul 16 16:49:59 srv64 kernel: Initializing USB Mass Storage driver...
Jul 16 16:49:59 srv64 kernel: scsi6 : SCSI emulation for USB Mass Storage devices
Jul 16 16:49:59 srv64 kernel: usbcore: registered new interface driver usb-storage
Jul 16 16:49:59 srv64 kernel: USB Mass Storage support registered.
Jul 16 16:50:04 srv64 kernel: scsi 6:0:0:0: Direct-Access     Corsair  Flash Voyager    1100 PQ: 0 ANSI: 0 CCS
Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] 990208 512-byte hardware sectors (507 MB)
Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Write Protect is off
Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] 990208 512-byte hardware sectors (507 MB)
Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Write Protect is off
Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jul 16 16:50:04 srv64 kernel:  sdb: sdb1
Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Attached SCSI removable disk
Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0

rmmod usb-storage:

Jul 16 16:51:12 srv64 kernel: usbcore: deregistering interface driver usb-storage

modprobe usb-storage:

Jul 16 16:51:40 srv64 kernel: Initializing USB Mass Storage driver...
Jul 16 16:51:40 srv64 kernel: scsi7 : SCSI emulation for USB Mass Storage devices
Jul 16 16:51:40 srv64 kernel: usbcore: registered new interface driver usb-storage
Jul 16 16:51:40 srv64 kernel: USB Mass Storage support registered.
Jul 16 16:51:51 srv64 kernel: usb 3-2: reset high speed USB device using ehci_hcd and address 2
Jul 16 16:51:51 srv64 kernel: scsi 7:0:0:0: Direct-Access     Corsair  Flash Voyager    1100 PQ: 0 ANSI: 0 CCS
Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] 990208 512-byte hardware sectors (507 MB)
Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Write Protect is off
Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Assuming drive cache: write through
Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] 990208 512-byte hardware sectors (507 MB)
Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Write Protect is off
Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Assuming drive cache: write through
Jul 16 16:51:51 srv64 kernel:  sdb: sdb1
Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Attached SCSI removable disk
Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: Attached scsi generic sg2 type 0
Jul 16 16:51:52 srv64 hald: mounted /dev/sdb1 on behalf of uid 500


Steps to reproduce:

Run gnome-volume-manager (already running if gnome-session started)
Plug usb stick.
Expected: usb stick gets automounted without further intervention, as in 2.6.21
Actual: usb stick does not get automounted. Gets automounted after cycle of rmmod usb-storage && modprobe usb-storage
Comment 1 Alex Villacis Lasso 2007-07-16 15:34:15 UTC
Created attachment 12057 [details]
Config file used to compile kernel

This is the config file used to compile the 2.6.22 kernel which exhibits bug.
Comment 2 Anonymous Emailer 2007-07-16 15:39:58 UTC
Reply-To: akpm@linux-foundation.org

On Mon, 16 Jul 2007 15:26:07 -0700 (PDT)
bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=8770
> 
>            Summary: Regression: hotplug events for usb-storage broken in
>                     2.6.22
>            Product: Drivers
>            Version: 2.5
>      KernelVersion: 2.6.22
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: USB
>         AssignedTo: greg@kroah.com
>         ReportedBy: avillaci@ceibo.fiec.espol.edu.ec
> 
> 
> Most recent kernel where this bug did not occur: 2.6.21
> Distribution: Fedora 7
> Hardware Environment:
> 
> [alex@srv64 linux-2.6.22]$ cat /proc/cpuinfo 
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 15
> model           : 4
> model name      : Intel(R) Celeron(R) CPU 2.80GHz
> stepping        : 9
> cpu MHz         : 2800.507
> cache size      : 256 KB
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : no
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 5
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov
> pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc
> pni monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
> bogomips        : 5604.47
> clflush size    : 64
> 
> 
> Software Environment:
> 
> [alex@srv64 linux-2.6.22]$ sh scripts/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.22 #1 PREEMPT Mon Jul 16 15:47:10 ECT 2007 i686
> i686 i386 GNU/Linux
> 
> Gnu C                  4.1.2
> Gnu make               3.81
> binutils               2.17.50.0.12-4
> util-linux             2.13-pre7
> mount                  2.13-pre7
> module-init-tools      3.3-pre11
> e2fsprogs              1.39
> pcmciautils            014
> quota-tools            3.14.
> PPP                    2.4.4
> Linux C Library        > libc.2.6
> Dynamic linker (ldd)   2.6
> Procps                 3.2.7
> Net-tools              1.60
> Kbd                    1.12
> oprofile               0.9.2
> Sh-utils               6.9
> udev                   106
> wireless-tools         28
> Modules Loaded         vfat fat usb_storage hidp rfcomm l2cap bluetooth
> dm_mirror dm_multipath dm_mod video sbs button dock battery ac ipv6 lp loop
> snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event 8139cp snd_seq
> snd_seq_device snd_pcm_oss 8139too mii snd_mixer_oss snd_pcm parport_pc
> parport
> snd_timer snd soundcore rtc_cmos serio_raw i2c_piix4 snd_page_alloc i2c_core
> sr_mod cdrom sg pata_atiixp sata_sil ata_generic libata sd_mod scsi_mod ext3
> jbd mbcache ehci_hcd ohci_hcd uhci_hcd
> [alex@srv64 linux-2.6.22]$ 
> 
> Problem Description:
> 
> With distro kernel (2.6.21-1.3228.fc7) hotplug events work normally.
> gnome-volume-manager works normally with haldaemon and udevd.
> 
> With 2.6.22, kernel does not fire required hotplug event on insertion of USB
> flash drive. Apparently the stick is detected and no obvious errors are
> displayed in the log, but it is never automounted, even with haldaemon,
> udevd,
> and gnome-volume-manager running.
> 
> A workaround is to manually rmmod usb-storage, then modprobe usb-storage ,
> without removing the stick. Then event gets fired and stick is "automounted".
> 
> Hotplug events for IDE CD-ROM (/dev/scd0) work normally even in 2.6.22.
> 
> This is what appears in the log on 2.6.22:
> 
> On plugin:
> 
> Jul 16 16:49:59 srv64 kernel: usb 3-2: new high speed USB device using
> ehci_hcd
> and address 2
> Jul 16 16:49:59 srv64 kernel: usb 3-2: configuration #1 chosen from 1 choice
> Jul 16 16:49:59 srv64 kernel: Initializing USB Mass Storage driver...
> Jul 16 16:49:59 srv64 kernel: scsi6 : SCSI emulation for USB Mass Storage
> devices
> Jul 16 16:49:59 srv64 kernel: usbcore: registered new interface driver
> usb-storage
> Jul 16 16:49:59 srv64 kernel: USB Mass Storage support registered.
> Jul 16 16:50:04 srv64 kernel: scsi 6:0:0:0: Direct-Access     Corsair  Flash
> Voyager    1100 PQ: 0 ANSI: 0 CCS
> Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] 990208 512-byte hardware
> sectors (507 MB)
> Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Write Protect is off
> Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write
> through
> Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] 990208 512-byte hardware
> sectors (507 MB)
> Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Write Protect is off
> Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write
> through
> Jul 16 16:50:04 srv64 kernel:  sdb: sdb1
> Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Attached SCSI removable disk
> Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0
> 
> rmmod usb-storage:
> 
> Jul 16 16:51:12 srv64 kernel: usbcore: deregistering interface driver
> usb-storage
> 
> modprobe usb-storage:
> 
> Jul 16 16:51:40 srv64 kernel: Initializing USB Mass Storage driver...
> Jul 16 16:51:40 srv64 kernel: scsi7 : SCSI emulation for USB Mass Storage
> devices
> Jul 16 16:51:40 srv64 kernel: usbcore: registered new interface driver
> usb-storage
> Jul 16 16:51:40 srv64 kernel: USB Mass Storage support registered.
> Jul 16 16:51:51 srv64 kernel: usb 3-2: reset high speed USB device using
> ehci_hcd and address 2
> Jul 16 16:51:51 srv64 kernel: scsi 7:0:0:0: Direct-Access     Corsair  Flash
> Voyager    1100 PQ: 0 ANSI: 0 CCS
> Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] 990208 512-byte hardware
> sectors (507 MB)
> Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Write Protect is off
> Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Assuming drive cache: write
> through
> Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] 990208 512-byte hardware
> sectors (507 MB)
> Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Write Protect is off
> Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Assuming drive cache: write
> through
> Jul 16 16:51:51 srv64 kernel:  sdb: sdb1
> Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Attached SCSI removable disk
> Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: Attached scsi generic sg2 type 0
> Jul 16 16:51:52 srv64 hald: mounted /dev/sdb1 on behalf of uid 500
> 
> 
> Steps to reproduce:
> 
> Run gnome-volume-manager (already running if gnome-session started)
> Plug usb stick.
> Expected: usb stick gets automounted without further intervention, as in
> 2.6.21
> Actual: usb stick does not get automounted. Gets automounted after cycle of
> rmmod usb-storage && modprobe usb-storage
> 
Comment 3 Felipe Balbi 2007-07-16 15:47:16 UTC
Hi... I have an ubuntu running on a Dell D600 with linux-2.6.22-rc7

Following "Steps to reproduce" worked just fine with me.



On 7/16/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Mon, 16 Jul 2007 15:26:07 -0700 (PDT)
> bugme-daemon@bugzilla.kernel.org wrote:
>
> > http://bugzilla.kernel.org/show_bug.cgi?id=8770
> >
> >            Summary: Regression: hotplug events for usb-storage broken in
> >                     2.6.22
> >            Product: Drivers
> >            Version: 2.5
> >      KernelVersion: 2.6.22
> >           Platform: All
> >         OS/Version: Linux
> >               Tree: Mainline
> >             Status: NEW
> >           Severity: normal
> >           Priority: P1
> >          Component: USB
> >         AssignedTo: greg@kroah.com
> >         ReportedBy: avillaci@ceibo.fiec.espol.edu.ec
> >
> >
> > Most recent kernel where this bug did not occur: 2.6.21
> > Distribution: Fedora 7
> > Hardware Environment:
> >
> > [alex@srv64 linux-2.6.22]$ cat /proc/cpuinfo
> > processor       : 0
> > vendor_id       : GenuineIntel
> > cpu family      : 15
> > model           : 4
> > model name      : Intel(R) Celeron(R) CPU 2.80GHz
> > stepping        : 9
> > cpu MHz         : 2800.507
> > cache size      : 256 KB
> > fdiv_bug        : no
> > hlt_bug         : no
> > f00f_bug        : no
> > coma_bug        : no
> > fpu             : yes
> > fpu_exception   : yes
> > cpuid level     : 5
> > wp              : yes
> > flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov
> > pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm
> constant_tsc
> > pni monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
> > bogomips        : 5604.47
> > clflush size    : 64
> >
> >
> > Software Environment:
> >
> > [alex@srv64 linux-2.6.22]$ sh scripts/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.22 #1 PREEMPT Mon Jul 16 15:47:10 ECT 2007
> i686
> > i686 i386 GNU/Linux
> >
> > Gnu C                  4.1.2
> > Gnu make               3.81
> > binutils               2.17.50.0.12-4
> > util-linux             2.13-pre7
> > mount                  2.13-pre7
> > module-init-tools      3.3-pre11
> > e2fsprogs              1.39
> > pcmciautils            014
> > quota-tools            3.14.
> > PPP                    2.4.4
> > Linux C Library        > libc.2.6
> > Dynamic linker (ldd)   2.6
> > Procps                 3.2.7
> > Net-tools              1.60
> > Kbd                    1.12
> > oprofile               0.9.2
> > Sh-utils               6.9
> > udev                   106
> > wireless-tools         28
> > Modules Loaded         vfat fat usb_storage hidp rfcomm l2cap bluetooth
> > dm_mirror dm_multipath dm_mod video sbs button dock battery ac ipv6 lp loop
> > snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event 8139cp snd_seq
> > snd_seq_device snd_pcm_oss 8139too mii snd_mixer_oss snd_pcm parport_pc
> parport
> > snd_timer snd soundcore rtc_cmos serio_raw i2c_piix4 snd_page_alloc
> i2c_core
> > sr_mod cdrom sg pata_atiixp sata_sil ata_generic libata sd_mod scsi_mod
> ext3
> > jbd mbcache ehci_hcd ohci_hcd uhci_hcd
> > [alex@srv64 linux-2.6.22]$
> >
> > Problem Description:
> >
> > With distro kernel (2.6.21-1.3228.fc7) hotplug events work normally.
> > gnome-volume-manager works normally with haldaemon and udevd.
> >
> > With 2.6.22, kernel does not fire required hotplug event on insertion of
> USB
> > flash drive. Apparently the stick is detected and no obvious errors are
> > displayed in the log, but it is never automounted, even with haldaemon,
> udevd,
> > and gnome-volume-manager running.
> >
> > A workaround is to manually rmmod usb-storage, then modprobe usb-storage ,
> > without removing the stick. Then event gets fired and stick is
> "automounted".
> >
> > Hotplug events for IDE CD-ROM (/dev/scd0) work normally even in 2.6.22.
> >
> > This is what appears in the log on 2.6.22:
> >
> > On plugin:
> >
> > Jul 16 16:49:59 srv64 kernel: usb 3-2: new high speed USB device using
> ehci_hcd
> > and address 2
> > Jul 16 16:49:59 srv64 kernel: usb 3-2: configuration #1 chosen from 1
> choice
> > Jul 16 16:49:59 srv64 kernel: Initializing USB Mass Storage driver...
> > Jul 16 16:49:59 srv64 kernel: scsi6 : SCSI emulation for USB Mass Storage
> > devices
> > Jul 16 16:49:59 srv64 kernel: usbcore: registered new interface driver
> > usb-storage
> > Jul 16 16:49:59 srv64 kernel: USB Mass Storage support registered.
> > Jul 16 16:50:04 srv64 kernel: scsi 6:0:0:0: Direct-Access     Corsair 
> Flash
> > Voyager    1100 PQ: 0 ANSI: 0 CCS
> > Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] 990208 512-byte hardware
> > sectors (507 MB)
> > Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Write Protect is off
> > Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write
> > through
> > Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] 990208 512-byte hardware
> > sectors (507 MB)
> > Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Write Protect is off
> > Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write
> > through
> > Jul 16 16:50:04 srv64 kernel:  sdb: sdb1
> > Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: [sdb] Attached SCSI removable
> disk
> > Jul 16 16:50:04 srv64 kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0
> >
> > rmmod usb-storage:
> >
> > Jul 16 16:51:12 srv64 kernel: usbcore: deregistering interface driver
> > usb-storage
> >
> > modprobe usb-storage:
> >
> > Jul 16 16:51:40 srv64 kernel: Initializing USB Mass Storage driver...
> > Jul 16 16:51:40 srv64 kernel: scsi7 : SCSI emulation for USB Mass Storage
> > devices
> > Jul 16 16:51:40 srv64 kernel: usbcore: registered new interface driver
> > usb-storage
> > Jul 16 16:51:40 srv64 kernel: USB Mass Storage support registered.
> > Jul 16 16:51:51 srv64 kernel: usb 3-2: reset high speed USB device using
> > ehci_hcd and address 2
> > Jul 16 16:51:51 srv64 kernel: scsi 7:0:0:0: Direct-Access     Corsair 
> Flash
> > Voyager    1100 PQ: 0 ANSI: 0 CCS
> > Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] 990208 512-byte hardware
> > sectors (507 MB)
> > Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Write Protect is off
> > Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Assuming drive cache: write
> > through
> > Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] 990208 512-byte hardware
> > sectors (507 MB)
> > Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Write Protect is off
> > Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Assuming drive cache: write
> > through
> > Jul 16 16:51:51 srv64 kernel:  sdb: sdb1
> > Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: [sdb] Attached SCSI removable
> disk
> > Jul 16 16:51:51 srv64 kernel: sd 7:0:0:0: Attached scsi generic sg2 type 0
> > Jul 16 16:51:52 srv64 hald: mounted /dev/sdb1 on behalf of uid 500
> >
> >
> > Steps to reproduce:
> >
> > Run gnome-volume-manager (already running if gnome-session started)
> > Plug usb stick.
> > Expected: usb stick gets automounted without further intervention, as in
> 2.6.21
> > Actual: usb stick does not get automounted. Gets automounted after cycle of
> > rmmod usb-storage && modprobe usb-storage
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> linux-usb-devel@lists.sourceforge.net
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
>
Comment 4 Alex Villacis Lasso 2007-07-16 17:27:25 UTC
Felipe Balbi, could you please post your .config file so that I can compare with mine? I just hope this is nothing more than a configuration issue. 

Have you tried with the 2.6.22 final kernel?
Comment 5 Greg Kroah-Hartman 2007-07-16 22:33:27 UTC
On Mon, Jul 16, 2007 at 06:42:04PM -0400, Felipe Balbi wrote:
>  Hi... I have an ubuntu running on a Dell D600 with linux-2.6.22-rc7
> 
>  Following "Steps to reproduce" worked just fine with me.

Can you run 'udevmonitor' when plugging in your device to see if the
events are properly getting to udev or not?

thanks,

greg k-h
Comment 6 Alex Villacis Lasso 2007-07-17 09:25:11 UTC
Testing with udevmonitor, as requested...

Here is the method I used for this test:

For a clean slate, I did the following before plugging the stick:

[root@srv64 ~]# rmmod usb-storage
[root@srv64 ~]# /sbin/lsmod | grep usb
[root@srv64 ~]# 

In a second console, I started udevmonitor:

udevmonitor prints the received event from the kernel [UEVENT]
and the event which udev sends out after rule processing [UDEV]


In a third console, I have dmesg ready for the kernel log.

On plugin of the stick, dmesg shows the following:

usb 3-2: new high speed USB device using ehci_hcd and address 9
PM: Adding info for usb:3-2
PM: Adding info for No Bus:usbdev3.9_ep00
usb 3-2: configuration #1 chosen from 1 choice
PM: Adding info for usb:3-2:1.0
PM: Adding info for No Bus:usbdev3.9_ep81
PM: Adding info for No Bus:usbdev3.9_ep02
PM: Adding info for No Bus:usbdev3.9
Initializing USB Mass Storage driver...
scsi16 : SCSI emulation for USB Mass Storage devices
PM: Adding info for No Bus:host16
usb-storage: device found at 9
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device scan complete
PM: Adding info for No Bus:target16:0:0
scsi 16:0:0:0: Direct-Access     Corsair  Flash Voyager    1100 PQ: 0 ANSI: 0 CCS
PM: Adding info for No Bus:target16:0:1
PM: Removing info for No Bus:target16:0:1
PM: Adding info for No Bus:target16:0:2
PM: Removing info for No Bus:target16:0:2
PM: Adding info for No Bus:target16:0:3
PM: Removing info for No Bus:target16:0:3
PM: Adding info for No Bus:target16:0:4
PM: Removing info for No Bus:target16:0:4
PM: Adding info for No Bus:target16:0:5
PM: Removing info for No Bus:target16:0:5
PM: Adding info for No Bus:target16:0:6
PM: Removing info for No Bus:target16:0:6
PM: Adding info for No Bus:target16:0:7
PM: Removing info for No Bus:target16:0:7
PM: Adding info for scsi:16:0:0:0
sd 16:0:0:0: [sdb] 990208 512-byte hardware sectors (507 MB)
sd 16:0:0:0: [sdb] Write Protect is off
sd 16:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 16:0:0:0: [sdb] Assuming drive cache: write through
sd 16:0:0:0: [sdb] 990208 512-byte hardware sectors (507 MB)
sd 16:0:0:0: [sdb] Write Protect is off
sd 16:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 16:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 16:0:0:0: [sdb] Attached SCSI removable disk
sd 16:0:0:0: Attached scsi generic sg2 type 0

On the other hand, udevmonitor shows this:

UEVENT[1184688071.788121] add      /devices/pci0000:00/0000:00:13.2/usb3/3-2 (usb)
UEVENT[1184688071.788579] add      /class/usb_endpoint/usbdev3.9_ep00 (usb_endpoint)
UEVENT[1184688071.788611] add      /devices/pci0000:00/0000:00:13.2/usb3/3-2/3-2:1.0 (usb)
UEVENT[1184688071.788625] add      /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UEVENT[1184688071.788638] add      /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)
UEVENT[1184688071.788650] add      /class/usb_device/usbdev3.9 (usb_device)
UEVENT[1184688071.804024] add      /module/usb_storage (module)
UEVENT[1184688071.805587] add      /bus/usb/drivers/usb-storage (drivers)
UEVENT[1184688071.807504] add      /class/scsi_host/host16 (scsi_host)
UDEV  [1184688071.833843] add      /devices/pci0000:00/0000:00:13.2/usb3/3-2 (usb)
UDEV  [1184688071.862499] add      /class/usb_endpoint/usbdev3.9_ep00 (usb_endpoint)
UDEV  [1184688071.997599] add      /devices/pci0000:00/0000:00:13.2/usb3/3-2/3-2:1.0 (usb)
UDEV  [1184688072.028721] add      /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UDEV  [1184688072.041921] add      /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)
UDEV  [1184688072.066746] add      /class/usb_device/usbdev3.9 (usb_device)
UDEV  [1184688072.083049] add      /class/scsi_host/host16 (scsi_host)
UEVENT[1184688076.810931] add      /devices/pci0000:00/0000:00:13.2/usb3/3-2/3-2:1.0/host16/target16:0:0/16:0:0:0 (scsi)
UEVENT[1184688076.811006] add      /class/scsi_disk/16:0:0:0 (scsi_disk)
UDEV  [1184688076.860145] add      /devices/pci0000:00/0000:00:13.2/usb3/3-2/3-2:1.0/host16/target16:0:0/16:0:0:0 (scsi)
UDEV  [1184688076.885835] add      /class/scsi_disk/16:0:0:0 (scsi_disk)
UEVENT[1184688076.961509] add      /block/sdb (block)
UEVENT[1184688076.961549] add      /block/sdb/sdb1 (block)
UEVENT[1184688076.961564] add      /class/scsi_device/16:0:0:0 (scsi_device)
UEVENT[1184688076.961577] add      /class/scsi_generic/sg2 (scsi_generic)
UDEV  [1184688077.045425] add      /block/sdb (block)
UDEV  [1184688077.122770] add      /class/scsi_device/16:0:0:0 (scsi_device)
UDEV  [1184688077.188625] add      /class/scsi_generic/sg2 (scsi_generic)
UDEV  [1184688077.405916] add      /block/sdb/sdb1 (block)

The stick does not get automounted (the bug).

Then I did the workaround described earlier, of rmmoding usb-storage:

dmesg then shows the following:

usbcore: deregistering interface driver usb-storage
PM: Removing info for scsi:16:0:0:0
PM: Removing info for No Bus:target16:0:0
PM: Removing info for No Bus:host16
PM: Removing info for No Bus:usbdev3.9_ep81
PM: Removing info for No Bus:usbdev3.9_ep02
PM: Adding info for No Bus:usbdev3.9_ep81
PM: Adding info for No Bus:usbdev3.9_ep02

udevmonitor shows this:

UEVENT[1184688159.701577] remove   /class/scsi_generic/sg2 (scsi_generic)
UDEV  [1184688159.703076] remove   /class/scsi_generic/sg2 (scsi_generic)
UEVENT[1184688159.703677] remove   /class/scsi_device/16:0:0:0 (scsi_device)
UEVENT[1184688159.704462] remove   /class/scsi_disk/16:0:0:0 (scsi_disk)
UEVENT[1184688159.705210] remove   /block/sdb/sdb1 (block)
UEVENT[1184688159.706025] remove   /block/sdb (block)
UEVENT[1184688159.706618] remove   /devices/pci0000:00/0000:00:13.2/usb3/3-2/3-2:1.0/host16/target16:0:0/16:0:0:0 (scsi)
UEVENT[1184688159.707532] remove   /class/scsi_host/host16 (scsi_host)
UDEV  [1184688159.723082] remove   /class/scsi_device/16:0:0:0 (scsi_device)
UDEV  [1184688159.776246] remove   /class/scsi_disk/16:0:0:0 (scsi_disk)
UDEV  [1184688159.778014] remove   /block/sdb/sdb1 (block)
UDEV  [1184688159.779638] remove   /devices/pci0000:00/0000:00:13.2/usb3/3-2/3-2:1.0/host16/target16:0:0/16:0:0:0 (scsi)
UDEV  [1184688159.780682] remove   /class/scsi_host/host16 (scsi_host)
UEVENT[1184688159.781336] remove   /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UEVENT[1184688159.782187] remove   /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)
UEVENT[1184688159.783208] add      /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UEVENT[1184688159.783718] add      /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)
UEVENT[1184688159.784041] remove   /bus/usb/drivers/usb-storage (drivers)
UEVENT[1184688159.784749] remove   /module/usb_storage (module)
UDEV  [1184688159.799986] remove   /block/sdb (block)
UDEV  [1184688159.844577] remove   /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UDEV  [1184688159.846624] remove   /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)
UDEV  [1184688159.853939] add      /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UDEV  [1184688159.915066] add      /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)


After that, I insert usb-storage manually.

dmesg then shows the following:

Initializing USB Mass Storage driver...
scsi17 : SCSI emulation for USB Mass Storage devices
PM: Adding info for No Bus:host17
usb-storage: device found at 9
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device scan complete
PM: Adding info for No Bus:target17:0:0
usb 3-2: reset high speed USB device using ehci_hcd and address 9
PM: Removing info for No Bus:usbdev3.9_ep81
PM: Removing info for No Bus:usbdev3.9_ep02
PM: Adding info for No Bus:usbdev3.9_ep81
PM: Adding info for No Bus:usbdev3.9_ep02
scsi 17:0:0:0: Direct-Access     Corsair  Flash Voyager    1100 PQ: 0 ANSI: 0 CCS
PM: Adding info for No Bus:target17:0:1
PM: Removing info for No Bus:target17:0:1
PM: Adding info for No Bus:target17:0:2
PM: Removing info for No Bus:target17:0:2
PM: Adding info for No Bus:target17:0:3
PM: Removing info for No Bus:target17:0:3
PM: Adding info for No Bus:target17:0:4
PM: Removing info for No Bus:target17:0:4
PM: Adding info for No Bus:target17:0:5
PM: Removing info for No Bus:target17:0:5
PM: Adding info for No Bus:target17:0:6
PM: Removing info for No Bus:target17:0:6
PM: Adding info for No Bus:target17:0:7
PM: Removing info for No Bus:target17:0:7
PM: Adding info for scsi:17:0:0:0
sd 17:0:0:0: [sdb] 990208 512-byte hardware sectors (507 MB)
sd 17:0:0:0: [sdb] Write Protect is off
sd 17:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 17:0:0:0: [sdb] Assuming drive cache: write through
sd 17:0:0:0: [sdb] 990208 512-byte hardware sectors (507 MB)
sd 17:0:0:0: [sdb] Write Protect is off
sd 17:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 17:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 17:0:0:0: [sdb] Attached SCSI removable disk
sd 17:0:0:0: Attached scsi generic sg2 type 0
SELinux: initialized (dev sdb1, type vfat), uses genfs_contexts

And then udevmonitor shows this:

UEVENT[1184688246.873895] add      /module/usb_storage (module)
UEVENT[1184688246.875123] add      /bus/usb/drivers/usb-storage (drivers)
UEVENT[1184688247.011478] add      /class/scsi_host/host17 (scsi_host)
UDEV  [1184688247.016770] add      /class/scsi_host/host17 (scsi_host)
UEVENT[1184688257.729729] remove   /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UEVENT[1184688257.729830] remove   /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)
UEVENT[1184688257.729847] add      /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UEVENT[1184688257.729860] add      /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)
UDEV  [1184688257.734151] remove   /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UEVENT[1184688257.735200] add      /devices/pci0000:00/0000:00:13.2/usb3/3-2/3-2:1.0/host17/target17:0:0/17:0:0:0 (scsi)
UEVENT[1184688257.735238] add      /class/scsi_disk/17:0:0:0 (scsi_disk)
UDEV  [1184688257.741229] remove   /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)
UEVENT[1184688257.746373] add      /block/sdb (block)
UEVENT[1184688257.746415] add      /block/sdb/sdb1 (block)
UEVENT[1184688257.746429] add      /class/scsi_device/17:0:0:0 (scsi_device)
UEVENT[1184688257.746442] add      /class/scsi_generic/sg2 (scsi_generic)
UDEV  [1184688257.996673] add      /devices/pci0000:00/0000:00:13.2/usb3/3-2/3-2:1.0/host17/target17:0:0/17:0:0:0 (scsi)
UDEV  [1184688258.066658] add      /class/scsi_disk/17:0:0:0 (scsi_disk)
UDEV  [1184688258.074190] add      /class/usb_endpoint/usbdev3.9_ep81 (usb_endpoint)
UDEV  [1184688258.089914] add      /class/usb_endpoint/usbdev3.9_ep02 (usb_endpoint)
UDEV  [1184688258.163075] add      /class/scsi_generic/sg2 (scsi_generic)
UDEV  [1184688258.268580] add      /class/scsi_device/17:0:0:0 (scsi_device)
UDEV  [1184688258.346892] add      /block/sdb (block)
UDEV  [1184688258.475858] add      /block/sdb/sdb1 (block)

And the stick gets finally automounted by gnome-volume-manager
Comment 7 Alex Villacis Lasso 2007-07-23 15:24:07 UTC
Problem still persists in 2.6.23-rc1
Comment 8 Alex Villacis Lasso 2007-07-30 14:08:51 UTC
Bug is being discussed at:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=249282

as a distro bug.
Comment 9 Alex Villacis Lasso 2007-07-30 14:33:20 UTC
From discussion at bugzilla.redhat.com , it seems that this is a race condition within udev, and not actually a kernel bug.