Bug 9925 - PROBLEM: Card Reader Detected but won't connect to system
Summary: PROBLEM: Card Reader Detected but won't connect to system
Status: REJECTED UNREPRODUCIBLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Pete Zaitcev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-09 18:08 UTC by Rich Jones
Modified: 2008-02-17 10:11 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.24.1
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
ub fix for improper sg_init_table (642 bytes, patch)
2008-02-10 19:11 UTC, Pete Zaitcev
Details | Diff
first dmesg output (14.87 KB, text/plain)
2008-02-13 18:37 UTC, Rich Jones
Details
usbmon output from bus 2u (11.24 KB, text/plain)
2008-02-13 18:39 UTC, Rich Jones
Details
dd output (77 bytes, application/octet-stream)
2008-02-13 18:40 UTC, Rich Jones
Details
usb device list (1.81 KB, application/octet-stream)
2008-02-13 18:41 UTC, Rich Jones
Details
partition list (268 bytes, application/octet-stream)
2008-02-13 18:42 UTC, Rich Jones
Details
dd output (77 bytes, text/plain)
2008-02-13 19:00 UTC, Rich Jones
Details
partition list (268 bytes, text/plain)
2008-02-13 19:01 UTC, Rich Jones
Details
usb device list (1.81 KB, text/plain)
2008-02-13 19:02 UTC, Rich Jones
Details

Description Rich Jones 2008-02-09 18:08:11 UTC
Latest working kernel version: 2.6.24.1
Earliest failing kernel version: 2.6.23.12
Distribution: Slackware Current (beta 12.1) Custom Kernel
Hardware Environment: 
Linux mars 2.6.24.1rj #2 PREEMPT Sat Feb 9 15:06:07 AST 2008 i686 AMD Athlon(tm) XP 2200+ AuthenticAMD GNU/Linux
1GB RAM
Software Environment:
Gnu C                  4.1.2
Gnu make               3.81
binutils               2.17.50.0.17.20070615
util-linux             2.12r
mount                  2.12r
module-init-tools      3.4
e2fsprogs              1.40.5
jfsutils               1.1.12
reiserfsprogs          3.6.19
xfsprogs               2.8.16
pcmciautils            014
quota-tools            3.13.
PPP                    2.4.4
Linux C Library        2.7
Dynamic linker (ldd)   2.7
Linux C++ Library      6.0.8
Procps                 3.2.7
Net-tools              1.60
Kbd                    1.12
oprofile               0.9.2
Sh-utils               6.9
udev                   116
wireless-tools         28
Modules Loaded         nls_iso8859_1 nls_cp437 nvidia usb_storage ub sg aic7xxx snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_pcm_oss snd_mixer_oss nfsd lockd auth_rpcgss sunrpc exportfs pcmcia pcmcia_core bt878 tuner tea5767 tda8290 tuner_simple mt20xx tea5761 i2c_viapro bttv ir_common compat_ioctl32 i2c_algo_bit videobuf_dma_sg videobuf_core btcx_risc via686a tveeprom hwmon i2c_core snd_emu10k1 snd_rawmidi snd_ac97_codec psmouse ac97_bus emu10k1_gp snd_pcm snd_seq_device snd_timer snd_page_alloc snd_util_mem gameport snd_hwdep via_agp agpgart evdev pcspkr via_rhine mii snd soundcore uhci_hcd parport_pc serio_raw videodev v4l2_common v4l1_compat parport

Problem Description:

Connecting USB card reader (ProFlash 6-in-1 Card Reader - resembles mini-iPod with a card slot) to the front panel USB slots, is detected by system, but adding a 1GB normal SD card, or a 4GB SDHC card causes error messages about cannot detect filesystem.

Steps to reproduce:
Insert SD card into the reader device, and error occurs.

Note: I enabled the Probe all LUNs option which resolved system freeze when card reader was inserted while another reader had /dev/uba already reserved. The device was correctly assigned /dev/ube.

Bus 002 Device 003: ID 090c:6000 Feiya Technology Corp.
Bus 002 Device 001: ID 0000:0000 
Bus 001 Device 002: ID 058f:6362 Alcor Micro Corp.
Bus 001 Device 001: ID 0000:0000 

/dev
root # ls -al ub*
brw-rw---- 1 root video 180,  0 2008-02-09 15:21 "uba"
brw-rw---- 1 root video 180,  8 2008-02-09 15:21 "ubb"
brw-rw---- 1 root video 180, 16 2008-02-09 15:21 "ubc"
brw-rw---- 1 root video 180, 24 2008-02-09 15:21 "ubd"
brw-r----- 1 root disk  180, 32 2008-02-09 15:23 "ube"

I tried a normal 1GB SD card (leaving out SDHC for the moment)

mount -t vfat /dev/ude1 /media/sddisk/
mount: special device /dev/ude1 does not exist

FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev ube.

I then tried it in the older card reader (no SDHC support)
as an example, after I insert the SD card:

dmesg>   uba: uba1

brw-rw---- 1 root video 180,  1 2008-02-09 15:55 "/dev/uba1"

