Re: kernel 4.18.5 Realtek 8111G network adapter stops responding under high system load

From: Maciej S. Szmigiero
Date: Sun Sep 16 2018 - 19:12:03 EST


On 16.09.2018 14:38, David Arendt wrote:
> Hi,
>
(..)
>
> For information here the differences from ethtool between the working
> driver from 4.17.14 and the patched one fom 4.18.8:
>
> --- working.txt 2018-09-16 14:14:00.544376935 +0200
> +++ patched.txt 2018-09-16 14:20:09.445660915 +0200
> @@ -17 +17 @@
> -0x40: Tx ConfigurationÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 0x4f000f80
> +0x40: Tx ConfigurationÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 0x4f000f00

TXCFG_AUTO_FIFO was set by the working driver in TxConfig but the current
driver version seems unable to do it.

Looking at your NIC model config code (guess it is XID 4c000800 or
RTL_GIGA_MAC_VER_40) that bit should be set by rtl_hw_start_8168g(),
that is called from rtl_hw_start_8168g_1(), that in turn is called
from rtl_hw_start_8168().

However, after rtl_hw_start_8168() is called from rtl_hw_start()
(as tp->hw_start(tp)) a call to rtl_set_tx_config_registers() is made
which overwrites TxConfig completely, zeroing the aforementioned bit.

It looks like this was first introduced by commit
4fd48c4ac0a0 ("r8169: move common initializations to tp->hw_start").
I have added its author (Heiner Kallweit) to CC.

@Heiner: could you have a look at this?

Maciej