RTL8156(A|B) chip requires r8156 to be force loaded to operate
flat view
From: Ryan Lahfa <hidden>
Date: 2021-12-24 20:36:39
Hi all, I recently bought an USB-C 2.5Gbps external network card, which shows in `lsusb` as:
Bus 002 Device 003: ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN
By default, on my distribution (NixOS "21.11pre319254.b5182c214fa")'s latest kernel (`pkgs.linuxPackages_latest`) which shows in `uname -nar` as:
Linux $machine 5.15.10 #1-NixOS SMP Fri Dec 17 09:30:17 UTC 2021 x86_64 GNU/Linux
The network card is loaded with `cdc_ncm` driver and is unable to detect any carrier even when one is actually plugged in, I tried multiple things, I confirmed independently that the carrier is working. Through further investigations and with the help of a user on Libera.Chat #networking channel, we blacklisted `cdc_ncm`, but nothing get loaded in turn. Then, I forced the usage of r8152 for the device 0bda:8156 using `echo 0bda 8156 > /sys/bus/usb/drivers/r8152/new_id`, and... miracle. Everything just worked. I am uncertain whether this falls in kernel's responsibility or not, it seems indeed that my device is listed for r8152: https://github.com/torvalds/linux/blob/master/drivers/net/usb/r8152.c#L9790 introduced by this commit https://github.com/torvalds/linux/commit/195aae321c829dd1945900d75561e6aa79cce208 if I understand well, which is tagged for 5.15. I am curious to see how difficult would that be to write a patch for this and fix it, meanwhile, here is my modest contribution with this bug report, hopefully, this is the right place for them. Kind regards, -- Ryan Lahfa