[Bug 244845] ue0 realtek interface stops working after some time connection stalls problem down->up helps unitek Y-3083B

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 12 Apr 2023 13:37:38 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244845

--- Comment #23 from Tomasz Duda <tomasz.m.duda@gmail.com> ---
> Did you cross-check with Linux's USB sources, the idVendor and idProduct values.

I booted Fedora 37 live memstick on exactly same laptop to check if it will
detect the device and it did.

Following is the result of running lsusb ran on Fedora Linux:

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        ID 058f:6387 Alcor Micro Corp. Flash Drive
    |__ Port 3: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
        ID 06cb:00fc Synaptics, Inc. 
    |__ Port 4: Dev 4, If 4, Class=Application Specific Interface, Driver=,
480M
        ID 04f2:b6ea Chicony Electronics Co., Ltd 
    |__ Port 4: Dev 4, If 2, Class=Video, Driver=uvcvideo, 480M
        ID 04f2:b6ea Chicony Electronics Co., Ltd 
    |__ Port 4: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
        ID 04f2:b6ea Chicony Electronics Co., Ltd 
    |__ Port 4: Dev 4, If 3, Class=Video, Driver=uvcvideo, 480M
        ID 04f2:b6ea Chicony Electronics Co., Ltd 
    |__ Port 4: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
        ID 04f2:b6ea Chicony Electronics Co., Ltd 
    |__ Port 6: Dev 6, If 0, Class=Hub, Driver=hub/5p, 480M
        ID 17ef:7225 Lenovo 
        |__ Port 5: Dev 7, If 0, Class=, Driver=, 480M
            ID 17ef:721c Lenovo 
    |__ Port 10: Dev 5, If 0, Class=Wireless, Driver=btusb, 12M
        ID 8087:0026 Intel Corp. AX201 Bluetooth
    |__ Port 10: Dev 5, If 1, Class=Wireless, Driver=btusb, 12M
        ID 8087:0026 Intel Corp. AX201 Bluetooth
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 3: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 17ef:721d Lenovo 
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=r8152,
5000M
            ID 17ef:721e Lenovo 
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub

The hub is using "r8152" driver. I took a glance on the driver sources, but I
didn't notice VENDOR:PRODUCT pairs (the part we have at the beginning of
"if_ure.c").

Following is part of dmesg run on Linux which suggests that the chip is 8153B:

[  100.736289] r8152 2-3.1:1.0: load rtl8153b-2 v1 10/23/19 successfully
[  100.764461] r8152 2-3.1:1.0 eth0: v1.12.13
[  100.810899] r8152 2-3.1:1.0 enp0s13f0u3u1: renamed from eth0
[  101.297328] ucsi_acpi USBC000:00: GET_CONNECTOR_STATUS failed (-110)
[  102.321355] ucsi_acpi USBC000:00: ucsi_handle_connector_change:
GET_CONNECTOR_STATUS failed (-110)
[  104.369313] ucsi_acpi USBC000:00: GET_CONNECTOR_STATUS failed (-110)
[  104.897452] thinkpad_acpi: undocked from hotplug port replicator
[  104.914313] usb 3-6.5: new high-speed USB device number 7 using xhci_hcd
[  104.993740] usb 3-6.5: New USB device found, idVendor=17ef, idProduct=721c,
bcdDevice= 0.01
[  104.993750] usb 3-6.5: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[  104.993753] usb 3-6.5: Product: Lenovo Powered Hub     
[  104.993756] usb 3-6.5: Manufacturer: VIA Labs, Inc.         
[  104.993758] usb 3-6.5: SerialNumber: 0000000000000001
[  179.494618] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s13f0u3u1: link becomes ready
[  179.495450] r8152 2-3.1:1.0 enp0s13f0u3u1: carrier on


> Maybe USB2.0 will work better?

Well, on 2.0 I won't be able to get 1Gbit. But at the end of this comment I
provide a little update.

> There are some known issues about newer USB ethernet adapters. Is it possible to find the datasheet somewhere for these devices?

Unfortunately, I'm not aware of any datasheets for the device.

--

To add to the above, only today I set URE_FLAG_8153B flag in "if_ure.c" driver.
Then I unloaded old driver (with 0 set as flag) and loaded newer version. This
gave me some of 1300 ups/downs in 3 hours.

After I've rebooted the laptop, the ups/downs rate seems to drop. I have 80
ups/downs of the ue0 interface in 2h 40min. All of that while doing "rclone
sync" of some 160GiB of data.

I'm not yet sure that the lower rate of drops is thanks to URE_FLAG_8153B &
reboot and I don't know if over time it will get worse.

-- 
You are receiving this mail because:
You are the assignee for the bug.