Am Donnerstag, den 06.07.2017, 14:32 -0700 schrieb Grégoire Gentil : Hi, > This might be a follow-up of: > https://www.spinics.net/lists/linux-usb/msg157437.html > https://www.spinics.net/lists/linux-usb/msg153647.html It does not look like that. > I have bought this adapter: > http://www.ebay.com/itm/122523342593 > > > The chip has the following marking: > JM JMS567 > http://www.jmicron.com/PDF/brief/jms567.pdf > > > My laptop is running: > Linux yoga 4.8.0-36-generic #36~16.04.1-Ubuntu SMP Sun Feb 5 09:39:57 > UTC 2017 x86_64 x86_64 x86_64 GNU/Linux > > LSB Version: > core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch > Distributor ID: Ubuntu > Description: Ubuntu 16.04.2 LTS > Release: 16.04 > Codename: xenial > > > When I plug the device, I get the following error message: > [ 1503.223516] usb 1-7: new high-speed USB device number 10 using xhci_hcd > [ 1503.444964] usb 1-7: New USB device found, idVendor=152d, idProduct=0539 > [ 1503.444970] usb 1-7: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1503.444973] usb 1-7: Product: USB to ATA/ATAPI Bridge > [ 1503.444976] usb 1-7: Manufacturer: JMicron > [ 1503.444979] usb 1-7: SerialNumber: 00A12345789F > [ 1503.447024] scsi host1: uas > [ 1511.457666] scsi 1:0:0:0: scsi scan: 96 byte inquiry failed. Consider > BLIST_INQUIRY_36 for this device > > > The device is working on Windows 10. > > > Any idea what could be the problem? The old storage driver unconditionally limits inquiries to 36 bytes. UAS does not have that limit. That seems to be a bit optimistic. Could you test the attached patch? Regards Oliver
From 60fd3e2d0e5c7e7fbe5984bac52e10d224f65d98 Mon Sep 17 00:00:00 2001 From: Oliver Neukum <oneukum@xxxxxxxx> Date: Mon, 10 Jul 2017 14:58:21 +0200 Subject: [PATCH] uas: introduce quirk to reduce inquiry to 36 bytes Usually UAS devices get the correct length of the enquiry right. But there are a few quirky devices needing special cases. So introduce a quirk. Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx> --- drivers/usb/storage/uas.c | 3 +++ drivers/usb/storage/unusual_devs.h | 7 +++++++ include/linux/usb_usual.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 5ef014ba6ae8..97602d77b1d7 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -799,6 +799,9 @@ static int uas_slave_alloc(struct scsi_device *sdev) sdev->hostdata = devinfo; + if (devinfo->flags & US_FL_INQUIRY_36) + sdev->inquiry_len = 36; + /* * USB has unusual DMA-alignment requirements: Although the * starting address of each scatter-gather element doesn't matter, diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 5a70c33ef0e0..c850613f1c94 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -2099,6 +2099,13 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x0201, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), +/* Reported by Grégoire Gentil <gregoire@xxxxxxxxxx> */ +UNUSUAL_DEV( 0x152d, 0x0539, 0x0000, 0x9999, + "JMicron", + "USB to ATA/ATAPI Bridge", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_INQUIRY_36 ), + /* Reported by Michael Büsch <m@xxxxxxx> */ UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0116, "JMicron", diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 0aae1b2ee931..d3cf3d921ec6 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h @@ -83,6 +83,8 @@ /* Cannot handle REPORT_LUNS */ \ US_FLAG(ALWAYS_SYNC, 0x20000000) \ /* lies about caching, so always sync */ \ + US_FLAG(INQUIRY_36, 0x20000000) \ + /* needs a shortened enquiry */ \ #define US_FLAG(name, value) US_FL_##name = value , enum { US_DO_ALL_FLAGS }; -- 2.12.3