mount -t vfat /dev/uba1 /media/sd
ls -al /media/sd
total 52
drwxr-xr-x  3 root root 16384 1969-12-31 20:00 "."/
drwxr-xr-x 22 root root  4096 2008-02-06 02:49 ".."/
drwxr-xr-x  3 root root 16384 2008-02-08 23:04 "dcim"/


fsck.vfat /dev/ube
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Got 0 bytes instead of 512 at 0


The device is picked up by hal:
 2263 ?        Ss     0:00 /usr/sbin/hald --daemon=yes
 2264 ?        S      0:00 hald-runner
 2270 ?        S      0:01 hald-addon-input: Listening on /dev/input/event0
 2275 ?        S      0:03 hald-addon-storage: polling /dev/hda (every 2 sec)
 2485 ?        D      0:03 hald-addon-storage: polling /dev/sr0 (every 2 sec)
 2638 ?        S      0:04 hald-addon-storage: polling /dev/uba (every 2 sec)
 2646 ?        S      0:04 hald-addon-storage: polling /dev/ubd (every 2 sec)
 2648 ?        S      0:04 hald-addon-storage: polling /dev/ubb (every 2 sec)
 2650 ?        S      0:04 hald-addon-storage: polling /dev/ubc (every 2 sec)
 2683 ?        S      0:03 hald-addon-storage: polling /dev/ube (every 2 sec)


lsusb -s 002:003 -v

Bus 002 Device 003: ID 090c:6000 Feiya Technology Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x090c Feiya Technology Corp.
  idProduct          0x6000
  bcdDevice            1.00
  iManufacturer           1 Generic       ,   .
  iProduct                2 USB2.0 Card Reader 
  iSerial                 3 12345678901234567890
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval             255
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval             255
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


After bootup, dmesg shows:

usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver ub
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb 2-1: USB disconnect, address 2
usb 1-1: new full speed USB device using uhci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb 2-1: new full speed USB device using uhci_hcd and address 3
usb 2-1: configuration #1 chosen from 1 choice


Let me know if you need additional information.

Thanks
Rich
Comment 1 Anonymous Emailer 2008-02-09 22:57:30 UTC
Reply-To: akpm@linux-foundation.org

On Sat,  9 Feb 2008 18:08:14 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=9925
> 
>            Summary: PROBLEM: Card Reader Detected but won't connect to
>                     system
>            Product: IO/Storage
>            Version: 2.5
>      KernelVersion: 2.6.24.1
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Other
>         AssignedTo: io_other@kernel-bugs.osdl.org
>         ReportedBy: budman85@eastlink.ca
> 
> 
> Latest working kernel version: 2.6.24.1
> Earliest failing kernel version: 2.6.23.12

A regression.

> Distribution: Slackware Current (beta 12.1) Custom Kernel
> Hardware Environment: 
> Linux mars 2.6.24.1rj #2 PREEMPT Sat Feb 9 15:06:07 AST 2008 i686 AMD
> Athlon(tm) XP 2200+ AuthenticAMD GNU/Linux
> 1GB RAM
> Software Environment:
> Gnu C                  4.1.2
> Gnu make               3.81
> binutils               2.17.50.0.17.20070615
> util-linux             2.12r
> mount                  2.12r
> module-init-tools      3.4
> e2fsprogs              1.40.5
> jfsutils               1.1.12
> reiserfsprogs          3.6.19
> xfsprogs               2.8.16
> pcmciautils            014
> quota-tools            3.13.
> PPP                    2.4.4
> Linux C Library        2.7
> Dynamic linker (ldd)   2.7
> Linux C++ Library      6.0.8
> Procps                 3.2.7
> Net-tools              1.60
> Kbd                    1.12
> oprofile               0.9.2
> Sh-utils               6.9
> udev                   116
> wireless-tools         28
> Modules Loaded         nls_iso8859_1 nls_cp437 nvidia usb_storage ub sg
> aic7xxx
> snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_pcm_oss
> snd_mixer_oss
> nfsd lockd auth_rpcgss sunrpc exportfs pcmcia pcmcia_core bt878 tuner tea5767
> tda8290 tuner_simple mt20xx tea5761 i2c_viapro bttv ir_common compat_ioctl32
> i2c_algo_bit videobuf_dma_sg videobuf_core btcx_risc via686a tveeprom hwmon
> i2c_core snd_emu10k1 snd_rawmidi snd_ac97_codec psmouse ac97_bus emu10k1_gp
> snd_pcm snd_seq_device snd_timer snd_page_alloc snd_util_mem gameport
> snd_hwdep
> via_agp agpgart evdev pcspkr via_rhine mii snd soundcore uhci_hcd parport_pc
> serio_raw videodev v4l2_common v4l1_compat parport
> 
> Problem Description:
> 
> Connecting USB card reader (ProFlash 6-in-1 Card Reader - resembles mini-iPod
> with a card slot) to the front panel USB slots, is detected by system, but
> adding a 1GB normal SD card, or a 4GB SDHC card causes error messages about
> cannot detect filesystem.
> 
> Steps to reproduce:
> Insert SD card into the reader device, and error occurs.
> 
> Note: I enabled the Probe all LUNs option which resolved system freeze when
> card reader was inserted while another reader had /dev/uba already reserved.
> The device was correctly assigned /dev/ube.
> 
> Bus 002 Device 003: ID 090c:6000 Feiya Technology Corp.
> Bus 002 Device 001: ID 0000:0000 
> Bus 001 Device 002: ID 058f:6362 Alcor Micro Corp.
> Bus 001 Device 001: ID 0000:0000 
> 
> /dev
> root # ls -al ub*
> brw-rw---- 1 root video 180,  0 2008-02-09 15:21 "uba"
> brw-rw---- 1 root video 180,  8 2008-02-09 15:21 "ubb"
> brw-rw---- 1 root video 180, 16 2008-02-09 15:21 "ubc"
> brw-rw---- 1 root video 180, 24 2008-02-09 15:21 "ubd"
> brw-r----- 1 root disk  180, 32 2008-02-09 15:23 "ube"
> 
> I tried a normal 1GB SD card (leaving out SDHC for the moment)
> 
> mount -t vfat /dev/ude1 /media/sddisk/
> mount: special device /dev/ude1 does not exist
> 
> FAT: bogus number of reserved sectors
> VFS: Can't find a valid FAT filesystem on dev ube.
> 
> I then tried it in the older card reader (no SDHC support)
> as an example, after I insert the SD card:
> 
> dmesg>   uba: uba1
> 
> brw-rw---- 1 root video 180,  1 2008-02-09 15:55 "/dev/uba1"
> 
> mount -t vfat /dev/uba1 /media/sd
> ls -al /media/sd
> total 52
> drwxr-xr-x  3 root root 16384 1969-12-31 20:00 "."/
> drwxr-xr-x 22 root root  4096 2008-02-06 02:49 ".."/
> drwxr-xr-x  3 root root 16384 2008-02-08 23:04 "dcim"/
> 
> 
> fsck.vfat /dev/ube
> dosfsck 2.11, 12 Mar 2005, FAT32, LFN
> Got 0 bytes instead of 512 at 0
> 
> 
> The device is picked up by hal:
>  2263 ?        Ss     0:00 /usr/sbin/hald --daemon=yes
>  2264 ?        S      0:00 hald-runner
>  2270 ?        S      0:01 hald-addon-input: Listening on /dev/input/event0
>  2275 ?        S      0:03 hald-addon-storage: polling /dev/hda (every 2 sec)
>  2485 ?        D      0:03 hald-addon-storage: polling /dev/sr0 (every 2 sec)
>  2638 ?        S      0:04 hald-addon-storage: polling /dev/uba (every 2 sec)
>  2646 ?        S      0:04 hald-addon-storage: polling /dev/ubd (every 2 sec)
>  2648 ?        S      0:04 hald-addon-storage: polling /dev/ubb (every 2 sec)
>  2650 ?        S      0:04 hald-addon-storage: polling /dev/ubc (every 2 sec)
>  2683 ?        S      0:03 hald-addon-storage: polling /dev/ube (every 2 sec)
> 
> 
> lsusb -s 002:003 -v
> 
> Bus 002 Device 003: ID 090c:6000 Feiya Technology Corp.
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   idVendor           0x090c Feiya Technology Corp.
>   idProduct          0x6000
>   bcdDevice            1.00
>   iManufacturer           1 Generic       ,   .
>   iProduct                2 USB2.0 Card Reader 
>   iSerial                 3 12345678901234567890
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength           32
>     bNumInterfaces          1
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0x80
>       (Bus Powered)
>     MaxPower              500mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass         8 Mass Storage
>       bInterfaceSubClass      6 SCSI
>       bInterfaceProtocol     80 Bulk (Zip)
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval             255
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x02  EP 2 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval             255
> Device Qualifier (for other device speed):
>   bLength                10
>   bDescriptorType         6
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   bNumConfigurations      1
> Device Status:     0x0000
>   (Bus Powered)
> 
> 
> After bootup, dmesg shows:
> 
> usb 2-1: new full speed USB device using uhci_hcd and address 2
> usb 2-1: configuration #1 chosen from 1 choice
> usbcore: registered new interface driver ub
> Initializing USB Mass Storage driver...
> usbcore: registered new interface driver usb-storage
> USB Mass Storage support registered.
> usb 2-1: USB disconnect, address 2
> usb 1-1: new full speed USB device using uhci_hcd and address 2
> usb 1-1: configuration #1 chosen from 1 choice
> usb 2-1: new full speed USB device using uhci_hcd and address 3
> usb 2-1: configuration #1 chosen from 1 choice
> 
> 
> Let me know if you need additional information.
> 
> Thanks
> Rich
> 
> 
Comment 2 Anonymous Emailer 2008-02-10 05:07:05 UTC
Reply-To: me@felipebalbi.com

