From: Greg Kroah-Hartman Date: Wed, 10 Dec 2008 00:39:33 +0000 (-0800) Subject: more .27 patches X-Git-Tag: v2.6.27.10~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2753c1cf7f49fb501bbb1b09d2138b5db95a38a6;p=thirdparty%2Fkernel%2Fstable-queue.git more .27 patches --- diff --git a/queue-2.6.27/alsa-emu10k1-add-more-invert_shared_spdif-flag-to-audigy-models.patch b/queue-2.6.27/alsa-emu10k1-add-more-invert_shared_spdif-flag-to-audigy-models.patch new file mode 100644 index 00000000000..517d57be1f0 --- /dev/null +++ b/queue-2.6.27/alsa-emu10k1-add-more-invert_shared_spdif-flag-to-audigy-models.patch @@ -0,0 +1,45 @@ +From 55e03a68d2489d116a5c5e8111ecef3f69831ed6 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 3 Nov 2008 10:21:36 +0100 +Subject: ALSA: emu10k1 - Add more invert_shared_spdif flag to Audigy models + +From: Takashi Iwai + +commit 55e03a68d2489d116a5c5e8111ecef3f69831ed6 upstream. + +Reported in Novell bnc#440862: + https://bugzilla.novell.com/show_bug.cgi?id=440862 + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/emu10k1/emu10k1_main.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/pci/emu10k1/emu10k1_main.c ++++ b/sound/pci/emu10k1/emu10k1_main.c +@@ -1464,6 +1464,7 @@ static struct snd_emu_chip_details emu_c + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, ++ .invert_shared_spdif = 1, /* digital/analog switch swapped */ + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20021102, + .driver = "Audigy2", .name = "Audigy 2 ZS [SB0350]", +@@ -1473,6 +1474,7 @@ static struct snd_emu_chip_details emu_c + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, ++ .invert_shared_spdif = 1, /* digital/analog switch swapped */ + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20011102, + .driver = "Audigy2", .name = "Audigy 2 ZS [2001]", +@@ -1482,6 +1484,7 @@ static struct snd_emu_chip_details emu_c + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, ++ .invert_shared_spdif = 1, /* digital/analog switch swapped */ + .ac97_chip = 1} , + /* Audigy 2 */ + /* Tested by James@superbug.co.uk 3rd July 2005 */ diff --git a/queue-2.6.27/cxgb3-fix-race-in-eeh.patch b/queue-2.6.27/cxgb3-fix-race-in-eeh.patch new file mode 100644 index 00000000000..47d35b87df3 --- /dev/null +++ b/queue-2.6.27/cxgb3-fix-race-in-eeh.patch @@ -0,0 +1,98 @@ +From 0ca41c0413a4d9ca58767d53d23accea9aa1cdef Mon Sep 17 00:00:00 2001 +From: Divy Le Ray +Date: Thu, 25 Sep 2008 14:05:28 +0000 +Subject: [2.6.28,1/1] cxgb3 - fix race in EEH + +From: Divy Le Ray + +commit 0ca41c0413a4d9ca58767d53d23accea9aa1cdef upstream. + +A SGE queue set timer might access registers while in EEH recovery, +triggering an EEH error loop. Stop all timers early in EEH process. + +Signed-off-by: Divy Le Ray +Signed-off-by: David S. Miller +Cc: Karsten Keil +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/cxgb3/adapter.h | 1 + + drivers/net/cxgb3/cxgb3_main.c | 5 +++++ + drivers/net/cxgb3/sge.c | 21 ++++++++++++++++++--- + 3 files changed, 24 insertions(+), 3 deletions(-) + +--- a/drivers/net/cxgb3/adapter.h ++++ b/drivers/net/cxgb3/adapter.h +@@ -285,6 +285,7 @@ void t3_os_link_changed(struct adapter * + + void t3_sge_start(struct adapter *adap); + void t3_sge_stop(struct adapter *adap); ++void t3_stop_sge_timers(struct adapter *adap); + void t3_free_sge_resources(struct adapter *adap); + void t3_sge_err_intr_handler(struct adapter *adapter); + irq_handler_t t3_intr_handler(struct adapter *adap, int polling); +--- a/drivers/net/cxgb3/cxgb3_main.c ++++ b/drivers/net/cxgb3/cxgb3_main.c +@@ -479,6 +479,7 @@ static int setup_sge_qsets(struct adapte + irq_idx, + &adap->params.sge.qset[qset_idx], ntxq, dev); + if (err) { ++ t3_stop_sge_timers(adap); + t3_free_sge_resources(adap); + return err; + } +@@ -2449,6 +2450,9 @@ static pci_ers_result_t t3_io_error_dete + test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map)) + offload_close(&adapter->tdev); + ++ /* Stop SGE timers */ ++ t3_stop_sge_timers(adapter); ++ + adapter->flags &= ~FULL_INIT_DONE; + + pci_disable_device(pdev); +@@ -2801,6 +2805,7 @@ static void __devexit remove_one(struct + if (test_bit(i, &adapter->registered_device_map)) + unregister_netdev(adapter->port[i]); + ++ t3_stop_sge_timers(adapter); + t3_free_sge_resources(adapter); + cxgb_disable_msi(adapter); + +--- a/drivers/net/cxgb3/sge.c ++++ b/drivers/net/cxgb3/sge.c +@@ -603,9 +603,6 @@ static void t3_free_qset(struct adapter + int i; + struct pci_dev *pdev = adapter->pdev; + +- if (q->tx_reclaim_timer.function) +- del_timer_sync(&q->tx_reclaim_timer); +- + for (i = 0; i < SGE_RXQ_PER_SET; ++i) + if (q->fl[i].desc) { + spin_lock_irq(&adapter->sge.reg_lock); +@@ -3043,6 +3040,24 @@ err: + } + + /** ++ * t3_stop_sge_timers - stop SGE timer call backs ++ * @adap: the adapter ++ * ++ * Stops each SGE queue set's timer call back ++ */ ++void t3_stop_sge_timers(struct adapter *adap) ++{ ++ int i; ++ ++ for (i = 0; i < SGE_QSETS; ++i) { ++ struct sge_qset *q = &adap->sge.qs[i]; ++ ++ if (q->tx_reclaim_timer.function) ++ del_timer_sync(&q->tx_reclaim_timer); ++ } ++} ++ ++/** + * t3_free_sge_resources - free SGE resources + * @adap: the adapter + * diff --git a/queue-2.6.27/cxgb3-remove-duplicate-tests-in-lro.patch b/queue-2.6.27/cxgb3-remove-duplicate-tests-in-lro.patch new file mode 100644 index 00000000000..1f7a002a8a5 --- /dev/null +++ b/queue-2.6.27/cxgb3-remove-duplicate-tests-in-lro.patch @@ -0,0 +1,72 @@ +From 004f23b9d3874efc81d2d1cf18fd0fe48dc2f26f Mon Sep 17 00:00:00 2001 +From: Divy Le Ray +Date: Thu, 4 Sep 2008 22:34:13 -0700 +Subject: cxgb3 - remove duplicate tests in lro + +From: Divy Le Ray + +commit 004f23b9d3874efc81d2d1cf18fd0fe48dc2f26f upstream. + +The generic lro code checks TCP flags/options. +Remove duplicate tests done in the driver. + +Signed-off-by: Divy Le Ray +Signed-off-by: Jeff Garzik +Cc: Hannes Reinecke +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/cxgb3/sge.c | 35 ----------------------------------- + 1 file changed, 35 deletions(-) + +--- a/drivers/net/cxgb3/sge.c ++++ b/drivers/net/cxgb3/sge.c +@@ -1934,38 +1934,6 @@ static inline int lro_frame_ok(const str + eh->h_proto == htons(ETH_P_IP) && ih->ihl == (sizeof(*ih) >> 2); + } + +-#define TCP_FLAG_MASK (TCP_FLAG_CWR | TCP_FLAG_ECE | TCP_FLAG_URG |\ +- TCP_FLAG_ACK | TCP_FLAG_PSH | TCP_FLAG_RST |\ +- TCP_FLAG_SYN | TCP_FLAG_FIN) +-#define TSTAMP_WORD ((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |\ +- (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP) +- +-/** +- * lro_segment_ok - check if a TCP segment is eligible for LRO +- * @tcph: the TCP header of the packet +- * +- * Returns true if a TCP packet is eligible for LRO. This requires that +- * the packet have only the ACK flag set and no TCP options besides +- * time stamps. +- */ +-static inline int lro_segment_ok(const struct tcphdr *tcph) +-{ +- int optlen; +- +- if (unlikely((tcp_flag_word(tcph) & TCP_FLAG_MASK) != TCP_FLAG_ACK)) +- return 0; +- +- optlen = (tcph->doff << 2) - sizeof(*tcph); +- if (optlen) { +- const u32 *opt = (const u32 *)(tcph + 1); +- +- if (optlen != TCPOLEN_TSTAMP_ALIGNED || +- *opt != htonl(TSTAMP_WORD) || !opt[2]) +- return 0; +- } +- return 1; +-} +- + static int t3_get_lro_header(void **eh, void **iph, void **tcph, + u64 *hdr_flags, void *priv) + { +@@ -1978,9 +1946,6 @@ static int t3_get_lro_header(void **eh, + *iph = (struct iphdr *)((struct ethhdr *)*eh + 1); + *tcph = (struct tcphdr *)((struct iphdr *)*iph + 1); + +- if (!lro_segment_ok(*tcph)) +- return -1; +- + *hdr_flags = LRO_IPV4 | LRO_TCP; + return 0; + } diff --git a/queue-2.6.27/sched-fix-a-bug-in-sched-domain-degenerate.patch b/queue-2.6.27/sched-fix-a-bug-in-sched-domain-degenerate.patch new file mode 100644 index 00000000000..c6166710662 --- /dev/null +++ b/queue-2.6.27/sched-fix-a-bug-in-sched-domain-degenerate.patch @@ -0,0 +1,61 @@ +From f29c9b1ccb52904ee442a933cf3dee628f9f4e62 Mon Sep 17 00:00:00 2001 +From: Li Zefan +Date: Thu, 6 Nov 2008 09:45:16 +0800 +Subject: sched: fix a bug in sched domain degenerate + +From: Li Zefan + +commit f29c9b1ccb52904ee442a933cf3dee628f9f4e62 upstream. + +Impact: re-add incorrectly eliminated sched domain layers + +(1) on i386 with SCHED_SMT and SCHED_MC enabled + # mount -t cgroup -o cpuset xxx /mnt + # echo 0 > /mnt/cpuset.sched_load_balance + # mkdir /mnt/0 + # echo 0 > /mnt/0/cpuset.cpus + # dmesg + CPU0 attaching sched-domain: + domain 0: span 0 level CPU + groups: 0 + +(2) on i386 with SCHED_MC enabled but SCHED_SMT disabled + # same with (1) + # dmesg + CPU0 attaching NULL sched-domain. + +The bug is that some sched domains may be skipped unintentionally when +degenerating (optimizing) sched domains. + +Signed-off-by: Li Zefan +Acked-by: Peter Zijlstra +Signed-off-by: Ingo Molnar +Cc: Gregory Haskins +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -6802,15 +6802,17 @@ cpu_attach_domain(struct sched_domain *s + struct sched_domain *tmp; + + /* Remove the sched domains which do not contribute to scheduling. */ +- for (tmp = sd; tmp; tmp = tmp->parent) { ++ for (tmp = sd; tmp; ) { + struct sched_domain *parent = tmp->parent; + if (!parent) + break; ++ + if (sd_parent_degenerate(tmp, parent)) { + tmp->parent = parent->parent; + if (parent->parent) + parent->parent->child = tmp; +- } ++ } else ++ tmp = tmp->parent; + } + + if (sd && sd_degenerate(sd)) { diff --git a/queue-2.6.27/series b/queue-2.6.27/series index 299efd3688a..ec9a107a386 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -62,3 +62,10 @@ alsa-hda-make-the-hp-elitebook-8530p-use-ad1884a-model-laptop.patch alsa-hda-add-a-quirk-for-dell-studio-15.patch alsa-hda-no-headphone-as-line-out-swich-without-line-outs.patch alsa-hda-mark-dell-studio-1535-quirk.patch +alsa-emu10k1-add-more-invert_shared_spdif-flag-to-audigy-models.patch +cxgb3-fix-race-in-eeh.patch +cxgb3-remove-duplicate-tests-in-lro.patch +sched-fix-a-bug-in-sched-domain-degenerate.patch +x86-hpet-convert-warn_on-to-warn_on_once.patch +x86-memory-hotplug-remove-wrong-1-in-calling-init_memory_mapping.patch +x86-remove-debug-code-from-arch_add_memory.patch diff --git a/queue-2.6.27/x86-hpet-convert-warn_on-to-warn_on_once.patch b/queue-2.6.27/x86-hpet-convert-warn_on-to-warn_on_once.patch new file mode 100644 index 00000000000..1c00d30eddb --- /dev/null +++ b/queue-2.6.27/x86-hpet-convert-warn_on-to-warn_on_once.patch @@ -0,0 +1,35 @@ +From 1de5b0854623d30d01d72cd4ea323eb5f39d1f16 Mon Sep 17 00:00:00 2001 +From: Matt Fleming +Date: Sun, 2 Nov 2008 16:04:18 +0000 +Subject: x86: HPET: convert WARN_ON to WARN_ON_ONCE + +From: Matt Fleming + +commit 1de5b0854623d30d01d72cd4ea323eb5f39d1f16 upstream. + +It is possible to flood the console with call traces if the WARN_ON +condition is true because of the frequency with which this function is +called. + +Signed-off-by: Matt Fleming +Cc: mingo@elte.hu +Cc: venkatesh.pallipadi@intel.com +Signed-off-by: Thomas Gleixner +Cc: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/hpet.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kernel/hpet.c ++++ b/arch/x86/kernel/hpet.c +@@ -283,7 +283,7 @@ static int hpet_legacy_next_event(unsign + * what we wrote hit the chip before we compare it to the + * counter. + */ +- WARN_ON((u32)hpet_readl(HPET_T0_CMP) != cnt); ++ WARN_ON_ONCE((u32)hpet_readl(HPET_T0_CMP) != cnt); + + return (s32)((u32)hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0; + } diff --git a/queue-2.6.27/x86-memory-hotplug-remove-wrong-1-in-calling-init_memory_mapping.patch b/queue-2.6.27/x86-memory-hotplug-remove-wrong-1-in-calling-init_memory_mapping.patch new file mode 100644 index 00000000000..45885358878 --- /dev/null +++ b/queue-2.6.27/x86-memory-hotplug-remove-wrong-1-in-calling-init_memory_mapping.patch @@ -0,0 +1,39 @@ +From 60817c9b31ef7897d60bca2f384cbc316a3fdd8b Mon Sep 17 00:00:00 2001 +From: Shaohua Li +Date: Mon, 27 Oct 2008 13:03:18 -0700 +Subject: x86, memory hotplug: remove wrong -1 in calling init_memory_mapping() + +From: Shaohua Li + +commit 60817c9b31ef7897d60bca2f384cbc316a3fdd8b upstream. + +Impact: fix crash with memory hotplug + +Shuahua Li found: + +| I just did some experiments on a desktop for memory hotplug and this bug +| triggered a crash in my test. +| +| Yinghai's suggestion also fixed the bug. + +We don't need to round it, just remove that extra -1 + +Signed-off-by: Yinghai +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/mm/init_64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/mm/init_64.c ++++ b/arch/x86/mm/init_64.c +@@ -721,7 +721,7 @@ int arch_add_memory(int nid, u64 start, + unsigned long nr_pages = size >> PAGE_SHIFT; + int ret; + +- last_mapped_pfn = init_memory_mapping(start, start + size-1); ++ last_mapped_pfn = init_memory_mapping(start, start + size); + if (last_mapped_pfn > max_pfn_mapped) + max_pfn_mapped = last_mapped_pfn; + diff --git a/queue-2.6.27/x86-remove-debug-code-from-arch_add_memory.patch b/queue-2.6.27/x86-remove-debug-code-from-arch_add_memory.patch new file mode 100644 index 00000000000..01639b626ca --- /dev/null +++ b/queue-2.6.27/x86-remove-debug-code-from-arch_add_memory.patch @@ -0,0 +1,38 @@ +From fe8b868eccb9f85a0e231e35f0abac5b39bac801 Mon Sep 17 00:00:00 2001 +From: Gary Hade +Date: Tue, 28 Oct 2008 16:43:14 -0700 +Subject: x86: remove debug code from arch_add_memory() + +From: Gary Hade + +commit fe8b868eccb9f85a0e231e35f0abac5b39bac801 upstream. + +Impact: remove incorrect WARN_ON(1) + +Gets rid of dmesg spam created during physical memory hot-add which +will very likely confuse users. The change removes what appears to +be debugging code which I assume was unintentionally included in: + + x86: arch/x86/mm/init_64.c printk fixes + commit 10f22dde556d1ed41d55355d1fb8ad495f9810c8 + +Signed-off-by: Gary Hade +Signed-off-by: Ingo Molnar +Acked-by: Jeff Mahoney +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/mm/init_64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/mm/init_64.c ++++ b/arch/x86/mm/init_64.c +@@ -726,7 +726,7 @@ int arch_add_memory(int nid, u64 start, + max_pfn_mapped = last_mapped_pfn; + + ret = __add_pages(zone, start_pfn, nr_pages); +- WARN_ON(1); ++ WARN_ON_ONCE(ret); + + return ret; + }