Open christasich opened 3 years ago
Quick update... Using the StarTech download above, I was able to build the driver from source on kernel 4.14. Per StarTech, that's the latest kernel that they support. I'd still like to get this working with kernel 5.4+, though.
I was able to patch the StarTech source code to work for Linux 5.4. #19 identified a similar issue in the @acooks driver. The issue was due to a change in the structure of skb_frag_struct
(referenced in tn40.c
) introduced by Linux 5.4. This was fixed in the @acooks drivers by https://github.com/acooks/tn40xx-driver/pull/19/commits/ce1cbe5cbc6dedea3e58595ce0c310b4e53a51d0. I used this information to patch the StarTech source code tn40.c
to include logic for Linux 5.4 (e.g. if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
). I was then able to build the StarTech drivers from source for Linux 5.4! Here is my patched tn40.c
version of the StarTech source code in case someone else is having a similar issue.
This still doesn't explain why the @acooks drivers don't initialize my device. I'd still like to figure this out so I can more easily keep my driver up-to-date.
Hello I believe i have a similar issue for ubuntu 20.04. The link you shared points to a tn40.h not tn40.c file ? thanks
Ooops... thanks for the catch @FLEGA457. I'll maybe do one better here actually. I had to change more than just the tn40.c
file. I had to find compatable .hdr
files (per the StarTech readme) and make a few changes to the Makefile
. Here is my patched source code. This works for my StarTech NIC on Ubuntu Server 20.04.02 LTS using Linux Kernel 5.4.0. Hope it helps!
Thanks. I still have the network interface UNCLAIMED with lshw -c network. Weird. Need to investigate further.
Were you able to build the driver from the unzipped source directory using make
and then make install
? If so, did you follow it up with modprobe tn40xx
?
Yes. It seems I had to deactivate the secure boot to allow the driver to load at startup time. Now it is fine.
I have the same issue on ubuntu 20.04-lts , tried all what was suggested here:
The module seems to be loading correctly
$ lsmod | grep tn40
tn40xx 466944 0
despite following messages:
$ dmesg | grep tn40
[ 2.751162] tn40xx: loading out-of-tree module taints kernel.
[ 2.751265] tn40xx: module verification failed: signature and/or required key missing - tainting kernel
[ 2.751567] Tehuti Network Driver from https://github.com/acooks/tn40xx-driver, 004
But I still get
$ lshw -c network
*-network UNCLAIMED
description: Ethernet controller
product: TN9710P 10GBase-T/NBASE-T Ethernet Adapter
vendor: Tehuti Networks Ltd.
physical id: 0
bus info: pci@0000:02:00.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: msi pm pciexpress cap_list
configuration: latency=0
resources: memory:d0000000-d000ffff
So it seems that the hardware is not recognized by the driver? Do you any other ideas of things to try. Many thanks for supporting that driver!
despite following messages:
$ dmesg | grep tn40 [ 2.751162] tn40xx: loading out-of-tree module taints kernel. [ 2.751265] tn40xx: module verification failed: signature and/or required key missing - tainting kernel
I also get tn40xx: loading out-of-tree module taints kernel.
What is different though is Tehuti Network Driver from https://github.com/acooks/tn40xx-driver, 004
.
This looks like you're still trying to load the original driver provided by @acooks. I would uninstall the @acooks drivers documentation here) and then build the drivers from source using the modified source code that I posted above.
Thanks, I think I got mixed-up when trying the different versions. I managed to make yours work with 5.4 but not with 5.8 (one of our machine had that kernel version so I downgraded). Is there a reason not to merge your changes in the present repository? Thanks!
I managed to make yours work with 5.4 but not with 5.8 (one of our machine had that kernel version so I downgraded).
Glad it worked! It sounds like there may be some changes in kernel 5.8 that will require further tweaks. I'm running Ubuntu 20.04 LTS so all my machines are still on 5.4.
Is there a reason not to merge your changes in the present repository?
I'm not a collaborator on this project. I opened this issue when I was having trouble loading drivers for my NIC. This thread has mainly turned into my stream of consciousness while I figure out how to make it work ha.
hey @christasich - from which commit did you fork your patch?
(or basically if there's a way we could turn that patched code into a PR, so we can update it to work with the latest kernel)
please let me know -- thanks / you're the best! 😸 👍
@numonium I never properly forked the project, but my patch was on the most recent commit (4e9b17ef31f022b14b62426dfd4f2491814aeea5). I ended up pulling the StarTech card and getting an Intel X550-2 since it has native support without needing to build drivers from source. Hope that helps!
Ooops... thanks for the catch @FLEGA457. I'll maybe do one better here actually. I had to change more than just the
tn40.c
file. I had to find compatable.hdr
files (per the StarTech readme) and make a few changes to theMakefile
. Here is my patched source code. This works for my StarTech NIC on Ubuntu Server 20.04.02 LTS using Linux Kernel 5.4.0. Hope it helps!
Hi I am able to install it on the 5.4 kernel version but when I try with 5.13 getting this output Skipping BTF generation for /root/Networkdriver/tn40xx.ko due to unavailability of vmlinux make -C /lib/modules/5.13.4-amdsos-build37+/build M=/root/Networkdriver clean make[1]: Entering directory '/usr/src/linux-headers-5.13.4-amdsos-build37+' CLEAN /root/Networkdriver/Module.symvers make[1]: Leaving directory '/usr/src/linux-headers-5.13.4-amdsos-build37+' Building kernel 5.13.4-amdsos-build37+ resume supported make -C /lib/modules/5.13.4-amdsos-build37+/build M=/root/Networkdriver modules make[1]: Entering directory '/usr/src/linux-headers-5.13.4-amdsos-build37+' CC [M] /root/Networkdriver/tn40.o CC [M] /root/Networkdriver/CX4.o CC [M] /root/Networkdriver/CX4_Linux.o CC [M] /root/Networkdriver/QT2025_phy.o CC [M] /root/Networkdriver/QT2025_phy_Linux.o CC [M] /root/Networkdriver/TLK10232_phy.o CC [M] /root/Networkdriver/TLK10232_phy_Linux.o CC [M] /root/Networkdriver/AQR105_phy.o CC [M] /root/Networkdriver/AQR105_phy_Linux.o CC [M] /root/Networkdriver/MV88X3120_phy.o CC [M] /root/Networkdriver/MV88X3120_phy_Linux.o CC [M] /root/Networkdriver/MV88X3310_phy.o CC [M] /root/Networkdriver/MV88X3310_phy_Linux.o LD [M] /root/Networkdriver/tn40xx.o MODPOST /root/Networkdriver/Module.symvers CC [M] /root/Networkdriver/tn40xx.mod.o LD [M] /root/Networkdriver/tn40xx.ko BTF [M] /root/Networkdriver/tn40xx.ko Skipping BTF generation for /root/Networkdriver/tn40xx.ko due to unavailability of vmlinux make[1]: Leaving directory '/usr/src/linux-headers-5.13.4-amdsos-build37+' please can you help me to build driver for 5.13 kernal.
I've the same hardware and installed latest release on Debian 11 stable that have kernel Linux server 5.10.0-13-amd64.
Please see: https://github.com/acooks/tn40xx-driver/issues/41#issuecomment-1138233530
Can you please tell me how the interface shoud appear under /sys/class/net/ if it's correctly detected?
Thanks, BR
@numonium I never properly forked the project, but my patch was on the most recent commit (4e9b17e). I ended up pulling the StarTech card and getting an Intel X550-2 since it has native support without needing to build drivers from source. Hope that helps!
I'm a little bit confused, if your patch was included in this repo at (4e9b17e), why I'm having this issue? 🤔 Not sure if your source code in the zip will behave different, @christasich
I'm a little bit confused, if your patch was included in this repo at (4e9b17e), why I'm having this issue?
@jfernandz: Please open a new issue and describe:
If it's a NIC based on the Marvell 88X3310 PHY, then unfortunately I cannot help you right now.
@acooks well, I didn't want to open a new issue as this one is still open and I've got exactly the same NIC than @christasich and exactly the very same error message when I use modprobe tn40xx
[ 577.517154] tn40xx: loading out-of-tree module taints kernel.
[ 577.517362] tn40xx: module verification failed: signature and/or required key missing - tainting kernel
[ 577.518042] Tehuti Network Driver from https://github.com/acooks/tn40xx-driver, 004
[ 577.518043] Supported phys : QT2025 TLK10232 AQR105 MUSTANG
I'm trying to make my NIC working in Ubuntu 20.04.6 LTS
with 5.15.0-88-generic
kernel.
I'm curious ... what's exactly the problem with PHY_MV88X3310
?
PS: I've actually copied the error message from @christasich because it's pretty similar, but I'd say in my case that line says
[ 577.518042] Tehuti Network Driver from https://github.com/acooks/tn40xx-driver, 006
But ... as develop
branch is the default one ... I'd say I've been building this one. I didn't do any checkout to some different branch after cloning this repo.
I'm curious ... what's exactly the problem with
PHY_MV88X3310
?
The exact problem with PHY_MV88X3310 is that Marvell has not allowed the firmware for that chip to be redistributed, and therefore this tn40xx driver doesn't include it.
Unfortunately that chip doesn't work at all without the firmware.
You can find copies of the firmware on the internet, and in other drivers, and it can even be extracted from flash chips on other cards, but it cannot be included into a Linux driver or distribution until Marvell makes it available under a suitable license.
Other's have posted helpful comments to Issue #3 and I've tried to link to other kernel discussions about that phy and firmware.
The original poster of this bug had multiple issues:
The kernel API issues have been addressed in subsequent releases. The missing firmware remains a problem that you might be able to resolve yourself, but I cannot help you obtain it.
I have this NIC here. I cannot get it running on Ubuntu Server 18.04.5 LTS (kernel 5.4.0). I started by trying to build the StarTech drivers from source here. I kept getting permission errors and never successfully built the driver. I then stumbled upon this project. I followed the dkms install directions and everything seems to build smoothly. However, my NIC is still not coming up.
lshw -c network
shows thismodprobe tn40xx
returns nothing anddmesg
showsAm I mistaken that the driver should work for my device? Any advice on where to go from here?