Code Monkey home page Code Monkey logo

tn40xx-driver's People

Contributors

acooks avatar cahz avatar jcheger avatar skwerlman avatar vojtad avatar zeldovich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tn40xx-driver's Issues

Makefile does not respect KERNELRELEASE passed by DKMS

When building the module with DKMS, the Makefile assumes that we only want to build the module for the current kernel, even if we tell DKMS that we want a different one with the -k option. On arch linux at least, this results in the DKMS install phase of a kernel upgrade failing, and a subsequent loss of networking on reboot.

DKMS tries to run the Makefile with the following command:

make -j32 KERNELRELEASE=5.9.14-zen1-1-zen -C /usr/lib/modules/5.9.14-zen1-1-zen/build M=/var/lib/dkms/tn40xx/004/build

The makefile ignores the KERNELRELEASE option, and uses uname -r instead, which results in the following error:

DKMS make.log for tn40xx-004 for kernel 5.9.14-zen1-1-zen (x86_64)
Tue Dec 15 10:29:14 PM EST 2020
make: Entering directory '/usr/lib/modules/5.9.14-zen1-1-zen/build'
/var/lib/dkms/tn40xx/004/build/Makefile:140: *** Aborting the build: Linux kernel /lib/modules/5.9.13-zen1-1-zen/build source not found.  Stop.
make: *** [Makefile:1781: /var/lib/dkms/tn40xx/004/build] Error 2
make: Leaving directory '/usr/lib/modules/5.9.14-zen1-1-zen/build'

Debian stable how to compile for ST10GSPEXNB

Hardware: Startech ST10GSPEXNB
https://www.startech.com/it-it/ingressi-uscite-reti/st10gspexnb

Software: Debian 11

Hi,
can someone please help me to make the driver compatibile with Linux server 5.10.0-13-amd64?

Unfortunately, officialy support is for Linux 3.x to 4.14 LTS Versions only. However, this card could be compatible with Linux server 5.10.0-13-amd64, but startech do not officialy support it.

I've tried to compile official drivers but ends with error:


wget https://sgcdn.startech.com/005329/media/sets/tn4010_Linux_ESXI_Drivers/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card.zip unzip Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card.zip 
cd Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card 

# make all
make -C /lib/modules/5.10.0-13-amd64/build M=/root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card clean make[1]: ingresso nella directory «/usr/src/linux-headers-5.10.0-13-amd64» make[1]: uscita dalla directory «/usr/src/linux-headers-5.10.0-13-amd64» Generating MV88X3310_phy.h /bin/sh: 3: ./mvidtoh.sh: Permission denied make: *** [Make file:163: MV88X3310_phy.h] Error 126# I've fixed permission on mvidtoh.sh# make all make -C /lib/modules/5.10.0-13-amd64/build M=/root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card clean make[1]: ingresso nella directory «/usr/src/linux-headers-5.10.0-13-amd64» make[1]: uscita dalla directory «/usr/src/linux-headers-5.10.0-13-amd64» Generating MV88X3310_phy.h /bin/sh: 3: ./mvidtoh.sh: Permission denied make: *** [Make file:163: MV88X3310_phy.h] Errore 126 

# fixed permisson:
root@server:~/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card# chmod +x mvidtoh.sh 


# tried again: make all
make -C /lib/modules/5.10.0-13-amd64/build M=/root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card clean
make[1]: ingresso nella directory «/usr/src/linux-headers-5.10.0-13-amd64»
make[1]: uscita dalla directory «/usr/src/linux-headers-5.10.0-13-amd64»
Generating MV88X3310_phy.h
Generating MV88E2010_phy.h
Building kernel 5.10.0-13-amd64 resume supported
make -C /lib/modules/5.10.0-13-amd64/build M=/root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card modules 
make[1]: ingresso nella directory «/usr/src/linux-headers-5.10.0-13-amd64»
  CC [M]  /root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card/tn40.o
/root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card/tn40.c: In function ‘bdx_tx_map_skb’:
/root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card/tn40.c:3644:13: error: assignment to ‘struct skb_frag_struct *’ from incompatible pointer type ‘skb_frag_t *’ {aka ‘struct bio_vec *’} [-Werror=incompatible-pointer-types]
 3644 |    frag     = &skb_shinfo(skb)->frags[i];
      |             ^
/root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card/tn40.c:3648:62: error: invalid use of undefined type ‘struct skb_frag_struct’
 3648 |    dmaAddr = skb_frag_dma_map(&priv->pdev->dev, frag, 0, frag->size, PCI_DMA_TODEVICE);
      |                                                              ^~
/root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card/tn40.c:3648:49: error: passing argument 2 of ‘skb_frag_dma_map’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3648 |    dmaAddr = skb_frag_dma_map(&priv->pdev->dev, frag, 0, frag->size, PCI_DMA_TODEVICE);
      |                                                 ^~~~
      |                                                 |
      |                                                 struct skb_frag_struct *
In file included from /usr/src/linux-headers-5.10.0-13-common/include/linux/if_ether.h:19,
                 from /usr/src/linux-headers-5.10.0-13-common/include/uapi/linux/ethtool.h:19,
                 from /usr/src/linux-headers-5.10.0-13-common/include/linux/ethtool.h:18,
                 from /usr/src/linux-headers-5.10.0-13-common/include/linux/netdevice.h:37,
                 from /root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card/tn40.h:16,
                 from /root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card/tn40.c:9:
/usr/src/linux-headers-5.10.0-13-common/include/linux/skbuff.h:3113:26: note: expected ‘const skb_frag_t *’ {aka ‘const struct bio_vec *’} but argument is of type ‘struct skb_frag_struct *’
 3113 |        const skb_frag_t *frag,
      |        ~~~~~~~~~~~~~~~~~~^~~~
/root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card/tn40.c:3651:33: error: invalid use of undefined type ‘struct skb_frag_struct’
 3651 |    bdx_setTxdb(db, dmaAddr, frag->size);
      |                                 ^~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.10.0-13-common/scripts/Makefile.build:285: /root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card/tn40.o] Errore 1
make[2]: *** [/usr/src/linux-headers-5.10.0-13-common/Makefile:1846: /root/Tehuti_TN4010_Linux_PCIe_10_Gigabit_Network_Card] Errore 2
make[1]: *** [/usr/src/linux-headers-5.10.0-13-common/Makefile:185: __sub-make] Errore 2
make[1]: uscita dalla directory «/usr/src/linux-headers-5.10.0-13-amd64»
make: *** [Makefile:147: all] Errore 2

Works well on NVidia Jetson TX1 dev board but "firmware loading failed" on TX2+X-Carrier

I have been using the cleanup/v0.3.6.17 branch to successfully run a Planet ENW-9801 SFP+ card on a NVidia Jetson TX1 development board. Performance not spectacular but reliably 3x faster than the onboard gigabit ethernet according to iperf which is sufficient for our needs.

Today we switched over to our intended production board:

https://coloradoengineering.com/standard-products/jetson-x2-x-carrier/

The card shows up fine in lspci:

00:01.0 PCI bridge: NVIDIA Corporation Device 10e5 (rev a1)
01:00.0 Ethernet controller: Tehuti Networks Ltd. TN9310 10GbE SFP+ Ethernet Adapter

... but fails to initialise:

[ 7.632585] Tehuti Network Driver, 0.3.6.17
[ 7.632587] Supported phys : QT2025 TLK10232 AQR105 MUSTANG
[ 7.632708] tn40xx 0000:01:00.0: enabling device (0000 -> 0002)
[ 7.632771] srom 0x0 HWver 16 build 0 lane# 4 max_pl 0x0 mrrs 0x2
[ 7.870952] PHY detected on port 1 ID=43A400 - QT2025 10Gbps SFP+
[ 8.068334] gk20a 17000000.gp10b: railgate is disabled.
[ 9.655103] QT2025 FW version 2.0.3.3 module type 0x4
[ 10.178658] eth1 firmware loading failed
[ 10.183438] fw 0x0
[ 10.194992] tn40xx: probe of 0000:01:00.0 failed with error -5

Any suggestions gratefully received!

Thanks,

Geoff

Crash with Linux 5.7 - WARNING: CPU: 6 PID: 644 at net/ethtool/common.c:348 ethtool_check_ops+0x14/0x20

I had this working fine on Linux 5.6, but today my PC upgraded to 5.7 and the tn40xx driver crashes.