On Sat, Feb 09, 2008 at 10:55:17PM -0800, Andrew Morton wrote:
> On Sat,  9 Feb 2008 18:08:14 -0800 (PST) bugme-daemon@bugzilla.kernel.org
> wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=9925
> > 
> >            Summary: PROBLEM: Card Reader Detected but won't connect to
> >                     system
> >            Product: IO/Storage
> >            Version: 2.5
> >      KernelVersion: 2.6.24.1
> >           Platform: All
> >         OS/Version: Linux
> >               Tree: Mainline
> >             Status: NEW
> >           Severity: normal
> >           Priority: P1
> >          Component: Other
> >         AssignedTo: io_other@kernel-bugs.osdl.org
> >         ReportedBy: budman85@eastlink.ca
> > 
> > 
> > Latest working kernel version: 2.6.24.1
> > Earliest failing kernel version: 2.6.23.12
> 
> A regression.
> 
> > Distribution: Slackware Current (beta 12.1) Custom Kernel
> > Hardware Environment: 
> > Linux mars 2.6.24.1rj #2 PREEMPT Sat Feb 9 15:06:07 AST 2008 i686 AMD
> > Athlon(tm) XP 2200+ AuthenticAMD GNU/Linux
> > 1GB RAM
> > Software Environment:
> > Gnu C                  4.1.2
> > Gnu make               3.81
> > binutils               2.17.50.0.17.20070615
> > util-linux             2.12r
> > mount                  2.12r
> > module-init-tools      3.4
> > e2fsprogs              1.40.5
> > jfsutils               1.1.12
> > reiserfsprogs          3.6.19
> > xfsprogs               2.8.16
> > pcmciautils            014
> > quota-tools            3.13.
> > PPP                    2.4.4
> > Linux C Library        2.7
> > Dynamic linker (ldd)   2.7
> > Linux C++ Library      6.0.8
> > Procps                 3.2.7
> > Net-tools              1.60
> > Kbd                    1.12
> > oprofile               0.9.2
> > Sh-utils               6.9
> > udev                   116
> > wireless-tools         28
> > Modules Loaded         nls_iso8859_1 nls_cp437 nvidia usb_storage ub sg
> aic7xxx
> > snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_pcm_oss
> snd_mixer_oss
> > nfsd lockd auth_rpcgss sunrpc exportfs pcmcia pcmcia_core bt878 tuner
> tea5767
> > tda8290 tuner_simple mt20xx tea5761 i2c_viapro bttv ir_common
> compat_ioctl32
> > i2c_algo_bit videobuf_dma_sg videobuf_core btcx_risc via686a tveeprom hwmon
> > i2c_core snd_emu10k1 snd_rawmidi snd_ac97_codec psmouse ac97_bus emu10k1_gp
> > snd_pcm snd_seq_device snd_timer snd_page_alloc snd_util_mem gameport
> snd_hwdep
> > via_agp agpgart evdev pcspkr via_rhine mii snd soundcore uhci_hcd
> parport_pc
> > serio_raw videodev v4l2_common v4l1_compat parport
> > 
> > Problem Description:
> > 
> > Connecting USB card reader (ProFlash 6-in-1 Card Reader - resembles
> mini-iPod
> > with a card slot) to the front panel USB slots, is detected by system, but
> > adding a 1GB normal SD card, or a 4GB SDHC card causes error messages about
> > cannot detect filesystem.
> > 
> > Steps to reproduce:
> > Insert SD card into the reader device, and error occurs.
> > 
> > Note: I enabled the Probe all LUNs option which resolved system freeze when
> > card reader was inserted while another reader had /dev/uba already
> reserved.
> > The device was correctly assigned /dev/ube.
> > 
> > Bus 002 Device 003: ID 090c:6000 Feiya Technology Corp.
> > Bus 002 Device 001: ID 0000:0000 
> > Bus 001 Device 002: ID 058f:6362 Alcor Micro Corp.
> > Bus 001 Device 001: ID 0000:0000 
> > 
> > /dev
> > root # ls -al ub*
> > brw-rw---- 1 root video 180,  0 2008-02-09 15:21 "uba"
> > brw-rw---- 1 root video 180,  8 2008-02-09 15:21 "ubb"
> > brw-rw---- 1 root video 180, 16 2008-02-09 15:21 "ubc"
> > brw-rw---- 1 root video 180, 24 2008-02-09 15:21 "ubd"
> > brw-r----- 1 root disk  180, 32 2008-02-09 15:23 "ube"
> > 
> > I tried a normal 1GB SD card (leaving out SDHC for the moment)
> > 
> > mount -t vfat /dev/ude1 /media/sddisk/
> > mount: special device /dev/ude1 does not exist

Shouldn't it be /dev/ube1 instead of ude1 ??

In any case, a full dmesg output with CONFIG_USB_STORAGE_DEBUG enabled
would be great.

> > 
> > FAT: bogus number of reserved sectors
> > VFS: Can't find a valid FAT filesystem on dev ube.

mkfs.vfat would help here, probably. It can be a bug in the FS not even
in USB.

