Whenever I plug my SanDisk SDDR31 CF reader into my 5.1-BETA system,
I am told that the device doesn't support "Get Max Lun". I have added a USB
quirk to my kernel to fix this, and it seems to work perfectly. I would
appreciate if somebody would consider adding this before 5.2-RELEASE.

umass0: SanDisk Corporation ImageMate CompactFlash USB, rev 1.10/0.09, addr 2
umass0: Get Max Lun not supported (STALLED)

The patch below fixes this problem.

Unfortunately, if there is no CF card in the reader, I am greeted with more
fun messages which I am currently unable to find a fix for:

da0: <SanDisk ImageMate II 1.30> Removable Direct Access SCSI-2 device
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
(da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI Status: Check Condition
(da0:umass-sim0:0:0:0): NOT READY asc:3a,0
(da0:umass-sim0:0:0:0): Medium not present
(da0:umass-sim0:0:0:0): Unretryable error
Opened disk da0 -> 6

Anyway, here is the USB quirk patch which seems to be solving half the
problem.

Index: sys/dev/usb/umass.c
===================================================================
RCS file: /usr/home/ncvs/src/sys/dev/usb/umass.c,v
retrieving revision 1.84
diff -u -p -r1.84 umass.c
--- sys/dev/usb/umass.c 21 May 2003 00:22:07 -0000      1.84
+++ sys/dev/usb/umass.c 30 May 2003 19:48:33 -0000
@@ -358,6 +358,9 @@ Static struct umass_devdescr_t umass_dev
          UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
          WRONG_CSWSIG
        },
+       { USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDDR31, RID_WILDCARD,
+         UMASS_PROTO_SCSI | UMASS_PROTO_WIRE, NO_GETMAXLUN
+       },
        { USB_VENDOR_SCANLOGIC, USB_PRODUCT_SCANLOGIC_SL11R, RID_WILDCARD,
          UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I,
          NO_QUIRKS

-- 
Sean Kelly         | PGP KeyID: D2E5E296
[EMAIL PROTECTED] | http://www.zombie.org

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to