0.000000] Linux version 5.7.7-200.fc32.x86_64 ([email protected]) (gcc version 10.1.1 20200507 (Red Hat 10.1.1-1) (GCC), GNU ld version 2.34-3.fc32) #1 SMP Wed Jul 1 19:53:01 UTC 2020
...
[   51.697332] tn40xx: loading out-of-tree module taints kernel.
[   51.697389] tn40xx: module verification failed: signature and/or required key missing - tainting kernel
[   51.697661] Tehuti Network Driver, 0.3.6.17.2
[   51.697662] Supported phys :    QT2025 TLK10232 AQR105 MUSTANG 
[   51.697704] tn40xx 0000:01:00.0: enabling device (0000 -> 0002)
[   51.697816] srom 0x0 HWver 16 build 0 lane# 4 max_pl 0x1 mrrs 0x2
[   51.929042] PHY detected on port 1 ID=3A1B4A3 - AQR105 10Gbps 10GBase-T
...
[   58.553169] AQR105 FW ver: 2.c.72
[   58.575344] ------------[ cut here ]------------
[   58.575348] WARNING: CPU: 6 PID: 644 at net/ethtool/common.c:348 ethtool_check_ops+0x14/0x20
[   58.575348] Modules linked in: intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel snd_sof_pci snd_sof_intel_byt kvm snd_sof_intel_ipc iwlmvm(+) snd_sof_intel_hda_common snd_soc_hdac_hda irqbypass snd_sof_xtensa_dsp intel_cstate snd_sof_intel_hda mac80211 snd_sof intel_rapl_perf snd_soc_skl snd_hda_codec_hdmi snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi libarc4 snd_hda_codec_realtek wmi_bmof snd_soc_core iwlwifi intel_wmi_thunderbolt snd_hda_codec_generic snd_compress ledtrig_audio ac97_bus snd_pcm_dmaengine cfg80211 pcspkr mxm_wmi snd_hda_intel snd_intel_dspcfg snd_usb_audio(+) snd_hda_codec snd_usbmidi_lib snd_hda_core snd_rawmidi snd_hwdep i2c_i801 thunderbolt snd_seq snd_seq_device btusb uvcvideo snd_pcm btrtl btbcm btintel videobuf2_vmalloc bluetooth snd_timer videobuf2_memops videobuf2_v4l2 snd videobuf2_common ecdh_generic videodev rfkill soundcore powermate joydev mc ecc i2c_multi_instantiate tn40xx(OE+) acpi_pad
[   58.575363]  acpi_tad mei_me mei intel_pch_thermal ip_tables hid_logitech_hidpp hid_logitech_dj uas usb_storage i915 crct10dif_pclmul i2c_algo_bit cec crc32_pclmul crc32c_intel drm_kms_helper nvme drm r8169 nvme_core ghash_clmulni_intel wmi video fuse
[   58.575368] CPU: 6 PID: 644 Comm: systemd-udevd Tainted: G           OE     5.7.7-200.fc32.x86_64 #1
[   58.575368] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z490 Phantom Gaming-ITX/TB3, BIOS P1.30 05/14/2020
[   58.575369] RIP: 0010:ethtool_check_ops+0x14/0x20
[   58.575370] Code: bc f4 ff ff ff eb e6 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 31 c0 48 83 7f 70 00 74 0d 8b 17 85 d2 75 07 <0f> 0b b8 ea ff ff ff c3 0f 1f 40 00 0f 1f 44 00 00 4c 8b 8f f8 01
[   58.575371] RSP: 0018:ffffa58a40573ba8 EFLAGS: 00010246
[   58.575372] RAX: 0000000000000000 RBX: ffffffffb99e3000 RCX: ffff8f6ad89e7df0
[   58.575372] RDX: 0000000000000000 RSI: 000000000000003e RDI: ffffffffc0967000
[   58.575372] RBP: ffff8f6ade7ef000 R08: 0000000000000000 R09: 000000000000c432
[   58.575373] R10: 0000000000000000 R11: ffffa58a406a0000 R12: 0000000000000001
[   58.575373] R13: ffffa58a402b9000 R14: ffff8f6ade7ef900 R15: ffff8f6ae25950b0
[   58.575374] FS:  00007fcd5ccdeb80(0000) GS:ffff8f6ae5580000(0000) knlGS:0000000000000000
[   58.575374] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   58.575375] CR2: 00007fef14537000 CR3: 0000000461bdc004 CR4: 00000000003606e0
[   58.575375] Call Trace:
[   58.575377]  register_netdevice+0x59/0x630
[   58.575380]  ? _cond_resched+0x16/0x40
[   58.575381]  register_netdev+0x1c/0x40
[   58.575384]  bdx_probe+0x264/0x990 [tn40xx]
[   58.575387]  local_pci_probe+0x42/0x80
[   58.575388]  ? _cond_resched+0x16/0x40
[   58.575389]  pci_device_probe+0xd9/0x190
[   58.575390]  really_probe+0x167/0x410
[   58.575391]  driver_probe_device+0xb6/0x100
[   58.575392]  device_driver_attach+0xa1/0xb0
[   58.575393]  __driver_attach+0x8a/0x150
[   58.575394]  ? device_driver_attach+0xb0/0xb0
[   58.575394]  ? device_driver_attach+0xb0/0xb0
[   58.575395]  bus_for_each_dev+0x64/0x90
[   58.575396]  bus_add_driver+0x12b/0x1e0
[   58.575397]  driver_register+0x8b/0xe0
[   58.575399]  ? bdx_tx_timeout+0x30/0x30 [tn40xx]
[   58.575400]  do_one_initcall+0x46/0x200
[   58.575401]  ? _cond_resched+0x16/0x40
[   58.575403]  ? kmem_cache_alloc_trace+0x167/0x220
[   58.575404]  ? do_init_module+0x23/0x260
[   58.575405]  do_init_module+0x5c/0x260
[   58.575406]  __do_sys_init_module+0x14f/0x170
[   58.575407]  do_syscall_64+0x5b/0xf0
[   58.575408]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   58.575409] RIP: 0033:0x7fcd5de3040e
[   58.575410] Code: 48 8b 0d 8d 0a 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5a 0a 0c 00 f7 d8 64 89 01 48
[   58.575411] RSP: 002b:00007fff130a6eb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[   58.575411] RAX: ffffffffffffffda RBX: 000055fa83b37160 RCX: 00007fcd5de3040e
[   58.575412] RDX: 00007fcd5da8a95d RSI: 000000000008ae38 RDI: 000055fa83b534c0
[   58.575412] RBP: 000055fa83b534c0 R08: 000055fa83b31010 R09: 00007fff130a5b98
[   58.575413] R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
[   58.575413] R13: 00007fcd5da8a95d R14: 000055fa83b31080 R15: 000055fa83b314e0
[   58.575414] ---[ end trace 4041894c56d7b050 ]---
[   58.575415] register_netdev failed
[   58.575420] ------------[ cut here ]------------
[   58.575421] WARNING: CPU: 6 PID: 644 at net/core/dev.c:8802 rollback_registered_many+0x9f/0x490
[   58.575421] Modules linked in: intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel snd_sof_pci snd_sof_intel_byt kvm snd_sof_intel_ipc iwlmvm(+) snd_sof_intel_hda_common snd_soc_hdac_hda irqbypass snd_sof_xtensa_dsp intel_cstate snd_sof_intel_hda mac80211 snd_sof intel_rapl_perf snd_soc_skl snd_hda_codec_hdmi snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi libarc4 snd_hda_codec_realtek wmi_bmof snd_soc_core iwlwifi intel_wmi_thunderbolt snd_hda_codec_generic snd_compress ledtrig_audio ac97_bus snd_pcm_dmaengine cfg80211 pcspkr mxm_wmi snd_hda_intel snd_intel_dspcfg snd_usb_audio(+) snd_hda_codec snd_usbmidi_lib snd_hda_core snd_rawmidi snd_hwdep i2c_i801 thunderbolt snd_seq snd_seq_device btusb uvcvideo snd_pcm btrtl btbcm btintel videobuf2_vmalloc bluetooth snd_timer videobuf2_memops videobuf2_v4l2 snd videobuf2_common ecdh_generic videodev rfkill soundcore powermate joydev mc ecc i2c_multi_instantiate tn40xx(OE+) acpi_pad
[   58.575429]  acpi_tad mei_me mei intel_pch_thermal ip_tables hid_logitech_hidpp hid_logitech_dj uas usb_storage i915 crct10dif_pclmul i2c_algo_bit cec crc32_pclmul crc32c_intel drm_kms_helper nvme drm r8169 nvme_core ghash_clmulni_intel wmi video fuse
[   58.575432] CPU: 6 PID: 644 Comm: systemd-udevd Tainted: G        W  OE     5.7.7-200.fc32.x86_64 #1
[   58.575432] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z490 Phantom Gaming-ITX/TB3, BIOS P1.30 05/14/2020
[   58.575433] RIP: 0010:rollback_registered_many+0x9f/0x490
[   58.575433] Code: 01 75 69 48 8b 45 68 4c 8d 7d 68 48 89 eb 48 83 e8 68 4d 39 ef 74 57 48 89 c5 0f b6 83 d8 04 00 00 84 c0 75 d3 0f 1f 44 00 00 <0f> 0b 4c 89 ff e8 67 51 c4 ff 84 c0 74 0f 48 8b 53 68 48 8b 43 70
[   58.575434] RSP: 0018:ffffa58a40573b50 EFLAGS: 00010246
[   58.575434] RAX: 0000000000000000 RBX: ffff8f6ade7ef000 RCX: 0000000000000007
[   58.575435] RDX: 0000000000000000 RSI: ffffa58a40573bb0 RDI: ffffffffb99e5060
[   58.575435] RBP: ffffa58a40573b48 R08: ffffa58a40573bb0 R09: ffffa58a40573bb0
[   58.575435] R10: 0000000000000000 R11: 0000000000000001 R12: dead000000000122
[   58.575436] R13: ffffa58a40573bb0 R14: dead000000000100 R15: ffff8f6ade7ef068
[   58.575436] FS:  00007fcd5ccdeb80(0000) GS:ffff8f6ae5580000(0000) knlGS:0000000000000000
[   58.575437] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   58.575437] CR2: 00007fef14537000 CR3: 0000000461bdc004 CR4: 00000000003606e0
[   58.575437] Call Trace:
[   58.575438]  unregister_netdevice_queue+0xab/0x160
[   58.575439]  unregister_netdev+0x18/0x20
[   58.575441]  bdx_probe+0x2df/0x990 [tn40xx]
[   58.575442]  local_pci_probe+0x42/0x80
[   58.575443]  ? _cond_resched+0x16/0x40
[   58.575444]  pci_device_probe+0xd9/0x190
[   58.575445]  really_probe+0x167/0x410
[   58.575446]  driver_probe_device+0xb6/0x100
[   58.575447]  device_driver_attach+0xa1/0xb0
[   58.575448]  __driver_attach+0x8a/0x150
[   58.575448]  ? device_driver_attach+0xb0/0xb0
[   58.575449]  ? device_driver_attach+0xb0/0xb0
[   58.575449]  bus_for_each_dev+0x64/0x90
[   58.575450]  bus_add_driver+0x12b/0x1e0
[   58.575451]  driver_register+0x8b/0xe0
[   58.575453]  ? bdx_tx_timeout+0x30/0x30 [tn40xx]
[   58.575454]  do_one_initcall+0x46/0x200
[   58.575455]  ? _cond_resched+0x16/0x40
[   58.575455]  ? kmem_cache_alloc_trace+0x167/0x220
[   58.575456]  ? do_init_module+0x23/0x260
[   58.575457]  do_init_module+0x5c/0x260
[   58.575458]  __do_sys_init_module+0x14f/0x170
[   58.575459]  do_syscall_64+0x5b/0xf0
[   58.575460]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   58.575461] RIP: 0033:0x7fcd5de3040e
[   58.575462] Code: 48 8b 0d 8d 0a 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5a 0a 0c 00 f7 d8 64 89 01 48
[   58.575462] RSP: 002b:00007fff130a6eb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[   58.575462] RAX: ffffffffffffffda RBX: 000055fa83b37160 RCX: 00007fcd5de3040e
[   58.575463] RDX: 00007fcd5da8a95d RSI: 000000000008ae38 RDI: 000055fa83b534c0
[   58.575463] RBP: 000055fa83b534c0 R08: 000055fa83b31010 R09: 00007fff130a5b98
[   58.575463] R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
[   58.575464] R13: 00007fcd5da8a95d R14: 000055fa83b31080 R15: 000055fa83b314e0
[   58.575465] ---[ end trace 4041894c56d7b051 ]---
[   58.584041] network todo 'eth%d' but state 0
[   58.584043] CPU: 0 PID: 644 Comm: systemd-udevd Tainted: G        W  OE     5.7.7-200.fc32.x86_64 #1
[   58.584043] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z490 Phantom Gaming-ITX/TB3, BIOS P1.30 05/14/2020
[   58.584044] Call Trace:
[   58.584048]  dump_stack+0x64/0x88
[   58.584050]  netdev_run_todo.cold+0x17/0x41
[   58.584054]  bdx_probe+0x2df/0x990 [tn40xx]
[   58.584056]  local_pci_probe+0x42/0x80
[   58.584058]  ? _cond_resched+0x16/0x40
[   58.584059]  pci_device_probe+0xd9/0x190
[   58.584061]  really_probe+0x167/0x410
[   58.584062]  driver_probe_device+0xb6/0x100
[   58.584063]  device_driver_attach+0xa1/0xb0
[   58.584064]  __driver_attach+0x8a/0x150
[   58.584064]  ? device_driver_attach+0xb0/0xb0
[   58.584065]  ? device_driver_attach+0xb0/0xb0
[   58.584066]  bus_for_each_dev+0x64/0x90
[   58.584066]  bus_add_driver+0x12b/0x1e0
[   58.584067]  driver_register+0x8b/0xe0
[   58.584070]  ? bdx_tx_timeout+0x30/0x30 [tn40xx]
[   58.584071]  do_one_initcall+0x46/0x200
[   58.584072]  ? _cond_resched+0x16/0x40
[   58.584073]  ? kmem_cache_alloc_trace+0x167/0x220
[   58.584074]  ? do_init_module+0x23/0x260
[   58.584075]  do_init_module+0x5c/0x260
[   58.584076]  __do_sys_init_module+0x14f/0x170
[   58.584078]  do_syscall_64+0x5b/0xf0
[   58.584079]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   58.584080] RIP: 0033:0x7fcd5de3040e
[   58.584081] Code: 48 8b 0d 8d 0a 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5a 0a 0c 00 f7 d8 64 89 01 48
[   58.584082] RSP: 002b:00007fff130a6eb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[   58.584083] RAX: ffffffffffffffda RBX: 000055fa83b37160 RCX: 00007fcd5de3040e
[   58.584083] RDX: 00007fcd5da8a95d RSI: 000000000008ae38 RDI: 000055fa83b534c0
[   58.584083] RBP: 000055fa83b534c0 R08: 000055fa83b31010 R09: 00007fff130a5b98
[   58.584084] R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
[   58.584084] R13: 00007fcd5da8a95d R14: 000055fa83b31080 R15: 000055fa83b314e0
[   58.591165] tn40xx: probe of 0000:01:00.0 failed with error -22

