[kernel] r16462 - in dists/lenny/linux-2.6/debian: . patches/bugfix/all patches/series

Ben Hutchings benh at alioth.debian.org
Tue Oct 19 12:15:56 UTC 2010


Author: benh
Date: Tue Oct 19 12:15:40 2010
New Revision: 16462

Log:
r6040: Fix various bugs in r6040_multicast_list() (Closes: #600155)

Added:
   dists/lenny/linux-2.6/debian/patches/bugfix/all/r6040-Fix-multicast-list-iteration.patch
   dists/lenny/linux-2.6/debian/patches/bugfix/all/r6040-fix-r6040_multicast_list.patch
Modified:
   dists/lenny/linux-2.6/debian/changelog
   dists/lenny/linux-2.6/debian/patches/series/26

Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog	Tue Oct 19 12:08:33 2010	(r16461)
+++ dists/lenny/linux-2.6/debian/changelog	Tue Oct 19 12:15:40 2010	(r16462)
@@ -6,6 +6,7 @@
   * SCSI/mptsas: fix hangs caused by ATA pass-through (Closes: #594690)
   * xfs: prevent kernel crash due to corrupted inode log format
     (Closes: #550733)
+  * r6040: Fix various bugs in r6040_multicast_list() (Closes: #600155)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Thu, 09 Sep 2010 05:02:56 +0100
 

Added: dists/lenny/linux-2.6/debian/patches/bugfix/all/r6040-Fix-multicast-list-iteration.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/all/r6040-Fix-multicast-list-iteration.patch	Tue Oct 19 12:15:40 2010	(r16462)
@@ -0,0 +1,33 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Fri, 15 Oct 2010 04:21:39 +0100
+Subject: [PATCH 2/2] r6040: Fix multicast list iteration when hash filter is used
+
+After walking the multicast list to set up the hash filter, this
+function will walk off the end of the list when filling the
+exact-match entries.  This was fixed in mainline by the interface
+change made in commit f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249.
+
+Reported-by: spamalot at hispeed.ch
+Reference: https://bugzilla.kernel.org/show_bug.cgi?id=15355
+Reported-by: Jason Heeris <jason.heeris at gmail.com>
+Reference: http://bugs.debian.org/600155
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ drivers/net/r6040.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
+index ac865e1..9ee9f01 100644
+--- a/drivers/net/r6040.c
++++ b/drivers/net/r6040.c
+@@ -992,6 +992,7 @@ static void r6040_multicast_list(struct net_device *dev)
+ 		iowrite16(hash_table[3], ioaddr + MAR3);
+ 	}
+ 	/* Multicast Address 1~4 case */
++	dmi = dev->mc_list;
+ 	for (i = 0, dmi; (i < dev->mc_count) && (i < MCAST_MAX); i++) {
+ 		adrp = (u16 *)dmi->dmi_addr;
+ 		iowrite16(adrp[0], ioaddr + MID_1L + 8*i);
+-- 
+1.7.1
+

Added: dists/lenny/linux-2.6/debian/patches/bugfix/all/r6040-fix-r6040_multicast_list.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/all/r6040-fix-r6040_multicast_list.patch	Tue Oct 19 12:15:40 2010	(r16462)
@@ -0,0 +1,66 @@
+From: Florian Fainelli <florian at openwrt.org>
+Date: Wed, 7 Apr 2010 16:50:58 -0700
+Subject: [PATCH 1/2] r6040: fix r6040_multicast_list
+
+commit 3bcf8229a8c49769e48d3e0bd1e20d8e003f8106 upstream.
+
+As reported in <https://bugzilla.kernel.org/show_bug.cgi?id=15355>, r6040_
+multicast_list currently crashes. This is due a wrong maximum of multicast
+entries. This patch fixes the following issues with multicast:
+
+- number of maximum entries if off-by-one (4 instead of 3)
+
+- the writing of the hash table index is not necessary and leads to invalid
+values being written into the MCR1 register, so the MAC is simply put in a non
+coherent state
+
+- when we exceed the maximum number of mutlticast address, writing the
+broadcast address should be done in registers MID_1{L,M,H} instead of
+MID_O{L,M,H}, otherwise we would loose the adapter's MAC address
+
+Signed-off-by: Florian Fainelli <florian at openwrt.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+[bwh: Adjust context for 2.6.27]
+---
+ drivers/net/r6040.c |   11 ++++-------
+ 1 files changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
+index 8b14c6e..ac865e1 100644
+--- a/drivers/net/r6040.c
++++ b/drivers/net/r6040.c
+@@ -135,7 +135,7 @@
+ #define RX_DESC_SIZE	(RX_DCNT * sizeof(struct r6040_descriptor))
+ #define TX_DESC_SIZE	(TX_DCNT * sizeof(struct r6040_descriptor))
+ #define MBCR_DEFAULT	0x012A	/* MAC Bus Control Register */
+-#define MCAST_MAX	4	/* Max number multicast addresses to filter */
++#define MCAST_MAX	3	/* Max number multicast addresses to filter */
+ 
+ /* PHY settings */
+ #define ICPLUS_PHY_ID	0x0243
+@@ -985,9 +985,6 @@ static void r6040_multicast_list(struct net_device *dev)
+ 			crc >>= 26;
+ 			hash_table[crc >> 4] |= 1 << (15 - (crc & 0xf));
+ 		}
+-		/* Write the index of the hash table */
+-		for (i = 0; i < 4; i++)
+-			iowrite16(hash_table[i] << 14, ioaddr + MCR1);
+ 		/* Fill the MAC hash tables with their values */
+ 		iowrite16(hash_table[0], ioaddr + MAR0);
+ 		iowrite16(hash_table[1], ioaddr + MAR1);
+@@ -1003,9 +1000,9 @@ static void r6040_multicast_list(struct net_device *dev)
+ 		dmi = dmi->next;
+ 	}
+ 	for (i = dev->mc_count; i < MCAST_MAX; i++) {
+-		iowrite16(0xffff, ioaddr + MID_0L + 8*i);
+-		iowrite16(0xffff, ioaddr + MID_0M + 8*i);
+-		iowrite16(0xffff, ioaddr + MID_0H + 8*i);
++		iowrite16(0xffff, ioaddr + MID_1L + 8*i);
++		iowrite16(0xffff, ioaddr + MID_1M + 8*i);
++		iowrite16(0xffff, ioaddr + MID_1H + 8*i);
+ 	}
+ }
+ 
+-- 
+1.7.1
+

Modified: dists/lenny/linux-2.6/debian/patches/series/26
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/26	Tue Oct 19 12:08:33 2010	(r16461)
+++ dists/lenny/linux-2.6/debian/patches/series/26	Tue Oct 19 12:15:40 2010	(r16462)
@@ -1,3 +1,5 @@
 + bugfix/all/math-emu-correct-test-for-downshifting-fraction.patch
 + bugfix/all/SCSI-mptsas-fix-hangs-caused-by-ATA-pass-through.patch
 + bugfix/all/xfs-prevent-kernel-crash-due-to-corrupted-inode-log.patch
++ bugfix/all/r6040-fix-r6040_multicast_list.patch
++ bugfix/all/r6040-Fix-multicast-list-iteration.patch



More information about the Kernel-svn-changes mailing list