]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .31 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 16 Sep 2009 21:49:28 +0000 (14:49 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 16 Sep 2009 21:49:28 +0000 (14:49 -0700)
queue-2.6.31/libata-fix-off-by-one-error-in-ata_tf_read_block.patch [new file with mode: 0644]
queue-2.6.31/pci-quirk-update-82576-device-ids-in-sr-iov-quirks-list.patch [new file with mode: 0644]
queue-2.6.31/pci-unhide-the-smbus-on-the-compaq-evo-d510-usdt.patch [new file with mode: 0644]
queue-2.6.31/powerpc-pseries-fix-to-handle-slb-resize-across-migration.patch [new file with mode: 0644]
queue-2.6.31/series

diff --git a/queue-2.6.31/libata-fix-off-by-one-error-in-ata_tf_read_block.patch b/queue-2.6.31/libata-fix-off-by-one-error-in-ata_tf_read_block.patch
new file mode 100644 (file)
index 0000000..7618d44
--- /dev/null
@@ -0,0 +1,42 @@
+From ac8672ea922bde59acf50eaa1eaa1640a6395fd2 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <htejun@gmail.com>
+Date: Sun, 16 Aug 2009 21:21:21 +0900
+Subject: libata: fix off-by-one error in ata_tf_read_block()
+
+From: Tejun Heo <htejun@gmail.com>
+
+commit ac8672ea922bde59acf50eaa1eaa1640a6395fd2 upstream.
+
+ata_tf_read_block() has off-by-one error when converting CHS address
+to LBA.  The bug isn't very visible because ata_tf_read_block() is
+used only when generating sense data for a failed RW command and CHS
+addressing isn't used too often these days.
+
+This problem was spotted by Atsushi Nemoto.
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Reported-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/libata-core.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -709,7 +709,13 @@ u64 ata_tf_read_block(struct ata_taskfil
+               head = tf->device & 0xf;
+               sect = tf->lbal;
+-              block = (cyl * dev->heads + head) * dev->sectors + sect;
++              if (!sect) {
++                      ata_dev_printk(dev, KERN_WARNING, "device reported "
++                                     "invalid CHS sector 0\n");
++                      sect = 1; /* oh well */
++              }
++
++              block = (cyl * dev->heads + head) * dev->sectors + sect - 1;
+       }
+       return block;
diff --git a/queue-2.6.31/pci-quirk-update-82576-device-ids-in-sr-iov-quirks-list.patch b/queue-2.6.31/pci-quirk-update-82576-device-ids-in-sr-iov-quirks-list.patch
new file mode 100644 (file)
index 0000000..b2a2e50
--- /dev/null
@@ -0,0 +1,31 @@
+From 6f1186be4feb3364d3a52cbea81e43e4d5296196 Mon Sep 17 00:00:00 2001
+From: Alexander Duyck <alexander.h.duyck@intel.com>
+Date: Thu, 13 Aug 2009 16:57:49 -0700
+Subject: PCI quirk: update 82576 device ids in SR-IOV quirks list
+
+From: Alexander Duyck <alexander.h.duyck@intel.com>
+
+commit 6f1186be4feb3364d3a52cbea81e43e4d5296196 upstream.
+
+This patch adds the most recent additions to the list of 82576 device IDs
+to the list of devices needing the SR-IOV quirk.
+
+Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/quirks.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/pci/quirks.c
++++ b/drivers/pci/quirks.c
+@@ -2494,6 +2494,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e7, quirk_i82576_sriov);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e8, quirk_i82576_sriov);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x150a, quirk_i82576_sriov);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x150d, quirk_i82576_sriov);
+ #endif        /* CONFIG_PCI_IOV */
diff --git a/queue-2.6.31/pci-unhide-the-smbus-on-the-compaq-evo-d510-usdt.patch b/queue-2.6.31/pci-unhide-the-smbus-on-the-compaq-evo-d510-usdt.patch
new file mode 100644 (file)
index 0000000..f653107
--- /dev/null
@@ -0,0 +1,33 @@
+From 6b5096e4d4496e185cd1ada5d1b8e1d941c805ed Mon Sep 17 00:00:00 2001
+From: Jean Delvare <khali@linux-fr.org>
+Date: Tue, 28 Jul 2009 11:49:19 +0200
+Subject: PCI: Unhide the SMBus on the Compaq Evo D510 USDT
+
+From: Jean Delvare <khali@linux-fr.org>
+
+commit 6b5096e4d4496e185cd1ada5d1b8e1d941c805ed upstream.
+
+One more form factor for Compaq Evo D510, which needs the same quirk
+as the other form factors. Apparently there's no hardware monitoring
+chip on that one, but SPD EEPROMs, so it's still worth unhiding the
+SMBus.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Tested-by: Nuzhna Pomoshch <nuzhna_pomoshch@yahoo.com>
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/quirks.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/pci/quirks.c
++++ b/drivers/pci/quirks.c
+@@ -1201,6 +1201,7 @@ static void __init asus_hides_smbus_host
+                       switch(dev->subsystem_device) {
+                       case 0x00b8: /* Compaq Evo D510 CMT */
+                       case 0x00b9: /* Compaq Evo D510 SFF */
++                      case 0x00ba: /* Compaq Evo D510 USDT */
+                               /* Motherboard doesn't have Host bridge
+                                * subvendor/subdevice IDs and on-board VGA
+                                * controller is disabled if an AGP card is
diff --git a/queue-2.6.31/powerpc-pseries-fix-to-handle-slb-resize-across-migration.patch b/queue-2.6.31/powerpc-pseries-fix-to-handle-slb-resize-across-migration.patch
new file mode 100644 (file)
index 0000000..044ac85
--- /dev/null
@@ -0,0 +1,164 @@
+From 46db2f86a3b2a94e0b33e0b4548fb7b7b6bdff66 Mon Sep 17 00:00:00 2001
+From: Brian King <brking@linux.vnet.ibm.com>
+Date: Fri, 28 Aug 2009 12:06:29 +0000
+Subject: powerpc/pseries: Fix to handle slb resize across migration
+
+From: Brian King <brking@linux.vnet.ibm.com>
+
+commit 46db2f86a3b2a94e0b33e0b4548fb7b7b6bdff66 upstream.
+
+The SLB can change sizes across a live migration, which was not
+being handled, resulting in possible machine crashes during
+migration if migrating to a machine which has a smaller max SLB
+size than the source machine. Fix this by first reducing the
+SLB size to the minimum possible value, which is 32, prior to
+migration. Then during the device tree update which occurs after
+migration, we make the call to ensure the SLB gets updated. Also
+add the slb_size to the lparcfg output so that the migration
+tools can check to make sure the kernel has this capability
+before allowing migration in scenarios where the SLB size will change.
+
+BenH: Fixed #include <asm/mmu-hash64.h> -> <asm/mmu.h> to avoid
+      breaking ppc32 build
+
+Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/include/asm/mmu-hash64.h     |    2 ++
+ arch/powerpc/kernel/lparcfg.c             |    3 +++
+ arch/powerpc/kernel/rtas.c                |    7 ++++++-
+ arch/powerpc/mm/slb.c                     |   16 ++++++++++++----
+ arch/powerpc/platforms/pseries/reconfig.c |    9 ++++++++-
+ 5 files changed, 31 insertions(+), 6 deletions(-)
+
+--- a/arch/powerpc/include/asm/mmu-hash64.h
++++ b/arch/powerpc/include/asm/mmu-hash64.h
+@@ -41,6 +41,7 @@ extern char initial_stab[];
+ #define SLB_NUM_BOLTED                3
+ #define SLB_CACHE_ENTRIES     8
++#define SLB_MIN_SIZE          32
+ /* Bits in the SLB ESID word */
+ #define SLB_ESID_V            ASM_CONST(0x0000000008000000) /* valid */
+@@ -296,6 +297,7 @@ extern void slb_flush_and_rebolt(void);
+ extern void stab_initialize(unsigned long stab);
+ extern void slb_vmalloc_update(void);
++extern void slb_set_size(u16 size);
+ #endif /* __ASSEMBLY__ */
+ /*
+--- a/arch/powerpc/kernel/lparcfg.c
++++ b/arch/powerpc/kernel/lparcfg.c
+@@ -35,6 +35,7 @@
+ #include <asm/prom.h>
+ #include <asm/vdso_datapage.h>
+ #include <asm/vio.h>
++#include <asm/mmu.h>
+ #define MODULE_VERS "1.8"
+ #define MODULE_NAME "lparcfg"
+@@ -537,6 +538,8 @@ static int pseries_lparcfg_data(struct s
+       seq_printf(m, "shared_processor_mode=%d\n", lppaca[0].shared_proc);
++      seq_printf(m, "slb_size=%d\n", mmu_slb_size);
++
+       return 0;
+ }
+--- a/arch/powerpc/kernel/rtas.c
++++ b/arch/powerpc/kernel/rtas.c
+@@ -39,6 +39,7 @@
+ #include <asm/smp.h>
+ #include <asm/atomic.h>
+ #include <asm/time.h>
++#include <asm/mmu.h>
+ struct rtas_t rtas = {
+       .lock = __RAW_SPIN_LOCK_UNLOCKED
+@@ -713,6 +714,7 @@ static void rtas_percpu_suspend_me(void 
+ {
+       long rc = H_SUCCESS;
+       unsigned long msr_save;
++      u16 slb_size = mmu_slb_size;
+       int cpu;
+       struct rtas_suspend_me_data *data =
+               (struct rtas_suspend_me_data *)info;
+@@ -735,13 +737,16 @@ static void rtas_percpu_suspend_me(void 
+               /* All other cpus are in H_JOIN, this cpu does
+                * the suspend.
+                */
++              slb_set_size(SLB_MIN_SIZE);
+               printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n",
+                      smp_processor_id());
+               data->error = rtas_call(data->token, 0, 1, NULL);
+-              if (data->error)
++              if (data->error) {
+                       printk(KERN_DEBUG "ibm,suspend-me returned %d\n",
+                              data->error);
++                      slb_set_size(slb_size);
++              }
+       } else {
+               printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n",
+                      smp_processor_id(), rc);
+--- a/arch/powerpc/mm/slb.c
++++ b/arch/powerpc/mm/slb.c
+@@ -240,14 +240,22 @@ void switch_slb(struct task_struct *tsk,
+ static inline void patch_slb_encoding(unsigned int *insn_addr,
+                                     unsigned int immed)
+ {
+-      /* Assume the instruction had a "0" immediate value, just
+-       * "or" in the new value
+-       */
+-      *insn_addr |= immed;
++      *insn_addr = (*insn_addr & 0xffff0000) | immed;
+       flush_icache_range((unsigned long)insn_addr, 4+
+                          (unsigned long)insn_addr);
+ }
++void slb_set_size(u16 size)
++{
++      extern unsigned int *slb_compare_rr_to_size;
++
++      if (mmu_slb_size == size)
++              return;
++
++      mmu_slb_size = size;
++      patch_slb_encoding(slb_compare_rr_to_size, mmu_slb_size);
++}
++
+ void slb_initialize(void)
+ {
+       unsigned long linear_llp, vmalloc_llp, io_llp;
+--- a/arch/powerpc/platforms/pseries/reconfig.c
++++ b/arch/powerpc/platforms/pseries/reconfig.c
+@@ -20,6 +20,7 @@
+ #include <asm/machdep.h>
+ #include <asm/uaccess.h>
+ #include <asm/pSeries_reconfig.h>
++#include <asm/mmu.h>
+@@ -439,9 +440,15 @@ static int do_update_property(char *buf,
+       if (!newprop)
+               return -ENOMEM;
++      if (!strcmp(name, "slb-size") || !strcmp(name, "ibm,slb-size"))
++              slb_set_size(*(int *)value);
++
+       oldprop = of_find_property(np, name,NULL);
+-      if (!oldprop)
++      if (!oldprop) {
++              if (strlen(name))
++                      return prom_add_property(np, newprop);
+               return -ENODEV;
++      }
+       rc = prom_update_property(np, newprop, oldprop);
+       if (rc)
index cea973d6412a2cc2c9a0efa6c97f2abd4ac37392..5667d49868b41baed99453eaadbeb52ce1816a41 100644 (file)
@@ -39,3 +39,7 @@ kvm-x86-emulator-implement-zero-extended-immediate-decoding.patch
 kvm-mmu-make-__kvm_mmu_free_some_pages-handle-empty-list.patch
 kvm-x86-emulator-fix-jmp-far-decoding.patch
 kvm-limit-lapic-periodic-timer-frequency.patch
+libata-fix-off-by-one-error-in-ata_tf_read_block.patch
+pci-quirk-update-82576-device-ids-in-sr-iov-quirks-list.patch
+pci-unhide-the-smbus-on-the-compaq-evo-d510-usdt.patch
+powerpc-pseries-fix-to-handle-slb-resize-across-migration.patch