Re: Lacie Rugged USB3-FW does not work with UAS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Donnerstag, den 29.08.2019, 20:33 +0200 schrieb Julian Sikorski:

Hi,

this is a relief. If necessary we can blacklist the new device.
Howevera, as that costs performance, I would appriciate if
you take first try out an alternative approach.

> [  362.230833] usb 2-4: New USB device found, idVendor=059f, 
> idProduct=1061, bcdDevice= 0.01
> [  362.230837] usb 2-4: New USB device strings: Mfr=2, Product=3, 
> SerialNumber=1
> [  362.230839] usb 2-4: Product: Rugged USB3-FW
> [  362.230841] usb 2-4: Manufacturer: LaCie
> [  362.230842] usb 2-4: SerialNumber: 00000000157f928920fa
> [  362.270100] scsi host12: uas
> [  362.270720] scsi 12:0:0:0: Direct-Access     LaCie    Rugged FW USB3 
>   051E PQ: 0 ANSI: 6
> [  362.271472] sd 12:0:0:0: Attached scsi generic sg1 type 0
> [  362.280344] sd 12:0:0:0: [sdb] 1953525168 512-byte logical blocks: 
> (1.00 TB/932 GiB)
> [  362.280422] sd 12:0:0:0: [sdb] Write Protect is off
> [  362.280423] sd 12:0:0:0: [sdb] Mode Sense: 43 00 00 00
> [  362.280544] sd 12:0:0:0: [sdb] Write cache: enabled, read cache: 
> enabled, doesn't support DPO or FUA

This means that at least the earliest commandos did get through.

> [  392.672691] sd 12:0:0:0: tag#29 uas_eh_abort_handler 0 uas-tag 1 
> inflight: IN
> [  392.672697] sd 12:0:0:0: tag#29 CDB: Report supported operation codes 
> a3 0c 01 12 00 00 00 00 02 00 00 00
> [  392.678304] scsi host12: uas_eh_device_reset_handler start
> [  392.800099] usb 2-4: reset SuperSpeed Gen 1 USB device number 3 using 
> xhci_hcd
> [  392.848154] scsi host12: uas_eh_device_reset_handler success
> [  422.875443] scsi host12: uas_eh_device_reset_handler start
> [  422.875650] sd 12:0:0:0: tag#16 uas_zap_pending 0 uas-tag 1 inflight:
> [  422.875654] sd 12:0:0:0: tag#16 CDB: Report supported operation codes 
> a3 0c 01 12 00 00 00 00 02 00 00 00
> [  422.997556] usb 2-4: reset SuperSpeed Gen 1 USB device number 3 using 
> xhci_hcd
> [  423.046525] scsi host12: uas_eh_device_reset_handler success
> [  431.853505] usb 2-4: USB disconnect, device number 3
> [  431.903459] sd 12:0:0:0: [sdb] Optimal transfer size 33553920 bytes
> [  432.064456] sd 12:0:0:0: [sdb] Read Capacity(16) failed: Result: 
> hostbyte=DID_ERROR driverbyte=DRIVER_OK

Read Capacity(16) failed

> [  432.064459] sd 12:0:0:0: [sdb] Sense not available.
> [  432.184595] sd 12:0:0:0: [sdb] Read Capacity(10) failed: Result: 
> hostbyte=DID_ERROR driverbyte=DRIVER_OK

Read Capacity(10) failed

There is a chance that this device can deal only with Read Capacity(10)
and crashes on Read Capacity(16). One difference between Usb-storage
and UAS is the order in which the 10 and 16 versions are tried.
The attached patches introduce a quirk to reverse the order
for this particular device under UAS. Could you try them?

	Regards
		Oliver
From 883355951a23d3c4b3c14ca0540972739ae6ffb2 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@xxxxxxxx>
Date: Mon, 2 Sep 2019 13:28:39 +0200
Subject: [PATCH 1/2] uas: honor flag to avoid CAPACITY16

Copy the support over from usb-storage

Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx>
---
 drivers/usb/storage/uas.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 68b1cb0f84e5..a8bd5ff5a4b9 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -854,6 +854,10 @@ static int uas_slave_configure(struct scsi_device *sdev)
 		sdev->wce_default_on = 1;
 	}
 
+	/* Some devices cannot handle READ_CAPACITY_16 */
+	if (devinfo->flags & US_FL_NO_READ_CAPACITY_16)
+		sdev->no_read_capacity_16 = 1;
+
 	/*
 	 * Some disks return the total number of blocks in response
 	 * to READ CAPACITY rather than the highest block number.
-- 
2.16.4

From 115389ff678cae7cb636ac7e520f06e5182cd353 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@xxxxxxxx>
Date: Mon, 2 Sep 2019 13:30:00 +0200
Subject: [PATCH 2/2] uas: quirk for LaCie Rugged USB 3

No. CAPACITY16 for these devices.

Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx>
---
 drivers/usb/storage/unusual_devs.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index ea0d27a94afe..643bba41291e 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -806,6 +806,12 @@ UNUSUAL_DEV(  0x059f, 0x0651, 0x0000, 0x0000,
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_NO_WP_DETECT ),
 
+UNUSUAL_DEV(  0x059f, 0x103e, 0x0002, 0x0002,
+		"LaCie",
+		"Rugged USB 3",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_NO_READ_CAPACITY_16 ),
+
 /*
  * Submitted by Joel Bourquard <numlock@xxxxxxxxxxx>
  * Some versions of this device need the SubClass and Protocol overrides
-- 
2.16.4


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux