raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.11k stars 1.68k forks source link

UE200 USB to Ethernet Adapter not initializing in boot #1902

Open Eldho1416 opened 1 month ago

Eldho1416 commented 1 month ago

Describe the bug I have USB to Lan adapter from TP link https://tinyurl.com/kptfvtrp which used to work perfectly fine around 6-8 months ago in Ubuntu Server 20.04 running Raspberry PI 4B (4GB RAM) and I recently tried to connect it to same hardware and OS and it fails to show the interface. It doesn't show up in lsusb but if unplug and plug it it works fine what could be the problem?

To reproduce Connect UE200 from TPlink before boot and then boot

Expected behaviour Supposed to be initailzed during boot

Actual behaviour Not initializing during boot

System

Logs dmesg

[    2.535403] usb 1-1.3: new full-speed USB device number 5 using xhci_hcd
[    2.615603] usb 1-1.3: device descriptor read/64, error -32
[    2.807586] usb 1-1.3: device descriptor read/64, error -32
[    2.999391] usb 1-1.3: new full-speed USB device number 6 using xhci_hcd
[    3.079588] usb 1-1.3: device descriptor read/64, error -32
[    3.271585] usb 1-1.3: device descriptor read/64, error -32
[    3.991400] usb 1-1.3: new full-speed USB device number 7 using xhci_hcd
[    3.991629] usb 1-1.3: Device not responding to setup address.
[    4.227594] usb 1-1.3: Device not responding to setup address.
[    4.435387] usb 1-1.3: device not accepting address 7, error -71
[    4.519396] usb 1-1.3: new full-speed USB device number 8 using xhci_hcd
[    4.519629] usb 1-1.3: Device not responding to setup address.
[    4.727670] usb 1-1.3: Device not responding to setup address.
[    4.935901] usb 1-1.3: device not accepting address 8, error -71

lsusb (While connected during boot)

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0eef:0005 D-WAV Scientific Co., Ltd WS170120
Bus 001 Device 003: ID 0461:0010 Primax Electronics, Ltd HP PR1101U / Primax PMX-KPR1101U Keyboard
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

(After unlpugging and replugging)

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 009: ID 2357:0602 TP-Link USB 10/100 LAN
Bus 001 Device 004: ID 0eef:0005 D-WAV Scientific Co., Ltd WS170120
Bus 001 Device 003: ID 0461:0010 Primax Electronics, Ltd HP PR1101U / Primax PMX-KPR1101U Keyboard
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Additional context I tried this in Ubuntu 20.04, 22.04 and Raspbian Lite (64Bit) and also downgraded the kernel version but the issue still persists while it is running perfectly in the OS i installed during Nov/Dec 2023

Eldho1416 commented 4 weeks ago

Update: I tried connecting with Jetson AGX and it is initializing with tegra-xusb

05:10:21 nvidia-desktop kernel: usb 1-2: new high-speed USB device number 2 using tegra-xusb
05:10:21 nvidia-desktop kernel: usb 1-2: New USB device found, idVendor=2357, idProduct=0602, bcdDevice=20.00
05:10:21 nvidia-desktop kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
05:10:21 nvidia-desktop kernel: usb 1-2: Product: USB 10/100 LAN
05:10:21 nvidia-desktop kernel: usb 1-2: Manufacturer: TP-LINK
05:10:21 nvidia-desktop kernel: usb 1-2: SerialNumber: 3C52A1B7DA8C
05:10:21 nvidia-desktop kernel: cdc_ether 1-2:2.0 eth0: register 'cdc_ether' at usb-3610000.xhci-2, CDC Ethernet Device, 3c:52:a1:b7:da:8c

Does this mean xhci_hcd is not supporting the Ethernet module?

pelwell commented 4 weeks ago

Does this mean xhci_hcd is not supporting the Ethernet module?

No, I don't think that's the case.

if unplug and plug it it works fine

That sounds like some sort of power-on glitch - it could be due to timing of reset signals, or perhaps the system is running out of power.

Eldho1416 commented 4 weeks ago

Hi @pelwell,

I'm using the official rasberry pi adapter with rating 5.1V, 3A Link.

I had the same doubt regrading the power issues so i disconnected all the other connection from rasberry pi but that didn't solve the problem.

pelwell commented 3 weeks ago

Do you have a USB hub? If so, try putting it between the LAN adaptor and the Pi 4 - sometimes that can help with devices that are not particularly standards-compliant, and it would be interesting to know if this issue might belong to that class of problems.

Eldho1416 commented 3 weeks ago

Sure i'll try with USB hub and let you know the results

Eldho1416 commented 3 weeks ago

Hello @pelwell,

I tried with this USB hub without and with external power of 5V/3A still the issue persists.

Eldho1416 commented 2 weeks ago

Update: I think it is probably hardware issue because it is initializing with the old RPi i had with the same power adapter, I will try with the new set of Raspberry Pi arriving soon and update here.

Eldho1416 commented 1 week ago

Hi @pelwell,

I'm still facing same issue with new set of raspberry pi, is there any way to mock uplugging and plug again since i cannot physically do it all the time or any was to intialize USB after booting?

pelwell commented 1 week ago

Have you tried uhubctl?

$ sudo apt install uhubctl
$ lsusb -t
# Note the bus number for the device you want to power-cycle - let's call it <bus>
$ sudo uhubctl -a cycle -l <bus>
pelwell commented 1 week ago

I should make it clear that Pi 4B doesn't have per-port VBUS control. However, uhubctl will issue USB resets to individual ports, and you may find that is sufficient.

Eldho1416 commented 1 week ago

Thanks @pelwell,

output of lsusb -t without when driver not initialized is

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

so i tried sudo uhubctl -a cycle -l 1 but that didn't help.

I tried again without specifying bus number sudo uhubctl -a cycle and not the driver is working fine.

lsusb -t
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 8, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 2: Dev 9, If 0, Class=Communications, Driver=cdc_ether, 480M
        |__ Port 2: Dev 9, If 1, Class=CDC Data, Driver=cdc_ether, 480M

Does it affect anything if i do this?

Eldho1416 commented 6 days ago

uhh nvm, It doesn't work when other USB devices are connected