Getting TN9710P / RC-NIC412v2 Working

I'm not posting a problem, rather a solution that can help someone else in the future! How I got my Rosewill RC-NIC412v2 working, which doesn't work with the default build of this tn40xx driver:

git clone -b release/tn40xx-001 https://github.com/acooks/tn40xx-driver.git /usr/src/tn40xx-001
cd /usr/src/tn40xx-001/
wget https://github.com/acooks/tn40xx-driver/files/2213763/MV88X3310_phy.h.zip
unzip MV88X3310_phy.h.zip
make MV88X3310=YES
make install
modprobe tn40xx

$ lshw -class network
*-network
description: Ethernet interface
product: TN9710P 10GBase-T/NBASE-T Ethernet Adapter
vendor: Tehuti Networks Ltd.
physical id: 0
bus info: pci@0000:02:00.0
logical name: enp2s0
version: 00
serial: 68:1c:a2:13:09:20
capacity: 10Gbit/s
width: 64 bits
clock: 33MHz
capabilities: msi pm pciexpress bus_master cap_list ethernet physical tp 100bt-fd 1000bt-fd 10000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=tn40xx driverversion=0.3.6.17 duplex=full firmware=N/A ip=192.168.0.244 latency=0 link=yes multicast=yes port=twisted pair

EDIT: I used the upstream source for this particular build.
wget http://www.tehutinetworks.net/images/UL240756/tn40xx-0.3.6.17.tgz

Latest RHEL 9 5.14 kernels needs fixes for 5.15 and 6.1+ from other forks

I'm recalling this from memory because I forgot to write it down a few weeks ago, but I hope this information helps someone.

When I went to install this I was getting the errors that were actually fixed for Linux 5.15+ and Linux 6.1+ in other forks of this driver. If you're on the latest RHEL 9-based distros using linux kernel 5.14, you may need to edit tn40.c and tn40.h to change or remove the Linux kernel version requirements:

https://github.com/bufanda/tn40xx-driver/blob/e0467efac96be3730d95bcdb79b90c6431d51edc/tn40.c#L633
https://github.com/bufanda/tn40xx-driver/blob/e0467efac96be3730d95bcdb79b90c6431d51edc/tn40.c#L3786
https://github.com/bufanda/tn40xx-driver/blob/e0467efac96be3730d95bcdb79b90c6431d51edc/tn40.c#L3786
https://github.com/bufanda/tn40xx-driver/blob/e0467efac96be3730d95bcdb79b90c6431d51edc/tn40.h#L884

You should have a much easier time building on RHEL/Alma/Rocky 9 when you change these to 5.14. Hope this helps someone.

PS: If anyone has a shitty Edimax EN-9320TX-E like I do, you need MV88X3310.

curl -LO https://github.com/acooks/tn40xx-driver/files/2214805/x3310fw_0_3_3_0_9374.tar.gz

Use mvidtoh.sh on x3310fw_0_3_3_0_9374.hdr to make MV88X3310_phy.h. Add then add MV88X3310=YES AQ=YES to the end of the dkms.conf make command and you should be able to build the driver.

Unable to install driver on 5.19.0-76051900-generic

I can't seem to install the driver using after doing the git-clone, I am new to linux so I may be doing something wrong.

`root@pop-os:/usr/src# dkms install -m tn40xx -v 004
Creating symlink /var/lib/dkms/tn40xx/004/source -> /usr/src/tn40xx-004

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j32 KERNELRELEASE=5.19.0-76051900-generic -C /lib/modules/5.19.0-76051900-generic/build M=/var/lib/dkms/tn40xx/004/build KVERSION=5.19.0-76051900-generic...(bad exit status: 2)
ERROR (dkms apport): binary package for tn40xx: 004 not found
Error! Bad return status for module build on kernel: 5.19.0-76051900-generic (x86_64)
Consult /var/lib/dkms/tn40xx/004/build/make.log for more information.
`

MV88X3310_set_rate_adapt

There seems to be an issue with MV88X3310_set_rate_adapt for copper implementations. If you jack in/out a cable to a 10G port, the interrrupt service routine gets called properly because it is looking at the MAC_LNK_STAT register (0x200) LNK_STAT bit which is a Read Only register in the TN4010. However, if you jack OUT from a 5G/2.5G/1G/100M port (after jacking in and getting link), the interrupt service routine does not get called because the LNK_STAT bit does not change. This is due to MV88X3310_set_rate_adapt function getting called for those speeds. Commenting out calls to MV88X3310_set_rate_adapt fixes the jack out but I'm not sure of the impact to overall networking on copper interfaces due to my change. Everything seems to work well with the networking at these speeds.

Looking to see if anyone else has recognized this issue.

Unable to compile on Fedora 30

I've been using your driver on Fedora with minimal changes for the last 6 months. I was even albe to compile in Fedora 30 until today.

The first error below is what I am seeing with branch release/tn40xx-002.
Previously, with branch tn40xx-001 I would modify tn40.c by commenting out the definition of .get_settings and .set_settings and everything would compile. I guess the latest kernel has some changes in the kernel headers. Any tips are appreciated

Your branch is up to date with 'origin/release/tn40xx-002'.

