On Mar 4, 2024, at 12:39, Alexander Motin <m...@freebsd.org> wrote:

> On 04.03.2024 15:33, Jakob Alvermark wrote:
>> On 3/4/24 21:13, Alexander Motin wrote:
>>> On 04.03.2024 15:00, Poul-Henning Kamp wrote:
>>>>>> Nov 30 03:23:18 7950X3D-UFS kernel: ue0: link state changed to DOWN
>>>>>> Nov 30 03:23:18 7950X3D-UFS kernel: ue0: link state changed to UP
>>>>>> Nov 30 03:23:18 7950X3D-UFS kernel: ue0: link state changed to DOWN
>>>>>> Nov 30 03:23:18 7950X3D-UFS kernel: ue0: link state changed to UP
>>>>>> Nov 30 03:23:18 7950X3D-UFS kernel: ue0: link state changed to DOWN
>>>>>> Nov 30 03:23:18 7950X3D-UFS kernel: ue0: link state changed to UP
>>>> 
>>>> I consistently had similar problems with my 0x17ef/0x3066 "ThinkPad
>>>> Thunderbolt 3 Dock MCU", but they went away after I forced it to
>>>> use the if_cdce driver instead with this quirk:
>>>> 
>>>>          /* This works much better with if_cdce than if_ure */
>>>>          USB_QUIRK(LENOVO, TBT3LAN,  0x0000, 0xffff, UQ_CFG_INDEX_1),
>>> 
>>> AFAIK it is only a workaround.  I saw it myself on number of different USB 
>>> dongles and laptops, that USB starting experience some problems with 
>>> multiple NIC queues and some other factors. IIRC the Realtek driver was 
>>> much more stable once I limited it to one queue and some other hacks. IIRC 
>>> if_cdce just has only one queue and other limitations, that not only makes 
>>> it more stable, but also much slower.  It would be good to understand 
>>> what's wrong is there exactly, since IMHO it is a big problem now. 
>>> Unfortunately HPS was unable to reproduce it on his laptop (that makes me 
>>> wonder if is is specific to chipset(s) or thunderbolt?), so it ended 
>>> nowhere so far.
>> I have a Lenovo USB 3 dongle, so no thunderbolt.
> 
> I also use USB3 dongles.  But in my laptops the USB 3 ports are provided by 
> Intel Thunderbolt controller, while in HPS' they were plain from USB3 
> controller.  Though it may be just a coincidence.

To my knowledge, no USB4/Thunderbolt controller is present in the
PRIME X670-P WIFI system that had been showing the messages and
no built-in external port is an example of such.

https://www.asus.com/us/motherboards-components/motherboards/prime/prime-x670-p-wifi/techspec/

lists for USB:

Rear USB (Total 10 ports)
1 x USB 3.2 Gen 2x2 port (1 x USB Type-C®)
3 x USB 3.2 Gen 2 ports (3 x Type-A)
4 x USB 3.2 Gen 1 ports (4 x Type-A)
2 x USB 2.0 ports (2 x Type-A)

Front USB (Total 9 ports)
1 x USB 3.2 Gen 1 connector (supports USB Type-C®)
2 x USB 3.2 Gen 1 headers support additional 4 USB 3.2 Gen 1 ports
2 x USB 2.0 headers support additional 4 USB 2.0 ports

* USB Type-C® power delivery output: max. 5V/3A

For Miscellaneous it lists:

1 x Thunderbolt™ (USB4®) header

But, as I understand, it has to be tied to a PCie
Thunderbolt card.

For reference for the 7950X3D system:

# pciconf -lcv | grep -B4 -A16 "subclass   = USB"
xhci0@pci0:11:0:0:      class=0x0c0330 rev=0x01 hdr=0x00 vendor=0x1022 
device=0x43f7 subvendor=0x1b21 subdevice=0x1142
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = '600 Series Chipset USB 3.2 Controller'
    class      = serial bus
    subclass   = USB
    cap 05[50] = MSI supports 8 messages, 64 bit 
    cap 11[68] = MSI-X supports 8 messages, enabled
                 Table in map 0x10[0x2000], PBA in map 0x10[0x2080]
    cap 01[78] = powerspec 3  supports D0 D3  current D0
    cap 10[80] = PCI-Express 2 legacy endpoint max data 256(512) RO NS
                 max read 512
                 link x1(x1) speed 2.5(2.5) ASPM L1(L0s/L1)
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected
    ecap 0018[160] = LTR 1
ahci0@pci0:12:0:0:      class=0x010601 rev=0x01 hdr=0x00 vendor=0x1022 
device=0x43f6 subvendor=0x1b21 subdevice=0x1062
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = '600 Series Chipset SATA Controller'
    class      = mass storage
    subclass   = SATA
    cap 05[50] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 01[70] = powerspec 3  supports D0 D3  current D0
--
xhci1@pci0:13:0:0:      class=0x0c0330 rev=0x01 hdr=0x00 vendor=0x1022 
device=0x43f7 subvendor=0x1b21 subdevice=0x1142
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = '600 Series Chipset USB 3.2 Controller'
    class      = serial bus
    subclass   = USB
    cap 05[50] = MSI supports 8 messages, 64 bit 
    cap 11[68] = MSI-X supports 8 messages, enabled
                 Table in map 0x10[0x2000], PBA in map 0x10[0x2080]
    cap 01[78] = powerspec 3  supports D0 D3  current D0
    cap 10[80] = PCI-Express 2 legacy endpoint max data 256(512) RO NS
                 max read 512
                 link x1(x1) speed 2.5(2.5) ASPM L1(L0s/L1)
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected
    ecap 0018[160] = LTR 1
ahci1@pci0:14:0:0:      class=0x010601 rev=0x01 hdr=0x00 vendor=0x1022 
device=0x43f6 subvendor=0x1b21 subdevice=0x1062
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = '600 Series Chipset SATA Controller'
    class      = mass storage
    subclass   = SATA
    cap 05[50] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 01[70] = powerspec 3  supports D0 D3  current D0
--
                     P2P Direct Translated unavailable, Enhanced Capability 
unavailable
xhci2@pci0:16:0:3:      class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 
device=0x15b6 subvendor=0x1043 subdevice=0x8877
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    class      = serial bus
    subclass   = USB
    cap 09[48] = vendor (length 8)
    cap 01[50] = powerspec 3  supports D0 D3  current D0
    cap 10[64] = PCI-Express 2 endpoint max data 256(256) RO NS
                 max read 512
                 link x16(x16) speed 16.0(16.0) ASPM disabled(L0s/L1)
    cap 05[a0] = MSI supports 8 messages, 64 bit 
    cap 11[c0] = MSI-X supports 8 messages, enabled
                 Table in map 0x10[0xfe000], PBA in map 0x10[0xff000]
    ecap 000b[100] = Vendor [1] ID 0001 Rev 1 Length 16
    ecap 000d[2a0] = ACS 1 Source Validation unavailable, Translation Blocking 
unavailable
                     P2P Req Redirect unavailable, P2P Cmpl Redirect unavailable
                     P2P Upstream Forwarding unavailable, P2P Egress Control 
unavailable
                     P2P Direct Translated unavailable, Enhanced Capability 
unavailable
xhci3@pci0:16:0:4:      class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 
device=0x15b7 subvendor=0x1043 subdevice=0x8877
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    class      = serial bus
    subclass   = USB
    cap 09[48] = vendor (length 8)
    cap 01[50] = powerspec 3  supports D0 D3  current D0
    cap 10[64] = PCI-Express 2 endpoint max data 256(256) RO NS
                 max read 512
                 link x16(x16) speed 16.0(16.0) ASPM disabled(L0s/L1)
    cap 05[a0] = MSI supports 8 messages, 64 bit 
    cap 11[c0] = MSI-X supports 8 messages, enabled
                 Table in map 0x10[0xfe000], PBA in map 0x10[0xff000]
    ecap 000b[100] = Vendor [1] ID 0001 Rev 1 Length 16
    ecap 000d[2a0] = ACS 1 Source Validation unavailable, Translation Blocking 
unavailable
                     P2P Req Redirect unavailable, P2P Cmpl Redirect unavailable
                     P2P Upstream Forwarding unavailable, P2P Egress Control 
unavailable
                     P2P Direct Translated unavailable, Enhanced Capability 
unavailable
hdac1@pci0:16:0:6:      class=0x040300 rev=0x00 hdr=0x00 vendor=0x1022 
device=0x15e3 subvendor=0x1043 subdevice=0x87fb
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Family 17h/19h HD Audio Controller'
--
                     P2P Direct Translated unavailable, Enhanced Capability 
unavailable
xhci4@pci0:17:0:0:      class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 
device=0x15b8 subvendor=0x1043 subdevice=0x8877
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    class      = serial bus
    subclass   = USB
    cap 09[48] = vendor (length 8)
    cap 01[50] = powerspec 3  supports D0 D3  current D0
    cap 10[64] = PCI-Express 2 endpoint max data 256(256) RO NS
                 max read 512
                 link x16(x16) speed 16.0(16.0) ASPM disabled(L0s/L1)
    cap 05[a0] = MSI supports 8 messages, 64 bit 
    cap 11[c0] = MSI-X supports 8 messages, enabled
                 Table in map 0x10[0xfe000], PBA in map 0x10[0xff000]
    ecap 000b[100] = Vendor [1] ID 0001 Rev 1 Length 16
    ecap 0019[270] = PCIe Sec 1 lane errors 0
    ecap 000d[2a0] = ACS 1 Source Validation unavailable, Translation Blocking 
unavailable
                     P2P Req Redirect unavailable, P2P Cmpl Redirect unavailable
                     P2P Upstream Forwarding unavailable, P2P Egress Control 
unavailable
                     P2P Direct Translated unavailable, Enhanced Capability 
unavailable
    ecap 0026[410] = Physical Layer 16.0 GT/s 1
    ecap 0027[450] = Lane Margining at Receiver 1

# usbconfig show_ifdrv
ugen4.1: <AMD XHCI root HUB> at usbus4, cfg=0 md=HOST spd=SUPER (5.0Gbps) 
pwr=SAVE (0mA)
ugen4.1.0: uhub0: <AMD XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1>
ugen0.1: <AMD XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) 
pwr=SAVE (0mA)
ugen0.1.0: uhub1: <AMD XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1>
ugen1.1: <AMD XHCI root HUB> at usbus1, cfg=0 md=HOST spd=SUPER (5.0Gbps) 
pwr=SAVE (0mA)
ugen1.1.0: uhub3: <AMD XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1>
ugen2.1: <AMD XHCI root HUB> at usbus2, cfg=0 md=HOST spd=SUPER (5.0Gbps) 
pwr=SAVE (0mA)
ugen2.1.0: uhub4: <AMD XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1>
ugen3.1: <AMD XHCI root HUB> at usbus3, cfg=0 md=HOST spd=SUPER (5.0Gbps) 
pwr=SAVE (0mA)
ugen3.1.0: uhub2: <AMD XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1>
ugen3.2: <Realtek USB 10/100/1000 LAN> at usbus3, cfg=0 md=HOST spd=SUPER 
(5.0Gbps) pwr=ON (72mA)
ugen3.2.0: ure0: <Realtek USB 10/100/1000 LAN, class 0/0, rev 3.00/30.00, addr 
1>
 . .
ugen1.2: <Realtek Bluetooth Radio> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) 
pwr=ON (500mA)
ugen1.2.0: ubt0: <Realtek Bluetooth Radio, class 224/1, rev 1.00/0.00, addr 1>
 . .

(I omitted the CORSAIR related lines.)


>> USB ID 0x17ef/0x7205
>> rgephy1: <RTL8251/8153 1000BASE-T media interface> PHY 0 on miibus1
>> I tried using the cdce driver, it gives me < 100Mb/s, while the ure driver 
>> gets > 500Mb/s
> 
> Right, I saw about the same.


===
Mark Millard
marklmi at yahoo.com


Reply via email to