All of lore.kernel.org
 help / color / mirror / Atom feed
* JMicron JMS578 USB-to-SATA HDD enclosure not working
@ 2019-05-17 19:32 Guido Trentalancia
  2019-05-18 12:31 ` Guido Trentalancia
  0 siblings, 1 reply; 4+ messages in thread
From: Guido Trentalancia @ 2019-05-17 19:32 UTC (permalink / raw)
  To: linux-usb; +Cc: stern

[-- Attachment #1: Type: text/plain, Size: 3850 bytes --]

Hello.

I am trying to use a Digitus DA-71114 USB-to-SATA HDD enclosure.

Such unit is reported to use the JMicron JMS578 chipset by the same
manufacturer, although it is listed with a different USB VID/PID:
0080:a001.

Immediately after plugging in the USB cable, it reports I/O errors,
even though the hard-drive is fine (mounts and reads/writes fine under
Windows without the enclosure):

[ 5432.689781] usb 2-1: new SuperSpeed Gen 1 USB device number 29 using
xhci_hcd
[ 5432.702547] usb 2-1: New USB device found, idVendor=0080,
idProduct=a001, bcdDevice= 1.00
[ 5432.702553] usb 2-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[ 5432.702557] usb 2-1: Product: External USB 3.0
[ 5432.702561] usb 2-1: Manufacturer: TOSHIBA
[ 5432.702565] usb 2-1: SerialNumber: 201503310008E
[ 5432.730948] usbcore: registered new interface driver usb-storage
[ 5432.736029] scsi host2: uas
[ 5432.736373] usbcore: registered new interface driver uas
[ 5432.736939] scsi 2:0:0:0: Direct-Access     TO Exter nal USB
3.0      6101 PQ: 0 ANSI: 6
[ 5432.738326] sd 2:0:0:0: Attached scsi generic sg2 type 0
[ 5435.336588] sd 2:0:0:0: [sdb] 1953525168 512-byte logical blocks:
(1.00 TB/932 GiB)
[ 5435.336594] sd 2:0:0:0: [sdb] 4096-byte physical blocks
[ 5435.336762] sd 2:0:0:0: [sdb] Write Protect is off
[ 5435.336766] sd 2:0:0:0: [sdb] Mode Sense: 53 00 00 08
[ 5435.337063] sd 2:0:0:0: [sdb] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 5435.337347] sd 2:0:0:0: [sdb] Optimal transfer size 33553920 bytes
not a multiple of physical block size (4096 bytes)
[ 5465.794203] sd 2:0:0:0: [sdb] tag#6 uas_eh_abort_handler 0 uas-tag 1
inflight: CMD IN 
[ 5465.794211] sd 2:0:0:0: [sdb] tag#6 CDB: Read(10) 28 00 00 00 00 00
00 00 08 00
[ 5465.800252] scsi host2: uas_eh_device_reset_handler start
[ 5465.915678] usb 2-1: reset SuperSpeed Gen 1 USB device number 29
using xhci_hcd
[ 5465.931925] scsi host2: uas_eh_device_reset_handler success
[ 5496.510222] scsi host2: uas_eh_device_reset_handler start
[ 5496.510329] sd 2:0:0:0: [sdb] tag#11 uas_zap_pending 0 uas-tag 1
inflight: CMD 
[ 5496.510337] sd 2:0:0:0: [sdb] tag#11 CDB: Read(10) 28 00 00 00 00 00
00 00 08 00
[ 5496.625614] usb 2-1: reset SuperSpeed Gen 1 USB device number 29
using xhci_hcd
[ 5496.642411] scsi host2: uas_eh_device_reset_handler success
[ 5527.230204] scsi host2: uas_eh_device_reset_handler start
[ 5527.230309] sd 2:0:0:0: [sdb] tag#9 uas_zap_pending 0 uas-tag 1
inflight: CMD 
[ 5527.230316] sd 2:0:0:0: [sdb] tag#9 CDB: Read(10) 28 00 00 00 00 00
00 00 08 00
[ 5527.345769] usb 2-1: reset SuperSpeed Gen 1 USB device number 29
using xhci_hcd
[ 5527.361964] scsi host2: uas_eh_device_reset_handler success
[ 5527.780612] sd 2:0:0:0: [sdb] tag#10 FAILED Result: hostbyte=DID_OK
driverbyte=DRIVER_SENSE
[ 5527.780631] sd 2:0:0:0: [sdb] tag#10 Sense Key : Aborted Command
[current] 
[ 5527.780636] sd 2:0:0:0: [sdb] tag#10 Add. Sense: No additional sense
information
[ 5527.780642] sd 2:0:0:0: [sdb] tag#10 CDB: Read(10) 28 00 00 00 00 00
00 00 08 00
[ 5527.780647] print_req_error: I/O error, dev sdb, sector 0 flags 0
[ 5527.780657] Buffer I/O error on dev sdb, logical block 0, async page
read

I have also attached the usbmon dump just before and after plugging in
the device.

Adding the US_FL_BROKEN_FUA in unusual_uas.h and unusual_devs.h does
not help !

I have also tried adding many other quirks (such as
US_FL_NO_REPORT_OPCODES, US_FL_NO_ATA_1X, US_FL_IGNORE_RESIDUE,
US_FL_FIX_CAPACITY, US_FL_NO_WP_DETECT, US_FL_MAX_SECTORS_64) without
any luck !!

The problem also happens when not using UAS but the standard USB
storage driver (fails on READ command, sector 0 and sometimes also
sector 1953524992).

When the drive is used in the enclosure it is completely unusable, as
it fails even on fdisk...

What should I do ?

Thanks.

Guido

[-- Attachment #2: usbmon.txt --]
[-- Type: text/plain, Size: 22111 bytes --]

ffff9d969f245c00 1517920124 S Ci:2:001:0 s a3 00 0000 0001 0004 4 <
ffff9d969f245c00 1517920155 C Ci:2:001:0 0 4 = 03020100
ffff9d969f245c00 1517920163 S Co:2:001:0 s 23 01 0010 0001 0000 0
ffff9d969f245c00 1517920170 C Co:2:001:0 0 0
ffff9d969f245c00 1517920173 S Ci:2:001:0 s a3 00 0000 0002 0004 4 <
ffff9d969f245c00 1517920179 C Ci:2:001:0 0 4 = a0020000
ffff9d969f245c00 1517920182 S Ci:2:001:0 s a3 00 0000 0003 0004 4 <
ffff9d969f245c00 1517920187 C Ci:2:001:0 0 4 = a0020000
ffff9d969f245c00 1517920190 S Ci:2:001:0 s a3 00 0000 0004 0004 4 <
ffff9d969f245c00 1517920195 C Ci:2:001:0 0 4 = a0020000
ffff9d969f245c00 1517920198 S Ci:2:001:0 s a3 00 0000 0005 0004 4 <
ffff9d969f245c00 1517920203 C Ci:2:001:0 0 4 = a0020000
ffff9d969f245c00 1517920206 S Ci:2:001:0 s a3 00 0000 0006 0004 4 <
ffff9d969f245c00 1517920211 C Ci:2:001:0 0 4 = a0020000
ffff9d969ecff600 1518022914 S Ii:2:001:1 -115:2048 4 <
ffff9d969f245c00 1518022942 S Ci:2:001:0 s a3 00 0000 0001 0004 4 <
ffff9d969f245c00 1518022960 C Ci:2:001:0 0 4 = 03020000
ffff9d969f245c00 1518023089 S Ci:2:001:0 s a3 00 0000 0001 0004 4 <
ffff9d969f245c00 1518023097 C Ci:2:001:0 0 4 = 03020000
ffff9d969f245c00 1518023102 S Co:2:001:0 s 23 03 0004 0001 0000 0
ffff9d969f245c00 1518023111 C Co:2:001:0 0 0
ffff9d969f245c00 1518085121 S Ci:2:001:0 s a3 00 0000 0001 0004 4 <
ffff9d969f245c00 1518085149 C Ci:2:001:0 0 4 = 03021000
ffff9d969f245c00 1518085160 S Co:2:001:0 s 23 01 0014 0001 0000 0
ffff9d969f245c00 1518085168 C Co:2:001:0 0 0
ffff9d969f245c00 1518085172 S Co:2:001:0 s 23 01 001d 0001 0000 0
ffff9d969f245c00 1518085179 C Co:2:001:0 0 0
ffff9d969f245c00 1518085182 S Co:2:001:0 s 23 01 0019 0001 0000 0
ffff9d969f245c00 1518085189 C Co:2:001:0 0 0
ffff9d969f245c00 1518085192 S Co:2:001:0 s 23 01 0010 0001 0000 0
ffff9d969f245c00 1518085201 C Co:2:001:0 0 0
ffff9d969f245c00 1518085205 S Ci:2:001:0 s a3 00 0000 0001 0004 4 <
ffff9d969f245c00 1518085210 C Ci:2:001:0 0 4 = 03020000
ffff9d969f245c00 1518148806 S Ci:2:030:0 s 80 06 0100 0000 0008 8 <
ffff9d969f245c00 1518148959 C Ci:2:030:0 0 8 = 12010003 00000009
ffff9d969f245c00 1518148987 S Co:2:030:0 s 00 31 0028 0000 0000 0
ffff9d969f245c00 1518149038 C Co:2:030:0 0 0
ffff9d969f245c00 1518149057 S Ci:2:030:0 s 80 06 0100 0000 0012 18 <
ffff9d969f245c00 1518149174 C Ci:2:030:0 0 18 = 12010003 00000009 800001a0 00010102 0301
ffff9d969f245c00 1518149203 S Ci:2:030:0 s 80 06 0f00 0000 0005 5 <
ffff9d969f245c00 1518149349 C Ci:2:030:0 0 5 = 050f1600 02
ffff9d969f245c00 1518149377 S Ci:2:030:0 s 80 06 0f00 0000 0016 22 <
ffff9d969f245c00 1518149496 C Ci:2:030:0 0 22 = 050f1600 02071002 0e0f0000 0a100300 0e00010a 2000
ffff9d969f245c00 1518149536 S Ci:2:030:0 s 80 06 0200 0000 0009 9 <
ffff9d969f245c00 1518149672 C Ci:2:030:0 0 9 = 09027900 01010080 70
ffff9d969f245c00 1518149701 S Ci:2:030:0 s 80 06 0200 0000 0079 121 <
ffff9d969f245c00 1518149834 C Ci:2:030:0 0 121 = 09027900 01010080 70090400 00020806 50000705 81020004 0006300f 00000007
ffff9d969f245b40 1518149851 S Ci:2:030:0 s 80 06 0300 0000 00ff 255 <
ffff9d969f245b40 1518149923 C Ci:2:030:0 0 4 = 04030904
ffff9d969f245b40 1518149933 S Ci:2:030:0 s 80 06 0302 0409 00ff 255 <
ffff9d969f245b40 1518150037 C Ci:2:030:0 0 34 = 22034500 78007400 65007200 6e006100 6c002000 55005300 42002000 33002e00
ffff9d969f245b40 1518150048 S Ci:2:030:0 s 80 06 0301 0409 00ff 255 <
ffff9d969f245b40 1518150131 C Ci:2:030:0 0 16 = 10035400 4f005300 48004900 42004100
ffff9d969f245b40 1518150140 S Ci:2:030:0 s 80 06 0303 0409 00ff 255 <
ffff9d969f245b40 1518150222 C Ci:2:030:0 0 28 = 1c033200 30003100 35003000 33003300 31003000 30003000 38004500
ffff9d969f245d80 1518151422 S Co:2:030:0 s 00 09 0001 0000 0000 0
ffff9d969f245d80 1518151468 C Co:2:030:0 0 0
ffff9d969f245d80 1518151485 S Co:2:030:0 s 00 30 0000 0000 0006 6 = 0a0a0002 0002
ffff9d969f245d80 1518151535 C Co:2:030:0 0 6 >
ffff9d969f245d80 1518151579 S Co:2:001:0 s 23 03 0017 3201 0000 0
ffff9d969f245d80 1518151594 C Co:2:001:0 0 0
ffff9d969f245d80 1518151600 S Co:2:030:0 s 00 03 0030 0000 0000 0
ffff9d969f245d80 1518151635 C Co:2:030:0 0 0
ffff9d969f245d80 1518151643 S Co:2:030:0 s 00 30 0000 0000 0006 6 = 0a0a0002 0002
ffff9d969f245d80 1518151686 C Co:2:030:0 0 6 >
ffff9d969f245d80 1518151733 S Co:2:001:0 s 23 03 0018 2801 0000 0
ffff9d969f245d80 1518151746 C Co:2:001:0 0 0
ffff9d969f245d80 1518151751 S Co:2:030:0 s 00 03 0031 0000 0000 0
ffff9d969f245d80 1518151786 C Co:2:030:0 0 0
ffff9d96a3467c00 1518165011 S Co:2:001:0 s 23 03 0017 0001 0000 0
ffff9d96a3467c00 1518165025 C Co:2:001:0 0 0
ffff9d96a3467c00 1518165027 S Co:2:030:0 s 00 01 0030 0000 0000 0
ffff9d96a3467c00 1518165214 C Co:2:030:0 0 0
ffff9d96a3467c00 1518165224 S Co:2:001:0 s 23 03 0018 0001 0000 0
ffff9d96a3467c00 1518165231 C Co:2:001:0 0 0
ffff9d96a3467c00 1518165238 S Co:2:030:0 s 00 01 0031 0000 0000 0
ffff9d96a3467c00 1518165267 C Co:2:030:0 0 0
ffff9d96a3467c00 1518165604 S Co:2:030:0 s 01 0b 0001 0000 0000 0
ffff9d96a3467c00 1518165736 C Co:2:030:0 0 0
ffff9d96a3467c00 1518165778 S Co:2:030:0 s 00 30 0000 0000 0006 6 = 0a0a0002 0002
ffff9d96a3467c00 1518165824 C Co:2:030:0 0 6 >
ffff9d96a3467c00 1518165868 S Co:2:001:0 s 23 03 0017 3201 0000 0
ffff9d96a3467c00 1518165877 C Co:2:001:0 0 0
ffff9d96a3467c00 1518165879 S Co:2:030:0 s 00 03 0030 0000 0000 0
ffff9d96a3467c00 1518165911 C Co:2:030:0 0 0
ffff9d96a3467c00 1518165916 S Co:2:030:0 s 00 30 0000 0000 0006 6 = 0a0a0002 0002
ffff9d96a3467c00 1518165957 C Co:2:030:0 0 6 >
ffff9d96a3467c00 1518166001 S Co:2:001:0 s 23 03 0018 2801 0000 0
ffff9d96a3467c00 1518166008 C Co:2:001:0 0 0
ffff9d96a3467c00 1518166010 S Co:2:030:0 s 00 03 0031 0000 0000 0
ffff9d96a3467c00 1518166040 C Co:2:030:0 0 0
ffff9d96029e8d80 1518167796 S Bi:2:030:2 -115 112 <
ffff9d96029e8c00 1518167805 S Bi:2:030:3 -115 36 <
ffff9d96029e80c0 1518167808 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12000000 24000000 00000000 00000000
ffff9d96029e80c0 1518167819 C Bo:2:030:1 0 32 >
ffff9d96029e8c00 1518167904 C Bi:2:030:3 0 36 = 00000612 5b000002 544f2045 78746572 6e616c20 55534220 332e3020 20202020
ffff9d96029e8d80 1518167943 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96029e8480 1518167968 S Bi:2:030:2 -115 112 <
ffff9d96029e8240 1518167971 S Bi:2:030:3 -115 96 <
ffff9d96029e89c0 1518167973 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12000000 60000000 00000000 00000000
ffff9d96029e89c0 1518167981 C Bo:2:030:1 0 32 >
ffff9d96029e8240 1518168065 C Bi:2:030:3 0 96 = 00000612 5b000002 544f2045 78746572 6e616c20 55534220 332e3020 20202020
ffff9d96029e8480 1518168105 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96029e8cc0 1518168131 S Bi:2:030:2 -115 112 <
ffff9d96029e83c0 1518168135 S Bi:2:030:3 -115 255 <
ffff9d96029e8a80 1518168136 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12010000 ff000000 00000000 00000000
ffff9d96029e8a80 1518168144 C Bo:2:030:1 0 32 >
ffff9d96029e83c0 1518168208 C Bi:2:030:3 0 11 = 00000007 008083b0 b2dedf
ffff9d96029e8cc0 1518168248 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96029e8b40 1518168261 S Bi:2:030:2 -115 112 <
ffff9d96029e8cc0 1518168263 S Bi:2:030:3 -115 255 <
ffff9d96029e83c0 1518168264 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12018000 ff000000 00000000 00000000
ffff9d96029e83c0 1518168287 C Bo:2:030:1 0 32 >
ffff9d96029e8cc0 1518168345 C Bi:2:030:3 0 20 = 00800010 32303135 30333331 30303038 45000000
ffff9d96029e8b40 1518168384 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96029e86c0 1518168397 S Bi:2:030:2 -115 112 <
ffff9d96029e8480 1518168398 S Bi:2:030:3 -115 255 <
ffff9d96029e8240 1518168399 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12018300 ff000000 00000000 00000000
ffff9d96029e8240 1518168423 C Bo:2:030:1 0 32 >
ffff9d96029e8480 1518168503 C Bi:2:030:3 0 60 = 00830038 01030008 30201503 31000850 02010028 544f2045 78746572 6e616c20
ffff9d96029e86c0 1518168542 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d969ce35d80 1518168560 S Bi:2:030:2 -115 112 <
ffff9d969ce35780 1518168564 S Bi:2:030:3 -115 4096 <
ffff9d969ce35f00 1518168566 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 a0000000 00000000 10000000 00000000
ffff9d969ce35f00 1518168581 C Bo:2:030:1 0 32 >
ffff9d969ce35780 1518168633 C Bi:2:030:3 0 16 = 00000008 00000000 00000000 00000000
ffff9d969ce35d80 1518168673 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d969f36c600 1518168775 S Bi:2:030:2 -115 112 <
ffff9d969f36cb40 1518168782 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffff9d969f36cb40 1518168791 C Bo:2:030:1 0 32 >
ffff9d969f36c600 1518168861 C Bi:2:030:2 0 34 = 03000001 00000200 00000000 00000012 70000200 0000000a 00000000 04010000
ffff9d969f36ca80 1518168875 S Bi:2:030:2 -115 112 <
ffff9d969f36c180 1518168876 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffff9d969f36c180 1518168900 C Bo:2:030:1 0 32 >
ffff9d969f36ca80 1520812868 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d969f36c180 1520812992 S Bi:2:030:2 -115 112 <
ffff9d969f36c600 1520813003 S Bi:2:030:3 -115 32 <
ffff9d969f36cb40 1520813008 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 9e100000 00000000 00000000 00200000
ffff9d969f36cb40 1520813022 C Bo:2:030:1 0 32 >
ffff9d969f36c600 1520813077 C Bi:2:030:3 0 32 = 00000000 74706daf 00000200 00030000 00000000 00000000 00000000 00000000
ffff9d969f36c180 1520813115 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96013e4900 1520813225 S Bi:2:030:2 -115 112 <
ffff9d96013e43c0 1520813244 S Bi:2:030:3 -115 64 <
ffff9d96013e4540 1520813250 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12010000 40000000 00000000 00000000
ffff9d96013e4540 1520813268 C Bo:2:030:1 0 32 >
ffff9d96013e43c0 1520813330 C Bi:2:030:3 0 11 = 00000007 008083b0 b2dedf
ffff9d96013e4900 1520813369 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d95fa0b0d80 1520813415 S Bi:2:030:2 -115 112 <
ffff9d95fa0b09c0 1520813429 S Bi:2:030:3 -115 64 <
ffff9d95fa0b06c0 1520813434 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 1201b000 40000000 00000000 00000000
ffff9d95fa0b06c0 1520813446 C Bo:2:030:1 0 32 >
ffff9d95fa0b09c0 1520813512 C Bi:2:030:3 0 64 = 00b0003c 00000008 0000ffff 0000ffff 0000ffff 00000000 00000000 00000000
ffff9d95fa0b0d80 1520813551 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d95fa0b0300 1520813583 S Bi:2:030:2 -115 112 <
ffff9d95fa0b0f00 1520813587 S Bi:2:030:3 -115 64 <
ffff9d95fa0b0000 1520813590 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12010000 40000000 00000000 00000000
ffff9d95fa0b0000 1520813602 C Bo:2:030:1 0 32 >
ffff9d95fa0b0f00 1520813667 C Bi:2:030:3 0 11 = 00000007 008083b0 b2dedf
ffff9d95fa0b0300 1520813707 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d95fa0b0540 1520813770 S Bi:2:030:2 -115 112 <
ffff9d95fa0b0e40 1520813776 S Bi:2:030:3 -115 4 <
ffff9d95fa0b0780 1520813780 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 1a003f00 04000000 00000000 00000000
ffff9d95fa0b0780 1520813792 C Bo:2:030:1 0 32 >
ffff9d95fa0b0e40 1520813878 C Bi:2:030:3 0 4 = 53000008
ffff9d95fa0b0540 1520813935 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96a4149600 1520813991 S Bi:2:030:2 -115 112 <
ffff9d96a4149e40 1520813999 S Bi:2:030:3 -115 4 <
ffff9d96a4149840 1520814003 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 1a000800 04000000 00000000 00000000
ffff9d96a4149840 1520814019 C Bo:2:030:1 0 32 >
ffff9d96a4149e40 1520814096 C Bi:2:030:3 0 4 = 1f000008
ffff9d96a4149600 1520814133 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96a4149e40 1520814154 S Bi:2:030:2 -115 112 <
ffff9d96a4149840 1520814156 S Bi:2:030:3 -115 32 <
ffff9d96a4149900 1520814160 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 1a000800 20000000 00000000 00000000
ffff9d96a4149900 1520814174 C Bo:2:030:1 0 32 >
ffff9d96a4149840 1520814256 C Bi:2:030:3 0 32 = 1f000008 74706db0 00000200 08121400 ffff0000 ffffffff 00ff0000 00000000
ffff9d96a4149e40 1520814292 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96a4149e40 1520814323 S Bi:2:030:2 -115 112 <
ffff9d96a4149840 1520814325 S Bi:2:030:3 -115 512 <
ffff9d96a4149900 1520814328 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 a30c0112 00000000 02000000 00000000
ffff9d96a4149900 1520814341 C Bo:2:030:1 0 32 >
ffff9d96a4149e40 1520814406 C Bi:2:030:2 0 34 = 03000001 00000200 00000000 00000012 70000500 0000000a 00000000 20000000
ffff9d96a4149840 1520814450 C Bi:2:030:3 -104 0
ffff9d96a4149840 1520814476 S Bi:2:030:2 -115 112 <
ffff9d96a4149e40 1520814481 S Bi:2:030:3 -115 64 <
ffff9d96a4149900 1520814485 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12010000 40000000 00000000 00000000
ffff9d96a4149900 1520814495 C Bo:2:030:1 0 32 >
ffff9d96a4149e40 1520814560 C Bi:2:030:3 0 11 = 00000007 008083b0 b2dedf
ffff9d96a4149840 1520814602 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96a4149900 1520815166 S Bi:2:030:2 -115 112 <
ffff9d96a4149cc0 1520815188 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffff9d96a4149cc0 1520815213 C Bo:2:030:1 0 32 >
ffff9d96a4149900 1520815247 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96a4149cc0 1520815279 S Bi:2:030:2 -115 112 <
ffff9d96a4149540 1520815283 S Bi:2:030:3 -115 32 <
ffff9d96a41493c0 1520815289 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 9e100000 00000000 00000000 00200000
ffff9d96a41493c0 1520815303 C Bo:2:030:1 0 32 >
ffff9d96a4149540 1520815356 C Bi:2:030:3 0 32 = 00000000 74706daf 00000200 00030000 00000000 00000000 00000000 00000000
ffff9d96a4149cc0 1520815395 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96a4149cc0 1520815424 S Bi:2:030:2 -115 112 <
ffff9d96a4149540 1520815429 S Bi:2:030:3 -115 64 <
ffff9d96a41493c0 1520815433 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12010000 40000000 00000000 00000000
ffff9d96a41493c0 1520815455 C Bo:2:030:1 0 32 >
ffff9d96a4149540 1520815510 C Bi:2:030:3 0 11 = 00000007 008083b0 b2dedf
ffff9d96a4149cc0 1520815549 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96a4149cc0 1520815586 S Bi:2:030:2 -115 112 <
ffff9d96a4149540 1520815592 S Bi:2:030:3 -115 64 <
ffff9d96a41493c0 1520815597 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 1201b000 40000000 00000000 00000000
ffff9d96a41493c0 1520815633 C Bo:2:030:1 0 32 >
ffff9d96a4149540 1520815682 C Bi:2:030:3 0 64 = 00b0003c 00000008 0000ffff 0000ffff 0000ffff 00000000 00000000 00000000
ffff9d96a4149cc0 1520815717 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96a4149cc0 1520815755 S Bi:2:030:2 -115 112 <
ffff9d96a4149540 1520815760 S Bi:2:030:3 -115 64 <
ffff9d96a41493c0 1520815764 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12010000 40000000 00000000 00000000
ffff9d96a41493c0 1520815775 C Bo:2:030:1 0 32 >
ffff9d96a4149540 1520815842 C Bi:2:030:3 0 11 = 00000007 008083b0 b2dedf
ffff9d96a4149cc0 1520815880 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96029e8780 1520815933 S Bi:2:030:2 -115 112 <
ffff9d96029e8d80 1520815941 S Bi:2:030:3 -115 4 <
ffff9d96029e8c00 1520815947 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 1a003f00 04000000 00000000 00000000
ffff9d96029e8c00 1520815962 C Bo:2:030:1 0 32 >
ffff9d96029e8d80 1520816046 C Bi:2:030:3 0 4 = 53000008
ffff9d96029e8780 1520816086 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96029e89c0 1520816161 S Bi:2:030:2 -115 112 <
ffff9d96029e8780 1520816172 S Bi:2:030:3 -115 4 <
ffff9d96029e8d80 1520816176 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 1a000800 04000000 00000000 00000000
ffff9d96029e8d80 1520816189 C Bo:2:030:1 0 32 >
ffff9d96029e8780 1520816270 C Bi:2:030:3 0 4 = 1f000008
ffff9d96029e89c0 1520816309 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96029e8900 1520816345 S Bi:2:030:2 -115 112 <
ffff9d96029e8a80 1520816350 S Bi:2:030:3 -115 32 <
ffff9d96029e86c0 1520816354 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 1a000800 20000000 00000000 00000000
ffff9d96029e86c0 1520816368 C Bo:2:030:1 0 32 >
ffff9d96029e8a80 1520816450 C Bi:2:030:3 0 32 = 1f000008 74706db0 00000200 08121400 ffff0000 ffffffff 00ff0000 00000000
ffff9d96029e8900 1520816460 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96029e8240 1520816498 S Bi:2:030:2 -115 112 <
ffff9d96029e8300 1520816503 S Bi:2:030:3 -115 64 <
ffff9d96029e8b40 1520816508 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 12010000 40000000 00000000 00000000
ffff9d96029e8b40 1520816522 C Bo:2:030:1 0 32 >
ffff9d96029e8300 1520816593 C Bi:2:030:3 0 11 = 00000007 008083b0 b2dedf
ffff9d96029e8240 1520816632 C Bi:2:030:2 0 16 = 03000001 00000000 00000000 00000000
ffff9d96029e8cc0 1520816730 S Bi:2:030:2 -115 112 <
ffff9d96029e83c0 1520816735 S Bi:2:030:3 -115 4096 <
ffff9d96029e8480 1520816739 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 28000000 00000000 08000000 00000000
ffff9d96029e8480 1520816754 C Bo:2:030:1 0 32 >
ffff9d96029e83c0 1551026751 C Bi:2:030:3 -2 0
ffff9d96029e8cc0 1551035826 C Bi:2:030:2 -2 0
ffff9d969f36c240 1551036657 S Co:2:001:0 s 23 03 0017 0001 0000 0
ffff9d969f36c240 1551036679 C Co:2:001:0 0 0
ffff9d96013e4b40 1551036700 S Co:2:030:0 s 00 01 0030 0000 0000 0
ffff9d96013e4b40 1551036757 C Co:2:030:0 0 0
ffff9d96013e4b40 1551036818 S Co:2:001:0 s 23 03 0018 0001 0000 0
ffff9d96013e4b40 1551036845 C Co:2:001:0 0 0
ffff9d969ce35480 1551036918 S Co:2:030:0 s 00 01 0031 0000 0000 0
ffff9d969ce35480 1551037018 C Co:2:030:0 0 0
ffff9d969ce35480 1551037125 S Ci:2:001:0 s a3 00 0000 0001 0004 4 <
ffff9d969ce35480 1551037144 C Ci:2:001:0 0 4 = 03020000
ffff9d96a3467e40 1551037214 S Co:2:001:0 s 23 03 0004 0001 0000 0
ffff9d96a3467e40 1551037234 C Co:2:001:0 0 0
ffff9d969ce35840 1551098681 S Ci:2:001:0 s a3 00 0000 0001 0004 4 <
ffff9d969ce35840 1551098706 C Ci:2:001:0 0 4 = 03021000
ffff9d96a3467c00 1551098770 S Co:2:001:0 s 23 01 0014 0001 0000 0
ffff9d96a3467c00 1551098789 C Co:2:001:0 0 0
ffff9d969ce35c00 1551098845 S Co:2:001:0 s 23 01 001d 0001 0000 0
ffff9d969ce35c00 1551098862 C Co:2:001:0 0 0
ffff9d96a3467a80 1551098917 S Co:2:001:0 s 23 01 0019 0001 0000 0
ffff9d96a3467a80 1551098936 C Co:2:001:0 0 0
ffff9d95fa0b0240 1551099007 S Co:2:001:0 s 23 01 0010 0001 0000 0
ffff9d95fa0b0240 1551099027 C Co:2:001:0 0 0
ffff9d96a3467180 1551099082 S Ci:2:001:0 s a3 00 0000 0001 0004 4 <
ffff9d96a3467180 1551099100 C Ci:2:001:0 0 4 = 03020000
ffff9d95fa0b0900 1551162692 S Ci:2:030:0 s 80 06 0100 0000 0008 8 <
ffff9d95fa0b0900 1551162820 C Ci:2:030:0 0 8 = 12010003 00000009
ffff9d95fa0b0900 1551162846 S Co:2:030:0 s 00 31 0028 0000 0000 0
ffff9d95fa0b0900 1551162941 C Co:2:030:0 0 0
ffff9d95fa0b0900 1551162969 S Ci:2:030:0 s 80 06 0100 0000 0012 18 <
ffff9d95fa0b0900 1551163081 C Ci:2:030:0 0 18 = 12010003 00000009 800001a0 00010102 0301
ffff9d95fa0b0900 1551163110 S Ci:2:030:0 s 80 06 0f00 0000 0005 5 <
ffff9d95fa0b0900 1551163220 C Ci:2:030:0 0 5 = 050f1600 02
ffff9d95fa0b0900 1551163248 S Ci:2:030:0 s 80 06 0f00 0000 0016 22 <
ffff9d95fa0b0900 1551163383 C Ci:2:030:0 0 22 = 050f1600 02071002 0e0f0000 0a100300 0e00010a 2000
ffff9d95fa0b0900 1551163413 S Ci:2:030:0 s 80 06 0200 0000 0079 121 <
ffff9d95fa0b0900 1551163601 C Ci:2:030:0 0 121 = 09027900 01010080 70090400 00020806 50000705 81020004 0006300f 00000007
ffff9d95fa0b0900 1551163631 S Ci:2:030:0 s 80 06 0303 0409 00ff 255 <
ffff9d95fa0b0900 1551163717 C Ci:2:030:0 0 28 = 1c033200 30003100 35003000 33003300 31003000 30003000 38004500
ffff9d95fa0b0900 1551164036 S Co:2:030:0 s 00 09 0001 0000 0000 0
ffff9d95fa0b0900 1551164082 C Co:2:030:0 0 0
ffff9d95fa0b0900 1551164444 S Co:2:030:0 s 01 0b 0001 0000 0000 0
ffff9d95fa0b0900 1551164576 C Co:2:030:0 0 0
ffff9d95fa0b0900 1551165927 S Co:2:030:0 s 00 30 0000 0000 0006 6 = 0a0a0002 0002
ffff9d95fa0b0900 1551166045 C Co:2:030:0 0 6 >
ffff9d95fa0b0900 1551166096 S Co:2:001:0 s 23 03 0017 3201 0000 0
ffff9d95fa0b0900 1551166115 C Co:2:001:0 0 0
ffff9d969f36c840 1551166177 S Co:2:030:0 s 00 03 0030 0000 0000 0
ffff9d969f36c840 1551166254 C Co:2:030:0 0 0
ffff9d969f36c840 1551166312 S Co:2:030:0 s 00 30 0000 0000 0006 6 = 0a0a0002 0002
ffff9d969f36c840 1551166415 C Co:2:030:0 0 6 >
ffff9d969f36c840 1551166590 S Co:2:001:0 s 23 03 0018 2801 0000 0
ffff9d969f36c840 1551166620 C Co:2:001:0 0 0
ffff9d969f36c840 1551166626 S Co:2:030:0 s 00 03 0031 0000 0000 0
ffff9d969f36c840 1551166725 C Co:2:030:0 0 0
ffff9d969f36c840 1551167661 S Bi:2:030:2 -115 112 <
ffff9d969f36c240 1551167676 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffff9d969f36c240 1551167732 C Bo:2:030:1 0 32 >
ffff9d969f36c840 1551167750 C Bi:2:030:2 0 34 = 03000001 00000200 00000000 00000012 70000200 0000000a 00000000 04010000
ffff9d969f36c9c0 1551167805 S Bi:2:030:2 -115 112 <
ffff9d969f36ce40 1551167819 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffff9d969f36ce40 1551167877 C Bo:2:030:1 0 32 >
ffff9d969f36c9c0 1551167890 C Bi:2:030:2 0 34 = 03000001 00000200 00000000 00000012 70000200 0000000a 00000000 04010000
ffff9d969f36c300 1551176640 S Bi:2:030:2 -115 112 <
ffff9d969f36c540 1551176656 S Bi:2:030:3 -115 4096 <
ffff9d969f36ccc0 1551176662 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 28000000 00000000 08000000 00000000
ffff9d969f36ccc0 1551176690 C Bo:2:030:1 0 32 >
ffff9d969f36c300 1551586605 C Bi:2:030:2 0 34 = 03000001 00000200 00000000 00000012 70000b00 0000000a 00000000 00000000
ffff9d969f36c540 1551586664 C Bi:2:030:3 -104 0
ffff9d96a4149000 1551594725 S Bi:2:030:2 -115 112 <
ffff9d96a4149d80 1551594742 S Bi:2:030:3 -115 4096 <
ffff9d96a4149780 1551594746 S Bo:2:030:1 -115 32 = 01000001 00000000 00000000 00000000 28000000 00000000 08000000 00000000
ffff9d96a4149780 1551594767 C Bo:2:030:1 0 32 >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: JMicron JMS578 USB-to-SATA HDD enclosure not working
  2019-05-17 19:32 JMicron JMS578 USB-to-SATA HDD enclosure not working Guido Trentalancia
@ 2019-05-18 12:31 ` Guido Trentalancia
  2019-05-19 17:35   ` Guido Trentalancia
  0 siblings, 1 reply; 4+ messages in thread
From: Guido Trentalancia @ 2019-05-18 12:31 UTC (permalink / raw)
  To: linux-usb; +Cc: stern

Hello again.

I have now upgraded the original HDD enclosure firmware (version
46.01.00.01) with the latest available one from the Hardkernel.com /
Odroid.com project (version 173.01.00.02).

The problem persists with similar symptoms, however the Sense Key is
now different:

sd 2:0:0:0: [sdb] tag#13 FAILED Result: hostbyte=DID_OK
driverbyte=DRIVER_SENSE
sd 2:0:0:0: [sdb] tag#13 Sense Key : Data Protect [current] 
sd 2:0:0:0: [sdb] tag#13 Add. Sense: Logical unit access not authorized
sd 2:0:0:0: [sdb] tag#13 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
print_req_error: critical target error, dev sdb, sector 0 flags 0
Buffer I/O error on dev sdb, logical block 0, async page read
sdb: unable to read partition table
sd 2:0:0:0: [sdb] Attached SCSI disk
sd 2:0:0:0: [sdb] tag#4 FAILED Result: hostbyte=DID_OK
driverbyte=DRIVER_SENSE
sd 2:0:0:0: [sdb] tag#4 Sense Key : Data Protect [current] 
sd 2:0:0:0: [sdb] tag#4 Add. Sense: Logical unit access not authorized
sd 2:0:0:0: [sdb] tag#4 CDB: Read(10) 28 00 74 70 6d 00 00 00 08 00
print_req_error: critical target error, dev sdb, sector 1953524992
flags 80700

So, the Sense basically changed from "No additional sense" to "Logical
unit access not authorized", which at least seems a bit more
meaningful...

The hard-drive is a brand-new Seagate 1TB HDD which works perfectly
fine when connected to the SATA port directly.

Is anybody aware of any kind of Data Protection or Access Authorization
option that needs to be disabled or enabled, respectively ? If yes, how
?

Thanks very much for your time !

Guido

On Fri, 17/05/2019 at 21.32 +0200, Guido Trentalancia wrote:
> Hello.
> 
> I am trying to use a Digitus DA-71114 USB-to-SATA HDD enclosure.
> 
> Such unit is reported to use the JMicron JMS578 chipset by the same
> manufacturer, although it is listed with a different USB VID/PID:
> 0080:a001.
> 
> Immediately after plugging in the USB cable, it reports I/O errors,
> even though the hard-drive is fine (mounts and reads/writes fine
> under
> Windows without the enclosure):
> 
> [ 5432.689781] usb 2-1: new SuperSpeed Gen 1 USB device number 29
> using
> xhci_hcd
> [ 5432.702547] usb 2-1: New USB device found, idVendor=0080,
> idProduct=a001, bcdDevice= 1.00
> [ 5432.702553] usb 2-1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [ 5432.702557] usb 2-1: Product: External USB 3.0
> [ 5432.702561] usb 2-1: Manufacturer: TOSHIBA
> [ 5432.702565] usb 2-1: SerialNumber: 201503310008E
> [ 5432.730948] usbcore: registered new interface driver usb-storage
> [ 5432.736029] scsi host2: uas
> [ 5432.736373] usbcore: registered new interface driver uas
> [ 5432.736939] scsi 2:0:0:0: Direct-Access     TO Exter nal USB
> 3.0      6101 PQ: 0 ANSI: 6
> [ 5432.738326] sd 2:0:0:0: Attached scsi generic sg2 type 0
> [ 5435.336588] sd 2:0:0:0: [sdb] 1953525168 512-byte logical blocks:
> (1.00 TB/932 GiB)
> [ 5435.336594] sd 2:0:0:0: [sdb] 4096-byte physical blocks
> [ 5435.336762] sd 2:0:0:0: [sdb] Write Protect is off
> [ 5435.336766] sd 2:0:0:0: [sdb] Mode Sense: 53 00 00 08
> [ 5435.337063] sd 2:0:0:0: [sdb] Write cache: enabled, read cache:
> enabled, doesn't support DPO or FUA
> [ 5435.337347] sd 2:0:0:0: [sdb] Optimal transfer size 33553920 bytes
> not a multiple of physical block size (4096 bytes)
> [ 5465.794203] sd 2:0:0:0: [sdb] tag#6 uas_eh_abort_handler 0 uas-tag 
> 1
> inflight: CMD IN 
> [ 5465.794211] sd 2:0:0:0: [sdb] tag#6 CDB: Read(10) 28 00 00 00 00
> 00
> 00 00 08 00
> [ 5465.800252] scsi host2: uas_eh_device_reset_handler start
> [ 5465.915678] usb 2-1: reset SuperSpeed Gen 1 USB device number 29
> using xhci_hcd
> [ 5465.931925] scsi host2: uas_eh_device_reset_handler success
> [ 5496.510222] scsi host2: uas_eh_device_reset_handler start
> [ 5496.510329] sd 2:0:0:0: [sdb] tag#11 uas_zap_pending 0 uas-tag 1
> inflight: CMD 
> [ 5496.510337] sd 2:0:0:0: [sdb] tag#11 CDB: Read(10) 28 00 00 00 00
> 00
> 00 00 08 00
> [ 5496.625614] usb 2-1: reset SuperSpeed Gen 1 USB device number 29
> using xhci_hcd
> [ 5496.642411] scsi host2: uas_eh_device_reset_handler success
> [ 5527.230204] scsi host2: uas_eh_device_reset_handler start
> [ 5527.230309] sd 2:0:0:0: [sdb] tag#9 uas_zap_pending 0 uas-tag 1
> inflight: CMD 
> [ 5527.230316] sd 2:0:0:0: [sdb] tag#9 CDB: Read(10) 28 00 00 00 00
> 00
> 00 00 08 00
> [ 5527.345769] usb 2-1: reset SuperSpeed Gen 1 USB device number 29
> using xhci_hcd
> [ 5527.361964] scsi host2: uas_eh_device_reset_handler success
> [ 5527.780612] sd 2:0:0:0: [sdb] tag#10 FAILED Result:
> hostbyte=DID_OK
> driverbyte=DRIVER_SENSE
> [ 5527.780631] sd 2:0:0:0: [sdb] tag#10 Sense Key : Aborted Command
> [current] 
> [ 5527.780636] sd 2:0:0:0: [sdb] tag#10 Add. Sense: No additional
> sense
> information
> [ 5527.780642] sd 2:0:0:0: [sdb] tag#10 CDB: Read(10) 28 00 00 00 00
> 00
> 00 00 08 00
> [ 5527.780647] print_req_error: I/O error, dev sdb, sector 0 flags 0
> [ 5527.780657] Buffer I/O error on dev sdb, logical block 0, async
> page
> read
> 
> I have also attached the usbmon dump just before and after plugging
> in
> the device.
> 
> Adding the US_FL_BROKEN_FUA in unusual_uas.h and unusual_devs.h does
> not help !
> 
> I have also tried adding many other quirks (such as
> US_FL_NO_REPORT_OPCODES, US_FL_NO_ATA_1X, US_FL_IGNORE_RESIDUE,
> US_FL_FIX_CAPACITY, US_FL_NO_WP_DETECT, US_FL_MAX_SECTORS_64) without
> any luck !!
> 
> The problem also happens when not using UAS but the standard USB
> storage driver (fails on READ command, sector 0 and sometimes also
> sector 1953524992).
> 
> When the drive is used in the enclosure it is completely unusable, as
> it fails even on fdisk...
> 
> What should I do ?
> 
> Thanks.
> 
> Guido

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: JMicron JMS578 USB-to-SATA HDD enclosure not working
  2019-05-18 12:31 ` Guido Trentalancia
