netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] r8169: Handle rxfifo errors on 8168 chips
@ 2010-09-14 21:57 Matthew Garrett
  2010-09-15 22:27 ` Francois Romieu
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Garrett @ 2010-09-14 21:57 UTC (permalink / raw)
  To: romieu; +Cc: netdev, jglisse, Matthew Garrett

The Thinkpad X100e seems to have some odd behaviour when the display is
powered off - the onboard r8169 starts generating rxfifo overflow errors.
The root cause of this has not yet been identified and may well be a
hardware design bug on the platform, but r8169 should be more resiliant to
this. This patch enables the rxfifo interrupt on 8168 devices and removes
the MAC version check in the interrupt handler, and the machine no longer
crashes when under network load while the screen turns off.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/net/r8169.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 078bbf4..a0da4a1 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2934,7 +2934,7 @@ static const struct rtl_cfg_info {
 		.hw_start	= rtl_hw_start_8168,
 		.region		= 2,
 		.align		= 8,
-		.intr_event	= SYSErr | LinkChg | RxOverflow |
+		.intr_event	= SYSErr | RxFIFOOver | LinkChg | RxOverflow |
 				  TxErr | TxOK | RxOK | RxErr,
 		.napi_event	= TxErr | TxOK | RxOK | RxOverflow,
 		.features	= RTL_FEATURE_GMII | RTL_FEATURE_MSI,
@@ -4625,8 +4625,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
 		}
 
 		/* Work around for rx fifo overflow */
-		if (unlikely(status & RxFIFOOver) &&
-		(tp->mac_version == RTL_GIGA_MAC_VER_11)) {
+		if (unlikely(status & RxFIFOOver)) {
 			netif_stop_queue(dev);
 			rtl8169_tx_timeout(dev);
 			break;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] r8169: Handle rxfifo errors on 8168 chips
  2010-09-14 21:57 [PATCH] r8169: Handle rxfifo errors on 8168 chips Matthew Garrett
@ 2010-09-15 22:27 ` Francois Romieu
  2010-09-16  2:33   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Francois Romieu @ 2010-09-15 22:27 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: netdev, jglisse

Matthew Garrett <mjg@redhat.com> :
[...]
> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
> index 078bbf4..a0da4a1 100644
> --- a/drivers/net/r8169.c
> +++ b/drivers/net/r8169.c
[...]
> @@ -4625,8 +4625,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
>  		}
>  
>  		/* Work around for rx fifo overflow */
> -		if (unlikely(status & RxFIFOOver) &&
> -		(tp->mac_version == RTL_GIGA_MAC_VER_11)) {
> +		if (unlikely(status & RxFIFOOver)) {
>  			netif_stop_queue(dev);
>  			rtl8169_tx_timeout(dev);
>  			break;


Acked-by: Francois Romieu <romieu@fr.zoreil.com>

Realtek's driver does something similar with the revision RTL_GIGA_MAC_VER_11
of the 8168.

-- 
Ueimor

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] r8169: Handle rxfifo errors on 8168 chips
  2010-09-15 22:27 ` Francois Romieu
@ 2010-09-16  2:33   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-09-16  2:33 UTC (permalink / raw)
  To: romieu; +Cc: mjg, netdev, jglisse

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 16 Sep 2010 00:27:19 +0200

> Matthew Garrett <mjg@redhat.com> :
> [...]
>> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
>> index 078bbf4..a0da4a1 100644
>> --- a/drivers/net/r8169.c
>> +++ b/drivers/net/r8169.c
> [...]
>> @@ -4625,8 +4625,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
>>  		}
>>  
>>  		/* Work around for rx fifo overflow */
>> -		if (unlikely(status & RxFIFOOver) &&
>> -		(tp->mac_version == RTL_GIGA_MAC_VER_11)) {
>> +		if (unlikely(status & RxFIFOOver)) {
>>  			netif_stop_queue(dev);
>>  			rtl8169_tx_timeout(dev);
>>  			break;
> 
> 
> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
> 
> Realtek's driver does something similar with the revision RTL_GIGA_MAC_VER_11
> of the 8168.

Applied, thanks everyone.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-16  2:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14 21:57 [PATCH] r8169: Handle rxfifo errors on 8168 chips Matthew Garrett
2010-09-15 22:27 ` Francois Romieu
2010-09-16  2:33   ` 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).