Hey guys,
The guy form my ISP finally came and fixed my shiny new router, and I am getting amazing 940Mbit up and down. Apparently I can go faster though, so I picked up an lr-link 10G NIC. When trying to install the drivers that come with it, it says to first run make clean, in the extracted directory, which seems to work fine, then just make, and then make install. When I run make, it gives me the error in the title, among other output:
david@wsUbuntu18:~/Downloads/tn40xx-0.3.6.14$ sudo make
make -C /lib/modules/4.15.0-29-generic/build M=/home/david/Downloads/tn40xx-0.3.6.14 clean
make[1]: Entering directory ‘/usr/src/linux-headers-4.15.0-29-generic’
make[1]: Leaving directory ‘/usr/src/linux-headers-4.15.0-29-generic’
Building kernel 4.15.0-29-generic resume supported
make -C /lib/modules/4.15.0-29-generic/build M=/home/david/Downloads/tn40xx-0.3.6.14 modules
make[1]: Entering directory ‘/usr/src/linux-headers-4.15.0-29-generic’
Makefile:976: “Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel”
CC [M] /home/david/Downloads/tn40xx-0.3.6.14/tn40.o
/home/david/Downloads/tn40xx-0.3.6.14/tn40.c: In function ‘bdx_rx_receive’:
/home/david/Downloads/tn40xx-0.3.6.14/tn40.c:2709:15: error: ‘struct net_device’ has no member named ‘last_rx’
priv->ndev->last_rx = jiffies;
^~
scripts/Makefile.build:332: recipe for target ‘/home/david/Downloads/tn40xx-0.3.6.14/tn40.o’ failed
make[2]: *** [/home/david/Downloads/tn40xx-0.3.6.14/tn40.o] Error 1
Makefile:1552: recipe for target ‘module/home/david/Downloads/tn40xx-0.3.6.14’ failed
make[1]: *** [module/home/david/Downloads/tn40xx-0.3.6.14] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-4.15.0-29-generic’
Makefile:105: recipe for target ‘all’ failed
make: *** [all] Error 2
Running make install then simply gives
david@wsUbuntu18:~/Downloads/tn40xx-0.3.6.14$ sudo make install
make: *** No rule to make target ‘tn40xx.ko’, needed by ‘install’. Stop.
I installed libelf-dev, and it can’t find the other two when I try to do apt-get install.
Even after a reboot, it gives the same error, only the line you quoted disappeared.
Not sure what’s wrong with your driver, but building random things as yourself is dangerous enough, and you’re even doing it as root… stop running with sudo.
Now, my guess is your drivers off of a CD are ancient, and my guess is they’re meant to be built with kernel 3.6.14 just from looking at the name, but I’m not sure.
Your best bet is probably to run lspci and with that information try to find a different driver for your card, or at least post some more information about the card here and someone might help you look for drivers.
Fixing/updating the driver yourself is also an option, it’s probably safe to assume the driver worked at some point with some version of Linux. You could bisect to try and find what version builds and take it from there and fix the driver.
Also, I’m guessing SFP+ drivers are probably one and the same as RJ45, you could try building those and maybe you get lucky
Sorry for the delayed response, I had to put this project on the back burner due to some other things. Now I’m back on it though.
Thank you for that, this one installed with no errors. However the network adapter still shows as “UNCLAIMED” when I do “lshw -class network” and doesn’t exactly work. Is there anything else I need to do, after running make and make install, or is the driver just not working?
I also did finally find the other one online, and it seems to be a recent version (but the same as on the CD), here is the link to it in case anyone is curious: http://www.lr-link.com/products/LREC6860BT.html
I also contacted lr-link directly about this, but my hopes of a good answer are low, as I only found a sales email.
Looking at the device ids for 10GBase-T, it looks like they are all there, none were removed. Try “lshw -class network -numeric” and look for the device number (ex: product: I211 Gigabit Network Connection [8086:1539]). I believe these are used match the driver and they are declared at the top of tn.c.
Hmm, looks like a header is missing… Sorry, it doesn’t look good for support of that adapter. It is probably Marvell who is to blame, they will make a reference design and not support it after the release.
$ make MV88X3310=YES
make -C /lib/modules/4.17.5-100.fc27.x86_64/build M=/home/chris/tn40xx-driver clean
make[1]: Entering directory '/usr/src/kernels/4.17.5-100.fc27.x86_64'
make[1]: Leaving directory '/usr/src/kernels/4.17.5-100.fc27.x86_64'
Building kernel 4.17.5-100.fc27.x86_64 resume supported
make -C /lib/modules/4.17.5-100.fc27.x86_64/build M=/home/chris/tn40xx-driver modules
make[1]: Entering directory '/usr/src/kernels/4.17.5-100.fc27.x86_64'
CC [M] /home/chris/tn40xx-driver/tn40.o
CC [M] /home/chris/tn40xx-driver/CX4.o
CC [M] /home/chris/tn40xx-driver/CX4_Linux.o
CC [M] /home/chris/tn40xx-driver/MV88X3310_phy.o
/home/chris/tn40xx-driver/MV88X3310_phy.c:3:10: fatal error: MV88X3310_phy.h: No such file or directory
#include "MV88X3310_phy.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:313: /home/chris/tn40xx-driver/MV88X3310_phy.o] Error 1
make[1]: *** [Makefile:1575: _module_/home/chris/tn40xx-driver] Error 2
make[1]: Leaving directory '/usr/src/kernels/4.17.5-100.fc27.x86_64'
make: *** [Makefile:146: all] Error 2