USB 2.0/3.0 and weird T77W968

Hi everybody,
Something happens in my T77W968 modem, as a result, it is detected by the USB 3.0 controllers, but not USB 2.0.

On PC / Vmware, where it is convenient to switch port emulation) It looks like this:

usb 2.0 emulation mode:

dmesg

[ 2216.890741] usb 2-1: new high-speed USB device number 6 using ehci-pci

[ 2217.163576] usb 2-1: device descriptor read/64, error 18

[ 2217.547061] usb 2-1: device descriptor read/64, error 18

[ 2217.901630] usb 2-1: new high-speed USB device number 7 using ehci-pci

[ 2218.179057] usb 2-1: device descriptor read/64, error 18

[ 2218.575801] usb 2-1: device descriptor read/64, error 18

[ 2218.683654] usb usb2-port1: attempt power cycle

[ 2219.249190] usb 2-1: new high-speed USB device number 8 using ehci-pci

[ 2219.294695] usb 2-1: Invalid ep0 maxpacket: 9

[ 2219.556620] usb 2-1: new high-speed USB device number 9 using ehci-pci

[ 2219.601274] usb 2-1: Invalid ep0 maxpacket: 9

[ 2219.616137] usb usb2-port1: unable to enumerate USB device

usb 3.0 emulation mode:

dmesg

[ 1990.269559] usb 4-1: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd

[ 1990.292143] usb 4-1: New USB device found, idVendor=1bc7, idProduct=1910, bcdDevice= 3.18

[ 1990.292145] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 1990.292145] usb 4-1: Product: Telit LN960 Mobile Broadband

[ 1990.292146] usb 4-1: Manufacturer: Telit

[ 1990.292146] usb 4-1: SerialNumber: 0123456789ABCDEF

[ 1990.339521] cdc_mbim 4-1:2.0: cdc-wdm0: USB WDM device

[ 1990.339663] cdc_mbim 4-1:2.0 wwan0: register ‘cdc_mbim’ at usb-0000:03:00.0-1, CDC MBIM, 3e:c6:99:54:47:b3

Those, on a PC with USB 3.0 and Linux/Windows, the modem is functional and can be used.

The problem is that when it plugged into a router with openwrt and a USB 3.0 port, the modem is picked up by the USB 2.0 (xhci-mtk/2p, 480M) controller (dmesg is empty there, you can only guess what is in it) and as a result it is not detected and does not start, the lsusb command does not sees the device at all.

How to make the router pick it up with the USB 3.0 controller (xhci-mtk/1p, 5000M) first?

The options are:

  1. turn off support for usb 2.0 emulation in the router (how - hardware or software)? removing ehci packages did not help, hub-ctrl also does not work
  2. special cable between the modem and the usb port of the router, turning off the power / data lines usb 2.0 (which one?)
  3. change the priority of the connection to 3.0 / 2.0 (how?)
  4. something else?
root@openwrt:~# uname -a

Linux openwrt 4.14.221 #0 SMP Mon Feb 15 15:22:37 2021 mips GNU/Linux

root@openwrt:~# lsusb -t

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/1p, 5000M

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M

root@openwrt:~# opkg list-installed | grep usb

kmod-usb-core - 4.14.221-1

kmod-usb-ledtrig-usbport - 4.14.221-1

kmod-usb-net - 4.14.221-1

kmod-usb-net-cdc-ether - 4.14.221-1

kmod-usb-net-cdc-mbim - 4.14.221-1

kmod-usb-net-cdc-ncm - 4.14.221-1

kmod-usb-net-huawei-cdc-ncm - 4.14.221-1

kmod-usb-net-qmi-wwan - 4.14.221-1

kmod-usb-net-rndis - 4.14.221-1

kmod-usb-serial - 4.14.221-1

kmod-usb-serial-option - 4.14.221-1

kmod-usb-serial-wwan - 4.14.221-1

kmod-usb-storage - 4.14.221-1

kmod-usb-wdm - 4.14.221-1

kmod-usb3 - 4.14.221-1

The T77W968 has an M.2 interface. To connect it to an OpenWrt router through USB, you must be using a M.2-USB adapter. Can you post details of which USB adapter you are using?

It is possible that the adapter is USB 2.0 due to which it connects to the USB2 pins in the USB3 port of the router and is picked up the ehci driver, instead of the xhci driver. If so, you will need to upgrade to a M.2-USB3 adapter.

This one:

It's definitely 3.0, and modem works fine when plugged in PC USB 3.0 ports in Windows/Linux.
The case is (I think so) with prioriry of usb 2.0/3.0 device detection in openwrt/my router hardware.
It fails with usb 2.0 detection and doesn't try to look for it with 3.0.

I think something burned in USB 2.0 power/data lines inside modem, so it definitely a mix of hardware/software issues.

Is it possible to disable this device in opewwrt?
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M

I am sure you are right, but just to confirm - how are you verifying that when the adapter with the modem is connected to Windows, it is the USB 3.0 logical port that it is being picked up on and not the USB 2.0 logical port?

I don't try to check this, it require some unknown monitoring software to install, but I've posted dmesg above for VMWare/Kali Linux and there is something bad with 2.0 emulation and all ok with 3.0.
As well I have notebook with two ports: usb 2.0 and usb 3.0, modem is dead being plugged in 2.0 and works in 3.0... So everything points to the fact it works only on 3.0 hardware port with logical 3.0 driver selected and doesn't work with 2.0 hardware port or 3.0 hardware port with logical 2.0 driver selected.

What output are you getting from these?

AT+USBSWITCH?
AT^USBTYPE?

hi

at^usbtype?
^USBTYPE: USB2.0

how to set 3.0?

Can you please post output of both commands.
Also this one cat /sys/kernel/debug/usb/devices and full dmesg

What router is this that you are using?