aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <benh@debian.org>2012-10-05 03:40:40 +0000
committerBen Hutchings <benh@debian.org>2012-10-05 03:40:40 +0000
commitdc330598839f5f58e7e5266c5c649e932fffd997 (patch)
treedde4b8931169b1a10aca31b10e5cb8840047c8cd
parentd9b6943846dcc20889b566289432e1dc559f225d (diff)
downloadkernel_replicant_linux-dc330598839f5f58e7e5266c5c649e932fffd997.tar.gz
kernel_replicant_linux-dc330598839f5f58e7e5266c5c649e932fffd997.tar.bz2
kernel_replicant_linux-dc330598839f5f58e7e5266c5c649e932fffd997.zip
tg3: Fix TSO CAP for 5704 devs w / ASF enabled
Cherry-picked based on an upstream bug report by a Debian user. svn path=/dists/sid/linux/; revision=19413
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/bugfix/all/tg3-Fix-TSO-CAP-for-5704-devs-w-ASF-enabled.patch59
-rw-r--r--debian/patches/series1
3 files changed, 61 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 4dc6781cdc31..c39df59f23d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ linux (3.2.30-2) UNRELEASED; urgency=low
* codel: refine one condition to avoid a nul rec_inv_sqrt
* [mips,mipsel] Ignore NFS/SunRPC ABI changes in 3.2.30 (fixes FTBFS)
+ * tg3: Fix TSO CAP for 5704 devs w / ASF enabled
-- Ben Hutchings <ben@decadent.org.uk> Sat, 29 Sep 2012 14:19:46 +0200
diff --git a/debian/patches/bugfix/all/tg3-Fix-TSO-CAP-for-5704-devs-w-ASF-enabled.patch b/debian/patches/bugfix/all/tg3-Fix-TSO-CAP-for-5704-devs-w-ASF-enabled.patch
new file mode 100644
index 000000000000..00e50676cc40
--- /dev/null
+++ b/debian/patches/bugfix/all/tg3-Fix-TSO-CAP-for-5704-devs-w-ASF-enabled.patch
@@ -0,0 +1,59 @@
+From: Matt Carlson <mcarlson@broadcom.com>
+Date: Mon, 28 Nov 2011 09:41:03 +0000
+Subject: tg3: Fix TSO CAP for 5704 devs w / ASF enabled
+
+commit cf9ecf4b631f649a964fa611f1a5e8874f2a76db upstream.
+
+On the earliest TSO capable devices, TSO was accomplished through
+firmware. The TSO cannot coexist with ASF management firmware though.
+The tg3 driver determines whether or not ASF is enabled by calling
+tg3_get_eeprom_hw_cfg(), which checks a particular bit of NIC memory.
+Commit dabc5c670d3f86d15ee4f42ab38ec5bd2682487d, entitled "tg3: Move
+TSO_CAPABLE assignment", accidentally moved the code that determines
+TSO capabilities earlier than the call to tg3_get_eeprom_hw_cfg(). As a
+consequence, the driver was attempting to determine TSO capabilities
+before it had all the data it needed to make the decision.
+
+This patch fixes the problem by revisiting and reevaluating the decision
+after tg3_get_eeprom_hw_cfg() is called.
+
+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>
+---
+ drivers/net/ethernet/broadcom/tg3.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
+index 0acb279..0c695dc 100644
+--- a/drivers/net/ethernet/broadcom/tg3.c
++++ b/drivers/net/ethernet/broadcom/tg3.c
+@@ -13988,9 +13988,13 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
+ if (tg3_flag(tp, HW_TSO_1) ||
+ tg3_flag(tp, HW_TSO_2) ||
+ tg3_flag(tp, HW_TSO_3) ||
+- (tp->fw_needed && !tg3_flag(tp, ENABLE_ASF)))
++ tp->fw_needed) {
++ /* For firmware TSO, assume ASF is disabled.
++ * We'll disable TSO later if we discover ASF
++ * is enabled in tg3_get_eeprom_hw_cfg().
++ */
+ tg3_flag_set(tp, TSO_CAPABLE);
+- else {
++ } else {
+ tg3_flag_clear(tp, TSO_CAPABLE);
+ tg3_flag_clear(tp, TSO_BUG);
+ tp->fw_needed = NULL;
+@@ -14266,6 +14270,12 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
+ */
+ tg3_get_eeprom_hw_cfg(tp);
+
++ if (tp->fw_needed && tg3_flag(tp, ENABLE_ASF)) {
++ tg3_flag_clear(tp, TSO_CAPABLE);
++ tg3_flag_clear(tp, TSO_BUG);
++ tp->fw_needed = NULL;
++ }
++
+ if (tg3_flag(tp, ENABLE_APE)) {
+ /* Allow reads and writes to the
+ * APE register and memory space.
diff --git a/debian/patches/series b/debian/patches/series
index e69b6aa427a7..b3949ba20746 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -398,3 +398,4 @@ bugfix/x86/drm-i915-i8xx-interrupt-handler.patch
features/arm/ahci-Add-JMicron-362-device-IDs.patch
bugfix/all/speakup-lower-default-software-speech-rate.patch
debian/perf-hide-abi-change-in-3.2.30.patch
+bugfix/all/tg3-Fix-TSO-CAP-for-5704-devs-w-ASF-enabled.patch