> > 
> > I then tried it in the older card reader (no SDHC support)
> > as an example, after I insert the SD card:
> > 
> > dmesg>   uba: uba1
> > 
> > brw-rw---- 1 root video 180,  1 2008-02-09 15:55 "/dev/uba1"
> > 
> > mount -t vfat /dev/uba1 /media/sd
> > ls -al /media/sd
> > total 52
> > drwxr-xr-x  3 root root 16384 1969-12-31 20:00 "."/
> > drwxr-xr-x 22 root root  4096 2008-02-06 02:49 ".."/
> > drwxr-xr-x  3 root root 16384 2008-02-08 23:04 "dcim"/
> > 
> > 
> > fsck.vfat /dev/ube
> > dosfsck 2.11, 12 Mar 2005, FAT32, LFN
> > Got 0 bytes instead of 512 at 0
> > 
> > 
> > The device is picked up by hal:
> >  2263 ?        Ss     0:00 /usr/sbin/hald --daemon=yes
> >  2264 ?        S      0:00 hald-runner
> >  2270 ?        S      0:01 hald-addon-input: Listening on /dev/input/event0
> >  2275 ?        S      0:03 hald-addon-storage: polling /dev/hda (every 2
> sec)
> >  2485 ?        D      0:03 hald-addon-storage: polling /dev/sr0 (every 2
> sec)
> >  2638 ?        S      0:04 hald-addon-storage: polling /dev/uba (every 2
> sec)
> >  2646 ?        S      0:04 hald-addon-storage: polling /dev/ubd (every 2
> sec)
> >  2648 ?        S      0:04 hald-addon-storage: polling /dev/ubb (every 2
> sec)
> >  2650 ?        S      0:04 hald-addon-storage: polling /dev/ubc (every 2
> sec)
> >  2683 ?        S      0:03 hald-addon-storage: polling /dev/ube (every 2
> sec)
> > 
> > 
> > lsusb -s 002:003 -v
> > 
> > Bus 002 Device 003: ID 090c:6000 Feiya Technology Corp.
> > Device Descriptor:
> >   bLength                18
> >   bDescriptorType         1
> >   bcdUSB               2.00
> >   bDeviceClass            0 (Defined at Interface level)
> >   bDeviceSubClass         0
> >   bDeviceProtocol         0
> >   bMaxPacketSize0        64
> >   idVendor           0x090c Feiya Technology Corp.
> >   idProduct          0x6000
> >   bcdDevice            1.00
> >   iManufacturer           1 Generic       ,   .
> >   iProduct                2 USB2.0 Card Reader 
> >   iSerial                 3 12345678901234567890
> >   bNumConfigurations      1
> >   Configuration Descriptor:
> >     bLength                 9
> >     bDescriptorType         2
> >     wTotalLength           32
> >     bNumInterfaces          1
> >     bConfigurationValue     1
> >     iConfiguration          0
> >     bmAttributes         0x80
> >       (Bus Powered)
> >     MaxPower              500mA
> >     Interface Descriptor:
> >       bLength                 9
> >       bDescriptorType         4
> >       bInterfaceNumber        0
> >       bAlternateSetting       0
> >       bNumEndpoints           2
> >       bInterfaceClass         8 Mass Storage
> >       bInterfaceSubClass      6 SCSI
> >       bInterfaceProtocol     80 Bulk (Zip)
> >       iInterface              0
> >       Endpoint Descriptor:
> >         bLength                 7
> >         bDescriptorType         5
> >         bEndpointAddress     0x81  EP 1 IN
> >         bmAttributes            2
> >           Transfer Type            Bulk
> >           Synch Type               None
> >           Usage Type               Data
> >         wMaxPacketSize     0x0040  1x 64 bytes
> >         bInterval             255
> >       Endpoint Descriptor:
> >         bLength                 7
> >         bDescriptorType         5
> >         bEndpointAddress     0x02  EP 2 OUT
> >         bmAttributes            2
> >           Transfer Type            Bulk
> >           Synch Type               None
> >           Usage Type               Data
> >         wMaxPacketSize     0x0040  1x 64 bytes
> >         bInterval             255
> > Device Qualifier (for other device speed):
> >   bLength                10
> >   bDescriptorType         6
> >   bcdUSB               2.00
> >   bDeviceClass            0 (Defined at Interface level)
> >   bDeviceSubClass         0
> >   bDeviceProtocol         0
> >   bMaxPacketSize0        64
> >   bNumConfigurations      1
> > Device Status:     0x0000
> >   (Bus Powered)
> > 
> > 
> > After bootup, dmesg shows:
> > 
> > usb 2-1: new full speed USB device using uhci_hcd and address 2
> > usb 2-1: configuration #1 chosen from 1 choice
> > usbcore: registered new interface driver ub
> > Initializing USB Mass Storage driver...
> > usbcore: registered new interface driver usb-storage
> > USB Mass Storage support registered.
> > usb 2-1: USB disconnect, address 2
> > usb 1-1: new full speed USB device using uhci_hcd and address 2
> > usb 1-1: configuration #1 chosen from 1 choice
> > usb 2-1: new full speed USB device using uhci_hcd and address 3
> > usb 2-1: configuration #1 chosen from 1 choice
> > 
> > 
> > Let me know if you need additional information.
> > 
> > Thanks
> > Rich
> > 
> > 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Comment 3 Greg Kroah-Hartman 2008-02-10 10:14:18 UTC
On Sat, Feb 09, 2008 at 10:55:17PM -0800, Andrew Morton wrote:
> On Sat,  9 Feb 2008 18:08:14 -0800 (PST) bugme-daemon@bugzilla.kernel.org
> wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=9925
> > 
> >            Summary: PROBLEM: Card Reader Detected but won't connect to
> >                     system
> >            Product: IO/Storage
> >            Version: 2.5
> >      KernelVersion: 2.6.24.1
> >           Platform: All
> >         OS/Version: Linux
> >               Tree: Mainline
> >             Status: NEW
> >           Severity: normal
> >           Priority: P1
> >          Component: Other
> >         AssignedTo: io_other@kernel-bugs.osdl.org
> >         ReportedBy: budman85@eastlink.ca
> > 
> > 
> > Latest working kernel version: 2.6.24.1
> > Earliest failing kernel version: 2.6.23.12
> 
> A regression.

