Power & Source of Big Ideas

Neo2 Board weird behavior in SATA disks (UAS issue?)

Moderators: chensy, FATechsupport

Hi all,

I'm facing a weird behavior on the internal SATA disk attached into a Neo2 with NAS 1.2 kit (Sata Seagate M3 disk) and also in any attached USB disk when reading thousands of small files from a TimeCapsule share I have configured within the OMV (3.0.86 Erasmus with 4.11.2 Kernel version), processor Allwinnersun50iw2Family.

Code: Select all

# uname -a
Linux dataNEO2 4.11.2 #22 SMP Sat Jul 27 11:14:47 CST 2017 aarch64 GNU/Linux


After some time backing up the information within the SATA disk to the cloud, I receive errors reading caused by scsi host0: uas_eh_bus_reset_handler start" that causes the FS to be in wrong state:

Code: Select all

 dataNEO2 kernel: EXT4-fs error (device sda1): ext4_xattr_block_get:324: inode #11272713: comm rclone: bad block 45097517
dataNEO2 kernel: EXT4-fs error (device sda1): ext4_xattr_block_get:324: inode #11272714: comm rclone: bad block 45097518
dataNEO2 kernel: EXT4-fs error (device sda1): ext4_xattr_block_get:324: inode #11272715: comm rclone: bad block 45097519
dataNEO2 afpd: ad_open_hf_ea: unexpected: Structure needs cleaning
dataNEO2 afpd: afp_openfork(1b5b): ad_open: Structure needs cleaning
dataNEO2 kernel: sd 1:0:0:0: sda tag#2 uas_eh_abort_handler 0 uas-tag 3 inflight: IN
dataNEO2 kernel: sd 1:0:0:0: sda tag#2 CDB: opcode=0x28 28 00 df 01 09 00 00 00 08 00
dataNEO2 kernel: scsi host1: uas_eh_bus_reset_handler start
dataNEO2 kernel: usb 4-1: reset high-speed USB device number 2 using ehci-platform
dataNEO2 kernel: scsi host1: uas_eh_bus_reset_handler success   ---> Here it comes the reset from UAS


I have attached an external USB drive (same model, same size) and again the same issue after some time reading files.

This is the information from the SATA drive

Code: Select all

# smartctl --all /dev/sda -d scsi
smartctl 6.4 2014-10-07 r4002 [aarch64-linux-4.11.2] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               JMicron
Product:              Tech
Revision:             0227
Compliance:           SPC-4
User Capacity:        2,000,398,934,016 bytes [2.00 TB]
Logical block size:   512 bytes
LB provisioning type: unreported, LBPME=-1, LBPRZ=0
Logical Unit id:      0x3000000000451400
Serial number:        0000000045AD
Device type:          disk
Local Time is:        Wed Aug  2 13:15:43 2017 UTC
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Disabled or Not Supported


And the information from the USB ports itself...

Code: Select all

# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0bc2:61b5 Seagate RSS LLC
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

# lsusb -d 152d:0578
Bus 004 Device 002: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp.

# lsusb -v -d  152d:0578

Bus 004 Device 002: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x152d JMicron Technology Corp. / JMicron USA Technology Corp.
  idProduct          0x0578
  bcdDevice            2.27
  iManufacturer           1 JMicron
  iProduct                2 External Disk 3.0
  iSerial                 3 0000000045AD
  bNumConfigurations      1


I already tried to disable the UAS feature as per UbuntuForums, StackExchange, ArchLinux, OpenMediaVault, etc... where they do recommend disabling the UAS feature within the USB ports (usually for USB3 devices, however the behavior is the same):
  • including a blacklist in /etc/modprobe.d/ignore_uas.conf (lsusb output:) with options usb-storage quirks=Vendor_ID:Product_ID:u
    idVendor 0x152d JMicron Technology Corp. / JMicron USA Technology Corp.
    idProduct 0x0578

    Code: Select all

    options usb-storage quirks=152d:0578:u

  • including a rule in /etc/udev/rules.d/60-usb-hdd.rule for disabling SMART

    Code: Select all

    KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", ENV{ID_ATA_FEATURE_SET_SMART}="0", ENV{ID_ATA_FEATURE_SET_SMART_ENABLED}="0", ENV{UDISKS_DISABLE_POLLING}="1"
    KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="ata", ENV{DEVTYPE}=="disk", ENV{ID_ATA_FEATURE_SET_SMART}="0", ENV{ID_ATA_FEATURE_SET_SMART_ENABLED}="0", ENV{UDISKS_DISABLE_POLLING}="1"
    KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="scsi", ENV{DEVTYPE}=="disk", ENV{ID_ATA_FEATURE_SET_SMART}="0", ENV{ID_ATA_FEATURE_SET_SMART_ENABLED}="0", ENV{UDISKS_DISABLE_POLLING}="1"

  • Both together disabling auto suspend and quirks

    Code: Select all

    # echo "152d:0578:u"  >> /sys/module/usb_storage/parameters/quirks
    # echo -1 >/sys/module/usbcore/parameters/autosuspend
But I'm not able to remove the USB resets when reading huge amount of small files (I have been not able to reproduce it with huge size files) and actually, I don't think the UAS is disabled as per dmesg output once reboot.


I'm wondering whether this is a Kernel issue or a HW issue. Any idea in how to remove that annoying situation?, I'm loosing all data within the Filesystem due to I have to fsck every time the partition, and I'm loosing almost all data inside.
In addition to above,

I would like to add some more information in regards of the investigations and test performed.

Debian Version from FriendlyElec is 8.9, with the latest kernel available for this distribution (nanopi-neo2_debian-nas-jessie_4.x.y_YYYYMMDD.img.zip Image File with Support for NAS Dock, Kernel: Linux-4.x, applicable to 1-bay NAS Dock)

It was suggested to remove the UAS module, however in this kernel the UAS module does not come as module:

Code: Select all

# zcat /proc/config.gz | grep "CONFIG_USB_UAS="
CONFIG_USB_UAS=y
# zcat /proc/config.gz | grep "CONFIG_USB_STORAGE="
CONFIG_USB_STORAGE=y


After include in the modprobe.d the blacklisted file contains the

Code: Select all

options usb-storage quirks=152d:0578:u



Code: Select all

# update-initramfs -u


however, as the UAS is not loaded as module, above attempt, did not work.

Is there any option to disable the UAS when it is loaded within the kernel?
Any option to update the kernel with the UAS issue solved?.

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 4 guests