# make all
make -C /lib/modules/5.1.8-300.fc30.x86_64/build M=/opt/projects/github/tn40xx-driver clean
make[1]: Entering directory '/usr/src/kernels/5.1.8-300.fc30.x86_64'
make[1]: Leaving directory '/usr/src/kernels/5.1.8-300.fc30.x86_64'
Building kernel 5.1.8-300.fc30.x86_64 resume supported
make -C /lib/modules/5.1.8-300.fc30.x86_64/build M=/opt/projects/github/tn40xx-driver modules 
make[1]: Entering directory '/usr/src/kernels/5.1.8-300.fc30.x86_64'
  CC [M]  /opt/projects/github/tn40xx-driver/tn40.o
  CC [M]  /opt/projects/github/tn40xx-driver/CX4.o
  CC [M]  /opt/projects/github/tn40xx-driver/CX4_Linux.o
  CC [M]  /opt/projects/github/tn40xx-driver/QT2025_phy.o
  CC [M]  /opt/projects/github/tn40xx-driver/QT2025_phy_Linux.o
  CC [M]  /opt/projects/github/tn40xx-driver/TLK10232_phy.o
  CC [M]  /opt/projects/github/tn40xx-driver/TLK10232_phy_Linux.o
  CC [M]  /opt/projects/github/tn40xx-driver/AQR105_phy.o
  CC [M]  /opt/projects/github/tn40xx-driver/AQR105_phy_Linux.o
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c: In function ‘AQR105_set_link_mode’:
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c:92:28: error: ‘__ETHTOOL_LINK_MODE_LAST’ undeclared (first use in this function); did you mean ‘__ETHTOOL_LINK_MODE_MASK_NBITS’?
   92 | #define AQR105_ALL_SPEEDS (__ETHTOOL_LINK_MODE_LAST+1)
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c:99:15: note: in expansion of macro ‘AQR105_ALL_SPEEDS’
   99 |  if (speed == AQR105_ALL_SPEEDS) {
      |               ^~~~~~~~~~~~~~~~~
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c:92:28: note: each undeclared identifier is reported only once for each function it appears in
   92 | #define AQR105_ALL_SPEEDS (__ETHTOOL_LINK_MODE_LAST+1)
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c:99:15: note: in expansion of macro ‘AQR105_ALL_SPEEDS’
   99 |  if (speed == AQR105_ALL_SPEEDS) {
      |               ^~~~~~~~~~~~~~~~~
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c: In function ‘AQR105_get_link_ksettings’:
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c:92:28: error: ‘__ETHTOOL_LINK_MODE_LAST’ undeclared (first use in this function); did you mean ‘__ETHTOOL_LINK_MODE_MASK_NBITS’?
   92 | #define AQR105_ALL_SPEEDS (__ETHTOOL_LINK_MODE_LAST+1)
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c:133:50: note: in expansion of macro ‘AQR105_ALL_SPEEDS’
  133 |  AQR105_set_link_mode(cmd->link_modes.supported, AQR105_ALL_SPEEDS);
      |                                                  ^~~~~~~~~~~~~~~~~
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c: In function ‘AQR105_set_link_ksettings’:
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c:92:28: error: ‘__ETHTOOL_LINK_MODE_LAST’ undeclared (first use in this function); did you mean ‘__ETHTOOL_LINK_MODE_MASK_NBITS’?
   92 | #define AQR105_ALL_SPEEDS (__ETHTOOL_LINK_MODE_LAST+1)
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/projects/github/tn40xx-driver/AQR105_phy_Linux.c:158:48: note: in expansion of macro ‘AQR105_ALL_SPEEDS’
  158 |   AQR105_set_link_mode(priv->link_advertising, AQR105_ALL_SPEEDS);
      |                                                ^~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:276: /opt/projects/github/tn40xx-driver/AQR105_phy_Linux.o] Error 1
make[1]: *** [Makefile:1575: _module_/opt/projects/github/tn40xx-driver] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.1.8-300.fc30.x86_64'
make: *** [Makefile:147: all] Error 2

Issue with incompatible pointer types when compiling ubuntu 20.04 and LTS 22.04 LTS

make -C /lib/modules/5.15.0-46-generic/build M=/home/lloyd/tn40xx-driver-release-tn40xx-004 clean
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-46-generic'
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-46-generic'
Building kernel 5.15.0-46-generic resume supported
make -C /lib/modules/5.15.0-46-generic/build M=/home/lloyd/tn40xx-driver-release-tn40xx-004 modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-46-generic'
CC [M] /home/lloyd/tn40xx-driver-release-tn40xx-004/tn40.o
/home/lloyd/tn40xx-driver-release-tn40xx-004/tn40.c:3877:25: warning: ‘struct kernel_ethtool_ringparam’ declared inside parameter list will not be visible outside of this definition or declaration
3877 | struct kernel_ethtool_ringparam *kernel_ering,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/lloyd/tn40xx-driver-release-tn40xx-004/tn40.c:3898:25: warning: ‘struct kernel_ethtool_ringparam’ declared inside parameter list will not be visible outside of this definition or declaration
3898 | struct kernel_ethtool_ringparam kernel_ering,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/lloyd/tn40xx-driver-release-tn40xx-004/tn40.c: In function ‘bdx_ethtool_ops’:
/home/lloyd/tn40xx-driver-release-tn40xx-004/tn40.c:4113:34: error: initialization of ‘void (
)(struct net_device *, struct ethtool_ringparam )’ from incompatible pointer type ‘void ()(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack )’ [-Werror=incompatible-pointer-types]
4113 | .get_ringparam = bdx_get_ringparam,
| ^~~~~~~~~~~~~~~~~
/home/lloyd/tn40xx-driver-release-tn40xx-004/tn40.c:4113:34: note: (near initialization for ‘bdx_ethtool_ops.get_ringparam’)
/home/lloyd/tn40xx-driver-release-tn40xx-004/tn40.c:4114:34: error: initialization of ‘int (
)(struct net_device *, struct ethtool_ringparam )’ from incompatible pointer type ‘int ()(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)’ [-Werror=incompatible-pointer-types]
4114 | .set_ringparam = bdx_set_ringparam,
| ^~~~~~~~~~~~~~~~~
/home/lloyd/tn40xx-driver-release-tn40xx-004/tn40.c:4114:34: note: (near initialization for ‘bdx_ethtool_ops.set_ringparam’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:297: /home/lloyd/tn40xx-driver-release-tn40xx-004/tn40.o] Error 1
make[1]: *** [Makefile:1881: /home/lloyd/tn40xx-driver-release-tn40xx-004] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-46-generic'
make: *** [Makefile:147: all] Error 2

Does anyone have any idea how to fix this?

Driver not loading for StarTech (ST10GSPEXNB) - Ubuntu Server 18.04.5 LTS; kernel 5.4.0-66-generic

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 this

*-network UNCLAIMED
       description: Ethernet controller
       product: TN9710P 10GBase-T/NBASE-T Ethernet Adapter
       vendor: Tehuti Networks Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm pciexpress cap_list
       configuration: latency=0
       resources: memory:d0600000-d060ffff

modprobe tn40xx returns nothing and dmesg shows

[  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

Am I mistaken that the driver should work for my device? Any advice on where to go from here?

setting MTU breaks receive

Setting the MTU intermittently causes the NIC to stop receiving frames. The MTU value being set does not matter - valid and invalid values will have the same effect.

Bug found using net-driver-test .

Defect Affects:
release/tn40xx-005 and release/tn40xx-006 (and probably earlier versions too)

Edit: Seems to be intermittent. Need info.

tn40xx: rxd_err = 0x10

Hi,

I have an LR-Link card in SFP + installed in an esxi 6.5.
And in the logs I have only WARNING: tn40xx: rxd_err = 0x10

Is it possible to build this driver under Esx?

Thank you

Driver or card crashes with VLAN traffic

I'm working on the Trendnet TEG-10GECTX adapter that uses this driver, and it uses the x3310fw file. I've gotten everything working, but seeing an odd problem. I have two servers running CentOS 8, both using this card/driver. I have IP addresses assigned to the interface, and traffic flows as normal.

I set up a bridge on the two servers, pointing at a vlan interface running over the cards. Sending any vlan traffic over the cards causes something to crash on the card or in the driver. I'm not seeing any error messages in dmesg or the logs, but all traffic across the interface suddenly stops.

Judging by watching pings, the connection crashes the moment vlan tagged traffic is sent across the wire.

error: ‘struct ethtool_ops’ has no member named ‘get_settings’; did you mean ‘get_strings’?

I'm having compile issues with kernel 4.20.3. Looks like "get_settings()" has been deprecated. I'm guessing this is an upstream issue, but does anybody have some quick fix in the meantime?

$ dkms install -m tn40xx -v 001 -k 4.20.3-200.fc29.x86_64

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=4.20.3-200.fc29.x86_64 MV88X3310=YES -C /lib/modules/4.20.3-200.fc29.x86_64/build M=/var/lib/dkms/tn40xx/001/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.20.3-200.fc29.x86_64 (x86_64)
Consult /var/lib/dkms/tn40xx/001/build/make.log for more information.


$ cat /var/lib/dkms/tn40xx/001/build/make.log
DKMS make.log for tn40xx-001 for kernel 4.20.3-200.fc29.x86_64 (x86_64)
Fri Jan 25 12:17:05 CST 2019
make: Entering directory '/usr/src/kernels/4.20.3-200.fc29.x86_64'
  CC [M]  /var/lib/dkms/tn40xx/001/build/tn40.o
  CC [M]  /var/lib/dkms/tn40xx/001/build/CX4.o
  CC [M]  /var/lib/dkms/tn40xx/001/build/CX4_Linux.o
  CC [M]  /var/lib/dkms/tn40xx/001/build/MV88X3310_phy.o
/var/lib/dkms/tn40xx/001/build/tn40.c: In function ‘bdx_ethtool_ops’:
/var/lib/dkms/tn40xx/001/build/tn40.c:4937:4: error: ‘struct ethtool_ops’ has no member named ‘get_settings’; did you mean ‘get_strings’?
   .get_settings = bdx_get_settings,
    ^~~~~~~~~~~~
    get_strings
/var/lib/dkms/tn40xx/001/build/tn40.c:4937:19: error: initialization of ‘int (*)(struct net_device *, struct ethtool_fecparam *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_cmd *)’ [-Werror=incompatible-pointer-types]
   .get_settings = bdx_get_settings,
                   ^~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/001/build/tn40.c:4937:19: note: (near initialization for ‘bdx_ethtool_ops.get_fecparam’)
/var/lib/dkms/tn40xx/001/build/tn40.c:4938:4: error: ‘struct ethtool_ops’ has no member named ‘set_settings’; did you mean ‘get_strings’?
   .set_settings = bdx_set_settings,
    ^~~~~~~~~~~~
    get_strings
/var/lib/dkms/tn40xx/001/build/tn40.c:4938:19: error: initialization of ‘int (*)(struct net_device *, struct ethtool_fecparam *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_cmd *)’ [-Werror=incompatible-pointer-types]
   .set_settings = bdx_set_settings,
                   ^~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/001/build/tn40.c:4938:19: note: (near initialization for ‘bdx_ethtool_ops.set_fecparam’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:291: /var/lib/dkms/tn40xx/001/build/tn40.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1567: _module_/var/lib/dkms/tn40xx/001/build] Error 2
make: Leaving directory '/usr/src/kernels/4.20.3-200.fc29.x86_64'

Debian11 ST10GSPEXNDP not working

I´m trying to install the driver under kernel 5.10.0.5.
dkms runs without a problem, but no NIC comes up.
The same with the patched sources from christsich

lscpi -k shows 2 TN9710P tied to kernelmodules tn40xx.

after modprobe dmesg shows

tn40xx: probe of 0000:04:00.0 failed with errror -22
tn40xx: PHY detected on Port 0 ID=2B09AB - MV88X3310 (A1) 10 Gps 10GBase-T
tn40xx: MV88X3310 initdata applied
tn40xx: MV88X3310 I/D version is 0.2.8.0

How to work on openwrt

How to work on openwrt (Kernel 5.4)
Tehuti Networks Ltd. TN9710P 10GBase-T/NBASE-T Ethernet Adapter

ST-Lab 480 (TN9710P) not detected after DKMS install

Hi All,

I've just bought a pair of ST-Lab N-480 10G adapters and installed them into machines with Fedora 34.

uname -a Linux amphimachairodus 5.12.8-300.fc34.x86_64 #1 SMP Fri May 28 15:20:54 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
NICs are present in my lspci:
05:00.0 Ethernet controller: Tehuti Networks Ltd. TN9710P 10GBase-T/NBASE-T Ethernet Adapter

I've cloned repo and installed DKMS as described here https://github.com/acooks/tn40xx-driver without any problems.

Then rebooted - an don't see NIC neither in ifconfig -a, nor in dmesg:
dmesg | grep tn4 returns just empty set.

Any suggestions, what can be missing?

MV88X3310 initdata not applied. Expected bit 4 to be 1, read 0x004B

Trying to install ver 001 of the driver for the TN9710P cards. I can see tn40xxx driver in lsmod, but dmesg gives:

[  285.738854] Driver unloaded
[  293.097779] Tehuti Network Driver, 0.3.6.16.1
[  293.097782] Supported phys :  MV88X3310  QT2025 TLK10232  MUSTANG 
[  293.098084] srom 0x0 HWver 16 build 0 lane# 4 max_pl 0x1 mrrs 0x2
[  293.334129] PHY detected on port 0 ID=2B09AB - MV88X3310 (A1) 10Gbps 10GBase-T
[  297.274249] MV88X3310 initdata not applied. Expected bit 4 to be 1, read 0x004B

OS: Ubuntu 20.04, kernetl 5.1.21

rxd_err = 0x10

The tn40xx driver is continuously printing "rxd_err = 0x10" to the kernel log.
The message is logged with error severity and indicates a TCP checksum error.

[178130.688609] tn40xx: loading out-of-tree module taints kernel.
[178130.688919] tn40xx: module verification failed: signature and/or required key missing - tainting kernel
[178130.691125] Tehuti Network Driver, 0.3.6.16.1
[178130.691127] Supported phys : QT2025 TLK10232 AQR105 MUSTANG
[178130.691402] srom 0x0 HWver 16 build 0 lane# 4 max_pl 0x1 mrrs 0x2
[178130.927129] PHY detected on port 1 ID=43A400 - QT2025 10Gbps SFP+
[178132.554209] QT2025 FW version 2.0.3.3 module type 0x4
[178132.569387] tn40xx 0000:01:00.0 enp1s0: renamed from eth0
[178132.657703] fw 0xe
[178132.657714] enp1s0, Port A
[178132.657728] 1 1fc9:4022:1fc9:3015
[178132.657747] detected 1 cards, 1 loaded
[178132.678580] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[178132.788944] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[178135.014124] enp1s0 Link Up 10G
[178135.014159] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
[178138.497468] rxd_err = 0x10
[178139.496917] rxd_err = 0x10
[178139.520752] rxd_err = 0x10
[178141.544918] rxd_err = 0x10
[178141.568767] rxd_err = 0x10
[178145.576895] rxd_err = 0x10
[178145.599649] rxd_err = 0x10
[178153.705395] rxd_err = 0x10
[178153.728670] rxd_err = 0x10
[178208.829274] rxd_err = 0x10
[178209.879790] rxd_err = 0x10
[178210.900655] rxd_err = 0x10
[178211.918293] rxd_err = 0x10
[178213.972620] rxd_err = 0x10
[178215.948609] rxd_err = 0x10

Problem with nvidia Jetson TX2 board

I want to run nvdia Jetson TX2 board with tn40xx driver.
Kernal driver building is fine.
when connected network, Kernal driver was crashed.

Below is My system information.

Hardware information
board : nvidia jetson tx2

Kernel information
Linux tegra-ubuntu 4.4.38 #47 SMP PREEMPT Fri Aug 24 16:57:06 KST 2018 aarch64 aarch64 aarch64 GNU/Linux

Git information

git remote : https://github.com/acooks/tn40xx-driver.git
branch     : release/tn40xx-001 
commit id  : c3b4acd011c749a7442c4ed1c0c4aa44cdd05a95

PCIe interface information

nvidia@tegra-ubuntu:~$ lspci -x
00:01.0 PCI bridge: NVIDIA Corporation Device 10e5 (rev a1)
00: de 10 e5 10 06 00 10 00 a1 00 04 06 00 00 01 00
10: 00 00 00 00 00 00 00 00 00 01 01 00 f1 01 00 00
20: f0 ff 00 00 01 58 01 58 00 00 00 00 00 00 00 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 84 01 00 00

01:00.0 Ethernet controller: Tehuti Networks Ltd. TN9510 10GBase-T/NBASE-T Ethernet Adapter
00: c9 1f 25 40 00 00 10 00 00 00 00 02 00 00 00 00
10: 0c 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 c9 1f 15 30
30: 00 00 00 00 50 00 00 00 00 00 00 00 84 01 00 00

When crashed, below is kernel log information

[ 2147.302751] Tehuti Network Driver, 0.3.6.16.1
[ 2147.307245] Supported phys : MV88X3120   QT2025 TLK10232 AQR105 MUSTANG
[ 2147.314745] tn40xx 0000:01:00.0: enabling device (0000 -> 0002)
[ 2147.320800] srom 0x0 HWver 16 build 0 lane# 4 max_pl 0x0 mrrs 0x2
[ 2147.566598] PHY detected on port 1 ID=3A1B4A3 - AQR105 10Gbps 10GBase-T
[ 2155.234683] AQR105 FW ver: 2.b.e2
[ 2155.366908] fw 0xe
[ 2155.368973] eth1, Port A
[ 2155.370834] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 2155.377378] 1 1fc9:4025:1fc9:3015
[ 2155.380707] detected 1 cards, 1 loaded
[ 2155.484325] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 2155.490334] 8021q: adding VLAN 0 to HW filter on device eth1
[ 2159.528777] eth1 Link Up 1G
[ 2159.531729] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 2194.505184] BUG: Bad page state in process swapper/0  pfn:229f00
[ 2194.511272] page:ffffffbdc8a7c000 count:0 mapcount:0 mapping:          (null) index:0x0
[ 2194.519374] flags: 0x4000000000000200(arch_1)
[ 2194.523810] page dumped because: PAGE_FLAGS_CHECK_AT_PREP flag set
[ 2194.530061] bad because of flags:
[ 2194.533417] flags: 0x200(arch_1)
[ 2194.536724] Modules linked in: tn40xx(O) fuse ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 xt_addrtype iptable_filter ip_tables xt_conntrack nf_nat br_netfilter overlay mttcan can_dev bcmdhd pci_tegra bluedroid_pm
[ 2194.557568] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O    4.4.38 #47
[ 2194.564812] Hardware name: quill (DT)
[ 2194.568485] Call trace:
[ 2194.570965] [<ffffffc000089398>] dump_backtrace+0x0/0xe8
[ 2194.576293] [<ffffffc000089494>] show_stack+0x14/0x20
[ 2194.581363] [<ffffffc00034c4d0>] dump_stack+0xa0/0xc8
[ 2194.586430] [<ffffffc00017b51c>] bad_page+0xcc/0x118
[ 2194.591411] [<ffffffc00017f834>] get_page_from_freelist+0xa84/0xa88
[ 2194.597691] [<ffffffc00017fb74>] __alloc_pages_nodemask+0x134/0x9d0
[ 2194.604002] [<ffffffbffcf4e40c>] bdx_rx_get_page+0x6c/0x1b0 [tn40xx]
[ 2194.610387] [<ffffffbffcf505e4>] _bdx_rx_alloc_buffers+0x234/0x4d8 [tn40xx]
[ 2194.617376] [<ffffffbffcf50d8c>] bdx_poll+0x504/0xaf8 [tn40xx]
[ 2194.623224] [<ffffffc0009f4280>] net_rx_action+0x1d0/0x340
[ 2194.628726] [<ffffffc0000a844c>] __do_softirq+0x124/0x350
[ 2194.634134] [<ffffffc0000a88f8>] irq_exit+0x88/0xe0
[ 2194.639026] [<ffffffc0000f65f0>] __handle_domain_irq+0x60/0xb8
[ 2194.644870] [<ffffffc000081774>] gic_handle_irq+0x64/0xc0
[ 2194.650280] [<ffffffc000084740>] el1_irq+0x80/0xf8
[ 2194.655090] [<ffffffc00082d610>] cpuidle_enter+0x18/0x20
[ 2194.660412] [<ffffffc0000e9214>] call_cpuidle+0x24/0x50
[ 2194.665648] [<ffffffc0000e94b0>] cpu_startup_entry+0x270/0x340
[ 2194.671495] [<ffffffc000b8ead8>] rest_init+0x88/0x98
[ 2194.676477] [<ffffffc00114196c>] start_kernel+0x390/0x3a4
[ 2194.681883] [<0000000080b95000>] 0x80b95000
[ 2194.686128] Disabling lock debugging due to kernel taint
[ 2204.563044] BUG: Bad page state in process swapper/0  pfn:24f7c0
[ 2204.569134] page:ffffffbdc93df000 count:0 mapcount:0 mapping:          (null) index:0x0
[ 2204.577214] flags: 0x4000000000000200(arch_1)
[ 2204.581658] page dumped because: PAGE_FLAGS_CHECK_AT_PREP flag set
[ 2204.587872] bad because of flags:
[ 2204.591221] flags: 0x200(arch_1)
[ 2204.594530] Modules linked in: tn40xx(O) fuse ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 xt_addrtype iptable_filter ip_tables xt_conntrack nf_nat br_netfilter overlay mttcan can_dev bcmdhd pci_tegra bluedroid_pm
[ 2204.615353] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G    B      O    4.4.38 #47
[ 2204.622607] Hardware name: quill (DT)
[ 2204.626279] Call trace:
[ 2204.628757] [<ffffffc000089398>] dump_backtrace+0x0/0xe8
[ 2204.634087] [<ffffffc000089494>] show_stack+0x14/0x20
[ 2204.639158] [<ffffffc00034c4d0>] dump_stack+0xa0/0xc8
[ 2204.644225] [<ffffffc00017b51c>] bad_page+0xcc/0x118
[ 2204.649205] [<ffffffc00017f834>] get_page_from_freelist+0xa84/0xa88
[ 2204.655482] [<ffffffc00017fb74>] __alloc_pages_nodemask+0x134/0x9d0
[ 2204.661791] [<ffffffbffcf4e40c>] bdx_rx_get_page+0x6c/0x1b0 [tn40xx]
[ 2204.668177] [<ffffffbffcf505e4>] _bdx_rx_alloc_buffers+0x234/0x4d8 [tn40xx]
[ 2204.675167] [<ffffffbffcf50d8c>] bdx_poll+0x504/0xaf8 [tn40xx]
[ 2204.681016] [<ffffffc0009f4280>] net_rx_action+0x1d0/0x340
[ 2204.686514] [<ffffffc0000a844c>] __do_softirq+0x124/0x350
[ 2204.691922] [<ffffffc0000a88f8>] irq_exit+0x88/0xe0
[ 2204.696815] [<ffffffc0000f65f0>] __handle_domain_irq+0x60/0xb8
[ 2204.702656] [<ffffffc000081774>] gic_handle_irq+0x64/0xc0
[ 2204.708065] [<ffffffc000084740>] el1_irq+0x80/0xf8
[ 2204.712874] [<ffffffc00082d610>] cpuidle_enter+0x18/0x20
[ 2204.718197] [<ffffffc0000e9214>] call_cpuidle+0x24/0x50
[ 2204.723433] [<ffffffc0000e94b0>] cpu_startup_entry+0x270/0x340
[ 2204.729279] [<ffffffc000b8ead8>] rest_init+0x88/0x98
[ 2204.734261] [<ffffffc00114196c>] start_kernel+0x390/0x3a4
[ 2204.739667] [<0000000080b95000>] 0x80b95000
[ 2216.473609] BUG: Bad page state in process swapper/0  pfn:220440
[ 2216.479712] page:ffffffbdc8811000 count:0 mapcount:0 mapping:          (null) index:0x0
[ 2216.487770] flags: 0x4000000000000200(arch_1)
[ 2216.492201] page dumped because: PAGE_FLAGS_CHECK_AT_PREP flag set
[ 2216.498452] bad because of flags:
[ 2216.501807] flags: 0x200(arch_1)
[ 2216.505106] Modules linked in: tn40xx(O) fuse ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 xt_addrtype iptable_filter ip_tables xt_conntrack nf_nat br_netfilter overlay mttcan can_dev bcmdhd pci_tegra bluedroid_pm
[ 2216.525920] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G    B      O    4.4.38 #47
[ 2216.533175] Hardware name: quill (DT)
[ 2216.536848] Call trace:
[ 2216.539325] [<ffffffc000089398>] dump_backtrace+0x0/0xe8
[ 2216.544659] [<ffffffc000089494>] show_stack+0x14/0x20
[ 2216.549731] [<ffffffc00034c4d0>] dump_stack+0xa0/0xc8
[ 2216.554798] [<ffffffc00017b51c>] bad_page+0xcc/0x118
[ 2216.559776] [<ffffffc00017f834>] get_page_from_freelist+0xa84/0xa88
[ 2216.566054] [<ffffffc00017fb74>] __alloc_pages_nodemask+0x134/0x9d0
[ 2216.572364] [<ffffffbffcf4e40c>] bdx_rx_get_page+0x6c/0x1b0 [tn40xx]
[ 2216.578749] [<ffffffbffcf505e4>] _bdx_rx_alloc_buffers+0x234/0x4d8 [tn40xx]
[ 2216.585739] [<ffffffbffcf50d8c>] bdx_poll+0x504/0xaf8 [tn40xx]
[ 2216.591588] [<ffffffc0009f4280>] net_rx_action+0x1d0/0x340
[ 2216.597087] [<ffffffc0000a844c>] __do_softirq+0x124/0x350
[ 2216.602496] [<ffffffc0000a88f8>] irq_exit+0x88/0xe0
[ 2216.607387] [<ffffffc0000f65f0>] __handle_domain_irq+0x60/0xb8
[ 2216.613227] [<ffffffc000081774>] gic_handle_irq+0x64/0xc0
[ 2216.618638] [<ffffffc000084740>] el1_irq+0x80/0xf8
[ 2216.623447] [<ffffffc00082d610>] cpuidle_enter+0x18/0x20
[ 2216.628770] [<ffffffc0000e9214>] call_cpuidle+0x24/0x50
[ 2216.634006] [<ffffffc0000e94b0>] cpu_startup_entry+0x270/0x340
[ 2216.639852] [<ffffffc000b8ead8>] rest_init+0x88/0x98
[ 2216.644834] [<ffffffc00114196c>] start_kernel+0x390/0x3a4
[ 2216.650241] [<0000000080b95000>] 0x80b95000

