Page MenuHomeVyOS Platform

Update Realtek r8152 driver
Open, HighPublicBUG

Description

r8152 driver in VyOS 1.4 is outdated and modern USB 2.5 Gbps NICs are not fully supported.
We should update the driver to add support for such NICs.

We had the task for 1.3 where it was fixed and works as expected https://vyos.dev/T5187 and PR https://github.com/vyos/vyos-build/pull/343

But for some reason, we do not have this in the build for 1.4
So after the update to 1.4.0 users face these issues.

1.4.0

$ modinfo r8152
filename:       /lib/modules/6.6.32-amd64-vyos/kernel/drivers/net/usb/r8152.ko
version:        v1.12.13
license:        GPL
description:    Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
author:         Realtek linux nic maintainers <[email protected]>

1.3.8

vyos@r1:~$ modinfo r8152
filename:       /lib/modules/5.4.268-amd64-vyos/updates/drivers/net/usb/r8152.ko
version:        v2.17.1 (2023/06/13)
license:        GPL
description:    Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
author:         Realtek nic sw <[email protected]>

Details

Difficulty level
Unknown (require assessment)
Version
1.4
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Related Objects

Event Timeline

Viacheslav triaged this task as Normal priority.
Viacheslav raised the priority of this task from Normal to High.Thu, Sep 12, 1:38 PM

Unfortunately the version: v2.18.1 (2024/05/20) does not work correctly and previous versions 2.17.1 are not compatible with the newest kernel version

make -C /vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/linux M=/vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/vyos-drivers-realtek-r8152-2.17.1 modules
make[2]: Entering directory '/vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/linux-6.6.49'
  CC [M]  /vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/vyos-drivers-realtek-r8152-2.17.1/r8152.o
/vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/vyos-drivers-realtek-r8152-2.17.1/r8152.c: In function ‘r8152_csum_workaround’:
/vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/vyos-drivers-realtek-r8152-2.17.1/r8152.c:2114:24: error: implicit declaration of function ‘skb_gso_segment’; did you mean ‘skb_gso_reset’? [-Werror=implicit-function-declaration]
 2114 |                 segs = skb_gso_segment(skb, features);
      |                        ^~~~~~~~~~~~~~~
      |                        skb_gso_reset
/vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/vyos-drivers-realtek-r8152-2.17.1/r8152.c:2114:22: warning: assignment to ‘struct sk_buff *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 2114 |                 segs = skb_gso_segment(skb, features);
      |                      ^
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:243: /vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/vyos-drivers-realtek-r8152-2.17.1/r8152.o] Error 1
make[3]: *** [/vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/linux-6.6.49/Makefile:1921: /vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/vyos-drivers-realtek-r8152-2.17.1] Error 2
make[2]: *** [Makefile:234: __sub-make] Error 2
make[2]: Leaving directory '/vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/linux-6.6.49'
make[1]: *** [debian/rules:23: override_dh_auto_build] Error 2
make[1]: Leaving directory '/vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/vyos-drivers-realtek-r8152-2.17.1'
make: *** [debian/rules:9: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed
Traceback (most recent call last):
  File "/vyos/work/T6713-current-realtek/vyos-build/packages/linux-kernel/./build-driver-realtek-r8152.py", line 88, in <module>
    run(debuild_cmd, cwd=PACKAGE_DIR, check=True)
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['debuild']' returned non-zero exit status 29.

Waiting for the 3d-party fix.