* [PATCHv2 2.6.32-rc5] r8169: fix Ethernet Hangup for RTL8110SC rev d
@ 2009-10-23 6:57 Simon Wunderlich
2009-10-24 13:48 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Simon Wunderlich @ 2009-10-23 6:57 UTC (permalink / raw)
To: netdev, simon.wunderlich, David Miller, bernhard.schmidt, romieu
[-- Attachment #1: Type: text/plain, Size: 2308 bytes --]
The 8110SC rev d chip on our board shows a regression which the 8110SB chip
did not have. When inbound traffic is overflowing the receive descriptor queue,
"holes" in the ring buffer may occur which lead to a hangup until the buffer
is filled again. The packets are than completely processed, but the ring
remains porous and no packets are processed until the next overflow. Setting
the interface down and up can fix the problem temporary from userspace.
For some reason we don't know, this behaviour is not occuring if the RxVlan
bit for hardware VLAN untagging is set. There is another "Work around for
AMD plateform" in the current code which checks the VLAN status
word in receive descriptors, but does never come to effect when hardware
VLAN support is enabled. We assume that this is a bug in the chip.
The following patch fixes the problem. Without the patch we could reproduce
the hang within minutes (given other devices also generating lots of
interrupts), without we couldn't reproduce within a few days of long term
testing.
This version contains minor style adjustments and is sent with mutt which
will hopefully not destroy the formatting again.
Signed-off-by: Bernhard Schmidt <bernhard.schmidt@saxnet.de>
Signed-off-by: Simon Wunderlich <simon.wunderlich@saxnet.de>
Acked-by: Francois Romieu <romieu@zoreil.com>
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 83c47d9..f98ef52 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1029,7 +1029,10 @@ static void rtl8169_vlan_rx_register(struct net_device *dev,
spin_lock_irqsave(&tp->lock, flags);
tp->vlgrp = grp;
- if (tp->vlgrp)
+ /*
+ * Do not disable RxVlan on 8110SCd.
+ */
+ if (tp->vlgrp || (tp->mac_version == RTL_GIGA_MAC_VER_05))
tp->cp_cmd |= RxVlan;
else
tp->cp_cmd &= ~RxVlan;
@@ -3197,6 +3200,14 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
}
rtl8169_init_phy(dev, tp);
+
+ /*
+ * Pretend we are using VLANs; This bypasses a nasty bug where
+ * Interrupts stop flowing on high load on 8110SCd controllers.
+ */
+ if (tp->mac_version == RTL_GIGA_MAC_VER_05)
+ RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) | RxVlan);
+
device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
out:
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCHv2 2.6.32-rc5] r8169: fix Ethernet Hangup for RTL8110SC rev d
2009-10-23 6:57 [PATCHv2 2.6.32-rc5] r8169: fix Ethernet Hangup for RTL8110SC rev d Simon Wunderlich
@ 2009-10-24 13:48 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-10-24 13:48 UTC (permalink / raw)
To: simon.wunderlich; +Cc: netdev, simon.wunderlich, bernhard.schmidt, romieu
From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Date: Fri, 23 Oct 2009 08:57:17 +0200
...
> Signed-off-by: Bernhard Schmidt <bernhard.schmidt@saxnet.de>
> Signed-off-by: Simon Wunderlich <simon.wunderlich@saxnet.de>
> Acked-by: Francois Romieu <romieu@zoreil.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-24 13:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-23 6:57 [PATCHv2 2.6.32-rc5] r8169: fix Ethernet Hangup for RTL8110SC rev d Simon Wunderlich
2009-10-24 13:48 ` 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).