USB 3.0 external HDD resetting and eventually becoming unavailiable

Hello, I’m using a Jeston Nano as a home media server. I’m on Jetpack 4.2.2 [L4T 32.2.1] and I have an externally powered USB 3.0 hard driver (Seagate Expansion 8TB Desktop External Hard Drive USB 3.0 (STEB8000100)) attached to the system.

Most of the time the system works just fine, but I get multiple USB resets in my dmesg logs and when the system is under heavy io load the driver eventually goes offline and become unavailable after an USB reset.

It first I thought this might be a problem with the driver, so I mounted it to my computer running Manjaro and I never saw any message popping on dmesg even when running fio stress tests. So this lead me to think that this could be a problem with how it’s being handled by the Jetson Nano. Any one has any suggestion of how can I solve this?

Some extra information that could be useful in identifying the problem:

$ uname -a
Linux jetson.local 4.9.140-tegra #1 SMP PREEMPT Sat Oct 19 15:54:06 PDT 2019 aarch64 aarch64 aarch64 GNU/Linux

and

$ cat /sys/kernel/debug/usb/devices
T:  Bus=02 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  4 Spd=5000 MxCh= 0
D:  Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=0bc2 ProdID=3322 Rev= 1.00
S:  Manufacturer=Seagate
S:  Product=Expansion Desk
S:  SerialNumber=REDACTED
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=uas
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 0 Alt= 1 #EPs= 4 Cls=08(stor.) Sub=06 Prot=62 Driver=uas
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms

And finally the dmesg log from last boot is attached and here is an extract with the reset message:

[ 5599.868555] sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[ 5599.868641] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x88 88 00 00 00 00 01 aa d2 93 d8 00 00 01 00 00 00
[ 5599.960794] usb 2-1.2: reset SuperSpeed USB device number 4 using tegra-xusb
[ 5689.882249] sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[ 5689.882265] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 3c 31 78 20 00 00 01 00 00 00
[ 5689.972737] usb 2-1.2: reset SuperSpeed USB device number 4 using tegra-xusb
[39873.198530] sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD OUT
[39873.198538] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x8a 8a 00 00 00 00 00 5a ab 00 58 00 00 00 08 00 00
[39874.179378] sd 0:0:0:0: [sda] tag#2 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD IN
[39874.179467] sd 0:0:0:0: [sda] tag#2 CDB: opcode=0x88 88 00 00 00 00 00 30 8f 13 d0 00 00 01 00 00 00
[39874.186392] sd 0:0:0:0: [sda] tag#3 uas_zap_pending 0 uas-tag 4 inflight: CMD
[39874.186421] sd 0:0:0:0: [sda] tag#3 CDB: opcode=0x8a 8a 00 00 00 00 00 03 eb 00 80 00 00 00 08 00 00
[39874.271540] usb 2-1.2: reset SuperSpeed USB device number 4 using tegra-xusb
[39923.246063] sd 0:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD IN
[39923.246092] sd 0:0:0:0: [sda] tag#1 CDB: opcode=0x88 88 00 00 00 00 00 62 6c 40 d0 00 00 00 08 00 00
[39923.724420] usb 2-1.2: reset SuperSpeed USB device number 4 using tegra-xusb

dmesg.log (69.9 KB)

Hi,
Please remove the config and give it a try:

Hi @DaneLLL, thanks for the suggestion. Can you point me to any documentation showing how to do that? If I’m understanding it right it would require me to reflash the module ( I was trying to avoid that).

Also, if I understand what that config does it would disable UAS, right? But then, I’d loose throughput right? If the intention is just disable UAS, could I use use usb quirks blacklisting uas just for this device?

It would require you to compile a kernel with that feature being the only difference. Then a file (“Image”) copy. The kernel customization documents have information on this, but basically it implies using the “tegra_defconfig”, but then removing “CONFIG_USB_UAS=y”.

1 Like

Hi,
Please refer to kernel customization in development guide.

1 Like

Thanks I’ve just finished doing and now it’s using usb-storage let me see how it goes.

@DaneLLL Thanks it seems to be working and performance is a little slower, but it’s enough for my user case. Do you think UAS support would be available in the future?

Hi,
In setting CONFIG_USB_UAS=y, please apply the patch
https://elinux.org/Jetson/L4T/r32.3.x_patches
[USB 3 hang when USAP enabled device is connected]
And use a USB cable with better quality( less than half meter ). Please try the solution and see if it works with the device.

I was able to fix this same problem without modifying/flashing the kernel. I did this by modifying /boot/extlinux/extlinux.conf. I added usb_storage.quirks=::u, where * is the device ID from lsusb, to the APPEND line of the .conf file.

(ex: APPEND ${cbootargs} usb_storage.quirks=0bc2:ac1e:u)

This just disables the uas for the single device by modifying the kernel boot parameter (needs to be done on the ‘DEFAULT’ boot parameter settings - sometimes extlinux.conf contains multiple kernel boot parameter setups).

You can check if it worked by running lsusb -t before and after adding the line to the file (then rebooting). The ‘driver=uas’ should change to ‘driver=usb-storage’ for the device in question (after reboot).

1 Like