aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2010-06-05 13:24:31 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-06 20:55:59 -0400
commitb1d0521059789a138d19c4f940d6eca7d620a6eb (patch)
treefa0cba1674ba1592476aa5940cf8ada89f018158
parentf92d9dc1504a964acfe07e8036fa30dcef22d343 (diff)
tg3: Avoid tx lockups on 5755+ devices
In certain edge conditions, internal tx resources can get corrupted. This patch enables a bit that will fix the problem. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/tg3.c3
-rw-r--r--drivers/net/tg3.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index bd331174550b..057e8ebc1b25 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8214,6 +8214,9 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
8214 } 8214 }
8215 8215
8216 tp->tx_mode = TX_MODE_ENABLE; 8216 tp->tx_mode = TX_MODE_ENABLE;
8217 if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) ||
8218 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
8219 tp->tx_mode |= TX_MODE_MBUF_LOCKUP_FIX;
8217 tw32_f(MAC_TX_MODE, tp->tx_mode); 8220 tw32_f(MAC_TX_MODE, tp->tx_mode);
8218 udelay(100); 8221 udelay(100);
8219 8222
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 84ea0dca7d29..c245e809d428 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -469,6 +469,7 @@
469#define TX_MODE_FLOW_CTRL_ENABLE 0x00000010 469#define TX_MODE_FLOW_CTRL_ENABLE 0x00000010
470#define TX_MODE_BIG_BCKOFF_ENABLE 0x00000020 470#define TX_MODE_BIG_BCKOFF_ENABLE 0x00000020
471#define TX_MODE_LONG_PAUSE_ENABLE 0x00000040 471#define TX_MODE_LONG_PAUSE_ENABLE 0x00000040
472#define TX_MODE_MBUF_LOCKUP_FIX 0x00000100
472#define MAC_TX_STATUS 0x00000460 473#define MAC_TX_STATUS 0x00000460
473#define TX_STATUS_XOFFED 0x00000001 474#define TX_STATUS_XOFFED 0x00000001
474#define TX_STATUS_SENT_XOFF 0x00000002 475#define TX_STATUS_SENT_XOFF 0x00000002