From 4d4c0405fac25e4fb90d5e19724cd57c20c23331 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 10 Aug 2017 08:47:44 +0200 Subject: [PATCH] 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 Obtained from: ElectroBSD --- sys/dev/usb/quirk/usb_quirk.c | 1 + sys/dev/usb/usbdevs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 9359a097fb8b..118db32856fc 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -231,6 +231,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, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 86ea3e02ceb3..d42ead72160b 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -60,6 +60,7 @@ vendor UNKNOWN2 0x0105 Unknown vendor vendor EGALAX2 0x0123 eGalax, Inc. vendor CHIPSBANK 0x0204 Chipsbank Microelectronics Co. vendor HUMAX 0x02ad HUMAX +vendor INTENSO 0x2109 INTENSO vendor LTS 0x0386 LTS vendor BWCT 0x03da Bernd Walter Computer Technology vendor AOX 0x03e8 AOX @@ -2470,6 +2471,9 @@ product INSYSTEM ISD105 0x0202 IDE Adapter ISD105 product INSYSTEM USBCABLE 0x081a USB cable product INSYSTEM STORAGE_V2 0x5701 USB Storage Adapter V2 +/* Intenso products */ +product INTENSO MEMORY_BOX 0x0701 External disk + /* Intel products */ product INTEL EASYPC_CAMERA 0x0110 Easy PC Camera product INTEL TESTBOARD 0x9890 82930 test board -- 2.14.1