From owner-freebsd-current@FreeBSD.ORG Sat May 31 14:43:35 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 968BD37B401 for ; Sat, 31 May 2003 14:43:35 -0700 (PDT) Received: from area51.slashnet.org (area51.slashnet.org [209.150.98.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01E7743F85 for ; Sat, 31 May 2003 14:43:35 -0700 (PDT) (envelope-from smkelly@zombie.org) Received: from edgemaster.zombie.org (ip68-13-71-251.om.om.cox.net [68.13.71.251]) by area51.slashnet.org (Postfix) with ESMTP id D4AEB49F29 for ; Sat, 31 May 2003 17:43:33 -0400 (EDT) Received: by edgemaster.zombie.org (Postfix, from userid 1001) id 810753983A; Sat, 31 May 2003 16:43:33 -0500 (CDT) Date: Sat, 31 May 2003 16:43:33 -0500 From: Sean Kelly To: current@freebsd.org Message-ID: <20030531214333.GA20274@edgemaster.zombie.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline User-Agent: Mutt/1.5.4i Subject: USB Quirk Patch: SanDisk ImageMate CF SDDR31 (V:0x0781, P:0x0002) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2003 21:43:35 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 --=20 Sean Kelly | PGP KeyID: D2E5E296 smkelly@zombie.org | http://www.zombie.org --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE+2SIFPm7A9NLl4pYRApzhAJ9T/SvnqnZSxMG0/fWhIC8Mbk0vVQCfZBwq 8ZKpaA+w+u1I8Bz7XBPmGGU= =WJgi -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0--