aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-omap-2.6.37/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2011-01-18 11:32:59 +0100
committerKoen Kooi <koen@openembedded.org>2011-01-18 11:53:28 +0100
commitc8195fa9cf57165ee28ac31477907991bc44bc76 (patch)
tree6a6a105f73abaf363e3a17caafd32060e2405aa4 /recipes/linux/linux-omap-2.6.37/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch
parent62eebc44737ee8a253770503d038be730ce9a3dd (diff)
downloadopenembedded-c8195fa9cf57165ee28ac31477907991bc44bc76.tar.gz
linux-omap 2.6.37: replace various patch with upstream versions and rediff
* The beagle poweron patch was split into 3 and accepted upstream thanks to Nishant * the 2 720MHz patches were combined and pending acceptance thanks to Sanjeev * the boardfile 720MHz patches aren't needed anymore Signed-off-by: Koen Kooi <koen@openembedded.org>
Diffstat (limited to 'recipes/linux/linux-omap-2.6.37/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch')
-rw-r--r--recipes/linux/linux-omap-2.6.37/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-2.6.37/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch b/recipes/linux/linux-omap-2.6.37/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch
new file mode 100644
index 0000000000..9db691b148
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.37/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch
@@ -0,0 +1,63 @@
+From f14284bb4ad057377b4944bb3985352fe1079c60 Mon Sep 17 00:00:00 2001
+From: J. K. Cliburn <jcliburn@gmail.com>
+Date: Sat, 1 Jan 2011 05:02:12 +0000
+Subject: [PATCH 57/65] atl1: fix oops when changing tx/rx ring params
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit 3f5a2a713aad28480d86b0add00c68484b54febc zeroes out the statistics
+message block (SMB) and coalescing message block (CMB) when adapter ring
+resources are freed. This is desirable behavior, but, as a side effect,
+the commit leads to an oops when atl1_set_ringparam() attempts to alter
+the number of rx or tx elements in the ring buffer (by using ethtool
+-G, for example). We don't want SMB or CMB to change during this
+operation.
+
+Modify atl1_set_ringparam() to preserve SMB and CMB when changing ring
+parameters.
+
+Cc: stable@kernel.org
+Signed-off-by: Jay Cliburn <jcliburn@gmail.com>
+Reported-by: Tõnu Raitviir <jussuf@linux.ee>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/atlx/atl1.c | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
+index 5336310..3acf512 100644
+--- a/drivers/net/atlx/atl1.c
++++ b/drivers/net/atlx/atl1.c
+@@ -3504,6 +3504,8 @@ static int atl1_set_ringparam(struct net_device *netdev,
+ struct atl1_rfd_ring rfd_old, rfd_new;
+ struct atl1_rrd_ring rrd_old, rrd_new;
+ struct atl1_ring_header rhdr_old, rhdr_new;
++ struct atl1_smb smb;
++ struct atl1_cmb cmb;
+ int err;
+
+ tpd_old = adapter->tpd_ring;
+@@ -3544,11 +3546,19 @@ static int atl1_set_ringparam(struct net_device *netdev,
+ adapter->rrd_ring = rrd_old;
+ adapter->tpd_ring = tpd_old;
+ adapter->ring_header = rhdr_old;
++ /*
++ * Save SMB and CMB, since atl1_free_ring_resources
++ * will clear them.
++ */
++ smb = adapter->smb;
++ cmb = adapter->cmb;
+ atl1_free_ring_resources(adapter);
+ adapter->rfd_ring = rfd_new;
+ adapter->rrd_ring = rrd_new;
+ adapter->tpd_ring = tpd_new;
+ adapter->ring_header = rhdr_new;
++ adapter->smb = smb;
++ adapter->cmb = cmb;
+
+ err = atl1_up(adapter);
+ if (err)
+--
+1.6.6.1
+