From owner-freebsd-usb@freebsd.org Wed Feb 20 19:21:04 2019 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41F1D14FD5A3 for ; Wed, 20 Feb 2019 19:21:04 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 4F45A8F797 for ; Wed, 20 Feb 2019 19:21:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [176.74.212.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9147B2600E0; Wed, 20 Feb 2019 20:20:56 +0100 (CET) Subject: Re: quirky Sandisk SDCZ48-032G when using XHCI To: Idwer Vollering , freebsd-usb@freebsd.org References: From: Hans Petter Selasky Message-ID: <26d963ed-4b9f-a9db-6d7d-ca4a802eb7ed@selasky.org> Date: Wed, 20 Feb 2019 20:18:30 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4F45A8F797 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-6.38 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mail.turbocat.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.80)[-0.797,0]; IP_SCORE(-3.28)[ip: (-9.49), ipnet: 88.99.0.0/16(-4.66), asn: 24940(-2.22), country: DE(-0.01)]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2019 19:21:04 -0000 On 2/20/19 7:29 PM, Idwer Vollering wrote: > Running 13-CURRENT, r344363 on amd64. > > dmesg: > ugen1.3: at usbus1 > umass0 on uhub4 > umass0: 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: Removable Direct Access SPC-4 SCSI device > da0: Serial Number > da0: 400.000MB/s transfers > da0: 29328MB (60063744 512 byte sectors) > da0: quirks=0x2 > > > usbconfig -d ugen1.3 dump_all_desc: > ugen1.3: at usbus1, cfg=0 md=HOST spd=SUPER (5.0Gbps) > pwr=ON (224mA) > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0300 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0009 > idVendor = 0x0781 > idProduct = 0x5581 > bcdDevice = 0x0100 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0003 > bNumConfigurations = 0x0001 > > Configuration index 0 > > bLength = 0x0009 > bDescriptorType = 0x0002 > wTotalLength = 0x002c > bNumInterfaces = 0x0001 > bConfigurationValue = 0x0001 > iConfiguration = 0x0000 > bmAttributes = 0x0080 > bMaxPower = 0x0070 > > Interface 0 > bLength = 0x0009 > bDescriptorType = 0x0004 > bInterfaceNumber = 0x0000 > bAlternateSetting = 0x0000 > bNumEndpoints = 0x0002 > bInterfaceClass = 0x0008 > bInterfaceSubClass = 0x0006 > bInterfaceProtocol = 0x0050 > iInterface = 0x0000 > > Endpoint 0 > bLength = 0x0007 > bDescriptorType = 0x0005 > bEndpointAddress = 0x0081 > bmAttributes = 0x0002 > 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 > bmAttributes = 0x0002 > 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. > Could you upload the patch in a PR and assign it to freebsd-usb@freebsd.org ? --HPS