Subject: Re: USB card readers?
To: Simon J. Gerraty <sjg@crufty.net>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: port-i386
Date: 03/28/2006 10:59:26
"Simon J. Gerraty" <sjg@crufty.net> writes:

> Anyone read SD cards?  Perhaps I was being too optimistic to think
> they'd provide the same functionality as a CF...

I have a couple of SD cards that I've used in various USB card
readers. This SanDisk reader mostly works (on 2.0.2 and 3.99.15/i386
systems):

umass0 at uhub3 port 5 configuration 1 interface 0
umass0: SanDisk ImageMate 12 in 1 Reader/Writer, rev 2.00/93.17, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 4 luns per target
sd0 at scsibus0 target 0 lun 0: <Generic, STORAGE DEVICE, 9317> disk removable
sd0: fabricating a geometry
sd0: 120 MB, 120 cyl, 64 head, 32 sec, 512 bytes/sect x 246016 sectors
sd1 at scsibus0 target 0 lun 1: <Generic, STORAGE DEVICE, 9317> disk removable
sd1: drive offline
sd2 at scsibus0 target 0 lun 2: <Generic, STORAGE DEVICE, 9317> disk removable
sd2: fabricating a geometry
sd2: 120 MB, 120 cyl, 64 head, 32 sec, 512 bytes/sect x 246016 sectors
sd3 at scsibus0 target 0 lun 3: <Generic, STORAGE DEVICE, 9317> disk removable
sd3: drive offline


... provided I use sd2 to read the SD card. I don't know why it also
shows up on sd0. I can also plug in the reader with or without the
card in place; if it's not in place when I try to read, I just get
"Operation not supported by device" and this on the console:

 sd2(umass0:0:0:2): Check Condition on CDB: 0x00 40 00 00 00 00 SENSE
    KEY: Not Ready ASC/ASCQ: Medium Not Present

but it doesn't keep it from working later.

The same is true of this cheaper reader (from "avbusa.com"):

umass0 at uhub3 port 5 configuration 1 interface 0
umass0: Genesys Logic USB 2.0 Card Reader, rev 2.00/1.28, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 4 luns per target
sd0 at scsibus0 target 0 lun 0: <Generic, STORAGE DEVICE, 0128> disk removable
sd0: fabricating a geometry
sd0: 120 MB, 120 cyl, 64 head, 32 sec, 512 bytes/sect x 246016 sectors
sd1 at scsibus0 target 0 lun 1: <Generic, STORAGE DEVICE, 0128> disk removable
sd1: drive offline
sd2 at scsibus0 target 0 lun 2: <Generic, STORAGE DEVICE, 0128> disk removable
sd2: fabricating a geometry
sd2: 120 MB, 120 cyl, 64 head, 32 sec, 512 bytes/sect x 246016 sectors
sd3 at scsibus0 target 0 lun 3: <Generic, STORAGE DEVICE, 0128> disk removable
sd3: drive offline

This older PQI TravelFlash reader (USB 1.0) reads cards fine if
they're plugged in at attach time, but doesn't support hot-inserting
of the media:

umass0 at uhub2 port 1 configuration 1 interface 0
umass0: PQI Travel Flash, rev 1.10/2.05, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 3 luns per target
sd0 at scsibus0 target 0 lun 0: <General, Flash Disk Drive, 2.05> disk removable
sd0: fabricating a geometry
sd0: 120 MB, 120 cyl, 64 head, 32 sec, 512 bytes/sect x 246016 sectors
sd1 at scsibus0 target 0 lun 1: <General, Flash Disk Drive, 2.05> disk removable
sd1: drive offline
sd2 at scsibus0 target 0 lun 2: <General, Flash Disk Drive, 2.05> disk removable
sd2: drive offline


        - Nathan