From: Chris Clayton <chris2553@googlemail.com>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Azat Khuzhin <a3at.mail@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Realtek linux nic maintainers <nic_swsd@realtek.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: R8169: Network lockups in 4.18.{8,9,10} (and 4.19 dev)
Date: Thu, 11 Oct 2018 09:24:06 +0100 [thread overview]
Message-ID: <d14f04cd-329d-cea9-14e1-d90ad629df74@googlemail.com> (raw)
In-Reply-To: <df88dcb6-951d-0568-6104-7346d0c49063@maciej.szmigiero.name>
On 11/10/2018 01:12, Maciej S. Szmigiero wrote:
> On 11.10.2018 00:49, Chris Clayton wrote:
>>> Now, knowing the "right" value you can experiment with what rtl_init_rxcfg()
>>> writes (under the "default:" label for your NIC model).
>>>
>>
>> This might be more interesting. Through a combination of viewing the output from pr_notice() and the output from
>> "ethtool -d", I can see RxConfig with the following values
>>
>> During boot: 0x00028700
>> Before suspend: 0x0002870e
>> During resume: 0x00024000
>> Post resume: 0x0002870e
>>
>> As I did with 4.18.10 early on in the process, I removed the call to rtl_init_rxcfg() from rtl_hw_start() and rebuilt,
>> installed and rebooted. Now I see the following values:
>>
>> During boot: 0x00028700
>> Before suspend: 0x0002870e
>> During resume: 0x00024000
>> Post resume: 0x0002400e
>>
>
> Now we can finally see some difference...
> Besides missing RX128_INT_EN (bit 15 or 0x8000) and RX_DMA_BURST
> (bits 8-10 or 0x700) - that rtl_init_rxcfg() would normally set so this
> is kind of expected - one can see that the working configuration
> post-resume has bit 14 (or 0x4000) set, too.
>
> This bit is described in the driver as RX_MULTI_EN ("8111c only") and is
> set by rtl_init_rxcfg() for example for RTL_GIGA_MAC_VER_35.
>
> RTL_GIGA_MAC_VER_35 is described in the driver as being in the same
> family as your RTL_GIGA_MAC_VER_38, so can you please try the following
> change:
> --- r8169.c
> +++ r8169.c
> @@ -4271,6 +4271,7 @@ static void rtl_init_rxcfg(struct rtl816
> case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_24:
> case RTL_GIGA_MAC_VER_34:
> case RTL_GIGA_MAC_VER_35:
> + case RTL_GIGA_MAC_VER_38:
> RTL_W32(tp, RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
> break;
> case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_51:
>
> This will add RX_MULTI_EN also for your chip model (you need to add back
> the call to rtl_init_rxcfg() to rtl_hw_start(), naturally).
>
That's done the trick. With the above change applied, my network runs running fine after a suspend/resume cycle and the
ping times are back in the 14-15ms range.
Chris
> If this does not help then I would try another values in the above write:
> 1) RTL_W32(tp, RxConfig, 0x00024000);
> 2) RTL_W32(tp, RxConfig, 0x00004000);
> 3) RTL_W32(tp, RxConfig, RX_DMA_BURST);
> 4) RTL_W32(tp, RxConfig, RX128_INT_EN);
>
>> Chris
>
> Maciej
>
next prev parent reply other threads:[~2018-10-11 8:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 15:54 Maciej S. Szmigiero
2018-09-28 22:00 ` Chris Clayton
2018-09-28 22:13 ` Heiner Kallweit
2018-09-29 7:25 ` Chris Clayton
2018-09-29 7:38 ` Chris Clayton
2018-10-04 8:41 ` Chris Clayton
2018-10-07 19:36 ` Chris Clayton
2018-10-09 12:32 ` Maciej S. Szmigiero
2018-10-09 14:40 ` Chris Clayton
2018-10-09 20:36 ` Heiner Kallweit
2018-10-10 0:24 ` Maciej S. Szmigiero
2018-10-10 8:09 ` Chris Clayton
2018-10-10 8:51 ` Chris Clayton
2018-10-10 22:30 ` Chris Clayton
2018-10-10 22:32 ` Chris Clayton
2018-10-10 22:49 ` Chris Clayton
2018-10-11 0:12 ` Maciej S. Szmigiero
2018-10-11 8:24 ` Chris Clayton [this message]
2018-10-11 12:23 ` Maciej S. Szmigiero
2018-10-11 13:34 ` Chris Clayton
2018-10-09 21:39 ` Heiner Kallweit
2018-10-09 23:32 ` Chris Clayton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d14f04cd-329d-cea9-14e1-d90ad629df74@googlemail.com \
--to=chris2553@googlemail.com \
--cc=a3at.mail@gmail.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@maciej.szmigiero.name \
--cc=nic_swsd@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®