Known problem, fixed with that patch that you sent to Linus last night
for the ub driver.

Right Pete?
Comment 4 Rich Jones 2008-02-10 10:33:37 UTC

bugme-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=9925
>
>   
>>>
>>> Latest working kernel version: 2.6.24.1
>>> Earliest failing kernel version: 2.6.23.12
>>>       
>> A regression.
>>     
I only had 2.6.23.12 working, and decided to try a newer kernel to see 
if anything was updated.
But it still exists.

>>     
>>> I tried a normal 1GB SD card (leaving out SDHC for the moment)
>>>
>>> mount -t vfat /dev/ude1 /media/sddisk/
>>> mount: special device /dev/ude1 does not exist
>>>       
>
> Shouldn't it be /dev/ube1 instead of ude1 ??
>
>   
Yes. I was using ube1 before, must of had a typo when assembling this email.
I have retried just to be sure, and ube1 does not exist.

mount -t vfat /dev/ube1 /media/sd
mount: special device /dev/ube1 does not exist


> In any case, a full dmesg output with CONFIG_USB_STORAGE_DEBUG enabled
> would be great.
>
>   
Will work on that.


>>> FAT: bogus number of reserved sectors
>>> VFS: Can't find a valid FAT filesystem on dev ube.
>>>       
>
> mkfs.vfat would help here, probably. It can be a bug in the FS not even
> in USB.
>
>   
The SD card was formatted using the Camera's format command.




Thanks
Rich
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:bugme-daemon@bugzilla.kernel.org">bugme-daemon@bugzilla.kernel.org</a> wrote:
<blockquote
 cite="mid:20080210130705.B1ADC11D109@picon.linux-foundation.org"
 type="cite">
  <pre wrap=""><a class="moz-txt-link-freetext" href="http://bugzilla.kernel.org/show_bug.cgi?id=9925">http://bugzilla.kernel.org/show_bug.cgi?id=9925</a>

  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">

Latest working kernel version: 2.6.24.1
Earliest failing kernel version: 2.6.23.12
      </pre>
    </blockquote>
    <pre wrap="">A regression.
    </pre>
  </blockquote>
</blockquote>
I only had 2.6.23.12 working, and decided to try a newer kernel to see
if anything was updated.<br>
But it still exists.<br>
<br>
<blockquote
 cite="mid:20080210130705.B1ADC11D109@picon.linux-foundation.org"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">
    </pre>
    <blockquote type="cite">
      <pre wrap="">
I tried a normal 1GB SD card (leaving out SDHC for the moment)

mount -t vfat /dev/ude1 /media/sddisk/
mount: special device /dev/ude1 does not exist
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->
Shouldn't it be /dev/ube1 instead of ude1 ??

  </pre>
</blockquote>
Yes. I was using ube1 before, must of had a typo when assembling this
email.<br>
I have retried just to be sure, and ube1 does not exist.<br>
<br>
mount -t vfat /dev/ube1 /media/sd<br>
mount: special device /dev/ube1 does not exist<br>
<br>
<br>
<blockquote
 cite="mid:20080210130705.B1ADC11D109@picon.linux-foundation.org"
 type="cite">
  <pre wrap="">In any case, a full dmesg output with CONFIG_USB_STORAGE_DEBUG enabled
would be great.

  </pre>
</blockquote>
Will work on that.<br>
<br>
<br>
<blockquote
 cite="mid:20080210130705.B1ADC11D109@picon.linux-foundation.org"
 type="cite">
  <pre wrap=""></pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev ube.
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->
mkfs.vfat would help here, probably. It can be a bug in the FS not even
in USB.

  </pre>
