Xiaomi Router 3G - USB Problem in 18.06.1

Hi,
I bought an Seagate BackupPlus Hub 4TB external hdd, but I can't mount.

lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 5000M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 480M

This packages are installed:

kmod-usb-storage-uas
kmod-usb-storage
kmod-usb3
kmod-usb-core
block-mount
kmod-fs-ext4
[  209.836005] usb 2-1: new SuperSpeed USB device number 4 using xhci-mtk
[  209.872490] hub 2-1:1.0: USB hub found
[  209.877831] hub 2-1:1.0: 3 ports detected
[  210.015854] usb 1-1: new high-speed USB device number 3 using xhci-mtk
[  210.199735] hub 1-1:1.0: USB hub found
[  210.203844] hub 1-1:1.0: 3 ports detected
[  210.295960] usb 2-1.1: new SuperSpeed USB device number 5 using xhci-mtk
[  210.329590] scsi host0: uas
[  210.333515] xhci-mtk 1e1c0000.xhci: ERROR Transfer event for unknown stream ring slot 3 ep 6
[  210.341970] xhci-mtk 1e1c0000.xhci: @000000000f796e90 0e8ca200 00000000 05000000 03078001
[  210.350154] xhci-mtk 1e1c0000.xhci: ERROR Transfer event for unknown stream ring slot 3 ep 2
[  210.358567] xhci-mtk 1e1c0000.xhci: @000000000f796ea0 0e8ca100 00000000 05000000 03038001
[  211.336204] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
[  231.575784] scsi 0:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN 
[  231.583350] scsi 0:0:0:0: tag#0 CDB: opcode=0x12 12 00 00 00 24 00
[  231.589645] xhci-mtk 1e1c0000.xhci: Mismatch between completed Set TR Deq Ptr command & xHCI internal state.
[  231.599433] xhci-mtk 1e1c0000.xhci: ep deq seg = 8de10580, deq ptr = ae86f010
[  232.675750] scsi host0: uas_eh_device_reset_handler FAILED to get lock err -16
[  232.682974] scsi 0:0:0:0: Device offlined - not ready after error recovery

I changed the cable, but problem persists.
Any help?

Please at least list basic information, Xiaomi Router 3G?
Does it work using 18.06.2 and/or snapshots?
Have you tried the Seagate HDD on another device to verify that its working?

Seems like a known issue https://bugs.openwrt.org/index.php?do=details&task_id=1862
The XHCI driver for MT7621 is incompatible for UAS in USB 3.0

1- Yes, Mi 3G
2- I'll take the test in 18.06.2
3- Yes, HDD works fine

What can I do?

Connect it via USB 2?

Do you have the UAS kmod installed? If so, it might be possible to remove or disable it to see if that resolves the problem

Correct :grinning:

Just install the usb2 packages? The transfer speed will be affected, right?

For a new hard disk, it probably well, as the sequential read and write spead is likely to be more than USB 2.0 bus speed.

You could try to remove UAS kmod as @jeff advised, though, in the last post in bug report mentioned by @LGA1150 https://bugs.openwrt.org/index.php?do=details&task_id=1862, the user says that removing that didn't solve the problem.

You could use a USB 2.0 cable to force it to use USB 2.0.

I'll test to see if it works...
The cable will be difficult to change because the plug is different

https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRwPuEi2hsb20g1pJRztl3jmsj2yRVU7Zd4DCqV482pi8WelpSm

A micro USB cable Type B (like what you have for some Android phones) can be plugged in a USB 3.0 disk, in which case it will function as USB 2.0.

Alternatively you can use a USB 2.0 extension cable (male to female) as intermediate between your HDD cable and the router.

Just make sure it's USB 2.0. If in doubt, look inside the connector to see how many pins there are. See the image below is for a USB 3.0 cable. USB 2.0 cables have only the 4 first pins

1 Like

I'll do the tests and later comment here

EDIT: I reinstalled the UAS driver and it worked with the 2.0 cable.

Is there nothing to do about write/read speed?

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 480M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 480M

These are the limits of USB 2.0 bus. Theoretical speed of 60 MB/s, but you would get around half that amount due to protocol overhead. At least now you have the HDD working while you are looking into the solution for USB 3.0.

1 Like

Sorry for the question, but how do I know they are fixing this bug?

You can follow up with the bug list. there is the option to get notification.

Did you try uninstalling the UAS driver and see if the the kmod-usb3 works with USB 3.0 cable?

Yes, but it didn't work.
Only when I reinstalled UAS Driver, the disk is recognized.

Hi,
This bug has been solved? USB2 is slow in streaming media... :frowning: