]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .23 patches added to queue
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Nov 2007 22:24:02 +0000 (14:24 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Nov 2007 22:24:02 +0000 (14:24 -0800)
queue-2.6.23/fix-synchronize_irq-races-with-irq-handler.patch [new file with mode: 0644]
queue-2.6.23/input-alps-add-signature-for-thinkpad-r61.patch [new file with mode: 0644]
queue-2.6.23/input-alps-add-support-for-model-found-in-dell-vostro-1400.patch [new file with mode: 0644]
queue-2.6.23/pkt_sched-check-subqueue-status-before-calling-hard_start_xmit.patch [new file with mode: 0644]
queue-2.6.23/series

diff --git a/queue-2.6.23/fix-synchronize_irq-races-with-irq-handler.patch b/queue-2.6.23/fix-synchronize_irq-races-with-irq-handler.patch
new file mode 100644 (file)
index 0000000..b328f50
--- /dev/null
@@ -0,0 +1,83 @@
+From stable-bounces@linux.kernel.org Wed Nov 21 14:10:14 2007
+From: Herbert Xu <herbert@gondor.apana.org.au>
+From: Chuck Ebbert <cebbert@redhat.com>
+Date: Wed, 21 Nov 2007 17:09:39 -0500
+Subject: Fix synchronize_irq races with IRQ handler
+To: linux-stable <stable@kernel.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Message-ID: <4744ACA3.8090408@redhat.com>
+
+From: Herbert Xu <herbert@gondor.apana.org.au>
+
+patch a98ce5c6feead6bfedefabd46cb3d7f5be148d9a in mainline.
+
+Fix synchronize_irq races with IRQ handler
+
+As it is some callers of synchronize_irq rely on memory barriers
+to provide synchronisation against the IRQ handlers.  For example,
+the tg3 driver does
+
+tp->irq_sync = 1;
+smp_mb();
+synchronize_irq();
+
+and then in the IRQ handler:
+
+if (!tp->irq_sync)
+       netif_rx_schedule(dev, &tp->napi);
+
+Unfortunately memory barriers only work well when they come in
+pairs.  Because we don't actually have memory barriers on the
+IRQ path, the memory barrier before the synchronize_irq() doesn't
+actually protect us.
+
+In particular, synchronize_irq() may return followed by the
+result of netif_rx_schedule being made visible.
+
+This patch (mostly written by Linus) fixes this by using spin
+locks instead of memory barries on the synchronize_irq() path.
+
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/irq/manage.c |   20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+--- a/kernel/irq/manage.c
++++ b/kernel/irq/manage.c
+@@ -29,12 +29,28 @@
+ void synchronize_irq(unsigned int irq)
+ {
+       struct irq_desc *desc = irq_desc + irq;
++      unsigned int status;
+       if (irq >= NR_IRQS)
+               return;
+-      while (desc->status & IRQ_INPROGRESS)
+-              cpu_relax();
++      do {
++              unsigned long flags;
++
++              /*
++               * Wait until we're out of the critical section.  This might
++               * give the wrong answer due to the lack of memory barriers.
++               */
++              while (desc->status & IRQ_INPROGRESS)
++                      cpu_relax();
++
++              /* Ok, that indicated we're done: double-check carefully. */
++              spin_lock_irqsave(&desc->lock, flags);
++              status = desc->status;
++              spin_unlock_irqrestore(&desc->lock, flags);
++
++              /* Oops, that failed? */
++      } while (status & IRQ_INPROGRESS);
+ }
+ EXPORT_SYMBOL(synchronize_irq);
diff --git a/queue-2.6.23/input-alps-add-signature-for-thinkpad-r61.patch b/queue-2.6.23/input-alps-add-signature-for-thinkpad-r61.patch
new file mode 100644 (file)
index 0000000..d60ab1f
--- /dev/null
@@ -0,0 +1,32 @@
+From stable-bounces@linux.kernel.org Wed Nov 21 14:12:51 2007
+From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Date: Wed, 21 Nov 2007 17:12:26 -0500
+Subject: Input: ALPS - add signature for ThinkPad R61
+To: linux-stable <stable@kernel.org>
+Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Message-ID: <4744AD4A.7000307@redhat.com>
+
+From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+
+changeset f493018ebc3f94d64e12bc848db0906700bf73a2 in mainline.
+
+Input: ALPS - add signature for ThinkPad R61
+
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/mouse/alps.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/input/mouse/alps.c
++++ b/drivers/input/mouse/alps.c
+@@ -48,6 +48,7 @@ static const struct alps_model_info alps
+       { { 0x63, 0x02, 0x50 }, 0xef, 0xef, ALPS_FW_BK_1 },             /* NEC Versa L320 */
+       { { 0x63, 0x02, 0x64 }, 0xf8, 0xf8, 0 },
+       { { 0x63, 0x03, 0xc8 }, 0xf8, 0xf8, ALPS_PASS },                /* Dell Latitude D800 */
++      { { 0x73, 0x00, 0x0a }, 0xf8, 0xf8, ALPS_DUALPOINT },           /* ThinkPad R61 8918-5QG */
+       { { 0x73, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
+       { { 0x73, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_FW_BK_2 },             /* Ahtec Laptop */
+       { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
diff --git a/queue-2.6.23/input-alps-add-support-for-model-found-in-dell-vostro-1400.patch b/queue-2.6.23/input-alps-add-support-for-model-found-in-dell-vostro-1400.patch
new file mode 100644 (file)
index 0000000..04badd8
--- /dev/null
@@ -0,0 +1,33 @@
+From stable-bounces@linux.kernel.org Wed Nov 21 14:11:29 2007
+From: William Pettersson <william.pettersson@gmail.com>
+Date: Wed, 21 Nov 2007 17:11:07 -0500
+Subject: Input: ALPS - add support for model found in Dell Vostro 1400
+To: linux-stable <stable@kernel.org>
+Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Message-ID: <4744ACFB.1020109@redhat.com>
+
+From: William Pettersson <william.pettersson@gmail.com>
+
+changeset dac4ae0daa1be36ab015973ed9e9dc04a2684395 in mainline.
+
+Input: ALPS - add support for model found in Dell Vostro 1400
+
+Signed-off-by: William Pettersson <william.pettersson@gmail.com>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/mouse/alps.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/input/mouse/alps.c
++++ b/drivers/input/mouse/alps.c
+@@ -53,6 +53,7 @@ static const struct alps_model_info alps
+       { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
+       { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
+       { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
++      { { 0x73, 0x02, 0x50 }, 0xcf, 0xff, ALPS_FW_BK_1 } /* Dell Vostro 1400 */
+ };
+ /*
diff --git a/queue-2.6.23/pkt_sched-check-subqueue-status-before-calling-hard_start_xmit.patch b/queue-2.6.23/pkt_sched-check-subqueue-status-before-calling-hard_start_xmit.patch
new file mode 100644 (file)
index 0000000..835593f
--- /dev/null
@@ -0,0 +1,55 @@
+From stable-bounces@linux.kernel.org Wed Nov 21 04:33:42 2007
+From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
+Date: Wed, 21 Nov 2007 20:32:57 +0800
+Subject: PKT_SCHED: Check subqueue status before calling hard_start_xmit
+To: stable@kernel.org, davem@davemloft.net
+Message-ID: <E1IuolF-0007sf-00@gondolin.me.apana.org.au>
+
+From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
+
+[PKT_SCHED]: Check subqueue status before calling hard_start_xmit
+
+[ Upstream commit: 5f1a485d5905aa641f33009019b3699076666a4c ]
+
+The only qdiscs that check subqueue state before dequeue'ing are PRIO
+and RR.  The other qdiscs, including the default pfifo_fast qdisc,
+will allow traffic bound for subqueue 0 through to hard_start_xmit.
+The check for netif_queue_stopped() is done above in pkt_sched.h, so
+it is unnecessary for qdisc_restart().  However, if the underlying
+driver is multiqueue capable, and only sets queue states on subqueues,
+this will allow packets to enter the driver when it's currently unable
+to process packets, resulting in expensive requeues and driver
+entries.  This patch re-adds the check for the subqueue status before
+calling hard_start_xmit, so we can try and avoid the driver entry when
+the queues are stopped.
+
+Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/sched/sch_generic.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/net/sched/sch_generic.c
++++ b/net/sched/sch_generic.c
+@@ -135,7 +135,7 @@ static inline int qdisc_restart(struct n
+       struct Qdisc *q = dev->qdisc;
+       struct sk_buff *skb;
+       unsigned lockless;
+-      int ret;
++      int ret = NETDEV_TX_BUSY;
+       /* Dequeue packet */
+       if (unlikely((skb = dev_dequeue_skb(dev, q)) == NULL))
+@@ -158,7 +158,8 @@ static inline int qdisc_restart(struct n
+       /* And release queue */
+       spin_unlock(&dev->queue_lock);
+-      ret = dev_hard_start_xmit(skb, dev);
++      if (!netif_subqueue_stopped(dev, skb->queue_mapping))
++              ret = dev_hard_start_xmit(skb, dev);
+       if (!lockless)
+               netif_tx_unlock(dev);
index 9d135f9c3e3ff553b19d15fa9a28c8573a49110c..741d93fbcadfe1e183bffab329d21fc99d379f2e 100644 (file)
@@ -3,3 +3,7 @@ net-random-secure_tcp_sequence_number-should-not-assume-config_ktime_scalar.patc
 netfilter-fix-null-pointer-dereference-in-nf_nat_move_storage.patch
 rd-fix-data-corruption-on-memory-pressure.patch
 sched-some-proc-entries-are-missed-in-sched_domain-sys_ctl-debug-code.patch
+pkt_sched-check-subqueue-status-before-calling-hard_start_xmit.patch
+fix-synchronize_irq-races-with-irq-handler.patch
+input-alps-add-support-for-model-found-in-dell-vostro-1400.patch
+input-alps-add-signature-for-thinkpad-r61.patch