summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-03-15 07:33:20 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-15 07:33:20 -0700
commit8923f0d4de6568d2825593b1511cae0da527e964 (patch)
treeffeb51706b032352ff93f2ee0888b071c7ffabe8
parent3f19334f1867108db84597c958f8d695a8a993f6 (diff)
downloadlongterm-queue-2.6.33-8923f0d4de6568d2825593b1511cae0da527e964.tar.gz
.33
-rw-r--r--queue-2.6.33/libata-no-special-completion-processing-for-eh-commands.patch74
-rw-r--r--queue-2.6.33/mips-mtx-1-make-au1000_eth-probe-all-phy-addresses.patch54
-rw-r--r--queue-2.6.33/series3
-rw-r--r--queue-2.6.33/x86-mm-handle-mm_fault_error-in-kernel-space.patch57
4 files changed, 188 insertions, 0 deletions
diff --git a/queue-2.6.33/libata-no-special-completion-processing-for-eh-commands.patch b/queue-2.6.33/libata-no-special-completion-processing-for-eh-commands.patch
new file mode 100644
index 0000000..680fb1d
--- /dev/null
+++ b/queue-2.6.33/libata-no-special-completion-processing-for-eh-commands.patch
@@ -0,0 +1,74 @@
+From f08dc1ac6b15c681f4643d8da1700e06c3855608 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Thu, 9 Dec 2010 15:59:32 +0100
+Subject: libata: no special completion processing for EH commands
+
+From: Tejun Heo <tj@kernel.org>
+
+commit f08dc1ac6b15c681f4643d8da1700e06c3855608 upstream.
+
+ata_qc_complete() contains special handling for certain commands. For
+example, it schedules EH for device revalidation after certain
+configurations are changed. These shouldn't be applied to EH
+commands but they were.
+
+In most cases, it doesn't cause an actual problem because EH doesn't
+issue any command which would trigger special handling; however, ACPI
+can issue such commands via _GTF which can cause weird interactions.
+
+Restructure ata_qc_complete() such that EH commands are always passed
+on to __ata_qc_complete().
+
+stable: Please apply to -stable only after 2.6.38 is released.
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Reported-by: Kyle McMartin <kyle@mcmartin.ca>
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/libata-core.c | 24 +++++++++++++++---------
+ 1 file changed, 15 insertions(+), 9 deletions(-)
+
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -5016,9 +5016,6 @@ static void ata_verify_xfer(struct ata_q
+ {
+ struct ata_device *dev = qc->dev;
+
+- if (ata_tag_internal(qc->tag))
+- return;
+-
+ if (ata_is_nodata(qc->tf.protocol))
+ return;
+
+@@ -5062,14 +5059,23 @@ void ata_qc_complete(struct ata_queued_c
+ if (unlikely(qc->err_mask))
+ qc->flags |= ATA_QCFLAG_FAILED;
+
+- if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
+- /* always fill result TF for failed qc */
++ /*
++ * Finish internal commands without any further processing
++ * and always with the result TF filled.
++ */
++ if (unlikely(ata_tag_internal(qc->tag))) {
+ fill_result_tf(qc);
++ __ata_qc_complete(qc);
++ return;
++ }
+
+- if (!ata_tag_internal(qc->tag))
+- ata_qc_schedule_eh(qc);
+- else
+- __ata_qc_complete(qc);
++ /*
++ * Non-internal qc has failed. Fill the result TF and
++ * summon EH.
++ */
++ if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
++ fill_result_tf(qc);
++ ata_qc_schedule_eh(qc);
+ return;
+ }
+
diff --git a/queue-2.6.33/mips-mtx-1-make-au1000_eth-probe-all-phy-addresses.patch b/queue-2.6.33/mips-mtx-1-make-au1000_eth-probe-all-phy-addresses.patch
new file mode 100644
index 0000000..eea865f
--- /dev/null
+++ b/queue-2.6.33/mips-mtx-1-make-au1000_eth-probe-all-phy-addresses.patch
@@ -0,0 +1,54 @@
+From bf3a1eb85967dcbaae42f4fcb53c2392cec32677 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <florian@openwrt.org>
+Date: Sun, 27 Feb 2011 19:53:53 +0100
+Subject: MIPS: MTX-1: Make au1000_eth probe all PHY addresses
+
+From: Florian Fainelli <florian@openwrt.org>
+
+commit bf3a1eb85967dcbaae42f4fcb53c2392cec32677 upstream.
+
+When au1000_eth probes the MII bus for PHY address, if we do not set
+au1000_eth platform data's phy_search_highest_address, the MII probing
+logic will exit early and will assume a valid PHY is found at address 0.
+For MTX-1, the PHY is at address 31, and without this patch, the link
+detection/speed/duplex would not work correctly.
+
+Signed-off-by: Florian Fainelli <florian@openwrt.org>
+To: linux-mips@linux-mips.org
+Patchwork: https://patchwork.linux-mips.org/patch/2111/
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/mips/alchemy/mtx-1/platform.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/arch/mips/alchemy/mtx-1/platform.c
++++ b/arch/mips/alchemy/mtx-1/platform.c
+@@ -28,6 +28,8 @@
+ #include <linux/mtd/physmap.h>
+ #include <mtd/mtd-abi.h>
+
++#include <asm/mach-au1x00/au1xxx_eth.h>
++
+ static struct gpio_keys_button mtx1_gpio_button[] = {
+ {
+ .gpio = 207,
+@@ -140,10 +142,17 @@ static struct __initdata platform_device
+ &mtx1_mtd,
+ };
+
++static struct au1000_eth_platform_data mtx1_au1000_eth0_pdata = {
++ .phy_search_highest_addr = 1,
++ .phy1_search_mac0 = 1,
++};
++
+ static int __init mtx1_register_devices(void)
+ {
+ int rc;
+
++ au1xxx_override_eth_cfg(0, &mtx1_au1000_eth0_pdata);
++
+ rc = gpio_request(mtx1_gpio_button[0].gpio,
+ mtx1_gpio_button[0].desc);
+ if (rc < 0) {
diff --git a/queue-2.6.33/series b/queue-2.6.33/series
index 57b18cd..74973cc 100644
--- a/queue-2.6.33/series
+++ b/queue-2.6.33/series
@@ -429,3 +429,6 @@ hwmon-f71882fg-set-platform-drvdata-to-null-later.patch
mtd-jedec_probe-change-variable-name-from-cfi_p-to-cfi.patch
mtd-jedec_probe-initialise-make-sector-erase-command-variable.patch
mtd-add-platform-prefix-for-platform-modalias.patch
+libata-no-special-completion-processing-for-eh-commands.patch
+mips-mtx-1-make-au1000_eth-probe-all-phy-addresses.patch
+x86-mm-handle-mm_fault_error-in-kernel-space.patch
diff --git a/queue-2.6.33/x86-mm-handle-mm_fault_error-in-kernel-space.patch b/queue-2.6.33/x86-mm-handle-mm_fault_error-in-kernel-space.patch
new file mode 100644
index 0000000..e82e83e
--- /dev/null
+++ b/queue-2.6.33/x86-mm-handle-mm_fault_error-in-kernel-space.patch
@@ -0,0 +1,57 @@
+From f86268549f424f83b9eb0963989270e14fbfc3de Mon Sep 17 00:00:00 2001
+From: Andrey Vagin <avagin@openvz.org>
+Date: Wed, 9 Mar 2011 15:22:23 -0800
+Subject: x86/mm: Handle mm_fault_error() in kernel space
+
+From: Andrey Vagin <avagin@openvz.org>
+
+commit f86268549f424f83b9eb0963989270e14fbfc3de upstream.
+
+mm_fault_error() should not execute oom-killer, if page fault
+occurs in kernel space. E.g. in copy_from_user()/copy_to_user().
+
+This would happen if we find ourselves in OOM on a
+copy_to_user(), or a copy_from_user() which faults.
+
+Without this patch, the kernels hangs up in copy_from_user(),
+because OOM killer sends SIG_KILL to current process, but it
+can't handle a signal while in syscall, then the kernel returns
+to copy_from_user(), reexcute current command and provokes
+page_fault again.
+
+With this patch the kernel return -EFAULT from copy_from_user().
+
+The code, which checks that page fault occurred in kernel space,
+has been copied from do_sigbus().
+
+This situation is handled by the same way on powerpc, xtensa,
+tile, ...
+
+Signed-off-by: Andrey Vagin <avagin@openvz.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+LKML-Reference: <201103092322.p29NMNPH001682@imap1.linux-foundation.org>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/mm/fault.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/arch/x86/mm/fault.c
++++ b/arch/x86/mm/fault.c
+@@ -829,6 +829,13 @@ mm_fault_error(struct pt_regs *regs, uns
+ unsigned long address, unsigned int fault)
+ {
+ if (fault & VM_FAULT_OOM) {
++ /* Kernel mode? Handle exceptions or die: */
++ if (!(error_code & PF_USER)) {
++ up_read(&current->mm->mmap_sem);
++ no_context(regs, error_code, address);
++ return;
++ }
++
+ out_of_memory(regs, error_code, address);
+ } else {
+ if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON))