I got it working, and confirmed the bug, only problem is it will get
overwritten with the next patch, and others cant use the fix.
Hopefully this is a quick fix for a proc dev.
This is how i did it
When you try to compile the drivers you get
./r8152-2.15.0/r8152.c:18530:25: error: initialization of ‘int (*)(struct
net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *,
struct netlink_ext_ack *)’ from incompatible pointer type ‘int (*)(struct
net_device *, struct ethtool_coalesce *)’ [-Werror=incompatible-pointer-types]
18530 | .get_coalesce = rtl8152_get_coalesce,
| ^~~~~~~~~~~~~~~~~~~~
./r8152-2.15.0/r8152.c:18530:25: note: (near initialization for
‘ops.get_coalesce’)
./r8152-2.15.0/r8152.c:18531:25: error: initialization of ‘int (*)(struct
net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *,
struct netlink_ext_ack *)’ from incompatible pointer type ‘int (*)(struct
net_device *, struct ethtool_coalesce *)’ [-Werror=incompatible-pointer-types]
18531 | .set_coalesce = rtl8152_set_coalesce,
I had a look at the code and googled (i cant code in C or C++ btw)
This site had similar code
https://sbexr.rabexc.org/latest/sources/26/53bfa290b96570.html#0000e00100031001
so i made the following changes to the realtek code. not sure if it
right or performant, but it now compiles
# diff ./r8152.c ../r8152-2.15.0/r8152.c
18339,18341c18339
< struct ethtool_coalesce *coalesce,
< struct kernel_ethtool_coalesce *,
< struct netlink_ext_ack *)
---
> struct ethtool_coalesce *coalesce)
18360,18363c18358
< struct ethtool_coalesce *coalesce,
< struct kernel_ethtool_coalesce *,
< struct netlink_ext_ack *)
<
---
> struct ethtool_coalesce *coalesce)
make install copied the code , but throws the following error, looks to
do with code signing ??? Any way i ignored it
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory:
../crypto/bio/bss_file.c:69
- SSL error:2006D080:BIO routines:BIO_new_file:no such file:
../crypto/bio/bss_file.c:76
sign-file: certs/signing_key.pem: No such file or directory
I ran
# sudo depmod -a
# sudo update-initramfs -u
as requested by the drivers readme file
rebooted
ethtool -s enx5c857e38e9b7 autoneg on advertise 0x80000000002f
now works
ethtool enx5c857e38e9b7
Settings for enx5c857e38e9b7:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
2500baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
2500baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
2500baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 2500Mb/s
Duplex: Full
Auto-negotiation: on
Port: MII
PHYAD: 32
Transceiver: internal
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00007fff (32767)
drv probe link timer ifdown ifup rx_err tx_err
tx_queued intr tx_done rx_status pktdata hw wol
Link detected: yes
checking the version
# modinfo /lib/modules/5.15.0-25-generic/kernel/drivers/net/usb/r8152.ko
filename: /lib/modules/5.15.0-25-generic/kernel/drivers/net/usb/r8152.ko
version: v2.15.0 (2021/04/15)
license: GPL
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1969211
Title:
Out of date driver with no capabilities for 2.5Gb full duplex
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1969211/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs