* [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
@ 2014-07-15 6:41 Michel Dänzer
2014-07-15 9:29 ` Hayes Wang
0 siblings, 1 reply; 9+ messages in thread
From: Michel Dänzer @ 2014-07-15 6:41 UTC (permalink / raw)
To: Francois Romieu, Realtek linux nic maintainers; +Cc: netdev, linux-kernel
Without this, the ethernet port on my ASUS A88X Pro mainboard stops
working sometimes, with messages like these in dmesg:
AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0 domain=0x001e address=0x0000000000003000 flags=0x0050]
Signed-off-by: Michel Dänzer <michel@daenzer.net>
---
drivers/net/ethernet/realtek/r8169.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index be425ad..e577566 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -4239,6 +4239,8 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
break;
case RTL_GIGA_MAC_VER_40:
+ RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST | RX_EARLY_OFF);
+ break;
case RTL_GIGA_MAC_VER_41:
case RTL_GIGA_MAC_VER_42:
case RTL_GIGA_MAC_VER_43:
--
2.0.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
2014-07-15 6:41 [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40 Michel Dänzer
@ 2014-07-15 9:29 ` Hayes Wang
2014-07-15 9:56 ` Michel Dänzer
2014-07-15 21:54 ` Francois Romieu
0 siblings, 2 replies; 9+ messages in thread
From: Hayes Wang @ 2014-07-15 9:29 UTC (permalink / raw)
To: Michel Dänzer, Francois Romieu, nic_swsd
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Michel Dänzer [mailto:michel@daenzer.net]
> Sent: Tuesday, July 15, 2014 2:42 PM
> To: Francois Romieu; nic_swsd
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
>
> Without this, the ethernet port on my ASUS A88X Pro mainboard stops
> working sometimes, with messages like these in dmesg:
>
> AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0
> domain=0x001e address=0x0000000000003000 flags=0x0050]
I search the information about your issue. It seems to be
relative to the IOMMU. I don't sure if your patch is the root
cause or a workaround.
Best Regards,
Hayes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
2014-07-15 9:29 ` Hayes Wang
@ 2014-07-15 9:56 ` Michel Dänzer
2014-07-15 21:54 ` Francois Romieu
1 sibling, 0 replies; 9+ messages in thread
From: Michel Dänzer @ 2014-07-15 9:56 UTC (permalink / raw)
To: Hayes Wang, Francois Romieu, nic_swsd
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
On 15.07.2014 18:29, Hayes Wang wrote:
> Michel Dänzer [mailto:michel@daenzer.net]
>> Sent: Tuesday, July 15, 2014 2:42 PM
>> To: Francois Romieu; nic_swsd
>> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org
>> Subject: [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
>>
>> Without this, the ethernet port on my ASUS A88X Pro mainboard stops
>> working sometimes, with messages like these in dmesg:
>>
>> AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0
>> domain=0x001e address=0x0000000000003000 flags=0x0050]
>
> I search the information about your issue. It seems to be
> relative to the IOMMU. I don't sure if your patch is the root
> cause or a workaround.
It's quite possibly just a workaround; I tried this based on previous
similar commits in this driver.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
2014-07-15 9:29 ` Hayes Wang
2014-07-15 9:56 ` Michel Dänzer
@ 2014-07-15 21:54 ` Francois Romieu
2014-07-16 22:25 ` David Miller
1 sibling, 1 reply; 9+ messages in thread
From: Francois Romieu @ 2014-07-15 21:54 UTC (permalink / raw)
To: Hayes Wang
Cc: Michel Dänzer, nic_swsd, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Hayes Wang <hayeswang@realtek.com> :
> Michel D?nzer [mailto:michel@daenzer.net]
[...]
> > Without this, the ethernet port on my ASUS A88X Pro mainboard stops
> > working sometimes, with messages like these in dmesg:
> >
> > AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0
> > domain=0x001e address=0x0000000000003000 flags=0x0050]
>
> I search the information about your issue. It seems to be
> relative to the IOMMU. I don't sure if your patch is the root
> cause or a workaround.
Btw, a few extra identifiers in rtl_init_rxcfg may improve consistency:
missing | included
-------------------------------+-------------------------------
RTL_GIGA_MAC_VER_36 (8168f) | RTL_GIGA_MAC_VER_35 (8168f)
RTL_GIGA_MAC_VER_38 (RTL8411) | RTL_GIGA_MAC_VER_44 (RTL8411)
RTL_GIGA_MAC_VER_39 (RTL8106e) | RTL_GIGA_MAC_VER_43 (RTL8106e)
RTL_GIGA_MAC_VER_37 (RTL8402) |
--
Ueimor
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
2014-07-15 21:54 ` Francois Romieu
@ 2014-07-16 22:25 ` David Miller
2014-07-17 0:55 ` Michel Dänzer
0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2014-07-16 22:25 UTC (permalink / raw)
To: romieu; +Cc: hayeswang, michel, nic_swsd, netdev, linux-kernel
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Tue, 15 Jul 2014 23:54:12 +0200
> Hayes Wang <hayeswang@realtek.com> :
>> Michel D?nzer [mailto:michel@daenzer.net]
> [...]
>> > Without this, the ethernet port on my ASUS A88X Pro mainboard stops
>> > working sometimes, with messages like these in dmesg:
>> >
>> > AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0
>> > domain=0x001e address=0x0000000000003000 flags=0x0050]
>>
>> I search the information about your issue. It seems to be
>> relative to the IOMMU. I don't sure if your patch is the root
>> cause or a workaround.
>
> Btw, a few extra identifiers in rtl_init_rxcfg may improve consistency:
>
> missing | included
> -------------------------------+-------------------------------
> RTL_GIGA_MAC_VER_36 (8168f) | RTL_GIGA_MAC_VER_35 (8168f)
> RTL_GIGA_MAC_VER_38 (RTL8411) | RTL_GIGA_MAC_VER_44 (RTL8411)
> RTL_GIGA_MAC_VER_39 (RTL8106e) | RTL_GIGA_MAC_VER_43 (RTL8106e)
> RTL_GIGA_MAC_VER_37 (RTL8402) |
Michel please take Francois's feedback here into consideration and also
provide a more detailed commit message so other people reading the commit
can understand your reasoning for making this change, not just what the
result might be for making it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
2014-07-16 22:25 ` David Miller
@ 2014-07-17 0:55 ` Michel Dänzer
2014-07-17 3:29 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Michel Dänzer @ 2014-07-17 0:55 UTC (permalink / raw)
To: David Miller, romieu; +Cc: hayeswang, nic_swsd, netdev, linux-kernel
On 17.07.2014 07:25, David Miller wrote:
> From: Francois Romieu <romieu@fr.zoreil.com>
> Date: Tue, 15 Jul 2014 23:54:12 +0200
>
>> Hayes Wang <hayeswang@realtek.com> :
>>> Michel D?nzer [mailto:michel@daenzer.net]
>> [...]
>>>> Without this, the ethernet port on my ASUS A88X Pro mainboard stops
>>>> working sometimes, with messages like these in dmesg:
>>>>
>>>> AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0
>>>> domain=0x001e address=0x0000000000003000 flags=0x0050]
>>>
>>> I search the information about your issue. It seems to be
>>> relative to the IOMMU. I don't sure if your patch is the root
>>> cause or a workaround.
>>
>> Btw, a few extra identifiers in rtl_init_rxcfg may improve consistency:
>>
>> missing | included
>> -------------------------------+-------------------------------
>> RTL_GIGA_MAC_VER_36 (8168f) | RTL_GIGA_MAC_VER_35 (8168f)
>> RTL_GIGA_MAC_VER_38 (RTL8411) | RTL_GIGA_MAC_VER_44 (RTL8411)
>> RTL_GIGA_MAC_VER_39 (RTL8106e) | RTL_GIGA_MAC_VER_43 (RTL8106e)
>> RTL_GIGA_MAC_VER_37 (RTL8402) |
>
> Michel please take Francois's feedback here into consideration and also
> provide a more detailed commit message so other people reading the commit
> can understand your reasoning for making this change, not just what the
> result might be for making it.
I'm afraid I can't do that. I don't really understand any of this stuff,
I just googled the IOMMU event message, found similar patches for other
chipsets, and adapted them for my mainboard until the problem stopped.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
2014-07-17 0:55 ` Michel Dänzer
@ 2014-07-17 3:29 ` David Miller
2014-07-17 3:55 ` [PATCH v2] " Michel Dänzer
0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2014-07-17 3:29 UTC (permalink / raw)
To: michel; +Cc: romieu, hayeswang, nic_swsd, netdev, linux-kernel
From: Michel Dänzer <michel@daenzer.net>
Date: Thu, 17 Jul 2014 09:55:59 +0900
> On 17.07.2014 07:25, David Miller wrote:
>> From: Francois Romieu <romieu@fr.zoreil.com>
>> Date: Tue, 15 Jul 2014 23:54:12 +0200
>>
>>> Hayes Wang <hayeswang@realtek.com> :
>>>> Michel D?nzer [mailto:michel@daenzer.net]
>>> [...]
>>>>> Without this, the ethernet port on my ASUS A88X Pro mainboard stops
>>>>> working sometimes, with messages like these in dmesg:
>>>>>
>>>>> AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0
>>>>> domain=0x001e address=0x0000000000003000 flags=0x0050]
>>>>
>>>> I search the information about your issue. It seems to be
>>>> relative to the IOMMU. I don't sure if your patch is the root
>>>> cause or a workaround.
>>>
>>> Btw, a few extra identifiers in rtl_init_rxcfg may improve consistency:
>>>
>>> missing | included
>>> -------------------------------+-------------------------------
>>> RTL_GIGA_MAC_VER_36 (8168f) | RTL_GIGA_MAC_VER_35 (8168f)
>>> RTL_GIGA_MAC_VER_38 (RTL8411) | RTL_GIGA_MAC_VER_44 (RTL8411)
>>> RTL_GIGA_MAC_VER_39 (RTL8106e) | RTL_GIGA_MAC_VER_43 (RTL8106e)
>>> RTL_GIGA_MAC_VER_37 (RTL8402) |
>>
>> Michel please take Francois's feedback here into consideration and also
>> provide a more detailed commit message so other people reading the commit
>> can understand your reasoning for making this change, not just what the
>> result might be for making it.
>
> I'm afraid I can't do that. I don't really understand any of this stuff,
> I just googled the IOMMU event message, found similar patches for other
> chipsets, and adapted them for my mainboard until the problem stopped.
And if so, that's exactly what I want you to say in the commit message.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
2014-07-17 3:29 ` David Miller
@ 2014-07-17 3:55 ` Michel Dänzer
2014-07-17 5:24 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Michel Dänzer @ 2014-07-17 3:55 UTC (permalink / raw)
To: Dave Miller, Realtek linux nic maintainers
Cc: Francois Romieu, hayeswang, netdev, linux-kernel
The ethernet port on my ASUS A88X Pro mainboard stopped working
several times a day, with messages like these in dmesg:
AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0 domain=0x001e address=0x0000000000003000 flags=0x0050]
Searching the web for these messages led me to similar reports about
different hardware supported by r8169, and eventually to commits
3ced8c955e74d319f3e3997f7169c79d524dfd06 ('r8169: enforce RX_MULTI_EN
for the 8168f.') and eb2dc35d99028b698cdedba4f5522bc43e576bd2 ('r8169:
RxConfig hack for the 8168evl'). So I tried this change, and it fixes
the problem for me.
Signed-off-by: Michel Dänzer <michel@daenzer.net>
---
v2: Updated commit log, how about this?
drivers/net/ethernet/realtek/r8169.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 06bdc31..61623e9 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -4240,6 +4240,8 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
break;
case RTL_GIGA_MAC_VER_40:
+ RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST | RX_EARLY_OFF);
+ break;
case RTL_GIGA_MAC_VER_41:
case RTL_GIGA_MAC_VER_42:
case RTL_GIGA_MAC_VER_43:
--
2.0.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40
2014-07-17 3:55 ` [PATCH v2] " Michel Dänzer
@ 2014-07-17 5:24 ` David Miller
0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2014-07-17 5:24 UTC (permalink / raw)
To: michel; +Cc: nic_swsd, romieu, hayeswang, netdev, linux-kernel
From: Michel Dänzer <michel@daenzer.net>
Date: Thu, 17 Jul 2014 12:55:40 +0900
> The ethernet port on my ASUS A88X Pro mainboard stopped working
> several times a day, with messages like these in dmesg:
>
> AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0 domain=0x001e address=0x0000000000003000 flags=0x0050]
>
> Searching the web for these messages led me to similar reports about
> different hardware supported by r8169, and eventually to commits
> 3ced8c955e74d319f3e3997f7169c79d524dfd06 ('r8169: enforce RX_MULTI_EN
> for the 8168f.') and eb2dc35d99028b698cdedba4f5522bc43e576bd2 ('r8169:
> RxConfig hack for the 8168evl'). So I tried this change, and it fixes
> the problem for me.
>
> Signed-off-by: Michel Dänzer <michel@daenzer.net>
> ---
>
> v2: Updated commit log, how about this?
Works for me, applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-07-17 5:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 6:41 [PATCH] r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40 Michel Dänzer
2014-07-15 9:29 ` Hayes Wang
2014-07-15 9:56 ` Michel Dänzer
2014-07-15 21:54 ` Francois Romieu
2014-07-16 22:25 ` David Miller
2014-07-17 0:55 ` Michel Dänzer
2014-07-17 3:29 ` David Miller
2014-07-17 3:55 ` [PATCH v2] " Michel Dänzer
2014-07-17 5:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).