@ 2019-05-19 17:35   ` Guido Trentalancia
  2019-05-21 12:05     ` Oliver Neukum
  0 siblings, 1 reply; 4+ messages in thread
From: Guido Trentalancia @ 2019-05-19 17:35 UTC (permalink / raw)
  To: linux-usb

Thanks to the new firmware and its more meaningful Sense Key, I finally
realized that the hard-drive was simply "locked" as in the BIOS Hard-
Disk Password Lock feature.

Therefore this is not a bug, the UAS driver is working fine with the
HDD enclosure and the issue was simply a matter of unlocking the drive
in the BIOS before connecting it to the JMicron JMS578 enclosure.

On Sat, 18/05/2019 at 14.31 +0200, Guido Trentalancia wrote:
> Hello again.
> 
> I have now upgraded the original HDD enclosure firmware (version
> 46.01.00.01) with the latest available one from the Hardkernel.com /
> Odroid.com project (version 173.01.00.02).
> 
> The problem persists with similar symptoms, however the Sense Key is
> now different:
> 
> sd 2:0:0:0: [sdb] tag#13 FAILED Result: hostbyte=DID_OK
> driverbyte=DRIVER_SENSE
> sd 2:0:0:0: [sdb] tag#13 Sense Key : Data Protect [current] 
> sd 2:0:0:0: [sdb] tag#13 Add. Sense: Logical unit access not
> authorized
> sd 2:0:0:0: [sdb] tag#13 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
> print_req_error: critical target error, dev sdb, sector 0 flags 0
> Buffer I/O error on dev sdb, logical block 0, async page read
> sdb: unable to read partition table
> sd 2:0:0:0: [sdb] Attached SCSI disk
> sd 2:0:0:0: [sdb] tag#4 FAILED Result: hostbyte=DID_OK
> driverbyte=DRIVER_SENSE
> sd 2:0:0:0: [sdb] tag#4 Sense Key : Data Protect [current] 
> sd 2:0:0:0: [sdb] tag#4 Add. Sense: Logical unit access not
> authorized
> sd 2:0:0:0: [sdb] tag#4 CDB: Read(10) 28 00 74 70 6d 00 00 00 08 00
> print_req_error: critical target error, dev sdb, sector 1953524992
> flags 80700
> 
> So, the Sense basically changed from "No additional sense" to
> "Logical
> unit access not authorized", which at least seems a bit more
> meaningful...
> 
> The hard-drive is a brand-new Seagate 1TB HDD which works perfectly
> fine when connected to the SATA port directly.
> 
> Is anybody aware of any kind of Data Protection or Access
> Authorization
> option that needs to be disabled or enabled, respectively ? If yes,
> how
> ?
> 
> Thanks very much for your time !
> 
> Guido
> 
> On Fri, 17/05/2019 at 21.32 +0200, Guido Trentalancia wrote:
> > Hello.
> > 
> > I am trying to use a Digitus DA-71114 USB-to-SATA HDD enclosure.
> > 
> > Such unit is reported to use the JMicron JMS578 chipset by the same
> > manufacturer, although it is listed with a different USB VID/PID:
> > 0080:a001.
> > 
> > Immediately after plugging in the USB cable, it reports I/O errors,
> > even though the hard-drive is fine (mounts and reads/writes fine
> > under
> > Windows without the enclosure):
> > 
> > [ 5432.689781] usb 2-1: new SuperSpeed Gen 1 USB device number 29
> > using
> > xhci_hcd
> > [ 5432.702547] usb 2-1: New USB device found, idVendor=0080,
> > idProduct=a001, bcdDevice= 1.00
> > [ 5432.702553] usb 2-1: New USB device strings: Mfr=1, Product=2,
> > SerialNumber=3
> > [ 5432.702557] usb 2-1: Product: External USB 3.0
> > [ 5432.702561] usb 2-1: Manufacturer: TOSHIBA
> > [ 5432.702565] usb 2-1: SerialNumber: 201503310008E
> > [ 5432.730948] usbcore: registered new interface driver usb-storage
> > [ 5432.736029] scsi host2: uas
> > [ 5432.736373] usbcore: registered new interface driver uas
> > [ 5432.736939] scsi 2:0:0:0: Direct-Access     TO Exter nal USB
> > 3.0      6101 PQ: 0 ANSI: 6
> > [ 5432.738326] sd 2:0:0:0: Attached scsi generic sg2 type 0
> > [ 5435.336588] sd 2:0:0:0: [sdb] 1953525168 512-byte logical
> > blocks:
> > (1.00 TB/932 GiB)
> > [ 5435.336594] sd 2:0:0:0: [sdb] 4096-byte physical blocks
> > [ 5435.336762] sd 2:0:0:0: [sdb] Write Protect is off
> > [ 5435.336766] sd 2:0:0:0: [sdb] Mode Sense: 53 00 00 08
> > [ 5435.337063] sd 2:0:0:0: [sdb] Write cache: enabled, read cache:
> > enabled, doesn't support DPO or FUA
> > [ 5435.337347] sd 2:0:0:0: [sdb] Optimal transfer size 33553920
> > bytes
> > not a multiple of physical block size (4096 bytes)
> > [ 5465.794203] sd 2:0:0:0: [sdb] tag#6 uas_eh_abort_handler 0 uas-
> > tag 
> > 1
> > inflight: CMD IN 
> > [ 5465.794211] sd 2:0:0:0: [sdb] tag#6 CDB: Read(10) 28 00 00 00 00
> > 00
> > 00 00 08 00
> > [ 5465.800252] scsi host2: uas_eh_device_reset_handler start
> > [ 5465.915678] usb 2-1: reset SuperSpeed Gen 1 USB device number 29
> > using xhci_hcd
> > [ 5465.931925] scsi host2: uas_eh_device_reset_handler success
> > [ 5496.510222] scsi host2: uas_eh_device_reset_handler start
> > [ 5496.510329] sd 2:0:0:0: [sdb] tag#11 uas_zap_pending 0 uas-tag 1
> > inflight: CMD 
> > [ 5496.510337] sd 2:0:0:0: [sdb] tag#11 CDB: Read(10) 28 00 00 00
> > 00
> > 00
> > 00 00 08 00
> > [ 5496.625614] usb 2-1: reset SuperSpeed Gen 1 USB device number 29
> > using xhci_hcd
> > [ 5496.642411] scsi host2: uas_eh_device_reset_handler success
> > [ 5527.230204] scsi host2: uas_eh_device_reset_handler start
> > [ 5527.230309] sd 2:0:0:0: [sdb] tag#9 uas_zap_pending 0 uas-tag 1
> > inflight: CMD 
> > [ 5527.230316] sd 2:0:0:0: [sdb] tag#9 CDB: Read(10) 28 00 00 00 00
> > 00
> > 00 00 08 00
> > [ 5527.345769] usb 2-1: reset SuperSpeed Gen 1 USB device number 29
> > using xhci_hcd
> > [ 5527.361964] scsi host2: uas_eh_device_reset_handler success
> > [ 5527.780612] sd 2:0:0:0: [sdb] tag#10 FAILED Result:
> > hostbyte=DID_OK
> > driverbyte=DRIVER_SENSE
> > [ 5527.780631] sd 2:0:0:0: [sdb] tag#10 Sense Key : Aborted Command
> > [current] 
> > [ 5527.780636] sd 2:0:0:0: [sdb] tag#10 Add. Sense: No additional
> > sense
> > information
> > [ 5527.780642] sd 2:0:0:0: [sdb] tag#10 CDB: Read(10) 28 00 00 00
> > 00
> > 00
> > 00 00 08 00
> > [ 5527.780647] print_req_error: I/O error, dev sdb, sector 0 flags
> > 0
> > [ 5527.780657] Buffer I/O error on dev sdb, logical block 0, async
> > page
> > read
> > 
> > I have also attached the usbmon dump just before and after plugging
> > in
> > the device.
> > 
> > Adding the US_FL_BROKEN_FUA in unusual_uas.h and unusual_devs.h
> > does
> > not help !
> > 
> > I have also tried adding many other quirks (such as
> > US_FL_NO_REPORT_OPCODES, US_FL_NO_ATA_1X, US_FL_IGNORE_RESIDUE,
> > US_FL_FIX_CAPACITY, US_FL_NO_WP_DETECT, US_FL_MAX_SECTORS_64)
> > without
> > any luck !!
> > 
> > The problem also happens when not using UAS but the standard USB
> > storage driver (fails on READ command, sector 0 and sometimes also
> > sector 1953524992).
> > 
> > When the drive is used in the enclosure it is completely unusable,
> > as
> > it fails even on fdisk...
> > 
> > What should I do ?
> > 
> > Thanks.
> > 
> > Guido

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: JMicron JMS578 USB-to-SATA HDD enclosure not working
  2019-05-19 17:35   ` Guido Trentalancia
@ 2019-05-21 12:05     ` Oliver Neukum
  0 siblings, 0 replies; 4+ messages in thread
