Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2011-07-29 13:06:34 +0200
committerJiri Slaby <jslaby@suse.cz>2011-07-29 13:06:34 +0200
commitc8d864c89b6a4f1ae8fd82deef2cc4552c518bb1 (patch)
treed5b3641713dcea4cc9298f03f6c5291946fbb7ad
parentaa27d23f08e73f9bf75572c08baa19d5d40baea3 (diff)
tg3: Fix io failures after chip reset (bnc#705962).
-rw-r--r--patches.fixes/tg3-Fix-io-failures-after-chip-reset.patch66
-rw-r--r--series.conf1
2 files changed, 67 insertions, 0 deletions
diff --git a/patches.fixes/tg3-Fix-io-failures-after-chip-reset.patch b/patches.fixes/tg3-Fix-io-failures-after-chip-reset.patch
new file mode 100644
index 0000000000..c5f0113ccc
--- /dev/null
+++ b/patches.fixes/tg3-Fix-io-failures-after-chip-reset.patch
@@ -0,0 +1,66 @@
+From 9e975cc291d80d5e4562d6bed15ec171e896d69b Mon Sep 17 00:00:00 2001
+From: Matt Carlson <mcarlson@broadcom.com>
+Date: Wed, 20 Jul 2011 10:20:50 +0000
+Subject: tg3: Fix io failures after chip reset
+Git-commit: 9e975cc291d80d5e4562d6bed15ec171e896d69b
+Patch-mainline: v3.1-rc1
+References: bnc#705962
+
+Commit f2096f94b514d88593355995d5dd276961e88af1, entitled
+"tg3: Add 5720 H2BMC support", needed to add code to preserve some bits
+set by firmware. Unfortunately the new code causes throughput to stop
+after a chip reset because it enables state machines before they are
+ready. This patch undoes the problematic code. The bits will be
+restored later in the init sequence.
+
+Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
+Reviewed-by: Michael Chan <mchan@broadcom.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/net/tg3.c | 18 ++++++------------
+ 1 files changed, 6 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
+index a5ff82d..5bf7671 100644
+--- a/drivers/net/tg3.c
++++ b/drivers/net/tg3.c
+@@ -7412,16 +7412,11 @@ static int tg3_chip_reset(struct tg3 *tp)
+ tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl);
+ }
+
+- if (tg3_flag(tp, ENABLE_APE))
+- tp->mac_mode = MAC_MODE_APE_TX_EN |
+- MAC_MODE_APE_RX_EN |
+- MAC_MODE_TDE_ENABLE;
+-
+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) {
+- tp->mac_mode |= MAC_MODE_PORT_MODE_TBI;
++ tp->mac_mode = MAC_MODE_PORT_MODE_TBI;
+ val = tp->mac_mode;
+ } else if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) {
+- tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
++ tp->mac_mode = MAC_MODE_PORT_MODE_GMII;
+ val = tp->mac_mode;
+ } else
+ val = 0;
+@@ -8559,12 +8554,11 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
+ udelay(10);
+ }
+
+- if (tg3_flag(tp, ENABLE_APE))
+- tp->mac_mode = MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN;
+- else
+- tp->mac_mode = 0;
+ tp->mac_mode |= MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE |
+- MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE | MAC_MODE_FHDE_ENABLE;
++ MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE |
++ MAC_MODE_FHDE_ENABLE;
++ if (tg3_flag(tp, ENABLE_APE))
++ tp->mac_mode |= MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN;
+ if (!tg3_flag(tp, 5705_PLUS) &&
+ !(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) &&
+ GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700)
+--
+1.7.6
+
diff --git a/series.conf b/series.conf
index b8a9d866db..99d65dbde6 100644
--- a/series.conf
+++ b/series.conf
@@ -384,6 +384,7 @@
patches.fixes/tulip-quad-NIC-ifdown
patches.fixes/net-tulip-debug-off-by-default.patch
patches.drivers/ehea-modinfo.patch
+ patches.fixes/tg3-Fix-io-failures-after-chip-reset.patch
########################################################
# Wireless Networking