PTP disabled

Hi,

is there a reason that PTP support is disabled by default?

In the header tn40.h uncommenting TN40_PTP allows me to use PTP and it doesn't appear to have any negative side effects...

StarTech ST10GSPEXNDP dual port naming support.

This is on a Debian-derived 5.2.17-1rodete3-amd64 system.

[161345.272682] Tehuti Network Driver, 0.3.6.17.2
[161345.272687] Supported phys : MV88X3120 MV88X3310 QT2025 TLK10232 AQR105 MUSTANG
[161345.272827] tn40xx 0000:05:00.0: enabling device (0100 -> 0102)
[161345.273004] srom 0x0 HWver 16 build 0 lane# 4 max_pl 0x1 mrrs 0x3
[161345.512548] PHY detected on port 0 ID=2B09AB - MV88X3310 (A1) 10Gbps 10GBase-T
[161349.016591] MV88X3310 initdata applied
[161349.016681] MV88X3310 I/D version is 0.3.4.0
[161349.136631] tn40xx 0000:05:00.0 ens6: renamed from eth1 <-- should be ens6f0
[161349.217708] fw 0xe
[161349.217717] ens6, Port A
[161349.217864] 1 1fc9:4027:1fc9:3015
[161349.217865] 2 1fc9:4027:1fc9:3015
[161349.218018] detected 2 cards, 1 loaded
[161349.218157] tn40xx 0000:06:00.0: enabling device (0100 -> 0102)
[161349.218269] srom 0x0 HWver 16 build 0 lane# 4 max_pl 0x1 mrrs 0x3
[161349.452670] PHY detected on port 0 ID=2B09AB - MV88X3310 (A1) 10Gbps 10GBase-T
[161352.728538] MV88X3310 initdata applied
[161352.728625] MV88X3310 I/D version is 0.3.4.0
[161352.929688] fw 0xe
[161352.929697] eth1, Port A
[161352.929838] 1 1fc9:4027:1fc9:3015
[161352.929839] 2 1fc9:4027:1fc9:3015
[161352.929992] detected 2 cards, 2 loaded

