acooks / tn40xx-driver

Linux driver for tn40xx from Tehuti Networks
71 stars 50 forks source link

unable to build on kernel 4.18.0-513.9.1.el8_9.x86_64 #66

Open seblom opened 7 months ago

seblom commented 7 months ago

The make command returns this log. I'm tryng to use this driver for a TN9710P on a kernel version 4.18.0-513.9.1.el8_9.x86_64 Can anyone help me ?? Many thanks in advance

make make -C /lib/modules/4.18.0-513.9.1.el8_9.x86_64/build M=/root/ethnew clean make[1]: ingresso nella directory "/usr/src/kernels/4.18.0-513.9.1.el8_9.x86_64" CLEAN /root/ethnew/.tmp_versions make[1]: uscita dalla directory "/usr/src/kernels/4.18.0-513.9.1.el8_9.x86_64" Building kernel 4.18.0-513.9.1.el8_9.x86_64 resume supported make -C /lib/modules/4.18.0-513.9.1.el8_9.x86_64/build M=/root/ethnew modules make[1]: ingresso nella directory "/usr/src/kernels/4.18.0-513.9.1.el8_9.x86_64" CC [M] /root/ethnew/tn40.o /root/ethnew/tn40.c: In function ‘bdx_probe’: /root/ethnew/tn40.c:4643:49: error: macro "netif_napi_add" passed 4 arguments, but takes just 3 LUXORNAPI_ADD(ndev, &priv->napi, bdx_poll, 64); ^ In file included from /root/ethnew/tn40.c:9: /root/ethnew/tn40.h:983:19: error: ‘netif_napi_add’ undeclared (first use in this function); did you mean ‘netif_napi_del’? netif_napi_add(dev, napi, poll, weight) ^~~~~~ /root/ethnew/tn40.c:4643:2: note: in expansion of macro ‘LUXORNAPI_ADD’ LUXORNAPI_ADD(ndev, &priv->napi, bdx_poll, 64); ^~~~~~~ /root/ethnew/tn40.h:983:19: note: each undeclared identifier is reported only once for each function it appears in netif_napi_add(dev, napi, poll, weight) ^~~~~~ /root/ethnew/tn40.c:4643:2: note: in expansion of macro ‘LUXORNAPI_ADD’ LUXOR__NAPI_ADD(ndev, &priv->napi, bdx_poll, 64); ^~~~~~~ /root/ethnew/tn40.c: In function ‘bdx_ethtool_ops’: /root/ethnew/tn40.c:5379:30: 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] .get_coalesce = bdx_get_coalesce, ^~~~ /root/ethnew/tn40.c:5379:30: note: (near initialization for ‘bdx_ethtool_ops..get_coalesce’) /root/ethnew/tn40.c:5380:30: 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] .set_coalesce = bdx_set_coalesce, ^~~~ /root/ethnew/tn40.c:5380:30: note: (near initialization for ‘bdx_ethtool_ops..set_coalesce’) /root/ethnew/tn40.c:5381:30: error: initialization of ‘void ()(struct net_device , struct ethtool_ringparam , struct kernel_ethtool_ringparam , struct netlink_ext_ack )’ from incompatible pointer type ‘void ()(struct net_device , struct ethtool_ringparam )’ [-Werror=incompatible-pointer-types] .get_ringparam = bdx_get_ringparam, ^~~~~ /root/ethnew/tn40.c:5381:30: note: (near initialization for ‘bdx_ethtool_ops..get_ringparam’) /root/ethnew/tn40.c:5382:30: error: initialization of ‘int ()(struct net_device , struct ethtool_ringparam , struct kernel_ethtool_ringparam , struct netlink_ext_ack )’ from incompatible pointer type ‘int ()(struct net_device , struct ethtool_ringparam )’ [-Werror=incompatible-pointer-types] .set_ringparam = bdx_set_ringparam, ^~~~~ /root/ethnew/tn40.c:5382:30: note: (near initialization for ‘bdx_ethtool_ops..set_ringparam’) At top level: /root/ethnew/tn40.c:1208:12: warning: ‘bdx_poll’ defined but not used [-Wunused-function] static int bdx_poll(struct napi_struct *napi, int budget) ^~~~ cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:318: /root/ethnew/tn40.o] Error 1 make[1]: [Makefile:1619: module/root/ethnew] Error 2 make[1]: uscita dalla directory "/usr/src/kernels/4.18.0-513.9.1.el8_9.x86_64" make: *** [Makefile:147: all] Error 2

acooks commented 7 months ago

Hi.

You seem to be running a Redhat Enterprise Linux kernel, or one that was rebuilt from RHEL sources.

Have you considered what value you get from running an 'enterprise' software distribution? Is it in line with what you expect from it?

Maintaining and supporting old, forked enterprise software is a burden for developers - one that enterprise employees get paid for and volunteers do not.

Perhaps you'd like to reach out to your enterprise vendor for the support that you're paying for, or perhaps you'd get better value from an up-to-date release that is supportable by the upstream developers.

Failing that, you could try an older release branch of this driver. 003 might work.

Good luck!