From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 25 19:30:00 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1F78818 for ; Fri, 25 Apr 2014 19:30:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF0D21C8C for ; Fri, 25 Apr 2014 19:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PJU0Yd060642 for ; Fri, 25 Apr 2014 19:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3PJU0v2060631; Fri, 25 Apr 2014 19:30:00 GMT (envelope-from gnats) Resent-Date: Fri, 25 Apr 2014 19:30:00 GMT Resent-Message-Id: <201404251930.s3PJU0v2060631@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Wes Morgan Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5C8AB77 for ; Fri, 25 Apr 2014 19:20:00 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A2861BA2 for ; Fri, 25 Apr 2014 19:20:00 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PJK0V6058179 for ; Fri, 25 Apr 2014 19:20:00 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3PJK0sj058169; Fri, 25 Apr 2014 19:20:00 GMT (envelope-from nobody) Message-Id: <201404251920.s3PJK0sj058169@cgiserv.freebsd.org> Date: Fri, 25 Apr 2014 19:20:00 GMT From: Wes Morgan To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/188999: QUIRK: ADATA USB Flash Drive X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 19:30:01 -0000 >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: 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 (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: 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 >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: