From df95b8058ed993a362e14fe601e6488addc0daaa Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 10 Aug 2017 08:47:44 +0200 Subject: [PATCH 001/325] usb: Add UQ_MSC_NO_INQUIRY quirk for external "Intenso Memory" disk Without the quirk the disk disappears shortly after beeing detected: 08:36:35 t520 kernel: ugen1.4: at usbus1 08:36:36 t520 kernel: umass0 on uhub3 08:36:36 t520 kernel: umass0: on usbus1 08:36:36 t520 kernel: umass0: SCSI over Bulk-Only; quirks = 0x0100 08:36:36 t520 kernel: umass0:5:0: Attached to scbus5 08:36:36 t520 kernel: (probe0:umass-sim0:0:0:0): REPORT LUNS. CDB: a0 00 00 00 00 00 00 00 00 10 00 00 08:36:36 t520 kernel: (probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error 08:36:36 t520 kernel: (probe0:umass-sim0:0:0:0): SCSI status: Check Condition 08:36:36 t520 kernel: (probe0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid command operation code) 08:36:36 t520 kernel: (probe0:umass-sim0:0:0:0): Error 22, Unretryable error 08:37:49 t520 kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 01 83 00 fc 00 08:37:49 t520 kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error 08:37:49 t520 kernel: (probe0:umass-sim0:0:0:0): Retrying command 08:37:54 t520 kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 01 83 00 fc 00 08:37:54 t520 kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error 08:37:54 t520 kernel: (probe0:umass-sim0:0:0:0): Retrying command 08:38:00 t520 kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 01 83 00 fc 00 08:38:00 t520 kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error 08:38:00 t520 kernel: (probe0:umass-sim0:0:0:0): Retrying command 08:38:05 t520 kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 01 83 00 fc 00 08:38:05 t520 kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error 08:38:05 t520 kernel: (probe0:umass-sim0:0:0:0): Retrying command 08:38:11 t520 kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 01 83 00 fc 00 08:38:11 t520 kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error 08:38:11 t520 kernel: (probe0:umass-sim0:0:0:0): Error 5, Retries exhausted 08:38:44 t520 kernel: (da0:umass-sim0:0:0:0): got CAM status 0x44 08:38:44 t520 kernel: (da0:umass-sim0:0:0:0): fatal error, failed to attach to device 08:38:44 t520 kernel: g_access(918): provider da0 has error 6 set 08:38:44 t520 last message repeated 2 times fk@t520 ~ $sudo usbconfig -u 1 -a 4 dump_device_desc ugen1.4: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0210 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x2109 idProduct = 0x0701 bcdDevice = 0x0307 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 <20130519000569> bNumConfigurations = 0x0001 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221852 PR submission date: 2017-08-27 Obtained from: ElectroBSD --- sys/dev/usb/quirk/usb_quirk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index b9d277692137..12164094568e 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -270,6 +270,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(INSYSTEM, USBCABLE, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_START_STOP, UQ_MSC_ALT_IFACE_1), + USB_QUIRK(INTENSO, MEMORY_BOX, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), USB_QUIRK(INSYSTEM, ATAPI, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC), USB_QUIRK(INSYSTEM, STORAGE_V2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, -- 2.32.0