I own an external USB 3.0 enclosure with the chip Asmedia ASM1051E that reports lots of error to syslogs:
sd 8:0:0:0: [sdi] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD
sd 8:0:0:0: [sdi] tag#1 CDB: Write(10) 2a 00 48 c0 81 00 00 00 01 00
scsi host8: uas_eh_device_reset_handler start
usb 2-1: reset SuperSpeed USB device number 2 using xhci_hcd
scsi host8: uas_eh_device_reset_handler success
usb 2-1: Disable of device-initiated U1 failed.
usb 2-1: Disable of device-initiated U2 failed.
sd 8:0:0:0: [sdi] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
sd 8:0:0:0: [sdi] tag#0 CDB: ATA command pass through(16) 85 09 0e 00 00 00 01 00 11 00 00 00 00 00 2f 00
xhci_hcd 0000:00:14.0: ERROR Unknown event condition 199 for slot 4 ep 3 , HC probably busted
I have done some research about it, and I found that the chip itself has broken support under UAS mode and that the best option is to run it as regular USB storage mode.
Blacklisting the vendor_id:product_id with the following command resolves the incompatibility problem:
But it has to be done at each reboot, before the system recognises the external USB enclosure.
I have tried to do a scheduled job at reboot executed with root but it gets launched after the system detects the external USB enclosure and therefore it uses UAS for it. So I have to turn the external drive off, relaunch the script and turn it on again each time the system reboots.
Is there any way to execute a custom script at a "lower level", before the system recognises the USB devices attached to it? Maybe at /etc/init.d/ or /etc/rc.local?
Thanks in advance.