Bug 234503 - Chipfancier SLC 16GB memstick: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
Summary: Chipfancier SLC 16GB memstick: ILLEGAL REQUEST asc:21,0 (Logical block addres...
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Warner Losh
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2018-12-30 15:24 UTC by josef.lar
Modified: 2019-02-09 17:09 UTC (History)
3 users (show)

See Also:
koobs: mfc-stable11?
koobs: mfc-stable12?


Attachments
This patch fixes the problem for me. (756 bytes, text/plain)
2018-12-30 15:24 UTC, josef.lar
no flags Details
Patch to broaden quirk coverage to all Chipfancier devices (529 bytes, patch)
2019-02-06 10:46 UTC, Mel Pilgrim
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description josef.lar 2018-12-30 15:24:36 UTC
Created attachment 200622 [details]
This patch fixes the problem for me.

Got a very similar issue as in Bug 198647.

dmesg info:

da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <16G SLC CHIPFANCIER 1.00> Removable Direct Access SPC-4 SCSI device
da0: Serial Number 500274313
da0: 40.000MB/s transfers
da0: 15900MB (32564183 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
da0: Delete methods: <NONE(*),ZERO>
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 01 f0 e3 d6 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

The number of sectors does not match the number I get from Linux, and a similar patch (see the attachment) as the one in bug 198647 fixed the problem for me.
Comment 1 Warner Losh freebsd_committer 2018-12-31 20:25:01 UTC
This patch looks good to me. It might be nice if we tried to automate this weird quirk...

The CCB decodes to the right thing...
Comment 2 commit-hook freebsd_committer 2018-12-31 22:20:46 UTC
A commit references this bug:

Author: imp
Date: Mon Dec 31 22:20:30 UTC 2018
New revision: 342657
URL: https://svnweb.freebsd.org/changeset/base/342657

Log:
  Add NO_RC16 quirk for Chipfancier 16GB USB stick...

  Submitted by: osef.lar@gmail.com
  PR: 234503

Changes:
  head/sys/cam/scsi/scsi_da.c
Comment 3 Warner Losh freebsd_committer 2018-12-31 22:28:01 UTC
Committed to -master, will let it chill in -head and then MFC it to stable/11 and stable/12
Comment 4 josef.lar 2019-01-01 03:58:36 UTC
Thanks! Yes, it will be impossible to test all the hardware in the world to see if this quirk applies so it would really be good to automate it somehow...

The e-mail in the commit msg looks incorrect but this is no big deal for me :).
Comment 5 Mel Pilgrim 2019-01-24 13:39:01 UTC
I have a Chipfancier 32 GB SLC drive that also exhibits this problem:

umass0 on uhub0
umass0: <32G SLC CHIPFANCIER, class 0/0, rev 3.00/0.01, addr 3> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x8100
umass0:9:0: Attached to scbus9
da0 at umass-sim0 bus 0 scbus9 target 0 lun 0
da0: <32G SLC CHIPFANCIER 1.00> Removable Direct Access SPC-4 SCSI device
da0: Serial Number 56922150
da0: 400.000MB/s transfers
da0: 31800MB (65128366 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 03 e1 c7 ac 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
[dozens of repetitions snipped]

I added the quirk to a GENERIC build from releng/11.2 r343111 modified as

{T_DIRECT, SIP_MEDIA_REMOVABLE, "32G SLC", "CHIPFANCIER", "1.00"}

and it fixed the problem for me as well.

Can this quirk be made to cover all of the Chipfancier drives?  I would assume everything in the family is going to have the same bug as, internally, these only differ by the number/capacity of the memory chips.  There are 16, 32, 64, 128, and 256 GB versions of this product.

If there will be an 11.3-R, can this get into stable/11 before then?
Comment 6 Mel Pilgrim 2019-02-06 10:46:04 UTC
Created attachment 201786 [details]
Patch to broaden quirk coverage to all Chipfancier devices

I was asked to provide a patch to cover all Chipfancier devices.  I've been running this patch in production and it covers the 32 GB Chipfancier devices I have.
Comment 7 Warner Losh freebsd_committer 2019-02-09 05:18:10 UTC
Any chance that I can get either a Chipfancier device, or a pointer to where to get one? It would be helpful to see a trace of its discovery to see if there'd be a way we can avoid needing this quirk at all...

I'll update the quirk.
Comment 8 Mel Pilgrim 2019-02-09 17:09:55 UTC
They're available on Amazon, NewEgg, and slcssd.com.  The specific product group is Chipfancier's "Enterprise Level SLC" USB 3.0 drives.

Newegg:
https://www.newegg.com/Product/Product.aspx?item=9SIAERZ6975952
Amazon:
https://www.amazon.com/Enterprise-Level-USB3-0-Positive-high-Speed/dp/B071YRWPPX/
slcssd:
https://www.slcssd.com/product/slc-ssd/?v=7516fd43adaa

I can also send you one myself if cost is a factor. These are not cheap thumbdrives.