From: Greg Kroah-Hartman Date: Wed, 20 Oct 2010 21:43:27 +0000 (-0700) Subject: .33 stuff X-Git-Tag: v2.6.27.55~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c718c7c38fe520181c3b20567c679cd545e69ed;p=thirdparty%2Fkernel%2Fstable-queue.git .33 stuff ignore please --- diff --git a/queue-2.6.33/bsg-fix-incorrect-device_status-value.patch b/queue-2.6.33/bsg-fix-incorrect-device_status-value.patch new file mode 100644 index 00000000000..bba68b23eb3 --- /dev/null +++ b/queue-2.6.33/bsg-fix-incorrect-device_status-value.patch @@ -0,0 +1,32 @@ +From 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 Mon Sep 17 00:00:00 2001 +From: FUJITA Tomonori +Date: Fri, 17 Sep 2010 00:46:42 +0900 +Subject: [SCSI] bsg: fix incorrect device_status value + +From: FUJITA Tomonori + +commit 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 upstream. + +bsg incorrectly returns sg's masked_status value for device_status. + +[jejb: fix up expression logic] +Reported-by: Douglas Gilbert +Signed-off-by: FUJITA Tomonori +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + block/bsg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/block/bsg.c ++++ b/block/bsg.c +@@ -425,7 +425,7 @@ static int blk_complete_sgv4_hdr_rq(stru + /* + * fill in all the output members + */ +- hdr->device_status = status_byte(rq->errors); ++ hdr->device_status = rq->errors & 0xff; + hdr->transport_status = host_byte(rq->errors); + hdr->driver_status = driver_byte(rq->errors); + hdr->info = 0; diff --git a/queue-2.6.33/r6040-fix-multicast-list-iteration-when-hash-filter-is-used.patch b/queue-2.6.33/r6040-fix-multicast-list-iteration-when-hash-filter-is-used.patch new file mode 100644 index 00000000000..6a772653453 --- /dev/null +++ b/queue-2.6.33/r6040-fix-multicast-list-iteration-when-hash-filter-is-used.patch @@ -0,0 +1,39 @@ +From ben@decadent.org.uk Wed Oct 20 14:37:52 2010 +From: Ben Hutchings +Date: Fri, 15 Oct 2010 04:36:53 +0100 +Subject: r6040: Fix multicast list iteration when hash filter is used +To: stable@kernel.org, Florian Fainelli +Cc: 600155@bugs.debian.org, Jason Heeris , David Miller , spamalot@hispeed.ch +Message-ID: <1287113813.20865.20.camel@localhost> + +From: Ben Hutchings + +This was fixed in mainline by the interface change made in commit +f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249. + +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@hispeed.ch +Reference: https://bugzilla.kernel.org/show_bug.cgi?id=15355 +Reported-by: Jason Heeris +Reference: http://bugs.debian.org/600155 +Signed-off-by: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/r6040.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/r6040.c ++++ b/drivers/net/r6040.c +@@ -991,6 +991,7 @@ static void r6040_multicast_list(struct + 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); diff --git a/queue-2.6.33/r6040-fix-r6040_multicast_list.patch b/queue-2.6.33/r6040-fix-r6040_multicast_list.patch new file mode 100644 index 00000000000..8059f6631d9 --- /dev/null +++ b/queue-2.6.33/r6040-fix-r6040_multicast_list.patch @@ -0,0 +1,68 @@ +From 3bcf8229a8c49769e48d3e0bd1e20d8e003f8106 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Wed, 7 Apr 2010 16:50:58 -0700 +Subject: r6040: fix r6040_multicast_list + +From: Florian Fainelli + +commit 3bcf8229a8c49769e48d3e0bd1e20d8e003f8106 upstream. + +As reported in , 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 + +[bwh: Adjust for 2.6.32; should also apply to 2.6.27] + +Signed-off-by: Florian Fainelli +Signed-off-by: David S. Miller +Cc: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/r6040.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +--- 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 */ +@@ -984,9 +984,6 @@ static void r6040_multicast_list(struct + 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); +@@ -1002,9 +999,9 @@ static void r6040_multicast_list(struct + 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); + } + } + diff --git a/queue-2.6.33/series b/queue-2.6.33/series index 7e866bfd73d..fa993a2ba62 100644 --- a/queue-2.6.33/series +++ b/queue-2.6.33/series @@ -42,3 +42,6 @@ rose-fix-signedness-issues-wrt.-digi-count.patch tcp-fix-4gb-writes-on-64-bit.patch tcp-fix-race-in-tcp_poll.patch xfrm4-strip-ecn-and-ip-precedence-bits-in-policy-lookup.patch +bsg-fix-incorrect-device_status-value.patch +r6040-fix-r6040_multicast_list.patch +r6040-fix-multicast-list-iteration-when-hash-filter-is-used.patch