]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
new patches added to queue
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 17 May 2006 21:18:41 +0000 (14:18 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 17 May 2006 21:18:41 +0000 (14:18 -0700)
queue-2.6.16/BLOCK-limit-request_fn-recursion.patch [new file with mode: 0644]
queue-2.6.16/Cardman-40x0-Fix-udev-device-creation.patch [new file with mode: 0644]
queue-2.6.16/PCI-VIA-quirk-fixup-additional-PCI-IDs.patch [new file with mode: 0644]
queue-2.6.16/PCI-quirk-VIA-IRQ-fixup-should-only-run-for-VIA-southbridges.patch [new file with mode: 0644]
queue-2.6.16/i386-x86_64-Force-pci-noacpi-on-HP-XW9300.patch [new file with mode: 0644]
queue-2.6.16/series

diff --git a/queue-2.6.16/BLOCK-limit-request_fn-recursion.patch b/queue-2.6.16/BLOCK-limit-request_fn-recursion.patch
new file mode 100644 (file)
index 0000000..3018c55
--- /dev/null
@@ -0,0 +1,83 @@
+From nobody Mon Sep 17 00:00:00 2001
+From: Jens Axboe <axboe@suse.de>
+Date: Thu, 11 May 2006 08:20:16 +0200
+Subject: [PATCH] [BLOCK] limit request_fn recursion
+
+Don't recurse back into the driver even if the unplug threshold is met,
+when the driver asks for a requeue. This is both silly from a logical
+point of view (requeues typically happen due to driver/hardware
+shortage), and also dangerous since we could hit an endless request_fn
+-> requeue -> unplug -> request_fn loop and crash on stack overrun.
+
+Also limit blk_run_queue() to one level of recursion, similar to how
+blk_start_queue() works.
+
+This patch fixed a real problem with SLES10 and lpfc, and it could hit
+any SCSI lld that returns non-zero from it's ->queuecommand() handler.
+
+Signed-off-by: Jens Axboe <axboe@suse.de>
+Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ block/elevator.c  |    8 +++++++-
+ block/ll_rw_blk.c |   17 +++++++++++++++--
+ 2 files changed, 22 insertions(+), 3 deletions(-)
+
+--- linux-2.6.16.16.orig/block/elevator.c
++++ linux-2.6.16.16/block/elevator.c
+@@ -314,6 +314,7 @@ void elv_insert(request_queue_t *q, stru
+ {
+       struct list_head *pos;
+       unsigned ordseq;
++      int unplug_it = 1;
+       rq->q = q;
+@@ -378,6 +379,11 @@ void elv_insert(request_queue_t *q, stru
+               }
+               list_add_tail(&rq->queuelist, pos);
++              /*
++               * most requeues happen because of a busy condition, don't
++               * force unplug of the queue for that case.
++               */
++              unplug_it = 0;
+               break;
+       default:
+@@ -386,7 +392,7 @@ void elv_insert(request_queue_t *q, stru
+               BUG();
+       }
+-      if (blk_queue_plugged(q)) {
++      if (unplug_it && blk_queue_plugged(q)) {
+               int nrq = q->rq.count[READ] + q->rq.count[WRITE]
+                       - q->in_flight;
+--- linux-2.6.16.16.orig/block/ll_rw_blk.c
++++ linux-2.6.16.16/block/ll_rw_blk.c
+@@ -1719,8 +1719,21 @@ void blk_run_queue(struct request_queue 
+       spin_lock_irqsave(q->queue_lock, flags);
+       blk_remove_plug(q);
+-      if (!elv_queue_empty(q))
+-              q->request_fn(q);
++
++      /*
++       * Only recurse once to avoid overrunning the stack, let the unplug
++       * handling reinvoke the handler shortly if we already got there.
++       */
++      if (!elv_queue_empty(q)) {
++              if (!test_and_set_bit(QUEUE_FLAG_REENTER, &q->queue_flags)) {
++                      q->request_fn(q);
++                      clear_bit(QUEUE_FLAG_REENTER, &q->queue_flags);
++              } else {
++                      blk_plug_device(q);
++                      kblockd_schedule_work(&q->unplug_work);
++              }
++      }
++
+       spin_unlock_irqrestore(q->queue_lock, flags);
+ }
+ EXPORT_SYMBOL(blk_run_queue);
diff --git a/queue-2.6.16/Cardman-40x0-Fix-udev-device-creation.patch b/queue-2.6.16/Cardman-40x0-Fix-udev-device-creation.patch
new file mode 100644 (file)
index 0000000..e99f54e
--- /dev/null
@@ -0,0 +1,72 @@
+From nobody Mon Sep 17 00:00:00 2001
+From: Harald Welte <laforge@gnumonks.org>
+Date: Wed, 10 May 2006 13:28:52 +0200
+Subject: [PATCH] [Cardman 40x0] Fix udev device creation
+
+This patch corrects the order of the calls to register_chrdev() and
+pcmcia_register_driver().  Now udev correctly creates userspace device
+files /dev/cmmN and /dev/cmxN respectively.
+
+Based on an earlier patch by Jan Niehusmann <jan@gondor.com>.
+
+Signed-off-by: Harald Welte <laforge@netfilter.org>
+Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/pcmcia/cm4000_cs.c |   10 ++++++----
+ drivers/char/pcmcia/cm4040_cs.c |   11 +++++++----
+ 2 files changed, 13 insertions(+), 8 deletions(-)
+
+--- linux-2.6.16.16.orig/drivers/char/pcmcia/cm4000_cs.c
++++ linux-2.6.16.16/drivers/char/pcmcia/cm4000_cs.c
+@@ -2010,10 +2010,6 @@ static int __init cmm_init(void)
+       if (!cmm_class)
+               return -1;
+-      rc = pcmcia_register_driver(&cm4000_driver);
+-      if (rc < 0)
+-              return rc;
+-
+       major = register_chrdev(0, DEVICE_NAME, &cm4000_fops);
+       if (major < 0) {
+               printk(KERN_WARNING MODULE_NAME
+@@ -2021,6 +2017,12 @@ static int __init cmm_init(void)
+               return -1;
+       }
++      rc = pcmcia_register_driver(&cm4000_driver);
++      if (rc < 0) {
++              unregister_chrdev(major, DEVICE_NAME);
++              return rc;
++      }
++
+       return 0;
+ }
+--- linux-2.6.16.16.orig/drivers/char/pcmcia/cm4040_cs.c
++++ linux-2.6.16.16/drivers/char/pcmcia/cm4040_cs.c
+@@ -769,16 +769,19 @@ static int __init cm4040_init(void)
+       if (!cmx_class)
+               return -1;
+-      rc = pcmcia_register_driver(&reader_driver);
+-      if (rc < 0)
+-              return rc;
+-
+       major = register_chrdev(0, DEVICE_NAME, &reader_fops);
+       if (major < 0) {
+               printk(KERN_WARNING MODULE_NAME
+                       ": could not get major number\n");
+               return -1;
+       }
++
++      rc = pcmcia_register_driver(&reader_driver);
++      if (rc < 0) {
++              unregister_chrdev(major, DEVICE_NAME);
++              return rc;
++      }
++
+       return 0;
+ }
diff --git a/queue-2.6.16/PCI-VIA-quirk-fixup-additional-PCI-IDs.patch b/queue-2.6.16/PCI-VIA-quirk-fixup-additional-PCI-IDs.patch
new file mode 100644 (file)
index 0000000..7edbb5e
--- /dev/null
@@ -0,0 +1,48 @@
+From nobody Mon Sep 17 00:00:00 2001
+From: Chris Wedgwood <cw@f00f.org>
+Date: Mon, 15 May 2006 09:43:55 -0700
+Subject: [PATCH] VIA quirk fixup, additional PCI IDs
+
+An earlier commit (75cf7456dd87335f574dcd53c4ae616a2ad71a11) changed an
+overly-zealous PCI quirk to only poke those VIA devices that need it.
+However, some PCI devices were not included in what I hope is now the full
+list.  Consequently we're failing to run the quirk on all machines which need
+it, causing IRQ routing failures.
+
+This should I hope correct this.
+
+Thanks to Masoud Sharbiani <masouds@masoud.ir> for pointing this out
+and testing the fix.
+
+Signed-off-by: Chris Wedgwood <cw@f00f.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/quirks.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- linux-2.6.16.16.orig/drivers/pci/quirks.c
++++ linux-2.6.16.16/drivers/pci/quirks.c
+@@ -631,6 +631,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_V
+  * non-x86 architectures (yes Via exists on PPC among other places),
+  * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
+  * interrupts delivered properly.
++ *
++ * Some of the on-chip devices are actually '586 devices' so they are
++ * listed here.
+  */
+ static void quirk_via_irq(struct pci_dev *dev)
+ {
+@@ -645,6 +648,10 @@ static void quirk_via_irq(struct pci_dev
+               pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
+       }
+ }
++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_via_irq);
++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq);
++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq);
++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq);
+ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
+ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
+ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
diff --git a/queue-2.6.16/PCI-quirk-VIA-IRQ-fixup-should-only-run-for-VIA-southbridges.patch b/queue-2.6.16/PCI-quirk-VIA-IRQ-fixup-should-only-run-for-VIA-southbridges.patch
new file mode 100644 (file)
index 0000000..e5da86c
--- /dev/null
@@ -0,0 +1,40 @@
+From nobody Mon Sep 17 00:00:00 2001
+From: Chris Wedgwood <cw@f00f.org>
+Date: Tue, 18 Apr 2006 23:57:09 -0700
+Subject: [PATCH] PCI quirk: VIA IRQ fixup should only run for VIA southbridges
+
+Alan Cox pointed out that the VIA 'IRQ fixup' was erroneously running
+on my system which has no VIA southbridge (but I do have a VIA IEEE
+1394 device).
+
+This should address that.  I also changed "Via IRQ" to "VIA IRQ"
+(initially I read Via as a capitalized via (by way/means of).
+
+Signed-off-by: Chris Wedgwood <cw@f00f.org>
+Acked-by: Jeff Garzik <jeff@garzik.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/quirks.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- linux-2.6.16.16.orig/drivers/pci/quirks.c
++++ linux-2.6.16.16/drivers/pci/quirks.c
+@@ -639,13 +639,15 @@ static void quirk_via_irq(struct pci_dev
+       new_irq = dev->irq & 0xf;
+       pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+       if (new_irq != irq) {
+-              printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n",
++              printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n",
+                       pci_name(dev), irq, new_irq);
+               udelay(15);     /* unknown if delay really needed */
+               pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
+       }
+ }
+-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);
++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
+ /*
+  * VIA VT82C598 has its device ID settable and many BIOSes
diff --git a/queue-2.6.16/i386-x86_64-Force-pci-noacpi-on-HP-XW9300.patch b/queue-2.6.16/i386-x86_64-Force-pci-noacpi-on-HP-XW9300.patch
new file mode 100644 (file)
index 0000000..9421d44
--- /dev/null
@@ -0,0 +1,37 @@
+From nobody Mon Sep 17 00:00:00 2001
+From: Andi Kleen <ak@suse.de>
+Date: Mon, 15 May 2006 18:19:41 +0200
+Subject: [PATCH] i386/x86_64: Force pci=noacpi on HP XW9300
+
+This is needed to see all devices.
+
+The system has multiple PCI segments and we don't handle that properly
+yet in PCI and ACPI. Short term before this is fixed blacklist it to
+pci=noacpi.
+
+Acked-by: len.brown@intel.com
+Signed-off-by: Andi Kleen <ak@suse.de>
+Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/i386/kernel/acpi/boot.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- linux-2.6.16.16.orig/arch/i386/kernel/acpi/boot.c
++++ linux-2.6.16.16/arch/i386/kernel/acpi/boot.c
+@@ -1060,6 +1060,14 @@ static struct dmi_system_id __initdata a
+                    DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+                    },
+        },
++      {
++       .callback = disable_acpi_pci,
++       .ident = "HP xw9300",
++       .matches = {
++                  DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
++                  DMI_MATCH(DMI_PRODUCT_NAME, "HP xw9300 Workstation"),
++                  },
++      },
+       {}
+ };
index 83b6790ba0e00238f60a61e2d9a4e3e7d5388514..ac53b58b21ff08068519f87d6e469d2b1335ce8d 100644 (file)
@@ -10,3 +10,8 @@ netfilter-do_add_counters-race-possible-info-leak.patch
 tg3-ethtool-always-report-port-is-tp.patch
 selinux-check-for-failed-kmalloc-in-security_sid_to_context.patch
 pci-correctly-allocate-return-buffers-for-osc-calls.patch
+BLOCK-limit-request_fn-recursion.patch
+Cardman-40x0-Fix-udev-device-creation.patch
+PCI-quirk-VIA-IRQ-fixup-should-only-run-for-VIA-southbridges.patch
+PCI-VIA-quirk-fixup-additional-PCI-IDs.patch
+i386-x86_64-Force-pci-noacpi-on-HP-XW9300.patch