Leap 42.3 Tehuti 10GS

Hi Folks ,
#1 previously on Tumbleweed /debian 9 the make goes well.
with Leap 42.3 trying to make driver for my Ethernet controller: Tehuti Networks Ltd. TN9510 10GBase-T/NBASE-T Ethernet Adapter,
i get error here is the outout

makemake -C /lib/modules/4.4.120-45-default/build M=/Downloads/tn40xx-driver-cleanup-v0.3.6.15 clean
make[1]: Entering directory '/usr/src/linux-4.4.120-45-obj/x86_64/default'
  CLEAN   /Downloads/tn40xx-driver-cleanup-v0.3.6.15/.tmp_versions
make[1]: Leaving directory '/usr/src/linux-4.4.120-45-obj/x86_64/default'
Building kernel 4.4.120-45-default resume supported
make -C /lib/modules/4.4.120-45-default/build M=/Downloads/tn40xx-driver-cleanup-v0.3.6.15 modules 
make[1]: Entering directory '/usr/src/linux-4.4.120-45-obj/x86_64/default'
  CC [M]  /Downloads/tn40xx-driver-cleanup-v0.3.6.15/tn40.o
/Downloads/tn40xx-driver-cleanup-v0.3.6.15/tn40.c: In function ‘bdx_rx_receive’:
/Downloads/tn40xx-driver-cleanup-v0.3.6.15/tn40.c:2528:12: error: ‘struct net_device’ has no member named ‘last_rx’
  priv->ndev->last_rx = jiffies;
            ^
/Downloads/tn40xx-driver-cleanup-v0.3.6.15/tn40.c: In function ‘bdx_tx_transmit’:
/Downloads/tn40xx-driver-cleanup-v0.3.6.15/tn40.c:3324:7: error: ‘struct net_device’ has no member named ‘trans_start’
   ndev->trans_start = jiffies;
       ^
/usr/src/linux-4.4.120-45/scripts/Makefile.build:270: recipe for target '/Downloads/tn40xx-driver-cleanup-v0.3.6.15/tn40.o' failed
make[4]: *** [/Downloads/tn40xx-driver-cleanup-v0.3.6.15/tn40.o] Error 1
/usr/src/linux-4.4.120-45/Makefile:1436: recipe for target '_module_/Downloads/tn40xx-driver-cleanup-v0.3.6.15' failed
make[3]: *** [_module_/Downloads/tn40xx-driver-cleanup-v0.3.6.15] Error 2
Makefile:152: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make[1]: *** [__sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-4.4.120-45-obj/x86_64/default'
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2



#2 whenever i play a video the"i7 6700k with water cooling" all cores jumps above 50 , correct and guid me please , if am using the gpu accelration then the cpu should not be involved here right ? even though why that much of cpu,my vlc settings are output “VDPAU output” and Hardware -accelerated decoding to “VPAU video decoder”
nvidia driver for my GTX9700 overcooking edition from the nvidia community repo + libgstvdpau + libva-vdpau-driver + libvdpau-devel + libvdpau1 + libvdpau_trace1 + vlc-vdpau + libvdpau_va_gl1 + vlc-codecs

#3 same hardware on debian 9 why do i get better graphics/ i just can feel it , i get better colores and general feelings over texts / i can set for houres and my eyes are ok , but now with leap my eyes hurts too and general feels so so if you compare.

#4 even the pc is idle the cpu will be runing a lot , tryed to figure out what process is consuming power which i did not find any , just cpu will keep working , with debian 9 i do not face such issue , why do you think so ? and how to optimize my pc for bet performance .

Many thanks.

Hi
So the default tehuti driver is not compatible with your card?;


/sbin/lspci -nnk | grep -A3 Ethernet

I would suggest revisiting the download site for the drivers as there appears to be a version greater than your trying to build that will be compatible with the 4.4.120 kernel… If not then it needs patching…

Not producing coredumps (tracker extract)?

debian 9 uses kernel 4.9 where the same driver works well.

PATCH for (openSUSE’s) 4.4.x (which is NOT really a 4.4.x but a wild mixture of
4.4.x and backported code from up to 4.9.x, which breaks quite a lot of the
typical #if/#else/#endif structures used in vendor drivers. You can ask Larry
Finger what a great idea that was …)


diff -u tn40.c.orig tn40.c
--- tn40.c.orig    2018-04-09 21:50:59.166353140 +0200
+++ tn40.c    2018-04-09 21:56:37.674343138 +0200
@@ -2524,7 +2524,7 @@
DEF_TIMER(bdx_rx_receive_6);
START_TIMER(bdx_rx_receive);

-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0))
priv->ndev->last_rx = jiffies;
#endif
f->m.wptr = READ_REG(priv, f->m.reg_WPTR) & TXF_WPTR_WR_PTR;
@@ -3318,7 +3318,7 @@
f->m.wptr & TXF_WPTR_WR_PTR);
}
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) ||
(defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,4)))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) ||
(defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,4)))
netif_trans_update(ndev); #else ndev->trans_start = jiffies;

