diff mbox

r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_40

Message ID 1405406500-1208-1-git-send-email-michel@daenzer.net
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Michel Dänzer July 15, 2014, 6:41 a.m. UTC
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(+)

Comments

Hayes Wang July 15, 2014, 9:29 a.m. UTC | #1
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michel Dänzer July 15, 2014, 9:56 a.m. UTC | #2
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.
Francois Romieu July 15, 2014, 9:54 p.m. UTC | #3
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)  |
David Miller July 16, 2014, 10:25 p.m. UTC | #4
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michel Dänzer July 17, 2014, 12:55 a.m. UTC | #5
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.
David Miller July 17, 2014, 3:29 a.m. UTC | #6
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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: