Open pdgendt opened 1 year ago
Same for other USB 3.0 to ethernet adapter, dmesg
:
[12429.363197] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(3)
[12429.363200] vhci_hcd vhci_hcd.0: devid(458754) speed(5) speed_str(super-speed)
[12429.363220] vhci_hcd vhci_hcd.0: Device attached
[12429.711635] usb 2-1: SetAddress Request (4) to port 0
[12429.711643] usb 2-1: new SuperSpeed USB device number 4 using vhci_hcd
[12429.745247] usb 2-1: New USB device found, idVendor=17ef, idProduct=7205, bcdDevice=30.00
[12429.745250] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[12429.745251] usb 2-1: Product: Thinkpad USB LAN
[12429.745252] usb 2-1: Manufacturer: Lenovo
[12429.745252] usb 2-1: SerialNumber: 10E40D000000
[12429.753826] BPF:[135141] ENUM nce
[12429.754370] BPF:size=4 vlen=11
[12429.754475] BPF:
[12429.754542] BPF:Invalid name
[12429.754641] BPF:
[12429.754740] failed to validate module [r8152] BTF: -22
@pdgendt to use the new module make sure the booted kernel and the module(s) are from the same build. You already build a new kernel. Add it to .wslconfig
and your module will load okay:
dmesg output after inserting the module:
[Thu Sep 7 14:34:20 2023] usbcore: registered new interface driver ax88179_178a
and modprobe output:
elsaco@eleven:~$ sudo modprobe -v ax88179_178a
insmod /lib/modules/5.15.90.4-microsoft-standard-WSL2/kernel/drivers/net/usb/ax88179_178a.ko
elsaco@eleven:~$ lsmod
Module Size Used by
ax88179_178a 28672 0
@elsaco thanks for the response, I'll try that out, but I was hoping to be able to do it without replacing the kernel itself. Getting updates from Windows to the WSL subsystem wouldn't affect the kernel anymore, and this would be something I tend to forget 🙃
As elsaco has said, this is by design, until the kernel we ship changes to accommodate this.
This problem does not occur when module building with CBL-Mariner 2.0 on docker. (Note: Module-dependent features must already be enabled in the kernel itself) CONFIG_DEBUG_INFO_BTF is enabled in 5.10.74.3, CONFIG_DEBUG_INFO_BTF_MODULES is enabled in 5.15.57.1 and kernel and modules from a different build, which causes this error. build_wsl_modules.zip containing the Dockerfile and build scripts.
Windows Version
Microsoft Windows [Version 10.0.22621.2215]
WSL Version
1.2.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.90.1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
Expected Behavior
I expect the module to be loaded and useable after
modprobe
.Actual Behavior
An error occurs:
Diagnostic Logs
No response