[kernel] r16461 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Tue Oct 19 12:08:42 UTC 2010
Author: benh
Date: Tue Oct 19 12:08:33 2010
New Revision: 16461
Log:
r6040: Fix various bugs in r6040_multicast_list() (Closes: #600155)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/r6040-Fix-multicast-list-iteration.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/r6040-fix-r6040_multicast_list.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/26
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Tue Oct 19 02:33:22 2010 (r16460)
+++ dists/sid/linux-2.6/debian/changelog Tue Oct 19 12:08:33 2010 (r16461)
@@ -22,6 +22,7 @@
* debian/bin/test-patches: Restrict patches to featureset when building
with a featureset (thanks to Tim Small)
* sata_via: Delay on vt6420 when starting ATAPI DMA write (Closes: #488566)
+ * r6040: Fix various bugs in r6040_multicast_list() (Closes: #600155)
[ dann frazier ]
* Force enable DMA on MBP w/ MCP 7,1
Added: dists/sid/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/sid/linux-2.6/debian/patches/bugfix/all/r6040-Fix-multicast-list-iteration.patch Tue Oct 19 12:08:33 2010 (r16461)
@@ -0,0 +1,34 @@
+From cc70977031de24e427d97577ab154237d59fe62a Mon Sep 17 00:00:00 2001
+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/sid/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/sid/linux-2.6/debian/patches/bugfix/all/r6040-fix-r6040_multicast_list.patch Tue Oct 19 12:08:33 2010 (r16461)
@@ -0,0 +1,66 @@
+From 5c95f74640fa3f320bf06122d749a2f597f10047 Mon Sep 17 00:00:00 2001
+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>
+---
+ 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 */
+
+ /* Descriptor status */
+ #define DSC_OWNER_MAC 0x8000 /* MAC is the owner of this descriptor */
+@@ -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/sid/linux-2.6/debian/patches/series/26
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/26 Tue Oct 19 02:33:22 2010 (r16460)
+++ dists/sid/linux-2.6/debian/patches/series/26 Tue Oct 19 12:08:33 2010 (r16461)
@@ -7,3 +7,5 @@
+ bugfix/all/ata_generic-implement-ATA_GEN_-flags-and-force-enable-DMA-on-MBP-7,1.patch
+ bugfix/all/ata_generic-drop-hard-coded-DMA-force-logic-for-CENATEK.patch
+ bugfix/all/sata_via-Delay-on-vt6420-when-starting-ATAPI-DMA-write.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