Bug 188999 - [scsi_da] QUIRK: ADATA USB Flash Drive
Summary: [scsi_da] QUIRK: ADATA USB Flash Drive
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-25 20:30 UTC by Wes Morgan
Modified: 2024-11-08 04:26 UTC (History)
2 users (show)

See Also:


Attachments
file.diff (484 bytes, patch)
2014-04-25 20:30 UTC, Wes Morgan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Morgan 2014-04-25 20:30:00 UTC
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>

Fix: Add DA_Q_NO_RC16 quirk to CAM layer for this device.


Patch attached with submission follows:
How-To-Repeat: Problem occurs any time said flash drive is used. Two sticks of the same make and model exhibit this behavior.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-05-04 03:59:40 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-usb

reclassify.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:29 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Warner Losh freebsd_committer freebsd_triage 2024-11-08 00:14:30 UTC
Seems legit and complete. Committing.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-11-08 01:00:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f11b6ce4a3bc6d455dbec375218c01ce9b6b5dc2

commit f11b6ce4a3bc6d455dbec375218c01ce9b6b5dc2
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-11-08 00:11:15 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-11-08 00:40:05 +0000

    da: Add quirk for ADATA USB Drive

    ADATA USB Drive lies about the RC16, so add a quirk to ignore it.

    MFC After: 3 days
    PR: 188999
    Sponsored by:           Netflix

 sys/cam/scsi/scsi_da.c | 5 +++++
 1 file changed, 5 insertions(+)
Comment 5 Warner Losh freebsd_committer freebsd_triage 2024-11-08 04:26:21 UTC
Doh! inadvertently neglected to set author of the patch. my apologies.