From: Greg Kroah-Hartman Date: Wed, 20 Oct 2010 21:42:56 +0000 (-0700) Subject: .27 patches X-Git-Tag: v2.6.27.55~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f5dd2ab23073db4f8a3160325ef3e5317d1e5eb;p=thirdparty%2Fkernel%2Fstable-queue.git .27 patches --- diff --git a/queue-2.6.27/bsg-fix-incorrect-device_status-value.patch b/queue-2.6.27/bsg-fix-incorrect-device_status-value.patch new file mode 100644 index 00000000000..02519d7b432 --- /dev/null +++ b/queue-2.6.27/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 +@@ -421,7 +421,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.27/powerpc-don-t-use-kernel-stack-with-translation-off.patch b/queue-2.6.27/powerpc-don-t-use-kernel-stack-with-translation-off.patch new file mode 100644 index 00000000000..d4444429d59 --- /dev/null +++ b/queue-2.6.27/powerpc-don-t-use-kernel-stack-with-translation-off.patch @@ -0,0 +1,68 @@ +From 54a834043314c257210db2a9d59f8cc605571639 Mon Sep 17 00:00:00 2001 +From: Michael Neuling +Date: Wed, 25 Aug 2010 21:04:25 +0000 +Subject: powerpc: Don't use kernel stack with translation off + +From: Michael Neuling + +commit 54a834043314c257210db2a9d59f8cc605571639 upstream. + +In f761622e59433130bc33ad086ce219feee9eb961 we changed +early_setup_secondary so it's called using the proper kernel stack +rather than the emergency one. + +Unfortunately, this stack pointer can't be used when translation is off +on PHYP as this stack pointer might be outside the RMO. This results in +the following on all non zero cpus: + cpu 0x1: Vector: 300 (Data Access) at [c00000001639fd10] + pc: 000000000001c50c + lr: 000000000000821c + sp: c00000001639ff90 + msr: 8000000000001000 + dar: c00000001639ffa0 + dsisr: 42000000 + current = 0xc000000016393540 + paca = 0xc000000006e00200 + pid = 0, comm = swapper + +The original patch was only tested on bare metal system, so it never +caught this problem. + +This changes __secondary_start so that we calculate the new stack +pointer but only start using it after we've called early_setup_secondary. + +With this patch, the above problem goes away. + +Signed-off-by: Michael Neuling +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/head_64.S | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/arch/powerpc/kernel/head_64.S ++++ b/arch/powerpc/kernel/head_64.S +@@ -1482,13 +1482,19 @@ __secondary_start: + /* Initialize the kernel stack. Just a repeat for iSeries. */ + LOAD_REG_ADDR(r3, current_set) + sldi r28,r24,3 /* get current_set[cpu#] */ +- ldx r1,r3,r28 +- addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD +- std r1,PACAKSAVE(r13) ++ ldx r14,r3,r28 ++ addi r14,r14,THREAD_SIZE-STACK_FRAME_OVERHEAD ++ std r14,PACAKSAVE(r13) + + /* Do early setup for that CPU (stab, slb, hash table pointer) */ + bl .early_setup_secondary + ++ /* ++ * setup the new stack pointer, but *don't* use this until ++ * translation is on. ++ */ ++ mr r1, r14 ++ + /* Clear backchain so we get nice backtraces */ + li r7,0 + mtlr r7 diff --git a/queue-2.6.27/powerpc-initialise-paca-kstack-before-early_setup_secondary.patch b/queue-2.6.27/powerpc-initialise-paca-kstack-before-early_setup_secondary.patch new file mode 100644 index 00000000000..3d260a84c86 --- /dev/null +++ b/queue-2.6.27/powerpc-initialise-paca-kstack-before-early_setup_secondary.patch @@ -0,0 +1,51 @@ +From f761622e59433130bc33ad086ce219feee9eb961 Mon Sep 17 00:00:00 2001 +From: Matt Evans +Date: Thu, 12 Aug 2010 20:58:28 +0000 +Subject: powerpc: Initialise paca->kstack before early_setup_secondary + +From: Matt Evans + +commit f761622e59433130bc33ad086ce219feee9eb961 upstream. + +As early setup calls down to slb_initialize(), we must have kstack +initialised before checking "should we add a bolted SLB entry for our kstack?" + +Failing to do so means stack access requires an SLB miss exception to refill +an entry dynamically, if the stack isn't accessible via SLB(0) (kernel text +& static data). It's not always allowable to take such a miss, and +intermittent crashes will result. + +Primary CPUs don't have this issue; an SLB entry is not bolted for their +stack anyway (as that lives within SLB(0)). This patch therefore only +affects the init of secondaries. + +Signed-off-by: Matt Evans +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/head_64.S | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/powerpc/kernel/head_64.S ++++ b/arch/powerpc/kernel/head_64.S +@@ -1479,9 +1479,6 @@ __secondary_start: + /* Load TOC */ + ld r2,PACATOC(r13) + +- /* Do early setup for that CPU (stab, slb, hash table pointer) */ +- bl .early_setup_secondary +- + /* Initialize the kernel stack. Just a repeat for iSeries. */ + LOAD_REG_ADDR(r3, current_set) + sldi r28,r24,3 /* get current_set[cpu#] */ +@@ -1489,6 +1486,9 @@ __secondary_start: + addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD + std r1,PACAKSAVE(r13) + ++ /* Do early setup for that CPU (stab, slb, hash table pointer) */ ++ bl .early_setup_secondary ++ + /* Clear backchain so we get nice backtraces */ + li r7,0 + mtlr r7 diff --git a/queue-2.6.27/r6040-fix-multicast-list-iteration-when-hash-filter-is-used.patch b/queue-2.6.27/r6040-fix-multicast-list-iteration-when-hash-filter-is-used.patch new file mode 100644 index 00000000000..1bbc71c5e02 --- /dev/null +++ b/queue-2.6.27/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 +@@ -976,6 +976,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.27/r6040-fix-r6040_multicast_list.patch b/queue-2.6.27/r6040-fix-r6040_multicast_list.patch new file mode 100644 index 00000000000..b3eea7c80c4 --- /dev/null +++ b/queue-2.6.27/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 */ +@@ -969,9 +969,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); +@@ -987,9 +984,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.27/series b/queue-2.6.27/series index 4585a4349e3..d154ff977f3 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -6,3 +6,8 @@ v4l1-fix-32-bit-compat-microcode-loading-translation.patch dmaengine-fix-interrupt-clearing-for-mv_xor.patch wext-fix-potential-private-ioctl-memory-content-leak.patch atl1-fix-resume.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 +powerpc-initialise-paca-kstack-before-early_setup_secondary.patch +powerpc-don-t-use-kernel-stack-with-translation-off.patch