AK

Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)

Hi
Please provide the output requested so can see some details…

Not sure what the Debian folks do… let me see if it builds as a kmp…

sure , here is the out put :


some numbers  Ethernet controller [some numbers]: Tehuti Networks Ltd. TN9510 10GBase-T/NBASE-T Ethernet Adapter [some numbers]
	Subsystem: Tehuti Networks Ltd. Ethernet Adapter [some numbers]
	Kernel modules: tn40xx

Hi
The numbers you deleted are the important parts…

Looks like you have been provided a patch…

Am Mon, 09 Apr 2018 20:04:45 GMT
schrieb AK <Akoellh@no-mx.forums.microfocus.com>:

A little post scriptum to my previous post:

> You can ask Larry Finger what a great idea that was …)
>

Just to avoid some potential misunderstanding here.

Larry did NOT decide to build such a kernel but he is maintainer of quite a
number of driver packages now needing some extra patches in order to
get them to build.

(And because of that he is a maintainer who was and still is erm let’s say
“rather unhappy” about that fact. A sentiment to which I fully agree).

For the same reason the tn40xx driver needs that rather strange patch I posted
before.

AK


Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)

Hey,
here is the output with numbers :

06:00.0 Ethernet controller [0200]: Tehuti Networks Ltd. TN9510 10GBase-T/NBASE-T Ethernet Adapter [1fc9:4025]	Subsystem: Tehuti Networks Ltd. Ethernet Adapter [1fc9:3015]
	Kernel modules: tn40xx

i did not do a patch, i tried to make the driver on debian and make install on suse “i know it was stupid though and it did not work”
Guys feel free to answer other questions please .

You have to patch the Driver with the Patch Akoellh postet in his first thread.

Hi,
i did the following in the driver working dir, correct me if wrong please .


cp tn40.c tn40.c.orig

vim my.patch  "pasted in the patch Akoellh posted in his first thread "

patch < my.patch

patching file tn40.c
patch: **** malformed patch at line 5: DEF_TIMER(bdx_rx_receive_6);




thought it was right output , so i run make i got the same old results.

Hi
Nope, it’s an error… maybe an old source…?

I used this and works fine with patch -p1;

Hi,
i have used same procedure with code you provided via the link i get the following out put :

patching file tn40.cHunk #1 FAILED at 2782.
Hunk #2 FAILED at 3598.
2 out of 2 hunks FAILED -- saving rejects to file tn40.c.rej

Why not enable the Repo and install the Package malcolmlewis build?

zypper ar -f https://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/openSUSE_Leap_42.3_Update/ Tehuti
zypper in tn40xx-kmp-default

On Fri 13 Apr 2018 06:46:02 AM CDT, seven skies wrote:

malcolmlewis;2862492 Wrote:
> Hi
> Nope, it’s an error… maybe an old source…?
>
> I used this and works fine with patch -p1;
>
> Welcome - openSUSE Build Service

Hi,
i have used same procedure with code you provided via the link i get the
following out put :

Code:

patching file tn40.cHunk #1 FAILED at 2782.
Hunk #2 FAILED at 3598.
2 out of 2 hunks FAILED – saving rejects to file tn40.c.rej

Hi
My patch uses -p1 to apply, the other option is to just go find the
lines and edit them…


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.3|GNOME 3.20.2|4.4.120-45-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Hi ,
Thanks. All Good can be marked as solved :slight_smile:

Hi ,
Thanks. All Good can be marked as solved :slight_smile: