我刚刚开始建立一个多演出网络。我找到了一些不错的 USB 转 2.5GBASE-T 适配器。
现在,虽然它们确实是开箱即用的,但它们似乎使用 cdc-ncm 作为驱动程序,无法充分利用 NIC 的功能(限制为 1500MTU 并阻碍了性能)
这可以通过为该芯片安装现已过时的 Realtek 驱动程序来解决。问题是,我需要在连接设备之前使用 modprobe -r 踢 cdc-mbim 和 cdc-ncm ,否则模块将发生冲突并且 cdc-ncm 将获胜。但是,我不只是想将这两个模块列入黑名单,因为我还安装了一个使用这些模块的 LTE 调制解调器。
我的两个问题:
- 如何防止 cdc-ncm 超越设备而不只是将其撕掉?
- 如何修补驱动程序以使用最新的内核版本?
系统信息:
- uname -r:5.3.8-050308-通用
- 瑞昱驱动:r8152_2.12.0
- 与 cdc-ncm 连接后的 dmesg 输出:
[ 556.959398] usb 3-3.2: New USB device found, idVendor=0bda, idProduct=8156, bcdDevice=30.00
[ 556.959400] usb 3-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[ 556.959401] usb 3-3.2: Product: USB 10/100/1G/2.5G LAN
[ 556.959402] usb 3-3.2: Manufacturer: Realtek
[ 556.959403] usb 3-3.2: SerialNumber: 000000001
[ 556.984103] cdc_ncm 3-3.2:2.0: MAC-Address: a0:ce:c8:cb:7c:ca
[ 556.984105] cdc_ncm 3-3.2:2.0: setting rx_max = 16384
[ 556.984172] cdc_ncm 3-3.2:2.0: setting tx_max = 16384
[ 556.984445] cdc_ncm 3-3.2:2.0 usb0: register 'cdc_ncm' at usb-0000:00:14.0-3.2, CDC NCM, a0:ce:c8:cb:7c:ca
[ 557.009821] usbcore: registered new interface driver r8152
[ 557.012312] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: renamed from usb0
[ 557.062459] usb 2-3.1.1: new high-speed USB device number 8 using xhci_hcd
[ 557.062510] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected
[ 557.094515] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected
[ 557.126508] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected
[ 557.158506] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected
[ 557.190514] cdc_ncm 3-3.2:2.0 enxa0cec8cb7cca: network connection: disconnected
- 踢完两个模块后的 dmesg 输出:
[ 624.246651] usb 3-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[ 624.246653] usb 3-3.2: Product: USB 10/100/1G/2.5G LAN
[ 624.246654] usb 3-3.2: Manufacturer: Realtek
[ 624.246655] usb 3-3.2: SerialNumber: 000000001
[ 624.330110] usb 3-3.2: reset SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[ 624.444293] r8152 3-3.2:1.0 eth0: v2.12.0 (2019/04/29)
[ 624.444295] r8152 3-3.2:1.0 eth0: Hello
[ 624.606497] usbcore: registered new interface driver cdc_ncm
[ 624.608322] usbcore: registered new interface driver cdc_wdm
[ 624.656599] cdc_mbim 2-4:1.0: setting rx_max = 16384
[ 624.657267] cdc_mbim 2-4:1.0: cdc-wdm0: USB WDM device
[ 624.657816] cdc_mbim 2-4:1.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-4, CDC MBIM, d2:c8:53:b2:65:df
[ 624.659148] usbcore: registered new interface driver cdc_mbim
[ 624.661511] cdc_mbim 2-4:1.0 wwp0s20u4: renamed from wwan0
[ 624.675680] r8152 3-3.2:1.0 enxa0cec8cb7cca: renamed from eth0
[ 628.423530] IPv6: ADDRCONF(NETDEV_CHANGE): enxa0cec8cb7cca: link becomes ready
[ 628.423959] r8152 3-3.2:1.0 enxa0cec8cb7cca: carrier on
任何帮助是极大的赞赏!