Asus RT-AC56R <-> External USB 3 drive not working

Solved! Support for Xiaomi Wifi R3P Pro? - #882 by andreykiselev

Adding quirk fixed it and the read speed now matches my desktop :grinning:

# hdparm -Tt /dev/sda3

/dev/sda3:
 Timing cached reads:   486 MB in  2.00 seconds = 242.61 MB/sec
 Timing buffered disk reads: 236 MB in  3.02 seconds =  78.22 MB/sec

OpenWrt 21.02.2 r16495-bf0c965af0 / LuCI openwrt-21.02 branch git-22.046.85957-59c3392

Finally got around to actually use the router Upcycling ASUS RT-AC56R and have some trouble with USB 3 and Orico external usb enclosure with 3 TB WD Red NAS drive. When I plug in the device in to USB 2.0 port, it works fine but fails when I plug it into USB 3.0 device.

BTW What read speed should I expect? I am not getting faster than 23.70 MB/sec. On a Ubuntu linux desktop I get around 80 MB.sec Here is dmesg output when it is plugged in to USB 3 port.

 dmesg | grep usb
[    6.517543] usbcore: registered new interface driver usbfs
[    6.523154] usbcore: registered new interface driver hub
[    6.528531] usbcore: registered new device driver usb
[    6.559560] ehci-platform 18021000.usb: EHCI Host Controller
[    6.565310] ehci-platform 18021000.usb: new USB bus registered, assigned bus number 1
[    6.573415] ehci-platform 18021000.usb: irq 37, io mem 0x18021000
[    6.590854] ohci-platform 18022000.usb: Generic Platform OHCI controller
[    6.597658] ohci-platform 18022000.usb: new USB bus registered, assigned bus number 2
[    6.605600] ohci-platform 18022000.usb: irq 37, io mem 0x18022000
[    6.610204] ehci-platform 18021000.usb: USB 2.0 started, EHCI 1.00
[    6.763760] xhci-hcd 18023000.usb: xHCI Host Controller
[    6.769005] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 3
[    6.776701] xhci-hcd 18023000.usb: hcc params 0x02501164 hci version 0x100 quirks 0x0000001000010010
[    6.785871] xhci-hcd 18023000.usb: irq 38, io mem 0x18023000
[    6.803684] xhci-hcd 18023000.usb: xHCI Host Controller
[    6.808926] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 4
[    6.816314] xhci-hcd 18023000.usb: Host supports USB 3.0 SuperSpeed
[    6.833831] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.943042] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    7.367808] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[   13.922028] usbcore: registered new interface driver usb-storage
[   13.934142] xhci-hcd 18023000.usb: ERROR: unexpected command completion code 0x11.
[   13.975674] usbcore: registered new interface driver uas
# lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=, Driver=, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/2p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/2p, 480M
# ls -l /dev/sd*
ls: /dev/sd*: No such file or directory

Here is the dmesg when it is connected to USB 2.0 port and it is working fine.

# dmesg | grep usb
[    6.531215] usbcore: registered new interface driver usbfs
[    6.536802] usbcore: registered new interface driver hub
[    6.542166] usbcore: registered new device driver usb
[    6.573088] ehci-platform 18021000.usb: EHCI Host Controller
[    6.578870] ehci-platform 18021000.usb: new USB bus registered, assigned bus number 1
[    6.592952] ehci-platform 18021000.usb: irq 37, io mem 0x18021000
[    6.598225] ohci-platform 18022000.usb: Generic Platform OHCI controller
[    6.610911] ohci-platform 18022000.usb: new USB bus registered, assigned bus number 2
[    6.618835] ohci-platform 18022000.usb: irq 37, io mem 0x18022000
[    6.633757] ehci-platform 18021000.usb: USB 2.0 started, EHCI 1.00
[    6.763748] xhci-hcd 18023000.usb: xHCI Host Controller
[    6.768992] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 3
[    6.776688] xhci-hcd 18023000.usb: hcc params 0x02501164 hci version 0x100 quirks 0x0000001000010010
[    6.785868] xhci-hcd 18023000.usb: irq 38, io mem 0x18023000
[    6.803553] xhci-hcd 18023000.usb: xHCI Host Controller
[    6.808804] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 4
[    6.816190] xhci-hcd 18023000.usb: Host supports USB 3.0 SuperSpeed
[    6.833803] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.970222] usb 1-2: new high-speed USB device number 2 using ehci-platform
[   13.921023] usbcore: registered new interface driver usb-storage
[   13.933641] usbcore: registered new interface driver uas
[   15.929972] usbcore: registered new interface driver ums-alauda
[   15.937833] usbcore: registered new interface driver ums-cypress
[   15.945753] usbcore: registered new interface driver ums-datafab
[   15.954202] usbcore: registered new interface driver ums-freecom
[   15.964009] usbcore: registered new interface driver ums-isd200
[   15.971532] usbcore: registered new interface driver ums-jumpshot
[   15.978840] usbcore: registered new interface driver ums-karma
[   15.987531] usbcore: registered new interface driver ums-sddr09
[   15.995929] usbcore: registered new interface driver ums-sddr55
[   16.004187] usbcore: registered new interface driver ums-usbat

# lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/2p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/2p, 480M
    |__ Port 2: Dev 2, If 0, Class=, Driver=uas, 480M

BTW What read speed should I expect? On a Ubuntu linux desktop I get around 80 MB/sec Here is dmesg output when it is plugged in to USB 2 port.

# hdparm -Tt /dev/sda3

/dev/sda3:
 Timing cached reads:   492 MB in  2.01 seconds = 245.28 MB/sec
 Timing buffered disk reads:  72 MB in  3.04 seconds =  23.70 MB/sec

There is some discussion of disabling UAS for jmicron chip set on this external drive using cmdline.txt. Can I do this with openwrt?

# lsusb -v | grep 0080:0578
Bus 001 Device 002: ID 0080:0578 JMicron External USB 3.0