Date: Fri, 25 Apr 2014 19:20:00 GMT From: Wes Morgan <morganw@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/188999: QUIRK: ADATA USB Flash Drive Message-ID: <201404251920.s3PJK0sj058169@cgiserv.freebsd.org> Resent-Message-ID: <201404251930.s3PJU0v2060631@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 188999 >Category: kern >Synopsis: QUIRK: ADATA USB Flash Drive >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 25 19:30:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Wes Morgan >Release: 10-STABLE >Organization: >Environment: FreeBSD mercury 10.0-STABLE FreeBSD 10.0-STABLE #22 r264766:264921M: Fri Apr 25 13:56:54 CDT 2014 root@mercury:/usr/obj/usr/src/sys/MERCURY amd64 >Description: Device needs the NO_RC16 quirk: da0 at umass-sim0 bus 0 scbus4 target 0 lun 0 da0: <ADATA USB Flash Drive 1.00> Removable Direct Access SCSI-6 device da0: Serial Number 1411216542340002 da0: 40.000MB/s transfers da0: 120842MB (247484416 512 byte sectors: 255H 63S/T 15405C) 247484415 512 da0: quirks=0x2<NO_6_BYTE> (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 0e c0 4f ff 00 00 01 00 (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): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range) (da0:umass-sim0:0:0:0): Error 22, Unretryable error (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 0e c0 4f ff 00 00 01 00 (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): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range) (da0:umass-sim0:0:0:0): Error 22, Unretryable error (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 0e c0 4f ff 00 00 01 00 (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): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range) (da0:umass-sim0:0:0:0): Error 22, Unretryable error After adding the quirk to scsi_da.c, we now have the correct size: da0: <ADATA USB Flash Drive 1.00> Removable Direct Access SCSI-6 device da0: Serial Number 1411216542340002 da0: 40.000MB/s transfers da0: 120586MB (246960128 512 byte sectors: 255H 63S/T 15372C) da0: quirks=0x12<NO_6_BYTE,NO_RC16> >How-To-Repeat: Problem occurs any time said flash drive is used. Two sticks of the same make and model exhibit this behavior. >Fix: Add DA_Q_NO_RC16 quirk to CAM layer for this device. Patch attached with submission follows: --- sys/cam/scsi/scsi_da.c~ 2014-04-25 13:44:36.000000000 -0500 +++ sys/cam/scsi/scsi_da.c 2014-04-25 13:51:19.051644688 -0500 @@ -684,6 +684,11 @@ {T_DIRECT, SIP_MEDIA_REMOVABLE, "JetFlash", "Transcend*", "*"}, /*quirks*/ DA_Q_NO_RC16 }, + { + /* ADATA USB sticks lie on RC16. */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "ADATA", "USB Flash Drive*", + "*"}, /*quirks*/ DA_Q_NO_RC16 + }, /* ATA/SATA devices over SAS/USB/... */ { /* Hitachi Advanced Format (4k) drives */ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404251920.s3PJK0sj058169>