Here's how a StarTech ST10GPEXNDPI nic (this is a 2-port PCIe 10GBase-T / NBASE-T Ethernet Network Card - with Intel X550 Chip) shows up:
4: ens4f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
5: ens4f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000

Here's how the above
7: ens6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 3000
8: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 3000

Basically this should have been ens6f0 (not ens6) and ens6f1 (not eth1).

I'm not entirely sure what causes the issue... is this a driver problem? An incorrect uevent issue? Missing udev config?

Obviously the intel (ixgbe) nic gets it right...

Linux 4.15

Hello!

Does anyone try to build this driver for Linux 4.15? I tried it:

make: Entering directory '/usr/src/linux-headers-4.15.17-1-pve' make[1]: *** No rule to make target '/root/tn40xx-driver/tn40.o', needed by '/root/tn40xx-driver/tn40xx.o'. Stop. Makefile:1552: recipe for target '_module_/root/tn40xx-driver' failed make: *** [_module_/root/tn40xx-driver] Error 2 make: Leaving directory '/usr/src/linux-headers-4.15.17-1-pve'

P.S. Linux 4.13 built without errors

rxd_err = 0x4

I have a PEX10000SFP and, although the installation was successful, I keep getting a 'rxd_err = 0x4' in the kernel log. A speed test shows it is properly installed but this error keeps happening. Any ideas?

Trying to build for MV88E2010/TN9710Q but I get error MV88E2010_phy.h: No such file or directory

I'm trying to build the driver for support of MV88E2010/TN9710Q

make  MV88E2010=YES
make -C /lib/modules/5.10.0-21-amd64/build M=/home/router/tehuti2 clean
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-21-amd64'
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-21-amd64'
Building kernel 5.10.0-21-amd64 resume supported
make -C /lib/modules/5.10.0-21-amd64/build M=/home/router/tehuti2 modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-21-amd64'
  CC [M]  /home/router/tehuti2/tn40.o
  CC [M]  /home/router/tehuti2/CX4.o
  CC [M]  /home/router/tehuti2/CX4_Linux.o
  CC [M]  /home/router/tehuti2/MV88X3310_phy.o
/home/router/tehuti2/MV88X3310_phy.c:6:10: fatal error: MV88E2010_phy.h: No such file or directory
    6 | #include "MV88E2010_phy.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/usr/src/linux-headers-5.10.0-21-common/scripts/Makefile.build:291: /home/router/tehuti2/MV88X3310_phy.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.10.0-21-common/Makefile:1861: /home/router/tehuti2] Error 2
make[1]: *** [/usr/src/linux-headers-5.10.0-21-common/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-21-amd64'
make: *** [Makefile:147: all] Error 2

I have searched everywhere for a MV88E2010_phy.h file, and it's nowhere; not even in the original vendor source. Am I SoL on trying to build a Linux driver for the TN9710Q card?

THANKS!
-Zac

ethtool coalesce compiling problem on all kernels

Hello there,

I keep getting this problem on every linux OS I try:

make: Entering directory '/usr/src/linux-headers-5.15.30-2-pve'
CC [M] /var/lib/dkms/tn40xx/004/build/tn40.o
CC [M] /var/lib/dkms/tn40xx/004/build/CX4.o
CC [M] /var/lib/dkms/tn40xx/004/build/CX4_Linux.o
CC [M] /var/lib/dkms/tn40xx/004/build/QT2025_phy.o
/var/lib/dkms/tn40xx/004/build/tn40.c: In function ‘bdx_ethtool_ops’:
/var/lib/dkms/tn40xx/004/build/tn40.c:4097:19: error: initialization of ‘int (*)(struct net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *, struct netlink_ext_ack )’ from incompatible > 4097 | .get_coalesce = bdx_get_coalesce,
| ^~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/004/build/tn40.c:4097:19: note: (near initialization for ‘bdx_ethtool_ops.get_coalesce’)
/var/lib/dkms/tn40xx/004/build/tn40.c:4098:19: error: initialization of ‘int (
)(struct net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)’ from incompatible > 4098 | .set_coalesce = bdx_set_coalesce,
| ^~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/004/build/tn40.c:4098:19: note: (near initialization for ‘bdx_ethtool_ops.set_coalesce’)
CC [M] /var/lib/dkms/tn40xx/004/build/QT2025_phy_Linux.o
CC [M] /var/lib/dkms/tn40xx/004/build/TLK10232_phy.o
CC [M] /var/lib/dkms/tn40xx/004/build/TLK10232_phy_Linux.o
CC [M] /var/lib/dkms/tn40xx/004/build/AQR105_phy.o
CC [M] /var/lib/dkms/tn40xx/004/build/AQR105_phy_Linux.o
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:285: /var/lib/dkms/tn40xx/004/build/tn40.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1875: /var/lib/dkms/tn40xx/004/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.30-2-pve'

I cannot figure out what I am doing wrong, I have a Edimax card with Tehuti Networks Ltd. TN9310 10GbE SFP+ Ethernet Adapter

How to install driver on Debian 10

I have Tehuti Networks Ltd. TN9710P and can`t use it on debian 10

I am trying to install driver with dkms, but its dont work

Help plz, what can i do with it ?

Mustang-200 confirmed working. Also Thanks !

I don't know whether you want to collect those but here I go:

I was fed-up with the lack of support from Qnap on the Mustang-200 card. (Virtualization station broke networking, updates broke networking, etc.) So to salvage my (wasted) money I decided to setup linux on it.

Long story short: Debian 10 (proxmox 6 actually but it's a debian based distro) on both host and Mustang-200 nodes works fine using the dkms instructions. Not sure of performance or long term stability yet.

Thanks!

Support for Thunderbolt version of the Tehuti Networks Ltd. TN9710P 10GBase-T/NBASE-T Ethernet Adapter

Should this driver work with a thunderbolt version of this card? its a Startech product, lspci gives me this:
06:00.0 Ethernet controller: Tehuti Networks Ltd. TN9710P 10GBase-T/NBASE-T Ethernet Adapter

I have installed the driver with the firmware x3310fw_0_3_4_0_9445.hdr and used DKMS, but I can't get this to work. I have tried with Oracle Linux 8 both types of kernels: 4.18.0-240.el8.x86_64 & 5.4.17-2036.102.0.2.el8uek.x86_64

i don't get any errors during install.

Cheers

rxd_err = 0x8

Hi Friends! Thank you so much on your awesome work on this driver!!

We are running a 10gbit solution with your drivers on multiple machines. Our machines seem to lock up after a few days like clockwork. It starts giving rxd_err = 0x8 about a page full then the machine hard locks.

error is: rxd_err = 0x8
adapter model number is: Edimax EN-9320SFP+
kernel version: 4.15.18-30
driver version = latest (7months ago github)

Please advise what we can try?

Kernel memory leak in version 004

We've upgraded to 004 version a month ago and since that upgrade we've seen a lot of weird memory issues.

After weeks of debugging I am sure it is because of 004 version. When I downgraded to 003 all went back to normal.

These memory issues caused kernel dynamic memory reported by smem -w to grow steadily. In the end the server always froze completely because OOM killer was not able to kill any process to free memory. Unfortunately, I have no more debug details from kernel since I am not able to compile custom kernel on this server.

We are running Debian Buster with this kernel:

$ uname   -a
Linux starkiller 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux

I've also tried upgrading kernel from Debian Buster backports but it didn't help.

Our network card details from lspci:

09:00.0 Ethernet controller: Tehuti Networks Ltd. TN9510 10GBase-T/NBASE-T Ethernet Adapter
	Subsystem: Tehuti Networks Ltd. Ethernet Adapter
	Flags: bus master, fast devsel, latency 0, IRQ 119, NUMA node 0
	Memory at ba000000 (64-bit, prefetchable) [size=64K]
	Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [78] Power Management version 3
	Capabilities: [80] Express Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Kernel driver in use: tn40xx
	Kernel modules: tn40xx

Fails to build against kernel 5.15.2-zen1-1-zen on arch linux

This broke when the ethtool coalesce api was extended in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f3ccfda1931977b80267ba54070a1aeafa18f6ca

DKMS output:

[root@a3 sk]# dkms install tn40xx/004 -k 5.15.2-zen1-1-zen
Deprecated feature: REMAKE_INITRD

Building module:
cleaning build area...
make -j32 KERNELRELEASE=5.15.2-zen1-1-zen -C /usr/lib/modules/5.15.2-zen1-1-zen/build M=/var/lib/dkms/tn40xx/004/build KVERSION=5.15.2-zen1-1-zen...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.2-zen1-1-zen (x86_64)
Consult /var/lib/dkms/tn40xx/004/build/make.log for more information.

/var/lib/dkms/tn40xx/004/build/make.log:

DKMS make.log for tn40xx-004 for kernel 5.15.2-zen1-1-zen (x86_64)
Mon Nov 15 12:29:15 PM EST 2021
make: Entering directory '/usr/lib/modules/5.15.2-zen1-1-zen/build'
  CC [M]  /var/lib/dkms/tn40xx/004/build/tn40.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/CX4.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/CX4_Linux.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/QT2025_phy.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/QT2025_phy_Linux.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/TLK10232_phy.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/TLK10232_phy_Linux.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/AQR105_phy.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/AQR105_phy_Linux.o
/var/lib/dkms/tn40xx/004/build/tn40.c: In function ‘bdx_ethtool_ops’:
/var/lib/dkms/tn40xx/004/build/tn40.c:4097:33: 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]
 4097 |                 .get_coalesce = bdx_get_coalesce,
      |                                 ^~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/004/build/tn40.c:4097:33: note: (near initialization for ‘bdx_ethtool_ops.get_coalesce’)
/var/lib/dkms/tn40xx/004/build/tn40.c:4098:33: 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]
 4098 |                 .set_coalesce = bdx_set_coalesce,
      |                                 ^~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/004/build/tn40.c:4098:33: note: (near initialization for ‘bdx_ethtool_ops.set_coalesce’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:277: /var/lib/dkms/tn40xx/004/build/tn40.o] Error 1
make: *** [Makefile:1863: /var/lib/dkms/tn40xx/004/build] Error 2
make: Leaving directory '/usr/lib/modules/5.15.2-zen1-1-zen/build'

quick patch which fixed it for me:

diff --git a/mnt/code/tn40xx-driver/tn40.c b/usr/src/tn40xx-004/tn40.c
index 51d1f06..0e80582 100644
--- a/mnt/code/tn40xx-driver/tn40.c
+++ b/usr/src/tn40xx-004/tn40.c
@@ -3771,7 +3771,7 @@ bdx_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
  * @ecoal
  */
 static int
-bdx_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ecoal)
+bdx_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ecoal, struct kernel_ethtool_coalesce *kernel_coal, struct netlink_ext_ack *extack)
 {
        u32 rdintcm;
        u32 tdintcm;
@@ -3803,7 +3803,7 @@ bdx_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ecoal)
  * @ecoal
  */
 static int
-bdx_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ecoal)
+bdx_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ecoal, struct kernel_ethtool_coalesce *kernel_coal, struct netlink_ext_ack *extack)
 {
        u32 rdintcm;
        u32 tdintcm;

a proper patch would need to have docs for the new params, and have version guards

Error install on ml kernel 6.2.5 almalinux 9

make: Entering directory '/usr/src/kernels/6.2.5-1.el9.elrepo.x86_64'
CC [M] /var/lib/dkms/tn40xx/004/build/tn40.o
CC [M] /var/lib/dkms/tn40xx/004/build/CX4.o
CC [M] /var/lib/dkms/tn40xx/004/build/CX4_Linux.o
CC [M] /var/lib/dkms/tn40xx/004/build/QT2025_phy.o
CC [M] /var/lib/dkms/tn40xx/004/build/QT2025_phy_Linux.o
CC [M] /var/lib/dkms/tn40xx/004/build/TLK10232_phy.o
CC [M] /var/lib/dkms/tn40xx/004/build/TLK10232_phy_Linux.o
CC [M] /var/lib/dkms/tn40xx/004/build/AQR105_phy.o
In file included from /var/lib/dkms/tn40xx/004/build/tn40.c:9:
/var/lib/dkms/tn40xx/004/build/tn40.c: In function ‘bdx_probe’:
/var/lib/dkms/tn40xx/004/build/tn40.h:885:19: error: too many arguments to function ‘netif_napi_add’
885 | netif_napi_add(dev, napi, poll, weight)
| ^~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/004/build/tn40.c:3577:9: note: in expansion of macro ‘LUXOR__NAPI_ADD’
3577 | LUXOR__NAPI_ADD(ndev, &priv->napi, bdx_poll, 64);
| ^~~~~~~~~~~~~~~
In file included from /var/lib/dkms/tn40xx/004/build/tn40.h:16,
from /var/lib/dkms/tn40xx/004/build/tn40.c:9:
./include/linux/netdevice.h:2586:1: note: declared here
2586 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
| ^~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:252: /var/lib/dkms/tn40xx/004/build/tn40.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:2021: /var/lib/dkms/tn40xx/004/build] Error 2
make: Leaving directory '/usr/src/kernels/6.2.5-1.el9.elrepo.x86_64'

error: unknown field ‘ndo_change_mtu’ specified in initializer (Install fails on CentOS7 - kernel 3.10.0-1160.80.1.el7.x86_64)

I am trying to install the driver on a CentOS7 server, but the installer exit with this error in log:
/var/lib/dkms/tn40xx/004/build/tn40.c:3387:2: error: unknown field ‘ndo_change_mtu’ specified in initializer

I found a workaround inserting this line in /usr/src/tn40xx-004/tn40.h
#define ndo_change_mtu ndo_change_mtu_rh74

But then I have other errors to solve:
/var/lib/dkms/tn40xx/004/build/tn40.c:3556:6: error: ‘struct net_device’ has no member named ‘min_mtu’
/var/lib/dkms/tn40xx/004/build/tn40.c:3557:6: error: ‘struct net_device’ has no member named ‘max_mtu’

Unable to build on Debian 10 (OpenMediaVault)

Hello, I'm only getting this as a result:

root@openmediavault:/usr/src/tn40xx-002# dkms install -m tn40xx -v 002

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j2 KERNELRELEASE=5.2.0-0.bpo.3-amd64 -C /lib/modules/5.2.0-0.bpo.3-amd64/build M=/var/lib/dkms/tn40xx/002/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.2.0-0.bpo.3-amd64 (x86_64)
Consult /var/lib/dkms/tn40xx/002/build/make.log for more information.

I followed the instructions.
https://github.com/acooks/tn40xx-driver/blob/release/tn40xx-002/docs/dkms.md
Even with this great manual, which once worked for Debian 9, it doesn't work anymore.
https://noobient.com/2018/08/10/edimax-en-9320tx-e-10gbe-ethernet-card-on-ubuntu/

Debian 10
OpenMediaVaul 5.0.10-1

Problem with .hdr file versions

The currrent version of the Readme file says this:

For TN9710P (DeviceID 4027) please obtain the file x3310fw_0_3_3_0_9374.hdr
For TN9710Q (DeviceID 4527) please obtain the file e2010fw_0_3_3_0_9374.hdr
If you are missing these exact files, the driver will compile without support for these PHYs

However the actual versions of these files in the repository are:
x3310fw_0_2_8_0_8850.hdr
e2010fw_0_2_8_0_8850.hdr

So they are not the latest versions referred to in the Readme. When I build the driver on Centos 7 it does not find my TN9710P based card. Is it likely this is because it is using the wrong .hdr files?

Unable to install with Kernel 5.18.0-0.deb11.4


Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j40 KERNELRELEASE=5.18.0-0.deb11.4-amd64 -C /lib/modules/5.18.0-0.deb11.4-amd64/build M=/var/lib/dkms/tn40xx/004/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.18.0-0.deb11.4-amd64 (x86_64)
Consult /var/lib/dkms/tn40xx/004/build/make.log for more information.```

[make.log](https://github.com/acooks/tn40xx-driver/files/9530564/make.log)

driver doesn't compile at 5.4.x Kernel

Hi,
Ive tried to compile the Tehuti 40xx-drive for a newer 5.4.x-Kernel, but unfortunatly it didnt work. Ive attached the compiler log for seeing, what happened. It seems probably a compiler issue of a newer ggc. The System is an Ubuntu 18.04.4 64bit Server Installation.

Tfh!
Oliver
compile-log.txt

kernel 5 fix

tn40xx - Linux kernel 5 fix

Tn40xx driver does not compile against Linux kernel 5.x.

procedure for reproducing this fix

git clone https://github.com/acooks/tn40xx-driver.git
cd tn40xx-driver
sed -ie 's/__ETHTOOL_LINK_MODE_LAST+1/__ETHTOOL_LINK_MODE_MASK_NBITS/' *_Linux.c

Acooks driver

This patch will be proposed as a fix to Acooks. If you did download it,
it's not mandatory to download this repository instead of the original one. You only have to patch the files.

DKMS way

cd /usr/src/tn40xx-002
sed -ie 's/__ETHTOOL_LINK_MODE_LAST+1/__ETHTOOL_LINK_MODE_MASK_NBITS/' *_Linux.c
dkms install -m tn40xx -v 002

manual compile way

cd wherever you did download the driver
sed -ie 's/__ETHTOOL_LINK_MODE_LAST+1/__ETHTOOL_LINK_MODE_MASK_NBITS/' *_Linux.c
make

explanation

Kernel 4.x headers include the file "ethtool.h", that contains:

/* number of link mode bits/ulongs handled internally by kernel */
#define __ETHTOOL_LINK_MODE_MASK_NBITS                  \
        (__ETHTOOL_LINK_MODE_LAST + 1)

__ETHTOOL_LINK_MODE_LAST is not defined anymore in kernel 5.x, but __ETHTOOL_LINK_MODE_MASK_NBITS still exists.

Replacing "__ETHTOOL_LINK_MODE_LAST+1" by "__ETHTOOL_LINK_MODE_MASK_NBITS" solves the problem.

Files modified:

  • AQR105_phy_Linux.c
  • MV88X3120_phy_Linux.c
  • MV88X3310_phy_Linux.c

compile error

make -C /lib/modules/5.3.13-1-pve/build M=/root/tn40xx-driver clean
make[1]: Entering directory '/usr/src/linux-headers-5.3.13-1-pve'
make[1]: Leaving directory '/usr/src/linux-headers-5.3.13-1-pve'
Building kernel 5.3.13-1-pve resume supported
make -C /lib/modules/5.3.13-1-pve/build M=/root/tn40xx-driver modules 
make[1]: Entering directory '/usr/src/linux-headers-5.3.13-1-pve'
  CC [M]  /root/tn40xx-driver/tn40.o
  CC [M]  /root/tn40xx-driver/CX4.o
  CC [M]  /root/tn40xx-driver/CX4_Linux.o
  CC [M]  /root/tn40xx-driver/QT2025_phy.o
  CC [M]  /root/tn40xx-driver/QT2025_phy_Linux.o
  CC [M]  /root/tn40xx-driver/TLK10232_phy.o
  CC [M]  /root/tn40xx-driver/TLK10232_phy_Linux.o
  CC [M]  /root/tn40xx-driver/AQR105_phy.o
  CC [M]  /root/tn40xx-driver/AQR105_phy_Linux.o
/root/tn40xx-driver/AQR105_phy_Linux.c: In function ‘AQR105_set_link_mode’:
/root/tn40xx-driver/AQR105_phy_Linux.c:92:28: error: ‘__ETHTOOL_LINK_MODE_LAST’ undeclared (first use in this function); did you mean ‘__ETHTOOL_LINK_MODE_MASK_NBITS’?
 #define AQR105_ALL_SPEEDS (__ETHTOOL_LINK_MODE_LAST+1)
                            ^~~~~~~~~~~~~~~~~~~~~~~~
/root/tn40xx-driver/AQR105_phy_Linux.c:99:15: note: in expansion of macro ‘AQR105_ALL_SPEEDS’
  if (speed == AQR105_ALL_SPEEDS) {
               ^~~~~~~~~~~~~~~~~
/root/tn40xx-driver/AQR105_phy_Linux.c:92:28: note: each undeclared identifier is reported only once for each function it appears in
 #define AQR105_ALL_SPEEDS (__ETHTOOL_LINK_MODE_LAST+1)
                            ^~~~~~~~~~~~~~~~~~~~~~~~
/root/tn40xx-driver/AQR105_phy_Linux.c:99:15: note: in expansion of macro ‘AQR105_ALL_SPEEDS’
  if (speed == AQR105_ALL_SPEEDS) {
               ^~~~~~~~~~~~~~~~~
/root/tn40xx-driver/AQR105_phy_Linux.c: In function ‘AQR105_get_link_ksettings’:
/root/tn40xx-driver/AQR105_phy_Linux.c:92:28: error: ‘__ETHTOOL_LINK_MODE_LAST’ undeclared (first use in this function); did you mean ‘__ETHTOOL_LINK_MODE_MASK_NBITS’?
 #define AQR105_ALL_SPEEDS (__ETHTOOL_LINK_MODE_LAST+1)
                            ^~~~~~~~~~~~~~~~~~~~~~~~
/root/tn40xx-driver/AQR105_phy_Linux.c:133:50: note: in expansion of macro ‘AQR105_ALL_SPEEDS’
  AQR105_set_link_mode(cmd->link_modes.supported, AQR105_ALL_SPEEDS);
                                                  ^~~~~~~~~~~~~~~~~
/root/tn40xx-driver/AQR105_phy_Linux.c: In function ‘AQR105_set_link_ksettings’:
/root/tn40xx-driver/AQR105_phy_Linux.c:92:28: error: ‘__ETHTOOL_LINK_MODE_LAST’ undeclared (first use in this function); did you mean ‘__ETHTOOL_LINK_MODE_MASK_NBITS’?
 #define AQR105_ALL_SPEEDS (__ETHTOOL_LINK_MODE_LAST+1)
                            ^~~~~~~~~~~~~~~~~~~~~~~~
/root/tn40xx-driver/AQR105_phy_Linux.c:158:48: note: in expansion of macro ‘AQR105_ALL_SPEEDS’
   AQR105_set_link_mode(priv->link_advertising, AQR105_ALL_SPEEDS);
                                                ^~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:290: /root/tn40xx-driver/AQR105_phy_Linux.o] Error 1
make[1]: *** [Makefile:1655: _module_/root/tn40xx-driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.3.13-1-pve'
make: *** [Makefile:147: all] Error 2

Tehuti Networks out of business - driver forking and maintenance

Tehuti Networks posted the following notice on LinkedIn:

After 16 years, Tehuti Networks is closing its doors.

I had the privilege of serving as the company's COO for the last 9 years in which we have made
extraordinary achievements in bringing 10GbE to the Consumer market.
Unfortunately, the market did not grow at the expected rate and we had to make the tough call.

I'd like to thank our investors, Proseed Venture Capital Fund Ltd. and especially Mr. Ligad Rotlevy, Mr. Moshe Shahaf, Mr. Niv Sarne and Mr. Shai Levy for providing me with this opportunity and believing in what we do throughout these years.
I'd like to thank the small, amazing team of employees working hard to make this happen.
I'd like to thank our customers, partners and vendors for taking this journey with us.

It's been a hell of a ride!
Thank you all!
Nir Sever.

In light of this announcement, I do not expect to see ongoing development or maintenance releases from Tehuti. Effectively, there is no more upstream vendor for this driver.

On the positive side, this makes it much easier to refactor and develop the driver without having to prepare for future upstream changes. Going forward, the development workflow will be much simpler, with a more standard branching and merging model.

Leave a comment if you have strong feelings about the future of this driver.

Issues with Debian 11 Installation with pve-headers

I get the following error when performing a dkms installation as per the following command:


Command:

dkms install -m tn40xx -v 004

Output:


Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j64 KERNELRELEASE=5.15.53-1-pve -C /lib/modules/5.15.53-1-pve/build M=/var/lib/dkms/tn40xx/004/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.53-1-pve (x86_64)
Consult /var/lib/dkms/tn40xx/004/build/make.log for more information.

Command:

cat /var/lib/dkms/tn40xx/004/build/make.log

Output:

DKMS make.log for tn40xx-004 for kernel 5.15.53-1-pve (x86_64)
Sat 10 Sep 2022 09:06:46 AM IST
make: Entering directory '/usr/src/linux-headers-5.15.53-1-pve'
  CC [M]  /var/lib/dkms/tn40xx/004/build/tn40.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/CX4.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/CX4_Linux.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/QT2025_phy.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/QT2025_phy_Linux.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/TLK10232_phy.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/TLK10232_phy_Linux.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/AQR105_phy.o
  CC [M]  /var/lib/dkms/tn40xx/004/build/AQR105_phy_Linux.o
/var/lib/dkms/tn40xx/004/build/tn40.c:3877:11: warning: 'struct kernel_ethtool_ringparam' declared inside parameter list will not be visible outside of this definition or declaration
 3877 |    struct kernel_ethtool_ringparam *kernel_ering,
      |           ^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/004/build/tn40.c:3898:11: warning: 'struct kernel_ethtool_ringparam' declared inside parameter list will not be visible outside of this definition or declaration
 3898 |    struct kernel_ethtool_ringparam *kernel_ering,
      |           ^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/004/build/tn40.c: In function 'bdx_ethtool_ops':
/var/lib/dkms/tn40xx/004/build/tn40.c:4113:20: error: initialization of 'void (*)(struct net_device *, struct ethtool_ringparam *)' from incompatible pointer type 'void (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)' [-Werror=incompatible-pointer-types]
 4113 |   .get_ringparam = bdx_get_ringparam,
      |                    ^~~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/004/build/tn40.c:4113:20: note: (near initialization for 'bdx_ethtool_ops.get_ringparam')
/var/lib/dkms/tn40xx/004/build/tn40.c:4114:20: error: initialization of 'int (*)(struct net_device *, struct ethtool_ringparam *)' from incompatible pointer type 'int (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)' [-Werror=incompatible-pointer-types]
 4114 |   .set_ringparam = bdx_set_ringparam,
      |                    ^~~~~~~~~~~~~~~~~
/var/lib/dkms/tn40xx/004/build/tn40.c:4114:20: note: (near initialization for 'bdx_ethtool_ops.set_ringparam')
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:297: /var/lib/dkms/tn40xx/004/build/tn40.o] Error 1
make: *** [Makefile:1884: /var/lib/dkms/tn40xx/004/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.53-1-pve'

The same error appears for make command as well:


Command:

cd /usr/src/tn40xx-004/
make

Output:

make -C /lib/modules/5.15.53-1-pve/build M=/usr/src/tn40xx-004 clean
make[1]: Entering directory '/usr/src/linux-headers-5.15.53-1-pve'
make[1]: Leaving directory '/usr/src/linux-headers-5.15.53-1-pve'
Building kernel 5.15.53-1-pve resume supported
make -C /lib/modules/5.15.53-1-pve/build M=/usr/src/tn40xx-004 modules 
make[1]: Entering directory '/usr/src/linux-headers-5.15.53-1-pve'
  CC [M]  /usr/src/tn40xx-004/tn40.o
/usr/src/tn40xx-004/tn40.c:3877:11: warning: 'struct kernel_ethtool_ringparam' declared inside parameter list will not be visible outside of this definition or declaration
 3877 |    struct kernel_ethtool_ringparam *kernel_ering,
      |           ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/tn40xx-004/tn40.c:3898:11: warning: 'struct kernel_ethtool_ringparam' declared inside parameter list will not be visible outside of this definition or declaration
 3898 |    struct kernel_ethtool_ringparam *kernel_ering,
      |           ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/tn40xx-004/tn40.c: In function 'bdx_ethtool_ops':
/usr/src/tn40xx-004/tn40.c:4113:20: error: initialization of 'void (*)(struct net_device *, struct ethtool_ringparam *)' from incompatible pointer type 'void (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)' [-Werror=incompatible-pointer-types]
 4113 |   .get_ringparam = bdx_get_ringparam,
      |                    ^~~~~~~~~~~~~~~~~
/usr/src/tn40xx-004/tn40.c:4113:20: note: (near initialization for 'bdx_ethtool_ops.get_ringparam')
/usr/src/tn40xx-004/tn40.c:4114:20: error: initialization of 'int (*)(struct net_device *, struct ethtool_ringparam *)' from incompatible pointer type 'int (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)' [-Werror=incompatible-pointer-types]
 4114 |   .set_ringparam = bdx_set_ringparam,
      |                    ^~~~~~~~~~~~~~~~~
/usr/src/tn40xx-004/tn40.c:4114:20: note: (near initialization for 'bdx_ethtool_ops.set_ringparam')
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:297: /usr/src/tn40xx-004/tn40.o] Error 1
make[1]: *** [Makefile:1884: /usr/src/tn40xx-004] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.53-1-pve'
make: *** [Makefile:147: all] Error 2

Install on Ubuntu 20.04 for TN9710P, driver not working on reboot

I think in the process of trying to install drivers from startech and then trying to use the DKMS drivers I made a mistake, following the basic DKMS install the drivers would not work. They would install but would not be picked up on a reboot and the TN9710P shows as unclaimed in a lshw. I saw the recent post ref this zip https://github.com/acooks/tn40xx-driver/files/5570081/tehuti.zip ran a make and install that also did not work. However if I do a insmod into the current 5.4 kernel it works fine. However with insmod I loose it as soon as I reboot and have to run insmod on each reboot. modprobe does not return an error, not sure what step I might have missed? Would really like to get the dkms version working if anyone has some suggestions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.