</blockquote>
The SD card was formatted using the Camera's format command.<br>
<br>
<br>
<br>
<br>
Thanks<br>
Rich<br>
</body>
</html>
Comment 5 Matthew Dharm 2008-02-10 10:40:48 UTC
On Sun, Feb 10, 2008 at 02:50:02PM -0500, Felipe Balbi wrote:
> On Sat, Feb 09, 2008 at 10:55:17PM -0800, Andrew Morton wrote:
> > On Sat,  9 Feb 2008 18:08:14 -0800 (PST) bugme-daemon@bugzilla.kernel.org
> wrote:
> > 
> > > /dev
> > > root # ls -al ub*
> > > brw-rw---- 1 root video 180,  0 2008-02-09 15:21 "uba"
> > > brw-rw---- 1 root video 180,  8 2008-02-09 15:21 "ubb"
> > > brw-rw---- 1 root video 180, 16 2008-02-09 15:21 "ubc"
> > > brw-rw---- 1 root video 180, 24 2008-02-09 15:21 "ubd"
> > > brw-r----- 1 root disk  180, 32 2008-02-09 15:23 "ube"
> > > 
> > > I tried a normal 1GB SD card (leaving out SDHC for the moment)
> > > 
> > > mount -t vfat /dev/ude1 /media/sddisk/
> > > mount: special device /dev/ude1 does not exist
> 
> Shouldn't it be /dev/ube1 instead of ude1 ??
> 
> In any case, a full dmesg output with CONFIG_USB_STORAGE_DEBUG enabled
> would be great.

That probably wouldn't help; it looks like he's using the ub driver, not
usb-storage.

Matt
Comment 6 Rich Jones 2008-02-10 11:35:57 UTC

Matthew Dharm wrote:
> On Sun, Feb 10, 2008 at 02:50:02PM -0500, Felipe Balbi wrote:
>   
>> On Sat, Feb 09, 2008 at 10:55:17PM -0800, Andrew Morton wrote:
>>     
>>> On Sat,  9 Feb 2008 18:08:14 -0800 (PST) bugme-daemon@bugzilla.kernel.org
>>> wrote:
>>>
>>>       
>>>> /dev
>>>> root # ls -al ub*
>>>> brw-rw---- 1 root video 180,  0 2008-02-09 15:21 "uba"
>>>> brw-rw---- 1 root video 180,  8 2008-02-09 15:21 "ubb"
>>>> brw-rw---- 1 root video 180, 16 2008-02-09 15:21 "ubc"
>>>> brw-rw---- 1 root video 180, 24 2008-02-09 15:21 "ubd"
>>>> brw-r----- 1 root disk  180, 32 2008-02-09 15:23 "ube"
>>>>
>>>> I tried a normal 1GB SD card (leaving out SDHC for the moment)
>>>>
>>>> mount -t vfat /dev/ude1 /media/sddisk/
>>>> mount: special device /dev/ude1 does not exist
>>>>         
>> Shouldn't it be /dev/ube1 instead of ude1 ??
>>
>> In any case, a full dmesg output with CONFIG_USB_STORAGE_DEBUG enabled
>> would be great.
>>     
>
> That probably wouldn't help; it looks like he's using the ub driver, not
> usb-storage.
>
>   

Correct, the card readers are using the ub driver.

/proc/bus/usb
more devices|grep Driver
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=ub
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=ub


Thanks
Rich


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Matthew Dharm wrote:
<blockquote cite="mid:20080210171804.GB30466@one-eyed-alien.net"
 type="cite">
  <pre wrap="">On Sun, Feb 10, 2008 at 02:50:02PM -0500, Felipe Balbi wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">On Sat, Feb 09, 2008 at 10:55:17PM -0800, Andrew Morton wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">On Sat,  9 Feb 2008 18:08:14 -0800 (PST) <a class="moz-txt-link-abbreviated" href="mailto:bugme-daemon@bugzilla.kernel.org">bugme-daemon@bugzilla.kernel.org</a> wrote:

      </pre>
      <blockquote type="cite">
        <pre wrap="">/dev
root # ls -al ub*
brw-rw---- 1 root video 180,  0 2008-02-09 15:21 "uba"
brw-rw---- 1 root video 180,  8 2008-02-09 15:21 "ubb"
brw-rw---- 1 root video 180, 16 2008-02-09 15:21 "ubc"
brw-rw---- 1 root video 180, 24 2008-02-09 15:21 "ubd"
brw-r----- 1 root disk  180, 32 2008-02-09 15:23 "ube"

I tried a normal 1GB SD card (leaving out SDHC for the moment)

mount -t vfat /dev/ude1 /media/sddisk/
mount: special device /dev/ude1 does not exist
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">Shouldn't it be /dev/ube1 instead of ude1 ??

In any case, a full dmesg output with CONFIG_USB_STORAGE_DEBUG enabled
would be great.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
That probably wouldn't help; it looks like he's using the ub driver, not
usb-storage.

  </pre>
