From: Greg Kroah-Hartman Date: Mon, 29 Jun 2009 23:12:26 +0000 (-0700) Subject: .27 patches X-Git-Tag: v2.6.27.26~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21bf282bf3b23638892eb9c25771fff8e1f107c1;p=thirdparty%2Fkernel%2Fstable-queue.git .27 patches --- diff --git a/queue-2.6.27/alsa-ca0106-add-missing-registrations-of-vmaster-controls.patch b/queue-2.6.27/alsa-ca0106-add-missing-registrations-of-vmaster-controls.patch new file mode 100644 index 00000000000..c5ece881f44 --- /dev/null +++ b/queue-2.6.27/alsa-ca0106-add-missing-registrations-of-vmaster-controls.patch @@ -0,0 +1,42 @@ +From 601e1cc5df940b59e71c947726640811897d30df Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 2 Jun 2009 11:37:01 +0200 +Subject: ALSA: ca0106 - Add missing registrations of vmaster controls + +From: Takashi Iwai + +commit 601e1cc5df940b59e71c947726640811897d30df upstream. + +Although the vmaster controls are created, they aren't registered thus +they don't appear in the real world. Added the missing snd_ctl_add() +calls. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/ca0106/ca0106_mixer.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/sound/pci/ca0106/ca0106_mixer.c ++++ b/sound/pci/ca0106/ca0106_mixer.c +@@ -761,6 +761,9 @@ int __devinit snd_ca0106_mixer(struct sn + snd_ca0106_master_db_scale); + if (!vmaster) + return -ENOMEM; ++ err = snd_ctl_add(card, vmaster); ++ if (err < 0) ++ return err; + add_slaves(card, vmaster, slave_vols); + + if (emu->details->spi_dac == 1) { +@@ -768,6 +771,9 @@ int __devinit snd_ca0106_mixer(struct sn + NULL); + if (!vmaster) + return -ENOMEM; ++ err = snd_ctl_add(card, vmaster); ++ if (err < 0) ++ return err; + add_slaves(card, vmaster, slave_sws); + } + return 0; diff --git a/queue-2.6.27/floppy-provide-a-pnp-device-table-in-the-module.patch b/queue-2.6.27/floppy-provide-a-pnp-device-table-in-the-module.patch new file mode 100644 index 00000000000..7e44eb212f3 --- /dev/null +++ b/queue-2.6.27/floppy-provide-a-pnp-device-table-in-the-module.patch @@ -0,0 +1,53 @@ +From 83f9ef463bcb4ba7b4fee1d6212fac7d277010d3 Mon Sep 17 00:00:00 2001 +From: Scott James Remnant +Date: Thu, 2 Apr 2009 16:56:47 -0700 +Subject: floppy: provide a PNP device table in the module. + +From: Scott James Remnant + +commit 83f9ef463bcb4ba7b4fee1d6212fac7d277010d3 upstream. + +The missing device table means that the floppy module is not auto-loaded, +even when the appropriate PNP device (0700) is found. + +We don't actually use the table in the module, since the device doesn't +have a struct pnp_driver, but it's sufficient to cause an alias in the +module that udev/modprobe will use. + +Signed-off-by: Scott James Remnant +Signed-off-by: Tim Gardner +Cc: Bjorn Helgaas +Cc: Philippe De Muyter +Acked-by: Kay Sievers +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/floppy.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/block/floppy.c ++++ b/drivers/block/floppy.c +@@ -177,6 +177,7 @@ static int print_unex = 1; + #include + #include + #include ++#include + #include /* for invalidate_buffers() */ + #include + +@@ -4572,6 +4573,13 @@ MODULE_AUTHOR("Alain L. Knaff"); + MODULE_SUPPORTED_DEVICE("fd"); + MODULE_LICENSE("GPL"); + ++/* This doesn't actually get used other than for module information */ ++static const struct pnp_device_id floppy_pnpids[] = { ++ { "PNP0700", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(pnp, floppy_pnpids); ++ + #else + + __setup("floppy=", floppy_setup); diff --git a/queue-2.6.27/floppy-request-and-release-only-the-ports-we-actually-use.patch b/queue-2.6.27/floppy-request-and-release-only-the-ports-we-actually-use.patch new file mode 100644 index 00000000000..a359b3ca5b7 --- /dev/null +++ b/queue-2.6.27/floppy-request-and-release-only-the-ports-we-actually-use.patch @@ -0,0 +1,200 @@ +From 5a74db06cc8d36a325913aa4968ae169f997a466 Mon Sep 17 00:00:00 2001 +From: Philippe De Muyter +Date: Wed, 18 Feb 2009 14:48:36 -0800 +Subject: floppy: request and release only the ports we actually use + +From: Philippe De Muyter + +commit 5a74db06cc8d36a325913aa4968ae169f997a466 upstream. + +The floppy driver requests an I/O port it doesn't need, and sometimes this +causes a conflict with a motherboard device reported by PNPBIOS. + +This patch makes the floppy driver request and release only the ports it +actually uses. It also factors out the request/release stuff and the +io-ports list so they're all in one place now. + +The current floppy driver uses only these ports: + + 0x3f2 (FD_DOR) + 0x3f4 (FD_STATUS) + 0x3f5 (FD_DATA) + 0x3f7 (FD_DCR/FD_DIR) + +but it requests 0x3f2-0x3f5 and 0x3f7, which includes the unused port +0x3f3. + +Some BIOSes report 0x3f3 as a motherboard resource. The PNP system driver +reserves that, which causes a conflict when the floppy driver requests +0x3f2-0x3f5 later. + +Philippe reported that this conflict broke the floppy driver between +2.6.11 and 2.6.22. His PNPBIOS reports these devices: + + $ cat 00:07/id 00:07/resources # motherboard device + PNP0c02 + state = active + io 0x80-0x80 + io 0x10-0x1f + io 0x22-0x3f + io 0x44-0x5f + io 0x90-0x9f + io 0xa2-0xbf + io 0x3f0-0x3f1 + io 0x3f3-0x3f3 + + $ cat 00:03/id 00:03/resources # floppy device + PNP0700 + state = active + io 0x3f4-0x3f5 + io 0x3f2-0x3f2 + +Reference: + http://lkml.org/lkml/2009/1/31/162 + +Signed-off-by: Bjorn Helgaas +Signed-off-by: Philippe De Muyter +Reported-by: Philippe De Muyter +Tested-by: Philippe De Muyter +Cc: Adam M Belay +Cc: Robert Hancock +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/floppy.c | 79 ++++++++++++++++++++++++++++++++----------------- + 1 file changed, 52 insertions(+), 27 deletions(-) + +--- a/drivers/block/floppy.c ++++ b/drivers/block/floppy.c +@@ -552,6 +552,8 @@ static void process_fd_request(void); + static void recalibrate_floppy(void); + static void floppy_shutdown(unsigned long); + ++static int floppy_request_regions(int); ++static void floppy_release_regions(int); + static int floppy_grab_irq_and_dma(void); + static void floppy_release_irq_and_dma(void); + +@@ -4274,8 +4276,7 @@ static int __init floppy_init(void) + FDCS->rawcmd = 2; + if (user_reset_fdc(-1, FD_RESET_ALWAYS, 0)) { + /* free ioports reserved by floppy_grab_irq_and_dma() */ +- release_region(FDCS->address + 2, 4); +- release_region(FDCS->address + 7, 1); ++ floppy_release_regions(fdc); + FDCS->address = -1; + FDCS->version = FDC_NONE; + continue; +@@ -4284,8 +4285,7 @@ static int __init floppy_init(void) + FDCS->version = get_fdc_version(); + if (FDCS->version == FDC_NONE) { + /* free ioports reserved by floppy_grab_irq_and_dma() */ +- release_region(FDCS->address + 2, 4); +- release_region(FDCS->address + 7, 1); ++ floppy_release_regions(fdc); + FDCS->address = -1; + continue; + } +@@ -4358,6 +4358,47 @@ out_put_disk: + + static DEFINE_SPINLOCK(floppy_usage_lock); + ++static const struct io_region { ++ int offset; ++ int size; ++} io_regions[] = { ++ { 2, 1 }, ++ /* address + 3 is sometimes reserved by pnp bios for motherboard */ ++ { 4, 2 }, ++ /* address + 6 is reserved, and may be taken by IDE. ++ * Unfortunately, Adaptec doesn't know this :-(, */ ++ { 7, 1 }, ++}; ++ ++static void floppy_release_allocated_regions(int fdc, const struct io_region *p) ++{ ++ while (p != io_regions) { ++ p--; ++ release_region(FDCS->address + p->offset, p->size); ++ } ++} ++ ++#define ARRAY_END(X) (&((X)[ARRAY_SIZE(X)])) ++ ++static int floppy_request_regions(int fdc) ++{ ++ const struct io_region *p; ++ ++ for (p = io_regions; p < ARRAY_END(io_regions); p++) { ++ if (!request_region(FDCS->address + p->offset, p->size, "floppy")) { ++ DPRINT("Floppy io-port 0x%04lx in use\n", FDCS->address + p->offset); ++ floppy_release_allocated_regions(fdc, p); ++ return -EBUSY; ++ } ++ } ++ return 0; ++} ++ ++static void floppy_release_regions(int fdc) ++{ ++ floppy_release_allocated_regions(fdc, ARRAY_END(io_regions)); ++} ++ + static int floppy_grab_irq_and_dma(void) + { + unsigned long flags; +@@ -4399,18 +4440,8 @@ static int floppy_grab_irq_and_dma(void) + + for (fdc = 0; fdc < N_FDC; fdc++) { + if (FDCS->address != -1) { +- if (!request_region(FDCS->address + 2, 4, "floppy")) { +- DPRINT("Floppy io-port 0x%04lx in use\n", +- FDCS->address + 2); +- goto cleanup1; +- } +- if (!request_region(FDCS->address + 7, 1, "floppy DIR")) { +- DPRINT("Floppy io-port 0x%04lx in use\n", +- FDCS->address + 7); +- goto cleanup2; +- } +- /* address + 6 is reserved, and may be taken by IDE. +- * Unfortunately, Adaptec doesn't know this :-(, */ ++ if (floppy_request_regions(fdc)) ++ goto cleanup; + } + } + for (fdc = 0; fdc < N_FDC; fdc++) { +@@ -4432,15 +4463,11 @@ static int floppy_grab_irq_and_dma(void) + fdc = 0; + irqdma_allocated = 1; + return 0; +-cleanup2: +- release_region(FDCS->address + 2, 4); +-cleanup1: ++cleanup: + fd_free_irq(); + fd_free_dma(); +- while (--fdc >= 0) { +- release_region(FDCS->address + 2, 4); +- release_region(FDCS->address + 7, 1); +- } ++ while (--fdc >= 0) ++ floppy_release_regions(fdc); + spin_lock_irqsave(&floppy_usage_lock, flags); + usage_count--; + spin_unlock_irqrestore(&floppy_usage_lock, flags); +@@ -4501,10 +4528,8 @@ static void floppy_release_irq_and_dma(v + #endif + old_fdc = fdc; + for (fdc = 0; fdc < N_FDC; fdc++) +- if (FDCS->address != -1) { +- release_region(FDCS->address + 2, 4); +- release_region(FDCS->address + 7, 1); +- } ++ if (FDCS->address != -1) ++ floppy_release_regions(fdc); + fdc = old_fdc; + } + diff --git a/queue-2.6.27/ib-mlx4-add-strong-ordering-to-local-inval-and-fast-reg-work-requests.patch b/queue-2.6.27/ib-mlx4-add-strong-ordering-to-local-inval-and-fast-reg-work-requests.patch new file mode 100644 index 00000000000..e57c7163c75 --- /dev/null +++ b/queue-2.6.27/ib-mlx4-add-strong-ordering-to-local-inval-and-fast-reg-work-requests.patch @@ -0,0 +1,58 @@ +From 2ac6bf4ddc87c3b6b609f8fa82f6ebbffeac12f4 Mon Sep 17 00:00:00 2001 +From: Jack Morgenstein +Date: Fri, 5 Jun 2009 10:36:24 -0700 +Subject: IB/mlx4: Add strong ordering to local inval and fast reg work requests + +From: Jack Morgenstein + +commit 2ac6bf4ddc87c3b6b609f8fa82f6ebbffeac12f4 upstream. + +The ConnectX Programmer's Reference Manual states that the "SO" bit +must be set when posting Fast Register and Local Invalidate send work +requests. When this bit is set, the work request will be executed +only after all previous work requests on the send queue have been +executed. (If the bit is not set, Fast Register and Local Invalidate +WQEs may begin execution too early, which violates the defined +semantics for these operations) + +This fixes the issue with NFS/RDMA reported in + + +Signed-off-by: Jack Morgenstein +Signed-off-by: Roland Dreier +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/infiniband/hw/mlx4/qp.c | 4 ++++ + include/linux/mlx4/qp.h | 1 + + 2 files changed, 5 insertions(+) + +--- a/drivers/infiniband/hw/mlx4/qp.c ++++ b/drivers/infiniband/hw/mlx4/qp.c +@@ -1563,12 +1563,16 @@ int mlx4_ib_post_send(struct ib_qp *ibqp + break; + + case IB_WR_LOCAL_INV: ++ ctrl->srcrb_flags |= ++ cpu_to_be32(MLX4_WQE_CTRL_STRONG_ORDER); + set_local_inv_seg(wqe, wr->ex.invalidate_rkey); + wqe += sizeof (struct mlx4_wqe_local_inval_seg); + size += sizeof (struct mlx4_wqe_local_inval_seg) / 16; + break; + + case IB_WR_FAST_REG_MR: ++ ctrl->srcrb_flags |= ++ cpu_to_be32(MLX4_WQE_CTRL_STRONG_ORDER); + set_fmr_seg(wqe, wr); + wqe += sizeof (struct mlx4_wqe_fmr_seg); + size += sizeof (struct mlx4_wqe_fmr_seg) / 16; +--- a/include/linux/mlx4/qp.h ++++ b/include/linux/mlx4/qp.h +@@ -165,6 +165,7 @@ enum { + MLX4_WQE_CTRL_IP_CSUM = 1 << 4, + MLX4_WQE_CTRL_TCP_UDP_CSUM = 1 << 5, + MLX4_WQE_CTRL_INS_VLAN = 1 << 6, ++ MLX4_WQE_CTRL_STRONG_ORDER = 1 << 7, + }; + + struct mlx4_wqe_ctrl_seg { diff --git a/queue-2.6.27/series b/queue-2.6.27/series index 49524e7d899..6ddbc55af4e 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -10,3 +10,8 @@ r8169-fix-crash-when-large-packets-are-received.patch isdn-fix-dma-alloc-for-hfcpci.patch x86-add-quirk-for-reboot-stalls-on-a-dell-optiplex-360.patch x86-quirk-for-reboot-stalls-on-a-dell-optiplex-330.patch +alsa-ca0106-add-missing-registrations-of-vmaster-controls.patch +floppy-provide-a-pnp-device-table-in-the-module.patch +floppy-request-and-release-only-the-ports-we-actually-use.patch +ib-mlx4-add-strong-ordering-to-local-inval-and-fast-reg-work-requests.patch +x86-handle-initrd-that-extends-into-unusable-memory.patch diff --git a/queue-2.6.27/x86-handle-initrd-that-extends-into-unusable-memory.patch b/queue-2.6.27/x86-handle-initrd-that-extends-into-unusable-memory.patch new file mode 100644 index 00000000000..d6c3180c87e --- /dev/null +++ b/queue-2.6.27/x86-handle-initrd-that-extends-into-unusable-memory.patch @@ -0,0 +1,76 @@ +From 8c5dd8f43367f4f266dd616f11658005bc2d20ef Mon Sep 17 00:00:00 2001 +From: Yinghai Lu +Date: Thu, 4 Jun 2009 19:14:22 -0700 +Subject: x86: handle initrd that extends into unusable memory + +From: Yinghai Lu + +commit 8c5dd8f43367f4f266dd616f11658005bc2d20ef upstream. + +On a system where system memory (according e820) is not covered by +mtrr, mtrr_trim_memory converts a portion of memory to reserved, but +bootloader has already put the initrd in that range. + +Thus, we need to have 64bit to use relocate_initrd too. + +[ Impact: fix using initrd when mtrr_trim_memory happen ] + +Signed-off-by: Yinghai Lu +Signed-off-by: H. Peter Anvin +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/setup.c | 15 +++------------ + 1 file changed, 3 insertions(+), 12 deletions(-) + +--- a/arch/x86/kernel/setup.c ++++ b/arch/x86/kernel/setup.c +@@ -250,15 +250,13 @@ static inline void copy_edd(void) + + #ifdef CONFIG_BLK_DEV_INITRD + +-#ifdef CONFIG_X86_32 +- + #define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT) + static void __init relocate_initrd(void) + { + + u64 ramdisk_image = boot_params.hdr.ramdisk_image; + u64 ramdisk_size = boot_params.hdr.ramdisk_size; +- u64 end_of_lowmem = max_low_pfn << PAGE_SHIFT; ++ u64 end_of_lowmem = max_low_pfn_mapped << PAGE_SHIFT; + u64 ramdisk_here; + unsigned long slop, clen, mapaddr; + char *p, *q; +@@ -314,14 +312,13 @@ static void __init relocate_initrd(void) + ramdisk_image, ramdisk_image + ramdisk_size - 1, + ramdisk_here, ramdisk_here + ramdisk_size - 1); + } +-#endif + + static void __init reserve_initrd(void) + { + u64 ramdisk_image = boot_params.hdr.ramdisk_image; + u64 ramdisk_size = boot_params.hdr.ramdisk_size; + u64 ramdisk_end = ramdisk_image + ramdisk_size; +- u64 end_of_lowmem = max_low_pfn << PAGE_SHIFT; ++ u64 end_of_lowmem = max_low_pfn_mapped << PAGE_SHIFT; + + if (!boot_params.hdr.type_of_loader || + !ramdisk_image || !ramdisk_size) +@@ -351,14 +348,8 @@ static void __init reserve_initrd(void) + return; + } + +-#ifdef CONFIG_X86_32 + relocate_initrd(); +-#else +- printk(KERN_ERR "initrd extends beyond end of memory " +- "(0x%08llx > 0x%08llx)\ndisabling initrd\n", +- ramdisk_end, end_of_lowmem); +- initrd_start = 0; +-#endif ++ + free_early(ramdisk_image, ramdisk_end); + } + #else