From: Oliver Neukum @ 2019-05-21 12:05 UTC (permalink / raw)
  To: Guido Trentalancia, linux-usb

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

On So, 2019-05-19 at 19:35 +0200, Guido Trentalancia wrote:
> Thanks to the new firmware and its more meaningful Sense Key, I finally
> realized that the hard-drive was simply "locked" as in the BIOS Hard-
> Disk Password Lock feature.
> 
> Therefore this is not a bug, the UAS driver is working fine with the
> HDD enclosure and the issue was simply a matter of unlocking the drive
> in the BIOS before connecting it to the JMicron JMS578 enclosure.

Hi,

this is an unusual report. It leaves a question open. We need to know
what this error will do during operation of the system. It makes me
wonder about power management operations.

Could you test S3 or S4 with your drive in the locked state?
If there is an error, could you test the attached patch?

	Regards
		Oliver

[-- Attachment #2: 0001-scsi-ignore-a-failure-to-synchronize-cache-due-to-la.patch --]
[-- Type: text/x-patch, Size: 1411 bytes --]

From 499d60018326c7e8b7922b0887cfd9456e765c45 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Tue, 21 May 2019 13:49:34 +0200
Subject: [PATCH] scsi: ignore a failure to synchronize cache due to lack of
 authorization

I've got a report about a UAS drive enclosure reporting back
Sense: Logical unit access not authorized
if the drive it holds is password protected. While the drive
is obviously unusable in that state as a mass storage device,
it still exists as a sd device and when the system is asked
to perform a suspend of the drive, it will be sent a
SYNCHRONIZE CACHE. If that fails due to password protection,
the error must be ignored.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/scsi/sd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index ebc80354714c..2a9a60393f50 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1653,7 +1653,8 @@ static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr)
 		/* we need to evaluate the error return  */
 		if (scsi_sense_valid(sshdr) &&
 			(sshdr->asc == 0x3a ||	/* medium not present */
-			 sshdr->asc == 0x20))	/* invalid command */
+			 sshdr->asc == 0x20 ||	/* invalid command */
+			 (sshdr->asc == 0x74 && sshdr->ascq == 0x71)))	/* drive is password locked */ 
 				/* this is no error here */
 				return 0;
 
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-21 12:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17 19:32 JMicron JMS578 USB-to-SATA HDD enclosure not working Guido Trentalancia
2019-05-18 12:31 ` Guido Trentalancia
2019-05-19 17:35   ` Guido Trentalancia
2019-05-21 12:05     ` Oliver Neukum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.