</blockquote>
<br>
Correct, the card readers are using the ub driver.<br>
<br>
/proc/bus/usb<br>
more devices|grep Driver<br>
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub&nbsp; ) Sub=00 Prot=00 Driver=hub<br>
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=ub<br>
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub&nbsp; ) Sub=00 Prot=00 Driver=hub<br>
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=ub<br>
<br>
<br>
Thanks<br>
Rich<br>
<br>
<br>
</body>
</html>
Comment 7 Pete Zaitcev 2008-02-10 13:27:34 UTC
(In reply to comment #3)
> Known problem, fixed with that patch that you sent to Linus last night
> for the ub driver.
> 
> Right Pete?

I'm not sure if it's the same issue (the sg table not initialized
before use). The tables are initialized to zero. Regretfuly I do
not understand how the new s/g API is supposed to be used (e.g.
if the last entry in the sg table special for chaining).
Comment 8 Pete Zaitcev 2008-02-10 19:11:20 UTC
Created attachment 14776 [details]
ub fix for improper sg_init_table
Comment 9 Pete Zaitcev 2008-02-10 19:16:06 UTC
Rich, please try the patch with sg_init_table(), see attached.
Comment 10 Rich Jones 2008-02-10 21:49:05 UTC
Hi Pete, I tried the patch, no luck.

Seems hal is not detecting when the memory card is inserted, like the other reader.   I did try making the node in dev,  mknod /dev/uba1 b 180 1 - when I try to mount, not a valid block device error occurs.

FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev uba.
mount: /dev/uba1 is not a valid block device

brw-r----- 1 root disk  180,  0 2008-02-11 00:57 "/dev/uba"
brw-r--r-- 1 root root  180,  1 2008-02-11 00:48 "/dev/uba1"


Is there a way to run ub in debug mode, since its not using usb_storage?



Thanks 
Rich
Comment 11 Pete Zaitcev 2008-02-13 11:10:18 UTC
I guessed this would be something different, but since Greg asked in
comment #3, we had to test it.

By itself ub does not have any debugging at all, it relies on usbmon.
This way you do not need to rebuild anything for testing, because
usbmon usually is enabled. Please have a look at
Documentation/usb/usbmon.txt.

The test should be
1. stop HAL ("service haldaemon stop" on Fedora, or just kill hald)
2. Start cat /sys/kernel/debug/usbmon/0u > 00.mon
3. plug the device
4. watch dmesg to see that probing settled
   dmesg > 00.1.dmesg
5. cat /proc/partitions > 00.part   -- this will tell which device
   I presume that partitions are not detected at this point.
6. dd if=/dev/ube of=00.ube.img bs=1k count=1
   This either succeeds or returns "0+1 records", please save
   the terminal log
7. dmesg > 00.2.dmesg
8. Kill the cat from step 2
9. cat /proc/bus/usb/devices > 00.devices
   Not strictly required, but I'm curious what we're dealing with.
   Also it makes it easier to read usbmon traces.

Please attach the 00.* files to the bug.
Comment 12 Rich Jones 2008-02-13 18:37:51 UTC
Created attachment 14817 [details]
first dmesg output

The second dmesg didn't produce any additional output.
Comment 13 Rich Jones 2008-02-13 18:39:58 UTC
Created attachment 14818 [details]
usbmon output from bus 2u

I didn't see any activity when I inserted the memory card (tried a few times).
I did reconnect the device, so you may see the disconnect and then a few seconds later a second connect.
Comment 14 Rich Jones 2008-02-13 18:40:17 UTC
Created attachment 14819 [details]
dd output
Comment 15 Rich Jones 2008-02-13 18:41:14 UTC
Created attachment 14820 [details]
usb device list

Bus 02 is the device thats trying to connect
Comment 16 Rich Jones 2008-02-13 18:42:22 UTC
Created attachment 14821 [details]
partition list
Comment 17 Rich Jones 2008-02-13 18:45:55 UTC
Thanks for the steps.
I recompiled the kernel with the debugfs enabled.
I was able to capture some output from usbmon,
but dd failed, and the partition wasn't picked up.


Thanks
Rich
Comment 18 Rich Jones 2008-02-13 19:00:49 UTC
Created attachment 14822 [details]
dd output
Comment 19 Rich Jones 2008-02-13 19:01:21 UTC
Created attachment 14823 [details]
partition list
Comment 20 Rich Jones 2008-02-13 19:02:10 UTC
Created attachment 14824 [details]
usb device list

Bus 02 is the device thats trying to connect
Comment 21 Pete Zaitcev 2008-02-13 22:23:01 UTC
I considered, and I cannot guess what it is, and it would take too
much work to figure it out.

Why don't you disable CONFIG_BLK_DEV_UB and hope for the best?
Comment 22 Rich Jones 2008-02-13 23:18:24 UTC
Hi

Before giving up, I did another search on the net, and came across a note about libusual.  I doubled checked my system and found in the config, libusual was not enabled.  I enabled it and rebooted - Bingo!

Both card readers changed back to /dev/sd* devices. When I added the memory card, the partition appeared and I was able to mount both cards, first the SD, and then the SDHC.  

Thanks for taking the time to take a look at this.
The device is connecting fine now.
Comment 23 Pete Zaitcev 2008-02-17 10:11:14 UTC
Let's close this, then. I'd like to see how is it that partitions are
not detected on ub, but it works fine on my systems.

Note You need to log in before you can comment on or make changes to this bug.