Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2019 19:29:15 +0100
From:      Idwer Vollering <vidwer@gmail.com>
To:        freebsd-usb@freebsd.org
Subject:   quirky Sandisk SDCZ48-032G when using XHCI
Message-ID:  <CAPp9OrnndSfb%2BzWr2tRemostB12yJ-GmxZTPyhNx2wa0qHCKJw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Running 13-CURRENT, r344363 on amd64.

dmesg:
ugen1.3: <SanDisk Ultra> at usbus1
umass0 on uhub4
umass0: <SanDisk Ultra, class 0/0, rev 3.00/1.00, addr 2> on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0xc100
umass0:2:0: Attached to scbus2
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 2 more tries remain
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: <SanDisk Ultra 1.00> Removable Direct Access SPC-4 SCSI device
da0: Serial Number <redacted>
da0: 400.000MB/s transfers
da0: 29328MB (60063744 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>


usbconfig -d ugen1.3 dump_all_desc:
ugen1.3: <SanDisk Ultra> at usbus1, cfg=0 md=HOST spd=SUPER (5.0Gbps)
pwr=ON (224mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0300
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0009
  idVendor = 0x0781
  idProduct = 0x5581
  bcdDevice = 0x0100
  iManufacturer = 0x0001  <SanDisk>
  iProduct = 0x0002  <Ultra>
  iSerialNumber = 0x0003  <redacted>
  bNumConfigurations = 0x0001

 Configuration index 0

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x002c
    bNumInterfaces = 0x0001
    bConfigurationValue = 0x0001
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x0080
    bMaxPower = 0x0070

    Interface 0
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0002
      bInterfaceClass = 0x0008  <Mass storage>
      bInterfaceSubClass = 0x0006
      bInterfaceProtocol = 0x0050
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0400
        bInterval = 0x0000
        bRefresh = 0x0000
        bSynchAddress = 0x0000

      Additional Descriptor

      bLength = 0x06
      bDescriptorType = 0x30
      bDescriptorSubType = 0x01
       RAW dump:
       0x00 | 0x06, 0x30, 0x01, 0x00, 0x00, 0x00


     Endpoint 1
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0002  <OUT>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0400
        bInterval = 0x0000
        bRefresh = 0x0000
        bSynchAddress = 0x0000

      Additional Descriptor

      bLength = 0x06
      bDescriptorType = 0x30
      bDescriptorSubType = 0x0f
       RAW dump:
       0x00 | 0x06, 0x30, 0x0f, 0x00, 0x00, 0x00


Proposed, yet unimproving the CCB stall, diff:
Index: sys/dev/usb/quirk/usb_quirk.c
===================================================================
--- sys/dev/usb/quirk/usb_quirk.c    (revision 344363)
+++ sys/dev/usb/quirk/usb_quirk.c    (working copy)
@@ -396,6 +396,8 @@
         UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
     USB_QUIRK(SANDISK, SDCZ4_256, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
         UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
+    USB_QUIRK(SANDISK, SDCZ48_32, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+        UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
     USB_QUIRK(SANDISK, SDDR31, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
         UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1),
     USB_QUIRK(SANDISK, IMAGEMATE_SDDR289, 0x0000, 0xffff,
Index: sys/dev/usb/usbdevs
===================================================================
--- sys/dev/usb/usbdevs    (revision 344363)
+++ sys/dev/usb/usbdevs    (working copy)
@@ -4067,6 +4067,7 @@
 product SANDISK SDCZ2_256    0x7104    Cruzer Mini 256MB
 product SANDISK SDCZ4_128    0x7112    Cruzer Micro 128MB
 product SANDISK SDCZ4_256    0x7113    Cruzer Micro 256MB
+product SANDISK SDCZ48_32    0x5581  Ultra 32GB
 product SANDISK IMAGEMATE_SDDR289    0xb6ba    ImageMate SDDR-289

 /* Sanwa Electric Instrument Co., Ltd. products */
Index: sys/cam/scsi/scsi_da.c
===================================================================
--- sys/cam/scsi/scsi_da.c    (revision 344363)
+++ sys/cam/scsi/scsi_da.c    (working copy)
@@ -871,6 +871,10 @@
         {T_DIRECT, SIP_MEDIA_REMOVABLE, "16G SLC", "CHIPFANCIER",
          "1.00"}, /*quirks*/ DA_Q_NO_RC16
        },
+       {
+        {T_DIRECT, SIP_MEDIA_REMOVABLE, "SanDisk", "Ultra",
+        "1.00"}, /*quirks*/ DA_Q_RETRY_BUSY|DA_Q_NO_6_BYTE
+       },
     /* ATA/SATA devices over SAS/USB/... */
     {
         /* Sandisk X400 */

I reasoned that scsi_da.c might benefit from "*" in the version field
("1.00"), however that won't clear the stall either.

Cheers,

Idwer



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPp9OrnndSfb%2BzWr2tRemostB12yJ-GmxZTPyhNx2wa0qHCKJw>