Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/microblaze/include/asm/uaccess.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/microblaze/include/asm/uaccess.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/microblaze/include/asm/uaccess.h 2011-04-01 17:56:57.679710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/microblaze/include/asm/uaccess.h 2011-04-02 01:37:43.889688353 +0200
- @@ -120,16 +120,16 @@ static inline unsigned long __must_check
- {
- /* normal memset with two words to __ex_table */
- __asm__ __volatile__ ( \
- - "1: sb r0, %2, r0;" \
- + "1: sb r0, %1, r0;" \
- " addik %0, %0, -1;" \
- " bneid %0, 1b;" \
- - " addik %2, %2, 1;" \
- + " addik %1, %1, 1;" \
- "2: " \
- __EX_TABLE_SECTION \
- ".word 1b,2b;" \
- ".previous;" \
- - : "=r"(n) \
- - : "0"(n), "r"(to)
- + : "=r"(n), "=r"(to) \
- + : "0"(n), "1"(to)
- );
- return n;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/mips/alchemy/mtx-1/platform.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/mips/alchemy/mtx-1/platform.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/mips/alchemy/mtx-1/platform.c 2011-04-01 17:56:57.802710686 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/mips/alchemy/mtx-1/platform.c 2011-04-02 01:37:43.912688353 +0200
- @@ -28,6 +28,8 @@
- #include <linux/mtd/physmap.h>
- #include <mtd/mtd-abi.h>
- +#include <asm/mach-au1x00/au1xxx_eth.h>
- +
- static struct gpio_keys_button mtx1_gpio_button[] = {
- {
- .gpio = 207,
- @@ -140,10 +142,17 @@ static struct __initdata platform_device
- &mtx1_mtd,
- };
- +static struct au1000_eth_platform_data mtx1_au1000_eth0_pdata = {
- + .phy_search_highest_addr = 1,
- + .phy1_search_mac0 = 1,
- +};
- +
- static int __init mtx1_register_devices(void)
- {
- int rc;
- + au1xxx_override_eth_cfg(0, &mtx1_au1000_eth0_pdata);
- +
- rc = gpio_request(mtx1_gpio_button[0].gpio,
- mtx1_gpio_button[0].desc);
- if (rc < 0) {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/parisc/kernel/irq.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/parisc/kernel/irq.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/parisc/kernel/irq.c 2011-04-01 17:56:58.074710686 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/parisc/kernel/irq.c 2011-04-02 01:37:44.182688351 +0200
- @@ -108,7 +108,7 @@ int cpu_check_affinity(unsigned int irq,
- int cpu_dest;
- /* timer and ipi have to always be received on all CPUs */
- - if (CHECK_IRQ_PER_CPU(irq)) {
- + if (CHECK_IRQ_PER_CPU(irq_to_desc(irq)->status)) {
- /* Bad linux design decision. The mask has already
- * been set; we must reset it */
- cpumask_setall(irq_desc[irq].affinity);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/powerpc/include/asm/reg.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/powerpc/include/asm/reg.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/powerpc/include/asm/reg.h 2011-04-01 17:56:58.308710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/powerpc/include/asm/reg.h 2011-04-02 01:37:44.352688352 +0200
- @@ -878,6 +878,7 @@
- #define PV_970 0x0039
- #define PV_POWER5 0x003A
- #define PV_POWER5p 0x003B
- +#define PV_POWER7 0x003F
- #define PV_970FX 0x003C
- #define PV_630 0x0040
- #define PV_630p 0x0041
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/powerpc/kernel/perf_event.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/powerpc/kernel/perf_event.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/powerpc/kernel/perf_event.c 2011-04-01 17:56:58.321710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/powerpc/kernel/perf_event.c 2011-04-02 01:37:44.392688351 +0200
- @@ -1268,6 +1268,28 @@ unsigned long perf_instruction_pointer(s
- return ip;
- }
- +static bool pmc_overflow(unsigned long val)
- +{
- + if ((int)val < 0)
- + return true;
- +
- + /*
- + * Events on POWER7 can roll back if a speculative event doesn't
- + * eventually complete. Unfortunately in some rare cases they will
- + * raise a performance monitor exception. We need to catch this to
- + * ensure we reset the PMC. In all cases the PMC will be 256 or less
- + * cycles from overflow.
- + *
- + * We only do this if the first pass fails to find any overflowing
- + * PMCs because a user might set a period of less than 256 and we
- + * don't want to mistakenly reset them.
- + */
- + if (__is_processor(PV_POWER7) && ((0x80000000 - val) <= 256))
- + return true;
- +
- + return false;
- +}
- +
- /*
- * Performance monitor interrupt stuff
- */
- @@ -1315,7 +1337,7 @@ static void perf_event_interrupt(struct
- if (is_limited_pmc(i + 1))
- continue;
- val = read_pmc(i + 1);
- - if ((int)val < 0)
- + if (pmc_overflow(val))
- write_pmc(i + 1, 0);
- }
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/sh/kernel/ptrace_32.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/sh/kernel/ptrace_32.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/sh/kernel/ptrace_32.c 2011-04-01 17:56:57.559710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/sh/kernel/ptrace_32.c 2011-04-02 01:38:34.957688311 +0200
- @@ -101,6 +101,8 @@ static int set_single_step(struct task_s
- attr = bp->attr;
- attr.bp_addr = addr;
- + /* reenable breakpoint */
- + attr.disabled = false;
- err = modify_user_hw_breakpoint(bp, &attr);
- if (unlikely(err))
- return err;
- @@ -392,6 +394,9 @@ long arch_ptrace(struct task_struct *chi
- tmp = 0;
- } else {
- unsigned long index;
- + ret = init_fpu(child);
- + if (ret)
- + break;
- index = addr - offsetof(struct user, fpu);
- tmp = ((unsigned long *)child->thread.xstate)
- [index >> 2];
- @@ -423,6 +428,9 @@ long arch_ptrace(struct task_struct *chi
- else if (addr >= offsetof(struct user, fpu) &&
- addr < offsetof(struct user, u_fpvalid)) {
- unsigned long index;
- + ret = init_fpu(child);
- + if (ret)
- + break;
- index = addr - offsetof(struct user, fpu);
- set_stopped_child_used_math(child);
- ((unsigned long *)child->thread.xstate)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/sh/kernel/ptrace_64.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/sh/kernel/ptrace_64.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/sh/kernel/ptrace_64.c 2011-04-01 17:56:57.559710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/sh/kernel/ptrace_64.c 2011-04-02 01:38:34.958688308 +0200
- @@ -403,6 +403,9 @@ long arch_ptrace(struct task_struct *chi
- else if ((addr >= offsetof(struct user, fpu)) &&
- (addr < offsetof(struct user, u_fpvalid))) {
- unsigned long index;
- + ret = init_fpu(child);
- + if (ret)
- + break;
- index = addr - offsetof(struct user, fpu);
- tmp = get_fpu_long(child, index);
- } else if (addr == offsetof(struct user, u_fpvalid)) {
- @@ -442,6 +445,9 @@ long arch_ptrace(struct task_struct *chi
- else if ((addr >= offsetof(struct user, fpu)) &&
- (addr < offsetof(struct user, u_fpvalid))) {
- unsigned long index;
- + ret = init_fpu(child);
- + if (ret)
- + break;
- index = addr - offsetof(struct user, fpu);
- ret = put_fpu_long(child, index, data);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/acpi.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/acpi.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/acpi.h 2011-04-01 17:56:58.767710686 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/acpi.h 2011-04-02 01:37:44.751688352 +0200
- @@ -88,6 +88,7 @@ extern int acpi_disabled;
- extern int acpi_pci_disabled;
- extern int acpi_skip_timer_override;
- extern int acpi_use_timer_override;
- +extern int acpi_fix_pin2_polarity;
- extern u8 acpi_sci_flags;
- extern int acpi_sci_override_gsi;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/msr-index.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/msr-index.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/msr-index.h 2011-04-01 17:56:58.750710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/msr-index.h 2011-04-02 01:38:34.959688308 +0200
- @@ -36,6 +36,11 @@
- #define MSR_IA32_PERFCTR1 0x000000c2
- #define MSR_FSB_FREQ 0x000000cd
- +#define MSR_NHM_SNB_PKG_CST_CFG_CTL 0x000000e2
- +#define NHM_C3_AUTO_DEMOTE (1UL << 25)
- +#define NHM_C1_AUTO_DEMOTE (1UL << 26)
- +#define ATM_LNC_C6_AUTO_DEMOTE (1UL << 25)
- +
- #define MSR_MTRRcap 0x000000fe
- #define MSR_IA32_BBL_CR_CTL 0x00000119
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/pgtable-3level.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/pgtable-3level.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/pgtable-3level.h 2011-04-01 17:56:58.758710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/pgtable-3level.h 2011-04-02 01:37:44.750688352 +0200
- @@ -69,8 +69,6 @@ static inline void native_pmd_clear(pmd_
- static inline void pud_clear(pud_t *pudp)
- {
- - unsigned long pgd;
- -
- set_pud(pudp, __pud(0));
- /*
- @@ -79,13 +77,10 @@ static inline void pud_clear(pud_t *pudp
- * section 8.1: in PAE mode we explicitly have to flush the
- * TLB via cr3 if the top-level pgd is changed...
- *
- - * Make sure the pud entry we're updating is within the
- - * current pgd to avoid unnecessary TLB flushes.
- + * Currently all places where pud_clear() is called either have
- + * flush_tlb_mm() followed or don't need TLB flush (x86_64 code or
- + * pud_clear_bad()), so we don't need TLB flush here.
- */
- - pgd = read_cr3();
- - if (__pa(pudp) >= pgd && __pa(pudp) <
- - (pgd + sizeof(pgd_t)*PTRS_PER_PGD))
- - write_cr3(pgd);
- }
- #ifdef CONFIG_SMP
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/smpboot_hooks.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/smpboot_hooks.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/smpboot_hooks.h 2011-04-01 17:56:58.770710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/include/asm/smpboot_hooks.h 2011-04-02 01:37:44.755688351 +0200
- @@ -34,7 +34,7 @@ static inline void smpboot_restore_warm_
- */
- CMOS_WRITE(0, 0xf);
- - *((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0;
- + *((volatile u32 *)phys_to_virt(apic->trampoline_phys_low)) = 0;
- }
- static inline void __init smpboot_setup_io_apic(void)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/acpi/boot.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/acpi/boot.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/acpi/boot.c 2011-04-01 17:56:58.783710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/acpi/boot.c 2011-04-02 01:37:44.766688351 +0200
- @@ -72,6 +72,7 @@ u8 acpi_sci_flags __initdata;
- int acpi_sci_override_gsi __initdata;
- int acpi_skip_timer_override __initdata;
- int acpi_use_timer_override __initdata;
- +int acpi_fix_pin2_polarity __initdata;
- #ifdef CONFIG_X86_LOCAL_APIC
- static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
- @@ -410,10 +411,15 @@ acpi_parse_int_src_ovr(struct acpi_subta
- return 0;
- }
- - if (acpi_skip_timer_override &&
- - intsrc->source_irq == 0 && intsrc->global_irq == 2) {
- - printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
- - return 0;
- + if (intsrc->source_irq == 0 && intsrc->global_irq == 2) {
- + if (acpi_skip_timer_override) {
- + printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
- + return 0;
- + }
- + if (acpi_fix_pin2_polarity && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
- + intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
- + printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n");
- + }
- }
- mp_override_legacy_irq(intsrc->source_irq,
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/alternative.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/alternative.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/alternative.c 2011-04-01 17:56:58.793710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/alternative.c 2011-04-02 01:37:44.768688352 +0200
- @@ -417,7 +417,12 @@ int alternatives_text_reserved(void *sta
- return 1;
- }
- }
- -
- + /*
- + * Intel Archiecture Software Developer's Manual section 7.1.3 specifies
- + * that a core serializing instruction such as "cpuid" should be
- + * executed on _each_ core before the new instruction is made visible.
- + */
- + sync_core();
- return 0;
- }
- #endif
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/check.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/check.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/check.c 2011-04-01 17:56:58.792710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/check.c 2011-04-02 01:37:44.766688352 +0200
- @@ -106,8 +106,8 @@ void __init setup_bios_corruption_check(
- addr += size;
- }
- - printk(KERN_INFO "Scanning %d areas for low memory corruption\n",
- - num_scan_areas);
- + if (num_scan_areas)
- + printk(KERN_INFO "Scanning %d areas for low memory corruption\n", num_scan_areas);
- }
- @@ -143,12 +143,12 @@ static void check_corruption(struct work
- {
- check_for_bios_corruption();
- schedule_delayed_work(&bios_check_work,
- - round_jiffies_relative(corruption_check_period*HZ));
- + round_jiffies_relative(corruption_check_period*HZ));
- }
- static int start_periodic_check_for_corruption(void)
- {
- - if (!memory_corruption_check || corruption_check_period == 0)
- + if (!num_scan_areas || !memory_corruption_check || corruption_check_period == 0)
- return 0;
- printk(KERN_INFO "Scanning for low memory corruption every %d seconds\n",
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c 2011-04-01 17:56:58.781710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c 2011-04-02 01:37:44.758688352 +0200
- @@ -195,7 +195,7 @@ static unsigned int pcc_get_freq(unsigne
- cmd_incomplete:
- iowrite16(0, &pcch_hdr->status);
- spin_unlock(&pcc_lock);
- - return -EINVAL;
- + return 0;
- }
- static int pcc_cpufreq_target(struct cpufreq_policy *policy,
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/e820.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/e820.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/e820.c 2011-04-01 17:56:58.773710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/e820.c 2011-04-02 01:37:44.757688352 +0200
- @@ -846,15 +846,21 @@ static int __init parse_memopt(char *p)
- if (!p)
- return -EINVAL;
- -#ifdef CONFIG_X86_32
- if (!strcmp(p, "nopentium")) {
- +#ifdef CONFIG_X86_32
- setup_clear_cpu_cap(X86_FEATURE_PSE);
- return 0;
- - }
- +#else
- + printk(KERN_WARNING "mem=nopentium ignored! (only supported on x86_32)\n");
- + return -EINVAL;
- #endif
- + }
- userdef = 1;
- mem_size = memparse(p, &p);
- + /* don't remove all of memory when handling "mem={invalid}" param */
- + if (mem_size == 0)
- + return -EINVAL;
- e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
- return 0;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/early-quirks.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/early-quirks.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/early-quirks.c 2011-04-01 17:56:58.793710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/early-quirks.c 2011-04-02 01:37:44.768688352 +0200
- @@ -143,15 +143,10 @@ static void __init ati_bugs(int num, int
- static u32 __init ati_sbx00_rev(int num, int slot, int func)
- {
- - u32 old, d;
- + u32 d;
- - d = read_pci_config(num, slot, func, 0x70);
- - old = d;
- - d &= ~(1<<8);
- - write_pci_config(num, slot, func, 0x70, d);
- d = read_pci_config(num, slot, func, 0x8);
- d &= 0xff;
- - write_pci_config(num, slot, func, 0x70, old);
- return d;
- }
- @@ -160,11 +155,19 @@ static void __init ati_bugs_contd(int nu
- {
- u32 d, rev;
- - if (acpi_use_timer_override)
- + rev = ati_sbx00_rev(num, slot, func);
- + if (rev >= 0x40)
- + acpi_fix_pin2_polarity = 1;
- +
- + /*
- + * SB600: revisions 0x11, 0x12, 0x13, 0x14, ...
- + * SB700: revisions 0x39, 0x3a, ...
- + * SB800: revisions 0x40, 0x41, ...
- + */
- + if (rev >= 0x39)
- return;
- - rev = ati_sbx00_rev(num, slot, func);
- - if (rev > 0x13)
- + if (acpi_use_timer_override)
- return;
- /* check for IRQ0 interrupt swap */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/entry_64.S linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/entry_64.S
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/entry_64.S 2011-04-01 17:56:58.792710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/entry_64.S 2011-04-02 01:37:44.766688352 +0200
- @@ -1238,7 +1238,7 @@ ENTRY(xen_do_hypervisor_callback) # do
- decl PER_CPU_VAR(irq_count)
- jmp error_exit
- CFI_ENDPROC
- -END(do_hypervisor_callback)
- +END(xen_do_hypervisor_callback)
- /*
- * Hypervisor uses this for application faults while it executes.
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/head64.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/head64.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/head64.c 2011-04-01 17:56:58.792710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/head64.c 2011-04-02 01:38:34.959688308 +0200
- @@ -77,9 +77,6 @@ void __init x86_64_start_kernel(char * r
- /* Make NULL pointers segfault */
- zap_identity_mappings();
- - /* Cleanup the over mapped high alias */
- - cleanup_highmap();
- -
- max_pfn_mapped = KERNEL_IMAGE_SIZE >> PAGE_SHIFT;
- for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/setup.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/setup.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/setup.c 2011-04-01 17:56:58.773710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/kernel/setup.c 2011-04-02 01:38:34.959688309 +0200
- @@ -297,6 +297,9 @@ static void __init init_gbpages(void)
- static inline void init_gbpages(void)
- {
- }
- +static void __init cleanup_highmap(void)
- +{
- +}
- #endif
- static void __init reserve_brk(void)
- @@ -922,6 +925,8 @@ void __init setup_arch(char **cmdline_p)
- */
- reserve_brk();
- + cleanup_highmap();
- +
- memblock.current_limit = get_max_mapped();
- memblock_x86_fill();
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/fault.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/fault.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/fault.c 2011-04-01 17:57:39.313710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/fault.c 2011-04-02 01:37:44.756688351 +0200
- @@ -827,6 +827,13 @@ mm_fault_error(struct pt_regs *regs, uns
- unsigned long address, unsigned int fault)
- {
- if (fault & VM_FAULT_OOM) {
- + /* Kernel mode? Handle exceptions or die: */
- + if (!(error_code & PF_USER)) {
- + up_read(¤t->mm->mmap_sem);
- + no_context(regs, error_code, address);
- + return;
- + }
- +
- out_of_memory(regs, error_code, address);
- } else {
- if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/init_64.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/init_64.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/init_64.c 2011-04-01 17:57:39.314710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/init_64.c 2011-04-02 01:38:34.960688312 +0200
- @@ -51,6 +51,7 @@
- #include <asm/numa.h>
- #include <asm/cacheflush.h>
- #include <asm/init.h>
- +#include <asm/setup.h>
- static int __init parse_direct_gbpages_off(char *arg)
- {
- @@ -293,18 +294,18 @@ void __init init_extra_mapping_uc(unsign
- * to the compile time generated pmds. This results in invalid pmds up
- * to the point where we hit the physaddr 0 mapping.
- *
- - * We limit the mappings to the region from _text to _end. _end is
- - * rounded up to the 2MB boundary. This catches the invalid pmds as
- + * We limit the mappings to the region from _text to _brk_end. _brk_end
- + * is rounded up to the 2MB boundary. This catches the invalid pmds as
- * well, as they are located before _text:
- */
- void __init cleanup_highmap(void)
- {
- unsigned long vaddr = __START_KERNEL_map;
- - unsigned long end = roundup((unsigned long)_end, PMD_SIZE) - 1;
- + unsigned long vaddr_end = __START_KERNEL_map + (max_pfn_mapped << PAGE_SHIFT);
- + unsigned long end = roundup((unsigned long)_brk_end, PMD_SIZE) - 1;
- pmd_t *pmd = level2_kernel_pgt;
- - pmd_t *last_pmd = pmd + PTRS_PER_PMD;
- - for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) {
- + for (; vaddr + PMD_SIZE - 1 < vaddr_end; pmd++, vaddr += PMD_SIZE) {
- if (pmd_none(*pmd))
- continue;
- if (vaddr < (unsigned long) _text || vaddr > end)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/init.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/init.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/init.c 2011-04-01 17:56:58.771710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/init.c 2011-04-02 01:38:34.962688312 +0200
- @@ -279,25 +279,6 @@ unsigned long __init_refok init_memory_m
- load_cr3(swapper_pg_dir);
- #endif
- -#ifdef CONFIG_X86_64
- - if (!after_bootmem && !start) {
- - pud_t *pud;
- - pmd_t *pmd;
- -
- - mmu_cr4_features = read_cr4();
- -
- - /*
- - * _brk_end cannot change anymore, but it and _end may be
- - * located on different 2M pages. cleanup_highmap(), however,
- - * can only consider _end when it runs, so destroy any
- - * mappings beyond _brk_end here.
- - */
- - pud = pud_offset(pgd_offset_k(_brk_end), _brk_end);
- - pmd = pmd_offset(pud, _brk_end - 1);
- - while (++pmd <= pmd_offset(pud, (unsigned long)_end - 1))
- - pmd_clear(pmd);
- - }
- -#endif
- __flush_tlb_all();
- if (!after_bootmem && e820_table_end > e820_table_start)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/pgtable.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/pgtable.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/pgtable.c 2011-04-01 17:57:39.314710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/mm/pgtable.c 2011-04-02 01:37:44.756688352 +0200
- @@ -168,8 +168,7 @@ void pud_populate(struct mm_struct *mm,
- * section 8.1: in PAE mode we explicitly have to flush the
- * TLB via cr3 if the top-level pgd is changed...
- */
- - if (mm == current->active_mm)
- - write_cr3(read_cr3());
- + flush_tlb_mm(mm);
- }
- #else /* !CONFIG_X86_PAE */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/xen/mmu.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/xen/mmu.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/xen/mmu.c 2011-04-01 17:57:39.315710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//arch/x86/xen/mmu.c 2011-04-02 01:38:34.963688312 +0200
- @@ -2027,9 +2027,6 @@ static __init void xen_map_identity_earl
- for (pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) {
- pte_t pte;
- - if (pfn > max_pfn_mapped)
- - max_pfn_mapped = pfn;
- -
- if (!pte_none(pte_page[pteidx]))
- continue;
- @@ -2087,6 +2084,12 @@ __init pgd_t *xen_setup_kernel_pagetable
- pud_t *l3;
- pmd_t *l2;
- + /* max_pfn_mapped is the last pfn mapped in the initial memory
- + * mappings. Considering that on Xen after the kernel mappings we
- + * have the mappings of some pages that don't exist in pfn space, we
- + * set max_pfn_mapped to the last real pfn mapped. */
- + max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->mfn_list));
- +
- /* Zap identity mapping */
- init_level4_pgt[0] = __pgd(0);
- @@ -2191,9 +2194,7 @@ __init pgd_t *xen_setup_kernel_pagetable
- initial_kernel_pmd =
- extend_brk(sizeof(pmd_t) * PTRS_PER_PMD, PAGE_SIZE);
- - max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) +
- - xen_start_info->nr_pt_frames * PAGE_SIZE +
- - 512*1024);
- + max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->mfn_list));
- kernel_pmd = m2v(pgd[KERNEL_PGD_BOUNDARY].pgd);
- memcpy(initial_kernel_pmd, kernel_pmd, sizeof(pmd_t) * PTRS_PER_PMD);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-core.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-core.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-core.c 2011-04-01 17:56:55.969710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-core.c 2011-04-02 01:37:42.118688354 +0200
- @@ -352,7 +352,7 @@ void blk_start_queue(struct request_queu
- WARN_ON(!irqs_disabled());
- queue_flag_clear(QUEUE_FLAG_STOPPED, q);
- - __blk_run_queue(q);
- + __blk_run_queue(q, false);
- }
- EXPORT_SYMBOL(blk_start_queue);
- @@ -403,13 +403,14 @@ EXPORT_SYMBOL(blk_sync_queue);
- /**
- * __blk_run_queue - run a single device queue
- * @q: The queue to run
- + * @force_kblockd: Don't run @q->request_fn directly. Use kblockd.
- *
- * Description:
- * See @blk_run_queue. This variant must be called with the queue lock
- * held and interrupts disabled.
- *
- */
- -void __blk_run_queue(struct request_queue *q)
- +void __blk_run_queue(struct request_queue *q, bool force_kblockd)
- {
- blk_remove_plug(q);
- @@ -423,7 +424,7 @@ void __blk_run_queue(struct request_queu
- * Only recurse once to avoid overrunning the stack, let the unplug
- * handling reinvoke the handler shortly if we already got there.
- */
- - if (!queue_flag_test_and_set(QUEUE_FLAG_REENTER, q)) {
- + if (!force_kblockd && !queue_flag_test_and_set(QUEUE_FLAG_REENTER, q)) {
- q->request_fn(q);
- queue_flag_clear(QUEUE_FLAG_REENTER, q);
- } else {
- @@ -446,7 +447,7 @@ void blk_run_queue(struct request_queue
- unsigned long flags;
- spin_lock_irqsave(q->queue_lock, flags);
- - __blk_run_queue(q);
- + __blk_run_queue(q, false);
- spin_unlock_irqrestore(q->queue_lock, flags);
- }
- EXPORT_SYMBOL(blk_run_queue);
- @@ -1053,7 +1054,7 @@ void blk_insert_request(struct request_q
- drive_stat_acct(rq, 1);
- __elv_add_request(q, rq, where, 0);
- - __blk_run_queue(q);
- + __blk_run_queue(q, false);
- spin_unlock_irqrestore(q->queue_lock, flags);
- }
- EXPORT_SYMBOL(blk_insert_request);
- @@ -2610,13 +2611,6 @@ int kblockd_schedule_work(struct request
- }
- EXPORT_SYMBOL(kblockd_schedule_work);
- -int kblockd_schedule_delayed_work(struct request_queue *q,
- - struct delayed_work *dwork, unsigned long delay)
- -{
- - return queue_delayed_work(kblockd_workqueue, dwork, delay);
- -}
- -EXPORT_SYMBOL(kblockd_schedule_delayed_work);
- -
- int __init blk_dev_init(void)
- {
- BUILD_BUG_ON(__REQ_NR_BITS > 8 *
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-flush.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-flush.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-flush.c 2011-04-01 17:57:39.319710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-flush.c 2011-04-02 01:37:42.119688354 +0200
- @@ -66,10 +66,12 @@ static void blk_flush_complete_seq_end_i
- /*
- * Moving a request silently to empty queue_head may stall the
- - * queue. Kick the queue in those cases.
- + * queue. Kick the queue in those cases. This function is called
- + * from request completion path and calling directly into
- + * request_fn may confuse the driver. Always use kblockd.
- */
- if (was_empty && next_rq)
- - __blk_run_queue(q);
- + __blk_run_queue(q, true);
- }
- static void pre_flush_end_io(struct request *rq, int error)
- @@ -130,7 +132,7 @@ static struct request *queue_next_fseq(s
- BUG();
- }
- - elv_insert(q, rq, ELEVATOR_INSERT_FRONT);
- + elv_insert(q, rq, ELEVATOR_INSERT_REQUEUE);
- return rq;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-lib.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-lib.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-lib.c 2011-04-01 17:56:55.969710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-lib.c 2011-04-02 01:37:42.119688354 +0200
- @@ -109,7 +109,6 @@ struct bio_batch
- atomic_t done;
- unsigned long flags;
- struct completion *wait;
- - bio_end_io_t *end_io;
- };
- static void bio_batch_end_io(struct bio *bio, int err)
- @@ -122,12 +121,9 @@ static void bio_batch_end_io(struct bio
- else
- clear_bit(BIO_UPTODATE, &bb->flags);
- }
- - if (bb) {
- - if (bb->end_io)
- - bb->end_io(bio, err);
- - atomic_inc(&bb->done);
- - complete(bb->wait);
- - }
- + if (bb)
- + if (atomic_dec_and_test(&bb->done))
- + complete(bb->wait);
- bio_put(bio);
- }
- @@ -150,13 +146,12 @@ int blkdev_issue_zeroout(struct block_de
- int ret;
- struct bio *bio;
- struct bio_batch bb;
- - unsigned int sz, issued = 0;
- + unsigned int sz;
- DECLARE_COMPLETION_ONSTACK(wait);
- - atomic_set(&bb.done, 0);
- + atomic_set(&bb.done, 1);
- bb.flags = 1 << BIO_UPTODATE;
- bb.wait = &wait;
- - bb.end_io = NULL;
- submit:
- ret = 0;
- @@ -185,12 +180,12 @@ submit:
- break;
- }
- ret = 0;
- - issued++;
- + atomic_inc(&bb.done);
- submit_bio(WRITE, bio);
- }
- /* Wait for bios in-flight */
- - while (issued != atomic_read(&bb.done))
- + if (!atomic_dec_and_test(&bb.done))
- wait_for_completion(&wait);
- if (!test_bit(BIO_UPTODATE, &bb.flags))
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-throttle.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-throttle.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-throttle.c 2011-04-01 17:56:55.969710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/blk-throttle.c 2011-04-02 01:37:42.118688354 +0200
- @@ -20,6 +20,11 @@ static int throtl_quantum = 32;
- /* Throttling is performed over 100ms slice and after that slice is renewed */
- static unsigned long throtl_slice = HZ/10; /* 100 ms */
- +/* A workqueue to queue throttle related work */
- +static struct workqueue_struct *kthrotld_workqueue;
- +static void throtl_schedule_delayed_work(struct throtl_data *td,
- + unsigned long delay);
- +
- struct throtl_rb_root {
- struct rb_root rb;
- struct rb_node *left;
- @@ -337,10 +342,9 @@ static void throtl_schedule_next_dispatc
- update_min_dispatch_time(st);
- if (time_before_eq(st->min_disptime, jiffies))
- - throtl_schedule_delayed_work(td->queue, 0);
- + throtl_schedule_delayed_work(td, 0);
- else
- - throtl_schedule_delayed_work(td->queue,
- - (st->min_disptime - jiffies));
- + throtl_schedule_delayed_work(td, (st->min_disptime - jiffies));
- }
- static inline void
- @@ -807,10 +811,10 @@ void blk_throtl_work(struct work_struct
- }
- /* Call with queue lock held */
- -void throtl_schedule_delayed_work(struct request_queue *q, unsigned long delay)
- +static void
- +throtl_schedule_delayed_work(struct throtl_data *td, unsigned long delay)
- {
- - struct throtl_data *td = q->td;
- struct delayed_work *dwork = &td->throtl_work;
- if (total_nr_queued(td) > 0) {
- @@ -819,12 +823,11 @@ void throtl_schedule_delayed_work(struct
- * Cancel that and schedule a new one.
- */
- __cancel_delayed_work(dwork);
- - kblockd_schedule_delayed_work(q, dwork, delay);
- + queue_delayed_work(kthrotld_workqueue, dwork, delay);
- throtl_log(td, "schedule work. delay=%lu jiffies=%lu",
- delay, jiffies);
- }
- }
- -EXPORT_SYMBOL(throtl_schedule_delayed_work);
- static void
- throtl_destroy_tg(struct throtl_data *td, struct throtl_grp *tg)
- @@ -912,7 +915,7 @@ static void throtl_update_blkio_group_re
- smp_mb__after_atomic_inc();
- /* Schedule a work now to process the limit change */
- - throtl_schedule_delayed_work(td->queue, 0);
- + throtl_schedule_delayed_work(td, 0);
- }
- static void throtl_update_blkio_group_write_bps(void *key,
- @@ -926,7 +929,7 @@ static void throtl_update_blkio_group_wr
- smp_mb__before_atomic_inc();
- atomic_inc(&td->limits_changed);
- smp_mb__after_atomic_inc();
- - throtl_schedule_delayed_work(td->queue, 0);
- + throtl_schedule_delayed_work(td, 0);
- }
- static void throtl_update_blkio_group_read_iops(void *key,
- @@ -940,7 +943,7 @@ static void throtl_update_blkio_group_re
- smp_mb__before_atomic_inc();
- atomic_inc(&td->limits_changed);
- smp_mb__after_atomic_inc();
- - throtl_schedule_delayed_work(td->queue, 0);
- + throtl_schedule_delayed_work(td, 0);
- }
- static void throtl_update_blkio_group_write_iops(void *key,
- @@ -954,7 +957,7 @@ static void throtl_update_blkio_group_wr
- smp_mb__before_atomic_inc();
- atomic_inc(&td->limits_changed);
- smp_mb__after_atomic_inc();
- - throtl_schedule_delayed_work(td->queue, 0);
- + throtl_schedule_delayed_work(td, 0);
- }
- void throtl_shutdown_timer_wq(struct request_queue *q)
- @@ -1127,6 +1130,10 @@ void blk_throtl_exit(struct request_queu
- static int __init throtl_init(void)
- {
- + kthrotld_workqueue = alloc_workqueue("kthrotld", WQ_MEM_RECLAIM, 0);
- + if (!kthrotld_workqueue)
- + panic("Failed to create kthrotld\n");
- +
- blkio_policy_register(&blkio_policy_throtl);
- return 0;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/cfq-iosched.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/cfq-iosched.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/cfq-iosched.c 2011-04-01 17:57:39.321710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/cfq-iosched.c 2011-04-02 01:37:42.118688354 +0200
- @@ -3358,7 +3358,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, s
- cfqd->busy_queues > 1) {
- cfq_del_timer(cfqd, cfqq);
- cfq_clear_cfqq_wait_request(cfqq);
- - __blk_run_queue(cfqd->queue);
- + __blk_run_queue(cfqd->queue, false);
- } else {
- cfq_blkiocg_update_idle_time_stats(
- &cfqq->cfqg->blkg);
- @@ -3373,7 +3373,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, s
- * this new queue is RT and the current one is BE
- */
- cfq_preempt_queue(cfqd, cfqq);
- - __blk_run_queue(cfqd->queue);
- + __blk_run_queue(cfqd->queue, false);
- }
- }
- @@ -3734,7 +3734,7 @@ static void cfq_kick_queue(struct work_s
- struct request_queue *q = cfqd->queue;
- spin_lock_irq(q->queue_lock);
- - __blk_run_queue(cfqd->queue);
- + __blk_run_queue(cfqd->queue, false);
- spin_unlock_irq(q->queue_lock);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/elevator.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/elevator.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/elevator.c 2011-04-01 17:56:55.969710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/elevator.c 2011-04-02 01:37:42.118688354 +0200
- @@ -602,7 +602,7 @@ void elv_quiesce_start(struct request_qu
- */
- elv_drain_elevator(q);
- while (q->rq.elvpriv) {
- - __blk_run_queue(q);
- + __blk_run_queue(q, false);
- spin_unlock_irq(q->queue_lock);
- msleep(10);
- spin_lock_irq(q->queue_lock);
- @@ -651,7 +651,7 @@ void elv_insert(struct request_queue *q,
- * with anything. There's no point in delaying queue
- * processing.
- */
- - __blk_run_queue(q);
- + __blk_run_queue(q, false);
- break;
- case ELEVATOR_INSERT_SORT:
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/genhd.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/genhd.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//block/genhd.c 2011-04-01 17:57:39.321710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//block/genhd.c 2011-04-02 01:37:42.119688354 +0200
- @@ -1297,7 +1297,7 @@ int invalidate_partition(struct gendisk
- struct block_device *bdev = bdget_disk(disk, partno);
- if (bdev) {
- fsync_bdev(bdev);
- - res = __invalidate_device(bdev);
- + res = __invalidate_device(bdev, true);
- bdput(bdev);
- }
- return res;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//Documentation/i2c/instantiating-devices linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//Documentation/i2c/instantiating-devices
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//Documentation/i2c/instantiating-devices 2011-04-01 17:56:55.963710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//Documentation/i2c/instantiating-devices 2011-04-02 01:37:42.111688352 +0200
- @@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_pro
- (...)
- i2c_adap = i2c_get_adapter(2);
- memset(&i2c_info, 0, sizeof(struct i2c_board_info));
- - strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE);
- + strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE);
- isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
- normal_i2c, NULL);
- i2c_put_adapter(i2c_adap);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//Documentation/networking/dns_resolver.txt linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//Documentation/networking/dns_resolver.txt
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//Documentation/networking/dns_resolver.txt 2011-04-01 17:56:55.934710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//Documentation/networking/dns_resolver.txt 2011-04-02 01:37:42.077688355 +0200
- @@ -61,7 +61,6 @@ before the more general line given above
- create dns_resolver foo:* * /usr/sbin/dns.foo %k
- -
- =====
- USAGE
- =====
- @@ -104,6 +103,14 @@ implemented in the module can be called
- returned also.
- +===============================
- +READING DNS KEYS FROM USERSPACE
- +===============================
- +
- +Keys of dns_resolver type can be read from userspace using keyctl_read() or
- +"keyctl read/print/pipe".
- +
- +
- =========
- MECHANISM
- =========
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/acpi/debugfs.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/acpi/debugfs.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/acpi/debugfs.c 2011-04-01 17:56:56.018710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/acpi/debugfs.c 2011-04-02 01:37:42.173688354 +0200
- @@ -26,7 +26,9 @@ static ssize_t cm_write(struct file *fil
- size_t count, loff_t *ppos)
- {
- static char *buf;
- - static int uncopied_bytes;
- + static u32 max_size;
- + static u32 uncopied_bytes;
- +
- struct acpi_table_header table;
- acpi_status status;
- @@ -37,19 +39,24 @@ static ssize_t cm_write(struct file *fil
- if (copy_from_user(&table, user_buf,
- sizeof(struct acpi_table_header)))
- return -EFAULT;
- - uncopied_bytes = table.length;
- - buf = kzalloc(uncopied_bytes, GFP_KERNEL);
- + uncopied_bytes = max_size = table.length;
- + buf = kzalloc(max_size, GFP_KERNEL);
- if (!buf)
- return -ENOMEM;
- }
- - if (uncopied_bytes < count) {
- - kfree(buf);
- + if (buf == NULL)
- + return -EINVAL;
- +
- + if ((*ppos > max_size) ||
- + (*ppos + count > max_size) ||
- + (*ppos + count < count) ||
- + (count > uncopied_bytes))
- return -EINVAL;
- - }
- if (copy_from_user(buf + (*ppos), user_buf, count)) {
- kfree(buf);
- + buf = NULL;
- return -EFAULT;
- }
- @@ -59,6 +66,7 @@ static ssize_t cm_write(struct file *fil
- if (!uncopied_bytes) {
- status = acpi_install_method(buf);
- kfree(buf);
- + buf = NULL;
- if (ACPI_FAILURE(status))
- return -EINVAL;
- add_taint(TAINT_OVERRIDDEN_ACPI_TABLE);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/ata/ahci.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/ata/ahci.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/ata/ahci.c 2011-04-01 17:56:56.028710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/ata/ahci.c 2011-04-02 01:37:42.183688354 +0200
- @@ -260,6 +260,8 @@ static const struct pci_device_id ahci_p
- { PCI_VDEVICE(INTEL, 0x1d02), board_ahci }, /* PBG AHCI */
- { PCI_VDEVICE(INTEL, 0x1d04), board_ahci }, /* PBG RAID */
- { PCI_VDEVICE(INTEL, 0x1d06), board_ahci }, /* PBG RAID */
- + { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */
- + { PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */
- /* JMicron 360/1/3/5/6, match class to avoid IDE function */
- { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
- @@ -380,6 +382,8 @@ static const struct pci_device_id ahci_p
- { PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv }, /* 6121 */
- { PCI_DEVICE(0x1b4b, 0x9123),
- .driver_data = board_ahci_yes_fbs }, /* 88se9128 */
- + { PCI_DEVICE(0x1b4b, 0x9125),
- + .driver_data = board_ahci_yes_fbs }, /* 88se9125 */
- /* Promise */
- { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/ata/libata-eh.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/ata/libata-eh.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/ata/libata-eh.c 2011-04-01 17:56:56.028710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/ata/libata-eh.c 2011-04-02 01:37:42.184688354 +0200
- @@ -1618,7 +1618,7 @@ static void ata_eh_analyze_serror(struct
- * host links. For disabled PMP links, only N bit is
- * considered as X bit is left at 1 for link plugging.
- */
- - if (link->lpm_policy != ATA_LPM_MAX_POWER)
- + if (link->lpm_policy > ATA_LPM_MAX_POWER)
- hotplug_mask = 0; /* hotplug doesn't work w/ LPM */
- else if (!(link->flags & ATA_LFLAG_DISABLED) || ata_is_host_link(link))
- hotplug_mask = SERR_PHYRDY_CHG | SERR_DEV_XCHG;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/block/floppy.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/block/floppy.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/block/floppy.c 2011-04-01 17:56:56.020710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/block/floppy.c 2011-04-02 01:37:42.176688354 +0200
- @@ -3276,7 +3276,7 @@ static int set_geometry(unsigned int cmd
- struct block_device *bdev = opened_bdev[cnt];
- if (!bdev || ITYPE(drive_state[cnt].fd_device) != type)
- continue;
- - __invalidate_device(bdev);
- + __invalidate_device(bdev, true);
- }
- mutex_unlock(&open_lock);
- } else {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/block/loop.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/block/loop.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/block/loop.c 2011-04-01 17:56:56.021710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/block/loop.c 2011-04-02 01:37:42.176688354 +0200
- @@ -78,7 +78,6 @@
- #include <asm/uaccess.h>
- -static DEFINE_MUTEX(loop_mutex);
- static LIST_HEAD(loop_devices);
- static DEFINE_MUTEX(loop_devices_mutex);
- @@ -1505,11 +1504,9 @@ static int lo_open(struct block_device *
- {
- struct loop_device *lo = bdev->bd_disk->private_data;
- - mutex_lock(&loop_mutex);
- mutex_lock(&lo->lo_ctl_mutex);
- lo->lo_refcnt++;
- mutex_unlock(&lo->lo_ctl_mutex);
- - mutex_unlock(&loop_mutex);
- return 0;
- }
- @@ -1519,7 +1516,6 @@ static int lo_release(struct gendisk *di
- struct loop_device *lo = disk->private_data;
- int err;
- - mutex_lock(&loop_mutex);
- mutex_lock(&lo->lo_ctl_mutex);
- if (--lo->lo_refcnt)
- @@ -1544,7 +1540,6 @@ static int lo_release(struct gendisk *di
- out:
- mutex_unlock(&lo->lo_ctl_mutex);
- out_unlocked:
- - mutex_unlock(&loop_mutex);
- return 0;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/bluetooth/ath3k.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/bluetooth/ath3k.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/bluetooth/ath3k.c 2011-04-01 17:56:56.022710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/bluetooth/ath3k.c 2011-04-02 01:37:42.178688354 +0200
- @@ -39,6 +39,11 @@ static struct usb_device_id ath3k_table[
- /* Atheros AR3011 with sflash firmware*/
- { USB_DEVICE(0x0CF3, 0x3002) },
- + /* Atheros AR9285 Malbec with sflash firmware */
- + { USB_DEVICE(0x03F0, 0x311D) },
- +
- + /* Atheros AR5BBU12 with sflash firmware */
- + { USB_DEVICE(0x0489, 0xE02C) },
- { } /* Terminating entry */
- };
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/bluetooth/btusb.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/bluetooth/btusb.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/bluetooth/btusb.c 2011-04-01 17:56:56.022710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/bluetooth/btusb.c 2011-04-02 01:37:42.178688354 +0200
- @@ -102,6 +102,12 @@ static struct usb_device_id blacklist_ta
- /* Atheros 3011 with sflash firmware */
- { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
- + /* Atheros AR9285 Malbec with sflash firmware */
- + { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
- +
- + /* Atheros AR5BBU12 with sflash firmware */
- + { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
- +
- /* Broadcom BCM2035 */
- { USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU },
- { USB_DEVICE(0x0a5c, 0x200a), .driver_info = BTUSB_WRONG_SCO_MTU },
- @@ -826,7 +832,7 @@ static void btusb_work(struct work_struc
- if (hdev->conn_hash.sco_num > 0) {
- if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) {
- - err = usb_autopm_get_interface(data->isoc);
- + err = usb_autopm_get_interface(data->isoc ? data->isoc : data->intf);
- if (err < 0) {
- clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
- usb_kill_anchored_urbs(&data->isoc_anchor);
- @@ -855,7 +861,7 @@ static void btusb_work(struct work_struc
- __set_isoc_interface(hdev, 0);
- if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
- - usb_autopm_put_interface(data->isoc);
- + usb_autopm_put_interface(data->isoc ? data->isoc : data->intf);
- }
- }
- @@ -1038,8 +1044,6 @@ static int btusb_probe(struct usb_interf
- usb_set_intfdata(intf, data);
- - usb_enable_autosuspend(interface_to_usbdev(intf));
- -
- return 0;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/char/virtio_console.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/char/virtio_console.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/char/virtio_console.c 2011-04-01 17:56:56.054710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/char/virtio_console.c 2011-04-02 01:37:42.211688354 +0200
- @@ -387,6 +387,10 @@ static void discard_port_data(struct por
- unsigned int len;
- int ret;
- + if (!port->portdev) {
- + /* Device has been unplugged. vqs are already gone. */
- + return;
- + }
- vq = port->in_vq;
- if (port->inbuf)
- buf = port->inbuf;
- @@ -469,6 +473,10 @@ static void reclaim_consumed_buffers(str
- void *buf;
- unsigned int len;
- + if (!port->portdev) {
- + /* Device has been unplugged. vqs are already gone. */
- + return;
- + }
- while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
- kfree(buf);
- port->outvq_full = false;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/firmware/dcdbas.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/firmware/dcdbas.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/firmware/dcdbas.c 2011-04-01 17:56:55.972710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/firmware/dcdbas.c 2011-04-02 01:38:34.963688312 +0200
- @@ -268,8 +268,10 @@ int dcdbas_smi_request(struct smi_cmd *s
- }
- /* generate SMI */
- + /* inb to force posted write through and make SMI happen now */
- asm volatile (
- - "outb %b0,%w1"
- + "outb %b0,%w1\n"
- + "inb %w1"
- : /* no output args */
- : "a" (smi_cmd->command_code),
- "d" (smi_cmd->command_address),
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_crtc.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_crtc.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_crtc.c 2011-04-01 17:56:56.354710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_crtc.c 2011-04-02 01:38:34.964688312 +0200
- @@ -1073,6 +1073,9 @@ int drm_mode_getresources(struct drm_dev
- uint32_t __user *encoder_id;
- struct drm_mode_group *mode_group;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- /*
- @@ -1244,6 +1247,9 @@ int drm_mode_getcrtc(struct drm_device *
- struct drm_mode_object *obj;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, crtc_resp->crtc_id,
- @@ -1312,6 +1318,9 @@ int drm_mode_getconnector(struct drm_dev
- uint64_t __user *prop_values;
- uint32_t __user *encoder_ptr;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- memset(&u_mode, 0, sizeof(struct drm_mode_modeinfo));
- DRM_DEBUG_KMS("[CONNECTOR:%d:?]\n", out_resp->connector_id);
- @@ -1431,6 +1440,9 @@ int drm_mode_getencoder(struct drm_devic
- struct drm_encoder *encoder;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, enc_resp->encoder_id,
- DRM_MODE_OBJECT_ENCODER);
- @@ -1486,6 +1498,9 @@ int drm_mode_setcrtc(struct drm_device *
- int ret = 0;
- int i;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, crtc_req->crtc_id,
- DRM_MODE_OBJECT_CRTC);
- @@ -1603,6 +1618,9 @@ int drm_mode_cursor_ioctl(struct drm_dev
- struct drm_crtc *crtc;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- if (!req->flags) {
- DRM_ERROR("no operation set\n");
- return -EINVAL;
- @@ -1667,6 +1685,9 @@ int drm_mode_addfb(struct drm_device *de
- struct drm_framebuffer *fb;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- if ((config->min_width > r->width) || (r->width > config->max_width)) {
- DRM_ERROR("mode new framebuffer width not within limits\n");
- return -EINVAL;
- @@ -1724,6 +1745,9 @@ int drm_mode_rmfb(struct drm_device *dev
- int ret = 0;
- int found = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, *id, DRM_MODE_OBJECT_FB);
- /* TODO check that we realy get a framebuffer back. */
- @@ -1780,6 +1804,9 @@ int drm_mode_getfb(struct drm_device *de
- struct drm_framebuffer *fb;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB);
- if (!obj) {
- @@ -1813,6 +1840,9 @@ int drm_mode_dirtyfb_ioctl(struct drm_de
- int num_clips;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB);
- if (!obj) {
- @@ -1996,6 +2026,9 @@ int drm_mode_attachmode_ioctl(struct drm
- struct drm_mode_modeinfo *umode = &mode_cmd->mode;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, mode_cmd->connector_id, DRM_MODE_OBJECT_CONNECTOR);
- @@ -2042,6 +2075,9 @@ int drm_mode_detachmode_ioctl(struct drm
- struct drm_mode_modeinfo *umode = &mode_cmd->mode;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, mode_cmd->connector_id, DRM_MODE_OBJECT_CONNECTOR);
- @@ -2211,6 +2247,9 @@ int drm_mode_getproperty_ioctl(struct dr
- uint64_t __user *values_ptr;
- uint32_t __user *blob_length_ptr;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, out_resp->prop_id, DRM_MODE_OBJECT_PROPERTY);
- if (!obj) {
- @@ -2333,6 +2372,9 @@ int drm_mode_getblob_ioctl(struct drm_de
- int ret = 0;
- void *blob_ptr;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, out_resp->blob_id, DRM_MODE_OBJECT_BLOB);
- if (!obj) {
- @@ -2393,6 +2435,9 @@ int drm_mode_connector_property_set_ioct
- int ret = -EINVAL;
- int i;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, out_resp->connector_id, DRM_MODE_OBJECT_CONNECTOR);
- @@ -2509,6 +2554,9 @@ int drm_mode_gamma_set_ioctl(struct drm_
- int size;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, crtc_lut->crtc_id, DRM_MODE_OBJECT_CRTC);
- if (!obj) {
- @@ -2560,6 +2608,9 @@ int drm_mode_gamma_get_ioctl(struct drm_
- int size;
- int ret = 0;
- + if (!drm_core_check_feature(dev, DRIVER_MODESET))
- + return -EINVAL;
- +
- mutex_lock(&dev->mode_config.mutex);
- obj = drm_mode_object_find(dev, crtc_lut->crtc_id, DRM_MODE_OBJECT_CRTC);
- if (!obj) {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_gem.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_gem.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_gem.c 2011-04-01 17:56:56.367710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_gem.c 2011-04-02 01:38:34.964688312 +0200
- @@ -498,11 +498,12 @@ EXPORT_SYMBOL(drm_gem_vm_open);
- void drm_gem_vm_close(struct vm_area_struct *vma)
- {
- struct drm_gem_object *obj = vma->vm_private_data;
- + struct drm_device *dev = obj->dev;
- - mutex_lock(&obj->dev->struct_mutex);
- + mutex_lock(&dev->struct_mutex);
- drm_vm_close_locked(vma);
- drm_gem_object_unreference(obj);
- - mutex_unlock(&obj->dev->struct_mutex);
- + mutex_unlock(&dev->struct_mutex);
- }
- EXPORT_SYMBOL(drm_gem_vm_close);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_irq.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_irq.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_irq.c 2011-04-01 17:56:56.367710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_irq.c 2011-04-02 01:37:42.452688353 +0200
- @@ -549,7 +549,8 @@ int drm_modeset_ctl(struct drm_device *d
- struct drm_file *file_priv)
- {
- struct drm_modeset_ctl *modeset = data;
- - int crtc, ret = 0;
- + int ret = 0;
- + unsigned int crtc;
- /* If drm_vblank_init() hasn't been called yet, just no-op */
- if (!dev->num_crtcs)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_sysfs.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_sysfs.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_sysfs.c 2011-04-01 17:56:56.367710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/drm_sysfs.c 2011-04-02 01:37:42.452688353 +0200
- @@ -158,8 +158,15 @@ static ssize_t status_show(struct device
- {
- struct drm_connector *connector = to_drm_connector(device);
- enum drm_connector_status status;
- + int ret;
- +
- + ret = mutex_lock_interruptible(&connector->dev->mode_config.mutex);
- + if (ret)
- + return ret;
- status = connector->funcs->detect(connector, true);
- + mutex_unlock(&connector->dev->mode_config.mutex);
- +
- return snprintf(buf, PAGE_SIZE, "%s\n",
- drm_get_connector_status_name(status));
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/i915_dma.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/i915_dma.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/i915_dma.c 2011-04-01 17:56:56.380710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/i915_dma.c 2011-04-02 01:37:42.456688353 +0200
- @@ -1943,6 +1943,17 @@ int i915_driver_load(struct drm_device *
- if (IS_GEN2(dev))
- dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(30));
- + /* 965GM sometimes incorrectly writes to hardware status page (HWS)
- + * using 32bit addressing, overwriting memory if HWS is located
- + * above 4GB.
- + *
- + * The documentation also mentions an issue with undefined
- + * behaviour if any general state is accessed within a page above 4GB,
- + * which also needs to be handled carefully.
- + */
- + if (IS_BROADWATER(dev) || IS_CRESTLINE(dev))
- + dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(32));
- +
- dev_priv->regs = ioremap(base, size);
- if (!dev_priv->regs) {
- DRM_ERROR("failed to map registers\n");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/i915_gem.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/i915_gem.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/i915_gem.c 2011-04-01 17:56:56.380710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/i915_gem.c 2011-04-02 01:38:34.965688312 +0200
- @@ -1748,8 +1748,10 @@ i915_gem_request_remove_from_client(stru
- return;
- spin_lock(&file_priv->mm.lock);
- - list_del(&request->client_list);
- - request->file_priv = NULL;
- + if (request->file_priv) {
- + list_del(&request->client_list);
- + request->file_priv = NULL;
- + }
- spin_unlock(&file_priv->mm.lock);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/intel_panel.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/intel_panel.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/intel_panel.c 2011-04-01 17:56:56.380710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/i915/intel_panel.c 2011-04-02 01:37:42.453688354 +0200
- @@ -176,7 +176,6 @@ u32 intel_panel_get_backlight(struct drm
- val &= ~1;
- pci_read_config_byte(dev->pdev, PCI_LBPC, &lbpc);
- val *= lbpc;
- - val >>= 1;
- }
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/atombios_crtc.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/atombios_crtc.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/atombios_crtc.c 2011-04-01 17:56:56.365710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/atombios_crtc.c 2011-04-02 01:38:34.965688312 +0200
- @@ -921,7 +921,11 @@ static void atombios_crtc_set_pll(struct
- /* adjust pixel clock as needed */
- adjusted_clock = atombios_adjust_pll(crtc, mode, pll, ss_enabled, &ss);
- - if (ASIC_IS_AVIVO(rdev))
- + if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT))
- + /* TV seems to prefer the legacy algo on some boards */
- + radeon_compute_pll_legacy(pll, adjusted_clock, &pll_clock, &fb_div, &frac_fb_div,
- + &ref_div, &post_div);
- + else if (ASIC_IS_AVIVO(rdev))
- radeon_compute_pll_avivo(pll, adjusted_clock, &pll_clock, &fb_div, &frac_fb_div,
- &ref_div, &post_div);
- else
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_combios.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_combios.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_combios.c 2011-04-01 17:56:56.364710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_combios.c 2011-04-02 01:38:34.966688311 +0200
- @@ -448,7 +448,7 @@ static uint16_t combios_get_table_offset
- bool radeon_combios_check_hardcoded_edid(struct radeon_device *rdev)
- {
- - int edid_info;
- + int edid_info, size;
- struct edid *edid;
- unsigned char *raw;
- edid_info = combios_get_table_offset(rdev->ddev, COMBIOS_HARDCODED_EDID_TABLE);
- @@ -456,11 +456,12 @@ bool radeon_combios_check_hardcoded_edid
- return false;
- raw = rdev->bios + edid_info;
- - edid = kmalloc(EDID_LENGTH * (raw[0x7e] + 1), GFP_KERNEL);
- + size = EDID_LENGTH * (raw[0x7e] + 1);
- + edid = kmalloc(size, GFP_KERNEL);
- if (edid == NULL)
- return false;
- - memcpy((unsigned char *)edid, raw, EDID_LENGTH * (raw[0x7e] + 1));
- + memcpy((unsigned char *)edid, raw, size);
- if (!drm_edid_is_valid(edid)) {
- kfree(edid);
- @@ -468,14 +469,24 @@ bool radeon_combios_check_hardcoded_edid
- }
- rdev->mode_info.bios_hardcoded_edid = edid;
- + rdev->mode_info.bios_hardcoded_edid_size = size;
- return true;
- }
- struct edid *
- radeon_combios_get_hardcoded_edid(struct radeon_device *rdev)
- {
- - if (rdev->mode_info.bios_hardcoded_edid)
- - return rdev->mode_info.bios_hardcoded_edid;
- + struct edid *edid;
- +
- + if (rdev->mode_info.bios_hardcoded_edid) {
- + edid = kmalloc(rdev->mode_info.bios_hardcoded_edid_size, GFP_KERNEL);
- + if (edid) {
- + memcpy((unsigned char *)edid,
- + (unsigned char *)rdev->mode_info.bios_hardcoded_edid,
- + rdev->mode_info.bios_hardcoded_edid_size);
- + return edid;
- + }
- + }
- return NULL;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_connectors.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_connectors.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_connectors.c 2011-04-01 17:56:56.362710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_connectors.c 2011-04-02 01:38:34.967688311 +0200
- @@ -626,6 +626,8 @@ static int radeon_vga_mode_valid(struct
- static enum drm_connector_status
- radeon_vga_detect(struct drm_connector *connector, bool force)
- {
- + struct drm_device *dev = connector->dev;
- + struct radeon_device *rdev = dev->dev_private;
- struct radeon_connector *radeon_connector = to_radeon_connector(connector);
- struct drm_encoder *encoder;
- struct drm_encoder_helper_funcs *encoder_funcs;
- @@ -676,6 +678,17 @@ radeon_vga_detect(struct drm_connector *
- if (ret == connector_status_connected)
- ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, true);
- +
- + /* RN50 and some RV100 asics in servers often have a hardcoded EDID in the
- + * vbios to deal with KVMs. If we have one and are not able to detect a monitor
- + * by other means, assume the CRT is connected and use that EDID.
- + */
- + if ((!rdev->is_atom_bios) &&
- + (ret == connector_status_disconnected) &&
- + rdev->mode_info.bios_hardcoded_edid_size) {
- + ret = connector_status_connected;
- + }
- +
- radeon_connector_update_scratch_regs(connector, ret);
- return ret;
- }
- @@ -787,6 +800,8 @@ static int radeon_dvi_get_modes(struct d
- static enum drm_connector_status
- radeon_dvi_detect(struct drm_connector *connector, bool force)
- {
- + struct drm_device *dev = connector->dev;
- + struct radeon_device *rdev = dev->dev_private;
- struct radeon_connector *radeon_connector = to_radeon_connector(connector);
- struct drm_encoder *encoder = NULL;
- struct drm_encoder_helper_funcs *encoder_funcs;
- @@ -826,8 +841,6 @@ radeon_dvi_detect(struct drm_connector *
- * you don't really know what's connected to which port as both are digital.
- */
- if (radeon_connector->shared_ddc && (ret == connector_status_connected)) {
- - struct drm_device *dev = connector->dev;
- - struct radeon_device *rdev = dev->dev_private;
- struct drm_connector *list_connector;
- struct radeon_connector *list_radeon_connector;
- list_for_each_entry(list_connector, &dev->mode_config.connector_list, head) {
- @@ -892,6 +905,19 @@ radeon_dvi_detect(struct drm_connector *
- ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, true);
- }
- + /* RN50 and some RV100 asics in servers often have a hardcoded EDID in the
- + * vbios to deal with KVMs. If we have one and are not able to detect a monitor
- + * by other means, assume the DFP is connected and use that EDID. In most
- + * cases the DVI port is actually a virtual KVM port connected to the service
- + * processor.
- + */
- + if ((!rdev->is_atom_bios) &&
- + (ret == connector_status_disconnected) &&
- + rdev->mode_info.bios_hardcoded_edid_size) {
- + radeon_connector->use_digital = true;
- + ret = connector_status_connected;
- + }
- +
- out:
- /* updated in get modes as well since we need to know if it's analog or digital */
- radeon_connector_update_scratch_regs(connector, ret);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_display.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_display.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_display.c 2011-04-01 17:56:56.363710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_display.c 2011-04-02 01:37:42.441688352 +0200
- @@ -639,7 +639,7 @@ void radeon_compute_pll_legacy(struct ra
- max_fractional_feed_div = pll->max_frac_feedback_div;
- }
- - for (post_div = min_post_div; post_div <= max_post_div; ++post_div) {
- + for (post_div = max_post_div; post_div >= min_post_div; --post_div) {
- uint32_t ref_div;
- if ((pll->flags & RADEON_PLL_NO_ODD_POST_DIV) && (post_div & 1))
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_mode.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_mode.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_mode.h 2011-04-01 17:56:56.363710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/gpu/drm/radeon/radeon_mode.h 2011-04-02 01:38:34.967688311 +0200
- @@ -239,6 +239,7 @@ struct radeon_mode_info {
- struct drm_property *underscan_vborder_property;
- /* hardcoded DFP edid from BIOS */
- struct edid *bios_hardcoded_edid;
- + int bios_hardcoded_edid_size;
- /* pointer to fbdev info structure */
- struct radeon_fbdev *rfbdev;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-core.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-core.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-core.c 2011-04-01 17:56:56.026710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-core.c 2011-04-02 01:37:42.181688354 +0200
- @@ -1365,6 +1365,7 @@ static const struct hid_device_id hid_bl
- { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_16) },
- { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_17) },
- { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) },
- + { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
- { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
- { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
- { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-ids.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-ids.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-ids.h 2011-04-01 17:56:56.025710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-ids.h 2011-04-02 01:37:42.181688354 +0200
- @@ -445,6 +445,7 @@
- #define USB_DEVICE_ID_ONTRAK_ADU100 0x0064
- #define USB_VENDOR_ID_ORTEK 0x05a4
- +#define USB_DEVICE_ID_ORTEK_PKB1700 0x1700
- #define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
- #define USB_VENDOR_ID_PANJIT 0x134c
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-magicmouse.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-magicmouse.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-magicmouse.c 2011-04-01 17:56:56.025710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-magicmouse.c 2011-04-02 01:37:42.180688354 +0200
- @@ -256,7 +256,7 @@ static void magicmouse_emit_touch(struct
- input_report_abs(input, ABS_MT_TRACKING_ID, id);
- input_report_abs(input, ABS_MT_TOUCH_MAJOR, touch_major << 2);
- input_report_abs(input, ABS_MT_TOUCH_MINOR, touch_minor << 2);
- - input_report_abs(input, ABS_MT_ORIENTATION, orientation);
- + input_report_abs(input, ABS_MT_ORIENTATION, -orientation);
- input_report_abs(input, ABS_MT_POSITION_X, x);
- input_report_abs(input, ABS_MT_POSITION_Y, y);
- @@ -395,7 +395,7 @@ static void magicmouse_setup_input(struc
- input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0);
- input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0);
- input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0);
- - input_set_abs_params(input, ABS_MT_ORIENTATION, -32, 31, 1, 0);
- + input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0);
- /* Note: Touch Y position from the device is inverted relative
- * to how pointer motion is reported (and relative to how USB
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-mosart.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-mosart.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-mosart.c 2011-04-01 17:56:56.025710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-mosart.c 2011-04-02 01:37:42.181688354 +0200
- @@ -90,6 +90,10 @@ static int mosart_input_mapping(struct h
- case 0xff000000:
- /* ignore HID features */
- return -1;
- +
- + case HID_UP_BUTTON:
- + /* ignore buttons */
- + return -1;
- }
- return 0;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-ortek.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-ortek.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-ortek.c 2011-04-01 17:56:56.025710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/hid-ortek.c 2011-04-02 01:37:42.181688354 +0200
- @@ -1,5 +1,5 @@
- /*
- - * HID driver for Ortek WKB-2000 (wireless keyboard + mouse trackpad).
- + * HID driver for Ortek PKB-1700/WKB-2000 (wireless keyboard + mouse trackpad).
- * Fixes LogicalMaximum error in USB report description, see
- * http://bugzilla.kernel.org/show_bug.cgi?id=14787
- *
- @@ -31,6 +31,7 @@ static __u8 *ortek_report_fixup(struct h
- }
- static const struct hid_device_id ortek_devices[] = {
- + { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
- { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
- { }
- };
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/Kconfig linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/Kconfig
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/Kconfig 2011-04-01 17:56:56.026710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hid/Kconfig 2011-04-02 01:37:42.181688354 +0200
- @@ -291,10 +291,10 @@ config HID_NTRIG
- Support for N-Trig touch screen.
- config HID_ORTEK
- - tristate "Ortek WKB-2000 wireless keyboard and mouse trackpad"
- + tristate "Ortek PKB-1700/WKB-2000 wireless keyboard and mouse trackpad"
- depends on USB_HID
- ---help---
- - Support for Ortek WKB-2000 wireless keyboard + mouse trackpad.
- + Support for Ortek PKB-1700/WKB-2000 wireless keyboard + mouse trackpad.
- config HID_PANTHERLORD
- tristate "Pantherlord/GreenAsia game controller"
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hwmon/f71882fg.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hwmon/f71882fg.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hwmon/f71882fg.c 2011-04-01 17:56:56.483710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hwmon/f71882fg.c 2011-04-02 01:37:42.570688353 +0200
- @@ -2110,7 +2110,6 @@ static int f71882fg_remove(struct platfo
- int nr_fans = (data->type == f71882fg) ? 4 : 3;
- u8 start_reg = f71882fg_read8(data, F71882FG_REG_START);
- - platform_set_drvdata(pdev, NULL);
- if (data->hwmon_dev)
- hwmon_device_unregister(data->hwmon_dev);
- @@ -2177,6 +2176,7 @@ static int f71882fg_remove(struct platfo
- }
- }
- + platform_set_drvdata(pdev, NULL);
- kfree(data);
- return 0;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hwmon/sht15.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hwmon/sht15.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hwmon/sht15.c 2011-04-01 17:56:56.485710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/hwmon/sht15.c 2011-04-02 01:37:42.573688353 +0200
- @@ -333,11 +333,11 @@ static inline int sht15_calc_humid(struc
- const int c1 = -4;
- const int c2 = 40500; /* x 10 ^ -6 */
- - const int c3 = -2800; /* x10 ^ -9 */
- + const int c3 = -28; /* x 10 ^ -7 */
- RHlinear = c1*1000
- + c2 * data->val_humid/1000
- - + (data->val_humid * data->val_humid * c3)/1000000;
- + + (data->val_humid * data->val_humid * c3) / 10000;
- return (temp - 25000) * (10000 + 80 * data->val_humid)
- / 1000000 + RHlinear;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/idle/intel_idle.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/idle/intel_idle.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/idle/intel_idle.c 2011-04-01 17:56:56.389710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/idle/intel_idle.c 2011-04-02 01:38:34.968688310 +0200
- @@ -62,6 +62,7 @@
- #include <linux/notifier.h>
- #include <linux/cpu.h>
- #include <asm/mwait.h>
- +#include <asm/msr.h>
- #define INTEL_IDLE_VERSION "0.4"
- #define PREFIX "intel_idle: "
- @@ -85,6 +86,12 @@ static int intel_idle(struct cpuidle_dev
- static struct cpuidle_state *cpuidle_state_table;
- /*
- + * Hardware C-state auto-demotion may not always be optimal.
- + * Indicate which enable bits to clear here.
- + */
- +static unsigned long long auto_demotion_disable_flags;
- +
- +/*
- * States are indexed by the cstate number,
- * which is also the index into the MWAIT hint array.
- * Thus C0 is a dummy.
- @@ -276,6 +283,15 @@ static struct notifier_block setup_broad
- .notifier_call = setup_broadcast_cpuhp_notify,
- };
- +static void auto_demotion_disable(void *dummy)
- +{
- + unsigned long long msr_bits;
- +
- + rdmsrl(MSR_NHM_SNB_PKG_CST_CFG_CTL, msr_bits);
- + msr_bits &= ~auto_demotion_disable_flags;
- + wrmsrl(MSR_NHM_SNB_PKG_CST_CFG_CTL, msr_bits);
- +}
- +
- /*
- * intel_idle_probe()
- */
- @@ -319,11 +335,17 @@ static int intel_idle_probe(void)
- case 0x25: /* Westmere */
- case 0x2C: /* Westmere */
- cpuidle_state_table = nehalem_cstates;
- + auto_demotion_disable_flags =
- + (NHM_C1_AUTO_DEMOTE | NHM_C3_AUTO_DEMOTE);
- break;
- case 0x1C: /* 28 - Atom Processor */
- + cpuidle_state_table = atom_cstates;
- + break;
- +
- case 0x26: /* 38 - Lincroft Atom Processor */
- cpuidle_state_table = atom_cstates;
- + auto_demotion_disable_flags = ATM_LNC_C6_AUTO_DEMOTE;
- break;
- case 0x2A: /* SNB */
- @@ -431,6 +453,8 @@ static int intel_idle_cpuidle_devices_in
- return -EIO;
- }
- }
- + if (auto_demotion_disable_flags)
- + smp_call_function(auto_demotion_disable, NULL, 1);
- return 0;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/infiniband/core/cma.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/infiniband/core/cma.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/infiniband/core/cma.c 2011-04-01 17:56:55.986710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/infiniband/core/cma.c 2011-04-02 01:37:42.132688354 +0200
- @@ -1210,6 +1210,11 @@ static int cma_req_handler(struct ib_cm_
- cm_id->context = conn_id;
- cm_id->cm_handler = cma_ib_handler;
- + /*
- + * Protect against the user destroying conn_id from another thread
- + * until we're done accessing it.
- + */
- + atomic_inc(&conn_id->refcount);
- ret = conn_id->id.event_handler(&conn_id->id, &event);
- if (!ret) {
- /*
- @@ -1222,8 +1227,10 @@ static int cma_req_handler(struct ib_cm_
- ib_send_cm_mra(cm_id, CMA_CM_MRA_SETTING, NULL, 0);
- mutex_unlock(&lock);
- mutex_unlock(&conn_id->handler_mutex);
- + cma_deref_id(conn_id);
- goto out;
- }
- + cma_deref_id(conn_id);
- /* Destroy the CM ID by returning a non-zero value. */
- conn_id->cm_id.ib = NULL;
- @@ -1425,17 +1432,25 @@ static int iw_conn_req_handler(struct iw
- event.param.conn.private_data_len = iw_event->private_data_len;
- event.param.conn.initiator_depth = attr.max_qp_init_rd_atom;
- event.param.conn.responder_resources = attr.max_qp_rd_atom;
- +
- + /*
- + * Protect against the user destroying conn_id from another thread
- + * until we're done accessing it.
- + */
- + atomic_inc(&conn_id->refcount);
- ret = conn_id->id.event_handler(&conn_id->id, &event);
- if (ret) {
- /* User wants to destroy the CM ID */
- conn_id->cm_id.iw = NULL;
- cma_exch(conn_id, CMA_DESTROYING);
- mutex_unlock(&conn_id->handler_mutex);
- + cma_deref_id(conn_id);
- rdma_destroy_id(&conn_id->id);
- goto out;
- }
- mutex_unlock(&conn_id->handler_mutex);
- + cma_deref_id(conn_id);
- out:
- if (dev)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/infiniband/core/cm.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/infiniband/core/cm.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/infiniband/core/cm.c 2011-04-01 17:56:55.986710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/infiniband/core/cm.c 2011-04-02 01:37:42.132688354 +0200
- @@ -2989,6 +2989,7 @@ static int cm_sidr_req_handler(struct cm
- goto out; /* No match. */
- }
- atomic_inc(&cur_cm_id_priv->refcount);
- + atomic_inc(&cm_id_priv->refcount);
- spin_unlock_irq(&cm.lock);
- cm_id_priv->id.cm_handler = cur_cm_id_priv->id.cm_handler;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/input/xen-kbdfront.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/input/xen-kbdfront.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/input/xen-kbdfront.c 2011-04-01 17:56:56.442710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/input/xen-kbdfront.c 2011-04-02 01:38:34.968688310 +0200
- @@ -109,7 +109,7 @@ static irqreturn_t input_handler(int rq,
- static int __devinit xenkbd_probe(struct xenbus_device *dev,
- const struct xenbus_device_id *id)
- {
- - int ret, i;
- + int ret, i, abs;
- struct xenkbd_info *info;
- struct input_dev *kbd, *ptr;
- @@ -127,6 +127,11 @@ static int __devinit xenkbd_probe(struct
- if (!info->page)
- goto error_nomem;
- + if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-abs-pointer", "%d", &abs) < 0)
- + abs = 0;
- + if (abs)
- + xenbus_printf(XBT_NIL, dev->nodename, "request-abs-pointer", "1");
- +
- /* keyboard */
- kbd = input_allocate_device();
- if (!kbd)
- @@ -136,11 +141,12 @@ static int __devinit xenkbd_probe(struct
- kbd->id.bustype = BUS_PCI;
- kbd->id.vendor = 0x5853;
- kbd->id.product = 0xffff;
- - kbd->evbit[0] = BIT(EV_KEY);
- +
- + __set_bit(EV_KEY, kbd->evbit);
- for (i = KEY_ESC; i < KEY_UNKNOWN; i++)
- - set_bit(i, kbd->keybit);
- + __set_bit(i, kbd->keybit);
- for (i = KEY_OK; i < KEY_MAX; i++)
- - set_bit(i, kbd->keybit);
- + __set_bit(i, kbd->keybit);
- ret = input_register_device(kbd);
- if (ret) {
- @@ -159,12 +165,20 @@ static int __devinit xenkbd_probe(struct
- ptr->id.bustype = BUS_PCI;
- ptr->id.vendor = 0x5853;
- ptr->id.product = 0xfffe;
- - ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
- +
- + if (abs) {
- + __set_bit(EV_ABS, ptr->evbit);
- + input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
- + input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
- + } else {
- + input_set_capability(ptr, EV_REL, REL_X);
- + input_set_capability(ptr, EV_REL, REL_Y);
- + }
- + input_set_capability(ptr, EV_REL, REL_WHEEL);
- +
- + __set_bit(EV_KEY, ptr->evbit);
- for (i = BTN_LEFT; i <= BTN_TASK; i++)
- - set_bit(i, ptr->keybit);
- - ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL);
- - input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
- - input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
- + __set_bit(i, ptr->keybit);
- ret = input_register_device(ptr);
- if (ret) {
- @@ -271,7 +285,7 @@ static void xenkbd_backend_changed(struc
- enum xenbus_state backend_state)
- {
- struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
- - int ret, val;
- + int val;
- switch (backend_state) {
- case XenbusStateInitialising:
- @@ -284,17 +298,6 @@ static void xenkbd_backend_changed(struc
- case XenbusStateInitWait:
- InitWait:
- - ret = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
- - "feature-abs-pointer", "%d", &val);
- - if (ret < 0)
- - val = 0;
- - if (val) {
- - ret = xenbus_printf(XBT_NIL, info->xbdev->nodename,
- - "request-abs-pointer", "1");
- - if (ret)
- - printk(KERN_WARNING
- - "xenkbd: can't request abs-pointer");
- - }
- xenbus_switch_state(dev, XenbusStateConnected);
- break;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/linear.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/linear.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/linear.c 2011-04-01 17:56:56.502710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/linear.c 2011-04-02 01:37:42.587688354 +0200
- @@ -216,7 +216,6 @@ static int linear_run (mddev_t *mddev)
- if (md_check_no_bitmap(mddev))
- return -EINVAL;
- - mddev->queue->queue_lock = &mddev->queue->__queue_lock;
- conf = linear_conf(mddev, mddev->raid_disks);
- if (!conf)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/md.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/md.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/md.c 2011-04-01 17:56:56.502710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/md.c 2011-04-02 01:37:42.589688354 +0200
- @@ -553,6 +553,9 @@ static mddev_t * mddev_find(dev_t unit)
- {
- mddev_t *mddev, *new = NULL;
- + if (unit && MAJOR(unit) != MD_MAJOR)
- + unit &= ~((1<<MdpMinorShift)-1);
- +
- retry:
- spin_lock(&all_mddevs_lock);
- @@ -4611,6 +4614,7 @@ static int do_md_run(mddev_t *mddev)
- }
- set_capacity(mddev->gendisk, mddev->array_sectors);
- revalidate_disk(mddev->gendisk);
- + mddev->changed = 1;
- kobject_uevent(&disk_to_dev(mddev->gendisk)->kobj, KOBJ_CHANGE);
- out:
- return err;
- @@ -4699,6 +4703,7 @@ static void md_clean(mddev_t *mddev)
- mddev->sync_speed_min = mddev->sync_speed_max = 0;
- mddev->recovery = 0;
- mddev->in_sync = 0;
- + mddev->changed = 0;
- mddev->degraded = 0;
- mddev->safemode = 0;
- mddev->bitmap_info.offset = 0;
- @@ -4808,6 +4813,7 @@ static int do_md_stop(mddev_t * mddev, i
- set_capacity(disk, 0);
- mutex_unlock(&mddev->open_mutex);
- + mddev->changed = 1;
- revalidate_disk(disk);
- if (mddev->ro)
- @@ -5991,7 +5997,7 @@ static int md_open(struct block_device *
- atomic_inc(&mddev->openers);
- mutex_unlock(&mddev->open_mutex);
- - check_disk_size_change(mddev->gendisk, bdev);
- + check_disk_change(bdev);
- out:
- return err;
- }
- @@ -6006,6 +6012,21 @@ static int md_release(struct gendisk *di
- return 0;
- }
- +
- +static int md_media_changed(struct gendisk *disk)
- +{
- + mddev_t *mddev = disk->private_data;
- +
- + return mddev->changed;
- +}
- +
- +static int md_revalidate(struct gendisk *disk)
- +{
- + mddev_t *mddev = disk->private_data;
- +
- + mddev->changed = 0;
- + return 0;
- +}
- static const struct block_device_operations md_fops =
- {
- .owner = THIS_MODULE,
- @@ -6016,6 +6037,8 @@ static const struct block_device_operati
- .compat_ioctl = md_compat_ioctl,
- #endif
- .getgeo = md_getgeo,
- + .media_changed = md_media_changed,
- + .revalidate_disk= md_revalidate,
- };
- static int md_thread(void * arg)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/md.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/md.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/md.h 2011-04-01 17:56:56.503710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/md.h 2011-04-02 01:37:42.589688354 +0200
- @@ -270,6 +270,8 @@ struct mddev_s
- atomic_t active; /* general refcount */
- atomic_t openers; /* number of active opens */
- + int changed; /* True if we might need to
- + * reread partition info */
- int degraded; /* whether md should consider
- * adding a spare
- */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/multipath.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/multipath.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/multipath.c 2011-04-01 17:56:56.502710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/multipath.c 2011-04-02 01:37:42.586688354 +0200
- @@ -435,7 +435,6 @@ static int multipath_run (mddev_t *mddev
- * bookkeeping area. [whatever we allocate in multipath_run(),
- * should be freed in multipath_stop()]
- */
- - mddev->queue->queue_lock = &mddev->queue->__queue_lock;
- conf = kzalloc(sizeof(multipath_conf_t), GFP_KERNEL);
- mddev->private = conf;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid0.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid0.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid0.c 2011-04-01 17:56:56.502710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid0.c 2011-04-02 01:37:42.587688354 +0200
- @@ -353,7 +353,6 @@ static int raid0_run(mddev_t *mddev)
- if (md_check_no_bitmap(mddev))
- return -EINVAL;
- blk_queue_max_hw_sectors(mddev->queue, mddev->chunk_sectors);
- - mddev->queue->queue_lock = &mddev->queue->__queue_lock;
- /* if private is not null, we are here after takeover */
- if (mddev->private == NULL) {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid10.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid10.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid10.c 2011-04-01 17:56:56.502710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid10.c 2011-04-02 01:37:42.589688354 +0200
- @@ -662,7 +662,10 @@ static int flush_pending_writes(conf_t *
- if (conf->pending_bio_list.head) {
- struct bio *bio;
- bio = bio_list_get(&conf->pending_bio_list);
- + /* Spinlock only taken to quiet a warning */
- + spin_lock(conf->mddev->queue->queue_lock);
- blk_remove_plug(conf->mddev->queue);
- + spin_unlock(conf->mddev->queue->queue_lock);
- spin_unlock_irq(&conf->device_lock);
- /* flush any pending bitmap writes to disk
- * before proceeding w/ I/O */
- @@ -971,7 +974,7 @@ static int make_request(mddev_t *mddev,
- atomic_inc(&r10_bio->remaining);
- spin_lock_irqsave(&conf->device_lock, flags);
- bio_list_add(&conf->pending_bio_list, mbio);
- - blk_plug_device(mddev->queue);
- + blk_plug_device_unlocked(mddev->queue);
- spin_unlock_irqrestore(&conf->device_lock, flags);
- }
- @@ -2303,8 +2306,6 @@ static int run(mddev_t *mddev)
- if (!conf)
- goto out;
- - mddev->queue->queue_lock = &conf->device_lock;
- -
- mddev->thread = conf->thread;
- conf->thread = NULL;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid1.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid1.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid1.c 2011-04-01 17:56:56.502710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid1.c 2011-04-02 01:37:42.587688354 +0200
- @@ -593,7 +593,10 @@ static int flush_pending_writes(conf_t *
- if (conf->pending_bio_list.head) {
- struct bio *bio;
- bio = bio_list_get(&conf->pending_bio_list);
- + /* Only take the spinlock to quiet a warning */
- + spin_lock(conf->mddev->queue->queue_lock);
- blk_remove_plug(conf->mddev->queue);
- + spin_unlock(conf->mddev->queue->queue_lock);
- spin_unlock_irq(&conf->device_lock);
- /* flush any pending bitmap writes to
- * disk before proceeding w/ I/O */
- @@ -959,7 +962,7 @@ static int make_request(mddev_t *mddev,
- atomic_inc(&r1_bio->remaining);
- spin_lock_irqsave(&conf->device_lock, flags);
- bio_list_add(&conf->pending_bio_list, mbio);
- - blk_plug_device(mddev->queue);
- + blk_plug_device_unlocked(mddev->queue);
- spin_unlock_irqrestore(&conf->device_lock, flags);
- }
- r1_bio_write_done(r1_bio, bio->bi_vcnt, behind_pages, behind_pages != NULL);
- @@ -2024,7 +2027,6 @@ static int run(mddev_t *mddev)
- if (IS_ERR(conf))
- return PTR_ERR(conf);
- - mddev->queue->queue_lock = &conf->device_lock;
- list_for_each_entry(rdev, &mddev->disks, same_set) {
- disk_stack_limits(mddev->gendisk, rdev->bdev,
- rdev->data_offset << 9);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid5.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid5.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid5.c 2011-04-01 17:56:56.501710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/md/raid5.c 2011-04-02 01:37:42.586688354 +0200
- @@ -5205,7 +5205,6 @@ static int run(mddev_t *mddev)
- mddev->queue->backing_dev_info.congested_data = mddev;
- mddev->queue->backing_dev_info.congested_fn = raid5_congested;
- - mddev->queue->queue_lock = &conf->device_lock;
- mddev->queue->unplug_fn = raid5_unplug_queue;
- chunk_size = mddev->chunk_sectors << 9;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/dvb-usb/dib0700_devices.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/dvb-usb/dib0700_devices.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/dvb-usb/dib0700_devices.c 2011-04-01 17:56:56.277710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/dvb-usb/dib0700_devices.c 2011-04-02 01:37:42.356688353 +0200
- @@ -870,6 +870,23 @@ static int dib7070p_tuner_attach(struct
- return 0;
- }
- +static int stk7700p_pid_filter(struct dvb_usb_adapter *adapter, int index,
- + u16 pid, int onoff)
- +{
- + struct dib0700_state *st = adapter->dev->priv;
- + if (st->is_dib7000pc)
- + return dib7000p_pid_filter(adapter->fe, index, pid, onoff);
- + return dib7000m_pid_filter(adapter->fe, index, pid, onoff);
- +}
- +
- +static int stk7700p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff)
- +{
- + struct dib0700_state *st = adapter->dev->priv;
- + if (st->is_dib7000pc)
- + return dib7000p_pid_filter_ctrl(adapter->fe, onoff);
- + return dib7000m_pid_filter_ctrl(adapter->fe, onoff);
- +}
- +
- static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff)
- {
- return dib7000p_pid_filter(adapter->fe, index, pid, onoff);
- @@ -1875,8 +1892,8 @@ struct dvb_usb_device_properties dib0700
- {
- .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
- .pid_filter_count = 32,
- - .pid_filter = stk70x0p_pid_filter,
- - .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
- + .pid_filter = stk7700p_pid_filter,
- + .pid_filter_ctrl = stk7700p_pid_filter_ctrl,
- .frontend_attach = stk7700p_frontend_attach,
- .tuner_attach = stk7700p_tuner_attach,
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/frontends/dib7000m.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/frontends/dib7000m.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/frontends/dib7000m.c 2011-04-01 17:56:56.290710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/frontends/dib7000m.c 2011-04-02 01:37:42.380688354 +0200
- @@ -1285,6 +1285,25 @@ struct i2c_adapter * dib7000m_get_i2c_ma
- }
- EXPORT_SYMBOL(dib7000m_get_i2c_master);
- +int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff)
- +{
- + struct dib7000m_state *state = fe->demodulator_priv;
- + u16 val = dib7000m_read_word(state, 294 + state->reg_offs) & 0xffef;
- + val |= (onoff & 0x1) << 4;
- + dprintk("PID filter enabled %d", onoff);
- + return dib7000m_write_word(state, 294 + state->reg_offs, val);
- +}
- +EXPORT_SYMBOL(dib7000m_pid_filter_ctrl);
- +
- +int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff)
- +{
- + struct dib7000m_state *state = fe->demodulator_priv;
- + dprintk("PID filter: index %x, PID %d, OnOff %d", id, pid, onoff);
- + return dib7000m_write_word(state, 300 + state->reg_offs + id,
- + onoff ? (1 << 13) | pid : 0);
- +}
- +EXPORT_SYMBOL(dib7000m_pid_filter);
- +
- #if 0
- /* used with some prototype boards */
- int dib7000m_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods,
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/frontends/dib7000m.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/frontends/dib7000m.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/frontends/dib7000m.h 2011-04-01 17:56:56.281710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/dvb/frontends/dib7000m.h 2011-04-02 01:37:42.362688353 +0200
- @@ -46,6 +46,8 @@ extern struct dvb_frontend *dib7000m_att
- extern struct i2c_adapter *dib7000m_get_i2c_master(struct dvb_frontend *,
- enum dibx000_i2c_interface,
- int);
- +extern int dib7000m_pid_filter(struct dvb_frontend *, u8 id, u16 pid, u8 onoff);
- +extern int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff);
- #else
- static inline
- struct dvb_frontend *dib7000m_attach(struct i2c_adapter *i2c_adap,
- @@ -63,6 +65,19 @@ struct i2c_adapter *dib7000m_get_i2c_mas
- printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
- return NULL;
- }
- +static inline int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id,
- + u16 pid, u8 onoff)
- +{
- + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
- + return -ENODEV;
- +}
- +
- +static inline int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe,
- + uint8_t onoff)
- +{
- + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
- + return -ENODEV;
- +}
- #endif
- /* TODO
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/cx23885/cx23885-i2c.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/cx23885/cx23885-i2c.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/cx23885/cx23885-i2c.c 2011-04-01 17:56:56.319710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/cx23885/cx23885-i2c.c 2011-04-02 01:37:42.399688353 +0200
- @@ -122,10 +122,6 @@ static int i2c_sendbytes(struct i2c_adap
- if (!i2c_wait_done(i2c_adap))
- goto eio;
- - if (!i2c_slave_did_ack(i2c_adap)) {
- - retval = -ENXIO;
- - goto err;
- - }
- if (i2c_debug) {
- printk(" <W %02x %02x", msg->addr << 1, msg->buf[0]);
- if (!(ctrl & I2C_NOSTOP))
- @@ -209,10 +205,6 @@ static int i2c_readbytes(struct i2c_adap
- if (!i2c_wait_done(i2c_adap))
- goto eio;
- - if (cnt == 0 && !i2c_slave_did_ack(i2c_adap)) {
- - retval = -ENXIO;
- - goto err;
- - }
- msg->buf[cnt] = cx_read(bus->reg_rdata) & 0xff;
- if (i2c_debug) {
- dprintk(1, " %02x", msg->buf[cnt]);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/cx25840/cx25840-core.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/cx25840/cx25840-core.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/cx25840/cx25840-core.c 2011-04-01 17:56:56.342710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/cx25840/cx25840-core.c 2011-04-02 01:37:42.434688352 +0200
- @@ -2031,7 +2031,8 @@ static int cx25840_probe(struct i2c_clie
- kfree(state);
- return err;
- }
- - v4l2_ctrl_cluster(2, &state->volume);
- + if (!is_cx2583x(state))
- + v4l2_ctrl_cluster(2, &state->volume);
- v4l2_ctrl_handler_setup(&state->hdl);
- cx25840_ir_probe(sd);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/ivtv/ivtv-irq.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/ivtv/ivtv-irq.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/ivtv/ivtv-irq.c 2011-04-01 17:56:56.320710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/ivtv/ivtv-irq.c 2011-04-02 01:37:42.406688353 +0200
- @@ -628,22 +628,66 @@ static void ivtv_irq_enc_pio_complete(st
- static void ivtv_irq_dma_err(struct ivtv *itv)
- {
- u32 data[CX2341X_MBOX_MAX_DATA];
- + u32 status;
- del_timer(&itv->dma_timer);
- +
- ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, 2, data);
- + status = read_reg(IVTV_REG_DMASTATUS);
- IVTV_DEBUG_WARN("DMA ERROR %08x %08x %08x %d\n", data[0], data[1],
- - read_reg(IVTV_REG_DMASTATUS), itv->cur_dma_stream);
- - write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS);
- + status, itv->cur_dma_stream);
- + /*
- + * We do *not* write back to the IVTV_REG_DMASTATUS register to
- + * clear the error status, if either the encoder write (0x02) or
- + * decoder read (0x01) bus master DMA operation do not indicate
- + * completed. We can race with the DMA engine, which may have
- + * transitioned to completed status *after* we read the register.
- + * Setting a IVTV_REG_DMASTATUS flag back to "busy" status, after the
- + * DMA engine has completed, will cause the DMA engine to stop working.
- + */
- + status &= 0x3;
- + if (status == 0x3)
- + write_reg(status, IVTV_REG_DMASTATUS);
- +
- if (!test_bit(IVTV_F_I_UDMA, &itv->i_flags) &&
- itv->cur_dma_stream >= 0 && itv->cur_dma_stream < IVTV_MAX_STREAMS) {
- struct ivtv_stream *s = &itv->streams[itv->cur_dma_stream];
- - /* retry */
- - if (s->type >= IVTV_DEC_STREAM_TYPE_MPG)
- + if (s->type >= IVTV_DEC_STREAM_TYPE_MPG) {
- + /* retry */
- + /*
- + * FIXME - handle cases of DMA error similar to
- + * encoder below, except conditioned on status & 0x1
- + */
- ivtv_dma_dec_start(s);
- - else
- - ivtv_dma_enc_start(s);
- - return;
- + return;
- + } else {
- + if ((status & 0x2) == 0) {
- + /*
- + * CX2341x Bus Master DMA write is ongoing.
- + * Reset the timer and let it complete.
- + */
- + itv->dma_timer.expires =
- + jiffies + msecs_to_jiffies(600);
- + add_timer(&itv->dma_timer);
- + return;
- + }
- +
- + if (itv->dma_retries < 3) {
- + /*
- + * CX2341x Bus Master DMA write has ended.
- + * Retry the write, starting with the first
- + * xfer segment. Just retrying the current
- + * segment is not sufficient.
- + */
- + s->sg_processed = 0;
- + itv->dma_retries++;
- + ivtv_dma_enc_start_xfer(s);
- + return;
- + }
- + /* Too many retries, give up on this one */
- + }
- +
- }
- if (test_bit(IVTV_F_I_UDMA, &itv->i_flags)) {
- ivtv_udma_start(itv);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/uvc/uvc_driver.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/uvc/uvc_driver.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/uvc/uvc_driver.c 2011-04-01 17:56:56.301710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/uvc/uvc_driver.c 2011-04-02 01:38:34.969688310 +0200
- @@ -1264,6 +1264,14 @@ static int uvc_scan_chain_entity(struct
- break;
- + case UVC_OTT_VENDOR_SPECIFIC:
- + case UVC_OTT_DISPLAY:
- + case UVC_OTT_MEDIA_TRANSPORT_OUTPUT:
- + if (uvc_trace_param & UVC_TRACE_PROBE)
- + printk(" OT %d", entity->id);
- +
- + break;
- +
- case UVC_TT_STREAMING:
- if (UVC_ENTITY_IS_ITERM(entity)) {
- if (uvc_trace_param & UVC_TRACE_PROBE)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/uvc/uvc_video.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/uvc/uvc_video.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/uvc/uvc_video.c 2011-04-01 17:56:56.301710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/media/video/uvc/uvc_video.c 2011-04-02 01:38:34.969688310 +0200
- @@ -89,15 +89,19 @@ int uvc_query_ctrl(struct uvc_device *de
- static void uvc_fixup_video_ctrl(struct uvc_streaming *stream,
- struct uvc_streaming_control *ctrl)
- {
- - struct uvc_format *format;
- + struct uvc_format *format = NULL;
- struct uvc_frame *frame = NULL;
- unsigned int i;
- - if (ctrl->bFormatIndex <= 0 ||
- - ctrl->bFormatIndex > stream->nformats)
- - return;
- + for (i = 0; i < stream->nformats; ++i) {
- + if (stream->format[i].index == ctrl->bFormatIndex) {
- + format = &stream->format[i];
- + break;
- + }
- + }
- - format = &stream->format[ctrl->bFormatIndex - 1];
- + if (format == NULL)
- + return;
- for (i = 0; i < format->nframes; ++i) {
- if (format->frame[i].bFrameIndex == ctrl->bFrameIndex) {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mfd/tps6586x.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mfd/tps6586x.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mfd/tps6586x.c 2011-04-01 17:56:56.215710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mfd/tps6586x.c 2011-04-02 01:37:42.333688353 +0200
- @@ -152,12 +152,12 @@ static inline int __tps6586x_write(struc
- static inline int __tps6586x_writes(struct i2c_client *client, int reg,
- int len, uint8_t *val)
- {
- - int ret;
- + int ret, i;
- - ret = i2c_smbus_write_i2c_block_data(client, reg, len, val);
- - if (ret < 0) {
- - dev_err(&client->dev, "failed writings to 0x%02x\n", reg);
- - return ret;
- + for (i = 0; i < len; i++) {
- + ret = __tps6586x_write(client, reg + i, *(val + i));
- + if (ret < 0)
- + return ret;
- }
- return 0;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mfd/ucb1x00-ts.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mfd/ucb1x00-ts.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mfd/ucb1x00-ts.c 2011-04-01 17:56:56.215710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mfd/ucb1x00-ts.c 2011-04-02 01:37:42.333688353 +0200
- @@ -385,12 +385,18 @@ static int ucb1x00_ts_add(struct ucb1x00
- idev->close = ucb1x00_ts_close;
- __set_bit(EV_ABS, idev->evbit);
- - __set_bit(ABS_X, idev->absbit);
- - __set_bit(ABS_Y, idev->absbit);
- - __set_bit(ABS_PRESSURE, idev->absbit);
- input_set_drvdata(idev, ts);
- + ucb1x00_adc_enable(ts->ucb);
- + ts->x_res = ucb1x00_ts_read_xres(ts);
- + ts->y_res = ucb1x00_ts_read_yres(ts);
- + ucb1x00_adc_disable(ts->ucb);
- +
- + input_set_abs_params(idev, ABS_X, 0, ts->x_res, 0, 0);
- + input_set_abs_params(idev, ABS_Y, 0, ts->y_res, 0, 0);
- + input_set_abs_params(idev, ABS_PRESSURE, 0, 0, 0, 0);
- +
- err = input_register_device(idev);
- if (err)
- goto fail;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/misc/bmp085.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/misc/bmp085.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/misc/bmp085.c 2011-04-01 17:56:56.259710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/misc/bmp085.c 2011-04-02 01:37:42.351688353 +0200
- @@ -449,6 +449,7 @@ static const struct i2c_device_id bmp085
- { "bmp085", 0 },
- { }
- };
- +MODULE_DEVICE_TABLE(i2c, bmp085_id);
- static struct i2c_driver bmp085_driver = {
- .driver = {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mmc/core/sdio.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mmc/core/sdio.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mmc/core/sdio.c 2011-04-01 17:56:56.034710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mmc/core/sdio.c 2011-04-02 01:37:42.190688354 +0200
- @@ -395,6 +395,14 @@ static int mmc_sdio_init_card(struct mmc
- if (err)
- goto remove;
- + /*
- + * Update oldcard with the new RCA received from the SDIO
- + * device -- we're doing this so that it's updated in the
- + * "card" struct when oldcard overwrites that later.
- + */
- + if (oldcard)
- + oldcard->rca = card->rca;
- +
- mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mmc/host/sdhci-pci.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mmc/host/sdhci-pci.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mmc/host/sdhci-pci.c 2011-04-01 17:56:56.033710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mmc/host/sdhci-pci.c 2011-04-02 01:37:42.189688354 +0200
- @@ -454,6 +454,14 @@ static const struct pci_device_id pci_id
- },
- {
- + .vendor = PCI_VENDOR_ID_RICOH,
- + .device = 0xe823,
- + .subvendor = PCI_ANY_ID,
- + .subdevice = PCI_ANY_ID,
- + .driver_data = (kernel_ulong_t)&sdhci_ricoh_mmc,
- + },
- +
- + {
- .vendor = PCI_VENDOR_ID_ENE,
- .device = PCI_DEVICE_ID_ENE_CB712_SD,
- .subvendor = PCI_ANY_ID,
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/chips/cfi_cmdset_0001.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/chips/cfi_cmdset_0001.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/chips/cfi_cmdset_0001.c 2011-04-01 17:56:56.477710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/chips/cfi_cmdset_0001.c 2011-04-02 01:37:42.567688353 +0200
- @@ -1229,10 +1229,32 @@ static int inval_cache_and_wait_for_oper
- sleep_time = chip_op_time / 2;
- for (;;) {
- + if (chip->state != chip_state) {
- + /* Someone's suspended the operation: sleep */
- + DECLARE_WAITQUEUE(wait, current);
- + set_current_state(TASK_UNINTERRUPTIBLE);
- + add_wait_queue(&chip->wq, &wait);
- + mutex_unlock(&chip->mutex);
- + schedule();
- + remove_wait_queue(&chip->wq, &wait);
- + mutex_lock(&chip->mutex);
- + continue;
- + }
- +
- status = map_read(map, cmd_adr);
- if (map_word_andequal(map, status, status_OK, status_OK))
- break;
- + if (chip->erase_suspended && chip_state == FL_ERASING) {
- + /* Erase suspend occured while sleep: reset timeout */
- + timeo = reset_timeo;
- + chip->erase_suspended = 0;
- + }
- + if (chip->write_suspended && chip_state == FL_WRITING) {
- + /* Write suspend occured while sleep: reset timeout */
- + timeo = reset_timeo;
- + chip->write_suspended = 0;
- + }
- if (!timeo) {
- map_write(map, CMD(0x70), cmd_adr);
- chip->state = FL_STATUS;
- @@ -1256,27 +1278,6 @@ static int inval_cache_and_wait_for_oper
- timeo--;
- }
- mutex_lock(&chip->mutex);
- -
- - while (chip->state != chip_state) {
- - /* Someone's suspended the operation: sleep */
- - DECLARE_WAITQUEUE(wait, current);
- - set_current_state(TASK_UNINTERRUPTIBLE);
- - add_wait_queue(&chip->wq, &wait);
- - mutex_unlock(&chip->mutex);
- - schedule();
- - remove_wait_queue(&chip->wq, &wait);
- - mutex_lock(&chip->mutex);
- - }
- - if (chip->erase_suspended && chip_state == FL_ERASING) {
- - /* Erase suspend occured while sleep: reset timeout */
- - timeo = reset_timeo;
- - chip->erase_suspended = 0;
- - }
- - if (chip->write_suspended && chip_state == FL_WRITING) {
- - /* Write suspend occured while sleep: reset timeout */
- - timeo = reset_timeo;
- - chip->write_suspended = 0;
- - }
- }
- /* Done and happy. */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/chips/jedec_probe.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/chips/jedec_probe.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/chips/jedec_probe.c 2011-04-01 17:56:56.476710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/chips/jedec_probe.c 2011-04-02 01:37:42.567688353 +0200
- @@ -1935,14 +1935,14 @@ static void jedec_reset(u32 base, struct
- }
- -static int cfi_jedec_setup(struct cfi_private *p_cfi, int index)
- +static int cfi_jedec_setup(struct map_info *map, struct cfi_private *cfi, int index)
- {
- int i,num_erase_regions;
- uint8_t uaddr;
- - if (! (jedec_table[index].devtypes & p_cfi->device_type)) {
- + if (!(jedec_table[index].devtypes & cfi->device_type)) {
- DEBUG(MTD_DEBUG_LEVEL1, "Rejecting potential %s with incompatible %d-bit device type\n",
- - jedec_table[index].name, 4 * (1<<p_cfi->device_type));
- + jedec_table[index].name, 4 * (1<<cfi->device_type));
- return 0;
- }
- @@ -1950,27 +1950,28 @@ static int cfi_jedec_setup(struct cfi_pr
- num_erase_regions = jedec_table[index].nr_regions;
- - p_cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL);
- - if (!p_cfi->cfiq) {
- + cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL);
- + if (!cfi->cfiq) {
- //xx printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name);
- return 0;
- }
- - memset(p_cfi->cfiq,0,sizeof(struct cfi_ident));
- + memset(cfi->cfiq, 0, sizeof(struct cfi_ident));
- - p_cfi->cfiq->P_ID = jedec_table[index].cmd_set;
- - p_cfi->cfiq->NumEraseRegions = jedec_table[index].nr_regions;
- - p_cfi->cfiq->DevSize = jedec_table[index].dev_size;
- - p_cfi->cfi_mode = CFI_MODE_JEDEC;
- + cfi->cfiq->P_ID = jedec_table[index].cmd_set;
- + cfi->cfiq->NumEraseRegions = jedec_table[index].nr_regions;
- + cfi->cfiq->DevSize = jedec_table[index].dev_size;
- + cfi->cfi_mode = CFI_MODE_JEDEC;
- + cfi->sector_erase_cmd = CMD(0x30);
- for (i=0; i<num_erase_regions; i++){
- - p_cfi->cfiq->EraseRegionInfo[i] = jedec_table[index].regions[i];
- + cfi->cfiq->EraseRegionInfo[i] = jedec_table[index].regions[i];
- }
- - p_cfi->cmdset_priv = NULL;
- + cfi->cmdset_priv = NULL;
- /* This may be redundant for some cases, but it doesn't hurt */
- - p_cfi->mfr = jedec_table[index].mfr_id;
- - p_cfi->id = jedec_table[index].dev_id;
- + cfi->mfr = jedec_table[index].mfr_id;
- + cfi->id = jedec_table[index].dev_id;
- uaddr = jedec_table[index].uaddr;
- @@ -1978,8 +1979,8 @@ static int cfi_jedec_setup(struct cfi_pr
- our brains explode when we see the datasheets talking about address
- lines numbered from A-1 to A18. The CFI table has unlock addresses
- in device-words according to the mode the device is connected in */
- - p_cfi->addr_unlock1 = unlock_addrs[uaddr].addr1 / p_cfi->device_type;
- - p_cfi->addr_unlock2 = unlock_addrs[uaddr].addr2 / p_cfi->device_type;
- + cfi->addr_unlock1 = unlock_addrs[uaddr].addr1 / cfi->device_type;
- + cfi->addr_unlock2 = unlock_addrs[uaddr].addr2 / cfi->device_type;
- return 1; /* ok */
- }
- @@ -2175,7 +2176,7 @@ static int jedec_probe_chip(struct map_i
- "MTD %s(): matched device 0x%x,0x%x unlock_addrs: 0x%.4x 0x%.4x\n",
- __func__, cfi->mfr, cfi->id,
- cfi->addr_unlock1, cfi->addr_unlock2 );
- - if (!cfi_jedec_setup(cfi, i))
- + if (!cfi_jedec_setup(map, cfi, i))
- return 0;
- goto ok_out;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/mtd_blkdevs.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/mtd_blkdevs.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/mtd_blkdevs.c 2011-04-01 17:56:56.477710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/mtd_blkdevs.c 2011-04-02 01:37:42.567688353 +0200
- @@ -413,7 +413,6 @@ error3:
- error2:
- list_del(&new->list);
- error1:
- - kfree(new);
- return ret;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/nand/omap2.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/nand/omap2.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/nand/omap2.c 2011-04-01 17:56:56.471710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/nand/omap2.c 2011-04-02 01:37:42.558688354 +0200
- @@ -968,6 +968,6 @@ static void __exit omap_nand_exit(void)
- module_init(omap_nand_init);
- module_exit(omap_nand_exit);
- -MODULE_ALIAS(DRIVER_NAME);
- +MODULE_ALIAS("platform:" DRIVER_NAME);
- MODULE_LICENSE("GPL");
- MODULE_DESCRIPTION("Glue layer for NAND flash on TI OMAP boards");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/onenand/generic.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/onenand/generic.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/onenand/generic.c 2011-04-01 17:56:56.478710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/onenand/generic.c 2011-04-02 01:37:42.569688353 +0200
- @@ -131,7 +131,7 @@ static struct platform_driver generic_on
- .remove = __devexit_p(generic_onenand_remove),
- };
- -MODULE_ALIAS(DRIVER_NAME);
- +MODULE_ALIAS("platform:" DRIVER_NAME);
- static int __init generic_onenand_init(void)
- {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/onenand/omap2.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/onenand/omap2.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/onenand/omap2.c 2011-04-01 17:56:56.478710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/mtd/onenand/omap2.c 2011-04-02 01:37:42.569688353 +0200
- @@ -815,7 +815,7 @@ static void __exit omap2_onenand_exit(vo
- module_init(omap2_onenand_init);
- module_exit(omap2_onenand_exit);
- -MODULE_ALIAS(DRIVER_NAME);
- +MODULE_ALIAS("platform:" DRIVER_NAME);
- MODULE_LICENSE("GPL");
- MODULE_AUTHOR("Jarkko Lavinen <jarkko.lavinen@nokia.com>");
- MODULE_DESCRIPTION("Glue layer for OneNAND flash on OMAP2 / OMAP3");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/ich8lan.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/ich8lan.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/ich8lan.c 2011-04-01 17:56:56.187710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/ich8lan.c 2011-04-02 01:37:42.312688354 +0200
- @@ -338,12 +338,17 @@ static s32 e1000_init_phy_params_pchlan(
- }
- phy->id = e1000_phy_unknown;
- - ret_val = e1000e_get_phy_id(hw);
- - if (ret_val)
- - goto out;
- - if ((phy->id == 0) || (phy->id == PHY_REVISION_MASK)) {
- + switch (hw->mac.type) {
- + default:
- + ret_val = e1000e_get_phy_id(hw);
- + if (ret_val)
- + goto out;
- + if ((phy->id != 0) && (phy->id != PHY_REVISION_MASK))
- + break;
- + /* fall-through */
- + case e1000_pch2lan:
- /*
- - * In case the PHY needs to be in mdio slow mode (eg. 82577),
- + * In case the PHY needs to be in mdio slow mode,
- * set slow mode and try to get the PHY id again.
- */
- ret_val = e1000_set_mdio_slow_mode_hv(hw);
- @@ -352,6 +357,7 @@ static s32 e1000_init_phy_params_pchlan(
- ret_val = e1000e_get_phy_id(hw);
- if (ret_val)
- goto out;
- + break;
- }
- phy->type = e1000e_get_phy_type_from_id(phy->id);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/netdev.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/netdev.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/netdev.c 2011-04-01 17:56:56.187710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/netdev.c 2011-04-02 01:37:42.312688354 +0200
- @@ -5884,7 +5884,8 @@ static int __devinit e1000_probe(struct
- /* APME bit in EEPROM is mapped to WUC.APME */
- eeprom_data = er32(WUC);
- eeprom_apme_mask = E1000_WUC_APME;
- - if (eeprom_data & E1000_WUC_PHY_WAKE)
- + if ((hw->mac.type > e1000_ich10lan) &&
- + (eeprom_data & E1000_WUC_PHY_WAKE))
- adapter->flags2 |= FLAG2_HAS_PHY_WAKEUP;
- } else if (adapter->flags & FLAG_APME_IN_CTRL3) {
- if (adapter->flags & FLAG_APME_CHECK_PORT_B &&
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/phy.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/phy.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/phy.c 2011-04-01 17:56:56.187710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/e1000e/phy.c 2011-04-02 01:37:42.312688354 +0200
- @@ -226,6 +226,13 @@ s32 e1000e_read_phy_reg_mdic(struct e100
- }
- *data = (u16) mdic;
- + /*
- + * Allow some time after each MDIC transaction to avoid
- + * reading duplicate data in the next MDIC transaction.
- + */
- + if (hw->mac.type == e1000_pch2lan)
- + udelay(100);
- +
- return 0;
- }
- @@ -279,6 +286,13 @@ s32 e1000e_write_phy_reg_mdic(struct e10
- return -E1000_ERR_PHY;
- }
- + /*
- + * Allow some time after each MDIC transaction to avoid
- + * reading duplicate data in the next MDIC transaction.
- + */
- + if (hw->mac.type == e1000_pch2lan)
- + udelay(100);
- +
- return 0;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/forcedeth.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/forcedeth.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/forcedeth.c 2011-04-01 17:56:56.145710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/forcedeth.c 2011-04-02 01:37:42.294688354 +0200
- @@ -5816,6 +5816,8 @@ static int __devinit nv_probe(struct pci
- goto out_error;
- }
- + netif_carrier_off(dev);
- +
- dev_printk(KERN_INFO, &pci_dev->dev, "ifname %s, PHY OUI 0x%x @ %d, "
- "addr %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n",
- dev->name,
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_common.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_common.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_common.c 2011-04-01 17:56:56.143710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_common.c 2011-04-02 01:37:42.293688354 +0200
- @@ -1292,6 +1292,9 @@ s32 ixgbe_init_rx_addrs_generic(struct i
- hw_dbg(hw, " New MAC Addr =%pM\n", hw->mac.addr);
- hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
- +
- + /* clear VMDq pool/queue selection for RAR 0 */
- + hw->mac.ops.clear_vmdq(hw, 0, IXGBE_CLEAR_VMDQ_ALL);
- }
- hw->addr_ctrl.overflow_promisc = 0;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_fcoe.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_fcoe.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_fcoe.c 2011-04-01 17:56:56.143710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_fcoe.c 2011-04-02 01:37:42.293688354 +0200
- @@ -151,7 +151,7 @@ int ixgbe_fcoe_ddp_get(struct net_device
- struct scatterlist *sg;
- unsigned int i, j, dmacount;
- unsigned int len;
- - static const unsigned int bufflen = 4096;
- + static const unsigned int bufflen = IXGBE_FCBUFF_MIN;
- unsigned int firstoff = 0;
- unsigned int lastsize;
- unsigned int thisoff = 0;
- @@ -241,6 +241,24 @@ int ixgbe_fcoe_ddp_get(struct net_device
- /* only the last buffer may have non-full bufflen */
- lastsize = thisoff + thislen;
- + /*
- + * lastsize can not be buffer len.
- + * If it is then adding another buffer with lastsize = 1.
- + */
- + if (lastsize == bufflen) {
- + if (j >= IXGBE_BUFFCNT_MAX) {
- + e_err(drv, "xid=%x:%d,%d,%d:addr=%llx "
- + "not enough user buffers. We need an extra "
- + "buffer because lastsize is bufflen.\n",
- + xid, i, j, dmacount, (u64)addr);
- + goto out_noddp_free;
- + }
- +
- + ddp->udl[j] = (u64)(fcoe->extra_ddp_buffer_dma);
- + j++;
- + lastsize = 1;
- + }
- +
- fcbuff = (IXGBE_FCBUFF_4KB << IXGBE_FCBUFF_BUFFSIZE_SHIFT);
- fcbuff |= ((j & 0xff) << IXGBE_FCBUFF_BUFFCNT_SHIFT);
- fcbuff |= (firstoff << IXGBE_FCBUFF_OFFSET_SHIFT);
- @@ -519,6 +537,24 @@ void ixgbe_configure_fcoe(struct ixgbe_a
- e_err(drv, "failed to allocated FCoE DDP pool\n");
- spin_lock_init(&fcoe->lock);
- +
- + /* Extra buffer to be shared by all DDPs for HW work around */
- + fcoe->extra_ddp_buffer = kmalloc(IXGBE_FCBUFF_MIN, GFP_ATOMIC);
- + if (fcoe->extra_ddp_buffer == NULL) {
- + e_err(drv, "failed to allocated extra DDP buffer\n");
- + goto out_extra_ddp_buffer_alloc;
- + }
- +
- + fcoe->extra_ddp_buffer_dma =
- + dma_map_single(&adapter->pdev->dev,
- + fcoe->extra_ddp_buffer,
- + IXGBE_FCBUFF_MIN,
- + DMA_FROM_DEVICE);
- + if (dma_mapping_error(&adapter->pdev->dev,
- + fcoe->extra_ddp_buffer_dma)) {
- + e_err(drv, "failed to map extra DDP buffer\n");
- + goto out_extra_ddp_buffer_dma;
- + }
- }
- /* Enable L2 eth type filter for FCoE */
- @@ -568,6 +604,14 @@ void ixgbe_configure_fcoe(struct ixgbe_a
- }
- }
- #endif
- +
- + return;
- +
- +out_extra_ddp_buffer_dma:
- + kfree(fcoe->extra_ddp_buffer);
- +out_extra_ddp_buffer_alloc:
- + pci_pool_destroy(fcoe->pool);
- + fcoe->pool = NULL;
- }
- /**
- @@ -587,6 +631,11 @@ void ixgbe_cleanup_fcoe(struct ixgbe_ada
- if (fcoe->pool) {
- for (i = 0; i < IXGBE_FCOE_DDP_MAX; i++)
- ixgbe_fcoe_ddp_put(adapter->netdev, i);
- + dma_unmap_single(&adapter->pdev->dev,
- + fcoe->extra_ddp_buffer_dma,
- + IXGBE_FCBUFF_MIN,
- + DMA_FROM_DEVICE);
- + kfree(fcoe->extra_ddp_buffer);
- pci_pool_destroy(fcoe->pool);
- fcoe->pool = NULL;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_fcoe.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_fcoe.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_fcoe.h 2011-04-01 17:56:56.130710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_fcoe.h 2011-04-02 01:37:42.293688354 +0200
- @@ -70,6 +70,8 @@ struct ixgbe_fcoe {
- spinlock_t lock;
- struct pci_pool *pool;
- struct ixgbe_fcoe_ddp ddp[IXGBE_FCOE_DDP_MAX];
- + unsigned char *extra_ddp_buffer;
- + dma_addr_t extra_ddp_buffer_dma;
- };
- #endif /* _IXGBE_FCOE_H */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_main.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_main.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_main.c 2011-04-01 17:56:56.130710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_main.c 2011-04-02 01:37:42.293688354 +0200
- @@ -2923,6 +2923,10 @@ static void ixgbe_set_rx_buffer_len(stru
- if (hw->mac.type == ixgbe_mac_82599EB)
- adapter->flags &= ~IXGBE_FLAG_RX_PS_ENABLED;
- + /* Disable packet split due to 82599 erratum #45 */
- + if (hw->mac.type == ixgbe_mac_82599EB)
- + adapter->flags &= ~IXGBE_FLAG_RX_PS_ENABLED;
- +
- /* Set the RX buffer length according to the mode */
- if (adapter->flags & IXGBE_FLAG_RX_PS_ENABLED) {
- rx_buf_len = IXGBE_RX_HDR_SIZE;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_sriov.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_sriov.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_sriov.c 2011-04-01 17:56:56.130710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/ixgbe/ixgbe_sriov.c 2011-04-02 01:37:42.293688354 +0200
- @@ -110,12 +110,10 @@ static int ixgbe_set_vf_vlan(struct ixgb
- return adapter->hw.mac.ops.set_vfta(&adapter->hw, vid, vf, (bool)add);
- }
- -
- static void ixgbe_set_vmolr(struct ixgbe_hw *hw, u32 vf, bool aupe)
- {
- u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
- vmolr |= (IXGBE_VMOLR_ROMPE |
- - IXGBE_VMOLR_ROPE |
- IXGBE_VMOLR_BAM);
- if (aupe)
- vmolr |= IXGBE_VMOLR_AUPE;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/r8169.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/r8169.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/r8169.c 2011-04-01 17:56:56.067710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/r8169.c 2011-04-02 01:37:42.225688354 +0200
- @@ -24,6 +24,7 @@
- #include <linux/init.h>
- #include <linux/dma-mapping.h>
- #include <linux/pm_runtime.h>
- +#include <linux/pci-aspm.h>
- #include <asm/system.h>
- #include <asm/io.h>
- @@ -757,7 +758,8 @@ static void __rtl8169_check_link_status(
- if (pm)
- pm_request_resume(&tp->pci_dev->dev);
- netif_carrier_on(dev);
- - netif_info(tp, ifup, dev, "link up\n");
- + if (net_ratelimit())
- + netif_info(tp, ifup, dev, "link up\n");
- } else {
- netif_carrier_off(dev);
- netif_info(tp, ifdown, dev, "link down\n");
- @@ -3047,6 +3049,11 @@ rtl8169_init_one(struct pci_dev *pdev, c
- mii->reg_num_mask = 0x1f;
- mii->supports_gmii = !!(cfg->features & RTL_FEATURE_GMII);
- + /* disable ASPM completely as that cause random device stop working
- + * problems as well as full system hangs for some PCIe devices users */
- + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
- + PCIE_LINK_STATE_CLKPM);
- +
- /* enable device (incl. PCI PM wakeup and hotplug setup) */
- rc = pci_enable_device(pdev);
- if (rc < 0) {
- @@ -3229,6 +3236,8 @@ rtl8169_init_one(struct pci_dev *pdev, c
- if (pci_dev_run_wake(pdev))
- pm_runtime_put_noidle(&pdev->dev);
- + netif_carrier_off(dev);
- +
- out:
- return rc;
- @@ -3719,7 +3728,8 @@ static void rtl_hw_start_8168(struct net
- RTL_W16(IntrMitigate, 0x5151);
- /* Work around for RxFIFO overflow. */
- - if (tp->mac_version == RTL_GIGA_MAC_VER_11) {
- + if (tp->mac_version == RTL_GIGA_MAC_VER_11 ||
- + tp->mac_version == RTL_GIGA_MAC_VER_22) {
- tp->intr_event |= RxFIFOOver | PCSTimeout;
- tp->intr_event &= ~RxOverflow;
- }
- @@ -4596,12 +4606,32 @@ static irqreturn_t rtl8169_interrupt(int
- break;
- }
- - /* Work around for rx fifo overflow */
- - if (unlikely(status & RxFIFOOver) &&
- - (tp->mac_version == RTL_GIGA_MAC_VER_11)) {
- - netif_stop_queue(dev);
- - rtl8169_tx_timeout(dev);
- - break;
- + if (unlikely(status & RxFIFOOver)) {
- + switch (tp->mac_version) {
- + /* Work around for rx fifo overflow */
- + case RTL_GIGA_MAC_VER_11:
- + case RTL_GIGA_MAC_VER_22:
- + case RTL_GIGA_MAC_VER_26:
- + netif_stop_queue(dev);
- + rtl8169_tx_timeout(dev);
- + goto done;
- + /* Testers needed. */
- + case RTL_GIGA_MAC_VER_17:
- + case RTL_GIGA_MAC_VER_19:
- + case RTL_GIGA_MAC_VER_20:
- + case RTL_GIGA_MAC_VER_21:
- + case RTL_GIGA_MAC_VER_23:
- + case RTL_GIGA_MAC_VER_24:
- + case RTL_GIGA_MAC_VER_27:
- + /* Experimental science. Pktgen proof. */
- + case RTL_GIGA_MAC_VER_12:
- + case RTL_GIGA_MAC_VER_25:
- + if (status == RxFIFOOver)
- + goto done;
- + break;
- + default:
- + break;
- + }
- }
- if (unlikely(status & SYSErr)) {
- @@ -4637,7 +4667,7 @@ static irqreturn_t rtl8169_interrupt(int
- (status & RxFIFOOver) ? (status | RxOverflow) : status);
- status = RTL_R16(IntrStatus);
- }
- -
- +done:
- return IRQ_RETVAL(handled);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/tg3.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/tg3.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/tg3.c 2011-04-01 17:56:56.068710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/tg3.c 2011-04-02 01:37:42.226688354 +0200
- @@ -11165,7 +11165,9 @@ static int tg3_ioctl(struct net_device *
- if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)
- break; /* We have no PHY */
- - if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)
- + if ((tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) ||
- + ((tp->tg3_flags & TG3_FLAG_ENABLE_ASF) &&
- + !netif_running(dev)))
- return -EAGAIN;
- spin_lock_bh(&tp->lock);
- @@ -11181,7 +11183,9 @@ static int tg3_ioctl(struct net_device *
- if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)
- break; /* We have no PHY */
- - if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)
- + if ((tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) ||
- + ((tp->tg3_flags & TG3_FLAG_ENABLE_ASF) &&
- + !netif_running(dev)))
- return -EAGAIN;
- spin_lock_bh(&tp->lock);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/ath9k.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/ath9k.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/ath9k.h 2011-04-01 17:56:56.094710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/ath9k.h 2011-04-02 01:37:42.249688354 +0200
- @@ -21,7 +21,6 @@
- #include <linux/device.h>
- #include <linux/leds.h>
- #include <linux/completion.h>
- -#include <linux/pm_qos_params.h>
- #include "debug.h"
- #include "common.h"
- @@ -647,8 +646,6 @@ struct ath_softc {
- struct ath_descdma txsdma;
- struct ath_ant_comb ant_comb;
- -
- - struct pm_qos_request_list pm_qos_req;
- };
- struct ath_wiphy {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/hif_usb.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/hif_usb.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/hif_usb.c 2011-04-01 17:56:56.093710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/hif_usb.c 2011-04-02 01:37:42.248688354 +0200
- @@ -210,8 +210,9 @@ static int __hif_usb_tx(struct hif_devic
- struct tx_buf *tx_buf = NULL;
- struct sk_buff *nskb = NULL;
- int ret = 0, i;
- - u16 *hdr, tx_skb_cnt = 0;
- + u16 tx_skb_cnt = 0;
- u8 *buf;
- + __le16 *hdr;
- if (hif_dev->tx.tx_skb_cnt == 0)
- return 0;
- @@ -236,9 +237,9 @@ static int __hif_usb_tx(struct hif_devic
- buf = tx_buf->buf;
- buf += tx_buf->offset;
- - hdr = (u16 *)buf;
- - *hdr++ = nskb->len;
- - *hdr++ = ATH_USB_TX_STREAM_MODE_TAG;
- + hdr = (__le16 *)buf;
- + *hdr++ = cpu_to_le16(nskb->len);
- + *hdr++ = cpu_to_le16(ATH_USB_TX_STREAM_MODE_TAG);
- buf += 4;
- memcpy(buf, nskb->data, nskb->len);
- tx_buf->len = nskb->len + 4;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/hw.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/hw.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/hw.c 2011-04-01 17:56:56.093710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/hw.c 2011-04-02 01:37:42.248688354 +0200
- @@ -516,6 +516,17 @@ static int __ath9k_hw_init(struct ath_hw
- if (ah->hw_version.devid == AR5416_AR9100_DEVID)
- ah->hw_version.macVersion = AR_SREV_VERSION_9100;
- + /*
- + * Read back AR_WA into a permanent copy and set bits 14 and 17.
- + * We need to do this to avoid RMW of this register. We cannot
- + * read the reg when chip is asleep.
- + */
- + ah->WARegVal = REG_READ(ah, AR_WA);
- + ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
- + AR_WA_ASPM_TIMER_BASED_DISABLE);
- +
- + ath9k_hw_read_revisions(ah);
- +
- if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
- ath_print(common, ATH_DBG_FATAL,
- "Couldn't reset chip\n");
- @@ -574,14 +585,6 @@ static int __ath9k_hw_init(struct ath_hw
- ath9k_hw_init_mode_regs(ah);
- - /*
- - * Read back AR_WA into a permanent copy and set bits 14 and 17.
- - * We need to do this to avoid RMW of this register. We cannot
- - * read the reg when chip is asleep.
- - */
- - ah->WARegVal = REG_READ(ah, AR_WA);
- - ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
- - AR_WA_ASPM_TIMER_BASED_DISABLE);
- if (ah->is_pciexpress)
- ath9k_hw_configpcipowersave(ah, 0, 0);
- @@ -1089,8 +1092,6 @@ static bool ath9k_hw_set_reset_power_on(
- return false;
- }
- - ath9k_hw_read_revisions(ah);
- -
- return ath9k_hw_set_reset(ah, ATH9K_RESET_WARM);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/init.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/init.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/init.c 2011-04-01 17:56:56.092710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/init.c 2011-04-02 01:37:42.248688354 +0200
- @@ -758,9 +758,6 @@ int ath9k_init_device(u16 devid, struct
- ath_init_leds(sc);
- ath_start_rfkill_poll(sc);
- - pm_qos_add_request(&sc->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
- - PM_QOS_DEFAULT_VALUE);
- -
- return 0;
- error_world:
- @@ -829,7 +826,6 @@ void ath9k_deinit_device(struct ath_soft
- }
- ieee80211_unregister_hw(hw);
- - pm_qos_remove_request(&sc->pm_qos_req);
- ath_rx_cleanup(sc);
- ath_tx_cleanup(sc);
- ath9k_deinit_softc(sc);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/main.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/main.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/main.c 2011-04-01 17:56:56.094710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/main.c 2011-04-02 01:37:42.249688354 +0200
- @@ -1245,8 +1245,6 @@ static int ath9k_start(struct ieee80211_
- ath9k_btcoex_timer_resume(sc);
- }
- - pm_qos_update_request(&sc->pm_qos_req, 55);
- -
- mutex_unlock:
- mutex_unlock(&sc->mutex);
- @@ -1425,8 +1423,6 @@ static void ath9k_stop(struct ieee80211_
- sc->sc_flags |= SC_OP_INVALID;
- - pm_qos_update_request(&sc->pm_qos_req, PM_QOS_DEFAULT_VALUE);
- -
- mutex_unlock(&sc->mutex);
- ath_print(common, ATH_DBG_CONFIG, "Driver halt\n");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/recv.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/recv.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/recv.c 2011-04-01 17:56:56.093710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/ath9k/recv.c 2011-04-02 01:37:42.248688354 +0200
- @@ -439,9 +439,7 @@ u32 ath_calcrxfilter(struct ath_softc *s
- * mode interface or when in monitor mode. AP mode does not need this
- * since it receives all in-BSS frames anyway.
- */
- - if (((sc->sc_ah->opmode != NL80211_IFTYPE_AP) &&
- - (sc->rx.rxfilter & FIF_PROMISC_IN_BSS)) ||
- - (sc->sc_ah->is_monitoring))
- + if (sc->sc_ah->is_monitoring)
- rfilt |= ATH9K_RX_FILTER_PROM;
- if (sc->rx.rxfilter & FIF_CONTROL)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/carl9170/usb.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/carl9170/usb.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/carl9170/usb.c 2011-04-01 17:56:56.091710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/ath/carl9170/usb.c 2011-04-02 01:37:42.247688354 +0200
- @@ -118,6 +118,8 @@ static struct usb_device_id carl9170_usb
- { USB_DEVICE(0x057c, 0x8402) },
- /* Qwest/Actiontec 802AIN Wireless N USB Network Adapter */
- { USB_DEVICE(0x1668, 0x1200) },
- + /* Airlive X.USB a/b/g/n */
- + { USB_DEVICE(0x1b75, 0x9170) },
- /* terminate */
- {}
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/p54/p54pci.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/p54/p54pci.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/p54/p54pci.c 2011-04-01 17:56:56.096710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/p54/p54pci.c 2011-04-02 01:37:42.251688354 +0200
- @@ -199,6 +199,7 @@ static void p54p_check_rx_ring(struct ie
- while (i != idx) {
- u16 len;
- struct sk_buff *skb;
- + dma_addr_t dma_addr;
- desc = &ring[i];
- len = le16_to_cpu(desc->len);
- skb = rx_buf[i];
- @@ -216,17 +217,20 @@ static void p54p_check_rx_ring(struct ie
- len = priv->common.rx_mtu;
- }
- + dma_addr = le32_to_cpu(desc->host_addr);
- + pci_dma_sync_single_for_cpu(priv->pdev, dma_addr,
- + priv->common.rx_mtu + 32, PCI_DMA_FROMDEVICE);
- skb_put(skb, len);
- if (p54_rx(dev, skb)) {
- - pci_unmap_single(priv->pdev,
- - le32_to_cpu(desc->host_addr),
- - priv->common.rx_mtu + 32,
- - PCI_DMA_FROMDEVICE);
- + pci_unmap_single(priv->pdev, dma_addr,
- + priv->common.rx_mtu + 32, PCI_DMA_FROMDEVICE);
- rx_buf[i] = NULL;
- - desc->host_addr = 0;
- + desc->host_addr = cpu_to_le32(0);
- } else {
- skb_trim(skb, 0);
- + pci_dma_sync_single_for_device(priv->pdev, dma_addr,
- + priv->common.rx_mtu + 32, PCI_DMA_FROMDEVICE);
- desc->len = cpu_to_le16(priv->common.rx_mtu + 32);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/p54/p54usb.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/p54/p54usb.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/p54/p54usb.c 2011-04-01 17:56:56.096710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/p54/p54usb.c 2011-04-02 01:37:42.251688354 +0200
- @@ -98,6 +98,7 @@ static struct usb_device_id p54u_table[]
- {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */
- {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */
- {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */
- + {USB_DEVICE(0x1740, 0x1000)}, /* Senao NUB-350 */
- {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */
- {USB_DEVICE(0x2001, 0x3705)}, /* D-Link DWL-G120 rev C1 */
- {USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/rt2x00/rt2x00dev.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/rt2x00/rt2x00dev.c 2011-04-01 17:56:56.102710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/rt2x00/rt2x00dev.c 2011-04-02 01:37:42.257688354 +0200
- @@ -486,6 +486,10 @@ void rt2x00lib_rxdone(struct queue_entry
- unsigned int header_length;
- int rate_idx;
- + if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) ||
- + !test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
- + goto submit_entry;
- +
- if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags))
- goto submit_entry;
- @@ -570,9 +574,13 @@ void rt2x00lib_rxdone(struct queue_entry
- entry->skb = skb;
- submit_entry:
- - rt2x00dev->ops->lib->clear_entry(entry);
- - rt2x00queue_index_inc(entry->queue, Q_INDEX);
- + entry->flags = 0;
- rt2x00queue_index_inc(entry->queue, Q_INDEX_DONE);
- + if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) &&
- + test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) {
- + rt2x00dev->ops->lib->clear_entry(entry);
- + rt2x00queue_index_inc(entry->queue, Q_INDEX);
- + }
- }
- EXPORT_SYMBOL_GPL(rt2x00lib_rxdone);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/rt2x00/rt2x00usb.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/rt2x00/rt2x00usb.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/rt2x00/rt2x00usb.c 2011-04-01 17:56:56.101710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/net/wireless/rt2x00/rt2x00usb.c 2011-04-02 01:37:42.257688354 +0200
- @@ -226,9 +226,7 @@ static void rt2x00usb_interrupt_txdone(s
- * Schedule the delayed work for reading the TX status
- * from the device.
- */
- - if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) &&
- - test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
- - ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->txdone_work);
- + ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->txdone_work);
- }
- static void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
- @@ -237,6 +235,7 @@ static void rt2x00usb_kick_tx_entry(stru
- struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
- struct queue_entry_priv_usb *entry_priv = entry->priv_data;
- u32 length;
- + int status;
- if (!test_and_clear_bit(ENTRY_DATA_PENDING, &entry->flags))
- return;
- @@ -253,7 +252,10 @@ static void rt2x00usb_kick_tx_entry(stru
- entry->skb->data, length,
- rt2x00usb_interrupt_txdone, entry);
- - if (usb_submit_urb(entry_priv->urb, GFP_ATOMIC)) {
- + status = usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
- + if (status) {
- + if (status == -ENODEV)
- + clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
- set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
- rt2x00lib_dmadone(entry);
- }
- @@ -424,9 +426,7 @@ static void rt2x00usb_interrupt_rxdone(s
- * Schedule the delayed work for reading the RX status
- * from the device.
- */
- - if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) &&
- - test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
- - ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->rxdone_work);
- + ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->rxdone_work);
- }
- /*
- @@ -454,6 +454,7 @@ void rt2x00usb_clear_entry(struct queue_
- to_usb_device_intf(entry->queue->rt2x00dev->dev);
- struct queue_entry_priv_usb *entry_priv = entry->priv_data;
- int pipe;
- + int status;
- entry->flags = 0;
- @@ -464,7 +465,12 @@ void rt2x00usb_clear_entry(struct queue_
- rt2x00usb_interrupt_rxdone, entry);
- set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
- - if (usb_submit_urb(entry_priv->urb, GFP_ATOMIC)) {
- +
- + status = usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
- + if (status) {
- + if (status == -ENODEV)
- + clear_bit(DEVICE_STATE_PRESENT,
- + &entry->queue->rt2x00dev->flags);
- set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
- rt2x00lib_dmadone(entry);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/hotplug/acpiphp_glue.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/hotplug/acpiphp_glue.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/hotplug/acpiphp_glue.c 2011-04-01 17:56:56.705710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/hotplug/acpiphp_glue.c 2011-04-02 01:38:34.971688310 +0200
- @@ -212,6 +212,7 @@ register_slot(acpi_handle handle, u32 lv
- pdev = pci_get_slot(pbus, PCI_DEVFN(device, function));
- if (pdev) {
- + pdev->current_state = PCI_D0;
- slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON);
- pci_dev_put(pdev);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/pci-sysfs.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/pci-sysfs.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/pci-sysfs.c 2011-04-01 17:56:56.713710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/pci-sysfs.c 2011-04-02 01:37:43.084688354 +0200
- @@ -1088,7 +1088,7 @@ static int pci_create_capabilities_sysfs
- attr->write = write_vpd_attr;
- retval = sysfs_create_bin_file(&dev->dev.kobj, attr);
- if (retval) {
- - kfree(dev->vpd->attr);
- + kfree(attr);
- return retval;
- }
- dev->vpd->attr = attr;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/quirks.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/quirks.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/quirks.c 2011-04-01 17:56:56.717710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/pci/quirks.c 2011-04-02 01:37:43.085688354 +0200
- @@ -533,6 +533,17 @@ static void __devinit quirk_piix4_acpi(s
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi);
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3, quirk_piix4_acpi);
- +#define ICH_PMBASE 0x40
- +#define ICH_ACPI_CNTL 0x44
- +#define ICH4_ACPI_EN 0x10
- +#define ICH6_ACPI_EN 0x80
- +#define ICH4_GPIOBASE 0x58
- +#define ICH4_GPIO_CNTL 0x5c
- +#define ICH4_GPIO_EN 0x10
- +#define ICH6_GPIOBASE 0x48
- +#define ICH6_GPIO_CNTL 0x4c
- +#define ICH6_GPIO_EN 0x10
- +
- /*
- * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at
- * 0x40 (128 bytes of ACPI, GPIO & TCO registers)
- @@ -541,12 +552,33 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
- static void __devinit quirk_ich4_lpc_acpi(struct pci_dev *dev)
- {
- u32 region;
- + u8 enable;
- - pci_read_config_dword(dev, 0x40, ®ion);
- - quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES, "ICH4 ACPI/GPIO/TCO");
- + /*
- + * The check for PCIBIOS_MIN_IO is to ensure we won't create a conflict
- + * with low legacy (and fixed) ports. We don't know the decoding
- + * priority and can't tell whether the legacy device or the one created
- + * here is really at that address. This happens on boards with broken
- + * BIOSes.
- + */
- - pci_read_config_dword(dev, 0x58, ®ion);
- - quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1, "ICH4 GPIO");
- + pci_read_config_byte(dev, ICH_ACPI_CNTL, &enable);
- + if (enable & ICH4_ACPI_EN) {
- + pci_read_config_dword(dev, ICH_PMBASE, ®ion);
- + region &= PCI_BASE_ADDRESS_IO_MASK;
- + if (region >= PCIBIOS_MIN_IO)
- + quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES,
- + "ICH4 ACPI/GPIO/TCO");
- + }
- +
- + pci_read_config_byte(dev, ICH4_GPIO_CNTL, &enable);
- + if (enable & ICH4_GPIO_EN) {
- + pci_read_config_dword(dev, ICH4_GPIOBASE, ®ion);
- + region &= PCI_BASE_ADDRESS_IO_MASK;
- + if (region >= PCIBIOS_MIN_IO)
- + quirk_io_region(dev, region, 64,
- + PCI_BRIDGE_RESOURCES + 1, "ICH4 GPIO");
- + }
- }
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, quirk_ich4_lpc_acpi);
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, quirk_ich4_lpc_acpi);
- @@ -562,12 +594,25 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
- static void __devinit ich6_lpc_acpi_gpio(struct pci_dev *dev)
- {
- u32 region;
- + u8 enable;
- - pci_read_config_dword(dev, 0x40, ®ion);
- - quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES, "ICH6 ACPI/GPIO/TCO");
- + pci_read_config_byte(dev, ICH_ACPI_CNTL, &enable);
- + if (enable & ICH6_ACPI_EN) {
- + pci_read_config_dword(dev, ICH_PMBASE, ®ion);
- + region &= PCI_BASE_ADDRESS_IO_MASK;
- + if (region >= PCIBIOS_MIN_IO)
- + quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES,
- + "ICH6 ACPI/GPIO/TCO");
- + }
- - pci_read_config_dword(dev, 0x48, ®ion);
- - quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1, "ICH6 GPIO");
- + pci_read_config_byte(dev, ICH6_GPIO_CNTL, &enable);
- + if (enable & ICH4_GPIO_EN) {
- + pci_read_config_dword(dev, ICH6_GPIOBASE, ®ion);
- + region &= PCI_BASE_ADDRESS_IO_MASK;
- + if (region >= PCIBIOS_MIN_IO)
- + quirk_io_region(dev, region, 64,
- + PCI_BRIDGE_RESOURCES + 1, "ICH6 GPIO");
- + }
- }
- static void __devinit ich6_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name, int dynsize)
- @@ -2618,58 +2663,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
- #endif /* CONFIG_PCI_MSI */
- -#ifdef CONFIG_PCI_IOV
- -
- -/*
- - * For Intel 82576 SR-IOV NIC, if BIOS doesn't allocate resources for the
- - * SR-IOV BARs, zero the Flash BAR and program the SR-IOV BARs to use the
- - * old Flash Memory Space.
- - */
- -static void __devinit quirk_i82576_sriov(struct pci_dev *dev)
- -{
- - int pos, flags;
- - u32 bar, start, size;
- -
- - if (PAGE_SIZE > 0x10000)
- - return;
- -
- - flags = pci_resource_flags(dev, 0);
- - if ((flags & PCI_BASE_ADDRESS_SPACE) !=
- - PCI_BASE_ADDRESS_SPACE_MEMORY ||
- - (flags & PCI_BASE_ADDRESS_MEM_TYPE_MASK) !=
- - PCI_BASE_ADDRESS_MEM_TYPE_32)
- - return;
- -
- - pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV);
- - if (!pos)
- - return;
- -
- - pci_read_config_dword(dev, pos + PCI_SRIOV_BAR, &bar);
- - if (bar & PCI_BASE_ADDRESS_MEM_MASK)
- - return;
- -
- - start = pci_resource_start(dev, 1);
- - size = pci_resource_len(dev, 1);
- - if (!start || size != 0x400000 || start & (size - 1))
- - return;
- -
- - pci_resource_flags(dev, 1) = 0;
- - pci_write_config_dword(dev, PCI_BASE_ADDRESS_1, 0);
- - pci_write_config_dword(dev, pos + PCI_SRIOV_BAR, start);
- - pci_write_config_dword(dev, pos + PCI_SRIOV_BAR + 12, start + size / 2);
- -
- - dev_info(&dev->dev, "use Flash Memory Space for SR-IOV BARs\n");
- -}
- -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10c9, quirk_i82576_sriov);
- -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e6, quirk_i82576_sriov);
- -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);
- -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1518, quirk_i82576_sriov);
- -
- -#endif /* CONFIG_PCI_IOV */
- -
- /* Allow manual resource allocation for PCI hotplug bridges
- * via pci=hpmemsize=nnM and pci=hpiosize=nnM parameters. For
- * some PCI-PCI hotplug bridges, like PLX 6254 (former HINT HB6),
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/rtc/rtc-ds3232.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/rtc/rtc-ds3232.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/rtc/rtc-ds3232.c 2011-04-01 17:56:56.030710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/rtc/rtc-ds3232.c 2011-04-02 01:37:42.186688354 +0200
- @@ -1,7 +1,7 @@
- /*
- * RTC client/driver for the Maxim/Dallas DS3232 Real-Time Clock over I2C
- *
- - * Copyright (C) 2009-2010 Freescale Semiconductor.
- + * Copyright (C) 2009-2011 Freescale Semiconductor.
- * Author: Jack Lan <jack.lan@freescale.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- @@ -141,9 +141,11 @@ static int ds3232_read_time(struct devic
- time->tm_hour = bcd2bin(hour);
- }
- - time->tm_wday = bcd2bin(week);
- + /* Day of the week in linux range is 0~6 while 1~7 in RTC chip */
- + time->tm_wday = bcd2bin(week) - 1;
- time->tm_mday = bcd2bin(day);
- - time->tm_mon = bcd2bin(month & 0x7F);
- + /* linux tm_mon range:0~11, while month range is 1~12 in RTC chip */
- + time->tm_mon = bcd2bin(month & 0x7F) - 1;
- if (century)
- add_century = 100;
- @@ -162,9 +164,11 @@ static int ds3232_set_time(struct device
- buf[0] = bin2bcd(time->tm_sec);
- buf[1] = bin2bcd(time->tm_min);
- buf[2] = bin2bcd(time->tm_hour);
- - buf[3] = bin2bcd(time->tm_wday); /* Day of the week */
- + /* Day of the week in linux range is 0~6 while 1~7 in RTC chip */
- + buf[3] = bin2bcd(time->tm_wday + 1);
- buf[4] = bin2bcd(time->tm_mday); /* Date */
- - buf[5] = bin2bcd(time->tm_mon);
- + /* linux tm_mon range:0~11, while month range is 1~12 in RTC chip */
- + buf[5] = bin2bcd(time->tm_mon + 1);
- if (time->tm_year >= 100) {
- buf[5] |= 0x80;
- buf[6] = bin2bcd(time->tm_year - 100);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/s390/char/keyboard.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/s390/char/keyboard.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/s390/char/keyboard.c 2011-04-01 17:56:56.210710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/s390/char/keyboard.c 2011-04-02 01:37:42.321688354 +0200
- @@ -460,7 +460,8 @@ kbd_ioctl(struct kbd_data *kbd, struct f
- unsigned int cmd, unsigned long arg)
- {
- void __user *argp;
- - int ct, perm;
- + unsigned int ct;
- + int perm;
- argp = (void __user *)arg;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/device_handler/scsi_dh_alua.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/device_handler/scsi_dh_alua.c 2011-04-01 17:56:55.998710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/device_handler/scsi_dh_alua.c 2011-04-02 01:37:42.153688354 +0200
- @@ -285,7 +285,8 @@ static void stpg_endio(struct request *r
- print_alua_state(h->state));
- }
- done:
- - blk_put_request(req);
- + req->end_io_data = NULL;
- + __blk_put_request(req->q, req);
- if (h->callback_fn) {
- h->callback_fn(h->callback_data, err);
- h->callback_fn = h->callback_data = NULL;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/scsi_lib.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/scsi_lib.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/scsi_lib.c 2011-04-01 17:56:55.995710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/scsi_lib.c 2011-04-02 01:37:42.150688354 +0200
- @@ -443,7 +443,7 @@ static void scsi_run_queue(struct reques
- &sdev->request_queue->queue_flags);
- if (flagset)
- queue_flag_set(QUEUE_FLAG_REENTER, sdev->request_queue);
- - __blk_run_queue(sdev->request_queue);
- + __blk_run_queue(sdev->request_queue, false);
- if (flagset)
- queue_flag_clear(QUEUE_FLAG_REENTER, sdev->request_queue);
- spin_unlock(sdev->request_queue->queue_lock);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/scsi_transport_fc.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/scsi_transport_fc.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/scsi_transport_fc.c 2011-04-01 17:56:55.994710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/scsi/scsi_transport_fc.c 2011-04-02 01:37:42.140688354 +0200
- @@ -3829,7 +3829,7 @@ fc_bsg_goose_queue(struct fc_rport *rpor
- !test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags);
- if (flagset)
- queue_flag_set(QUEUE_FLAG_REENTER, rport->rqst_q);
- - __blk_run_queue(rport->rqst_q);
- + __blk_run_queue(rport->rqst_q, false);
- if (flagset)
- queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q);
- spin_unlock_irqrestore(rport->rqst_q->queue_lock, flags);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wlc_mac80211.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wlc_mac80211.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wlc_mac80211.c 2011-04-01 17:56:56.527710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wlc_mac80211.c 2011-04-02 01:37:42.659688352 +0200
- @@ -5336,7 +5336,6 @@ wlc_sendpkt_mac80211(wlc_info_t *wlc, vo
- fifo = prio2fifo[prio];
- ASSERT((uint) PKTHEADROOM(sdu) >= TXOFF);
- - ASSERT(!PKTSHARED(sdu));
- ASSERT(!PKTNEXT(sdu));
- ASSERT(!PKTLINK(sdu));
- ASSERT(fifo < NFIFO);
- @@ -8673,3 +8672,16 @@ static void wlc_txq_free(wlc_info_t *wlc
- kfree(qi);
- }
- +
- +/*
- + * Flag 'scan in progress' to withold dynamic phy calibration
- + */
- +void wlc_scan_start(struct wlc_info *wlc)
- +{
- + wlc_phy_hold_upd(wlc->band->pi, PHY_HOLD_FOR_SCAN, true);
- +}
- +
- +void wlc_scan_stop(struct wlc_info *wlc)
- +{
- + wlc_phy_hold_upd(wlc->band->pi, PHY_HOLD_FOR_SCAN, false);
- +}
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wlc_pub.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wlc_pub.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wlc_pub.h 2011-04-01 17:56:56.527710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wlc_pub.h 2011-04-02 01:37:42.659688352 +0200
- @@ -568,6 +568,8 @@ extern void wlc_enable_mac(struct wlc_in
- extern u16 wlc_rate_shm_offset(struct wlc_info *wlc, u8 rate);
- extern u32 wlc_get_rspec_history(struct wlc_bsscfg *cfg);
- extern u32 wlc_get_current_highest_rate(struct wlc_bsscfg *cfg);
- +extern void wlc_scan_start(struct wlc_info *wlc);
- +extern void wlc_scan_stop(struct wlc_info *wlc);
- static inline int wlc_iovar_getuint(struct wlc_info *wlc, const char *name,
- uint *arg)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wl_mac80211.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wl_mac80211.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wl_mac80211.c 2011-04-01 17:56:56.527710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/brcm80211/sys/wl_mac80211.c 2011-04-02 01:37:42.659688352 +0200
- @@ -353,9 +353,7 @@ ieee_set_channel(struct ieee80211_hw *hw
- switch (type) {
- case NL80211_CHAN_HT20:
- case NL80211_CHAN_NO_HT:
- - WL_LOCK(wl);
- err = wlc_set(wl->wlc, WLC_SET_CHANNEL, chan->hw_value);
- - WL_UNLOCK(wl);
- break;
- case NL80211_CHAN_HT40MINUS:
- case NL80211_CHAN_HT40PLUS:
- @@ -376,6 +374,7 @@ static int wl_ops_config(struct ieee8021
- int err = 0;
- int new_int;
- + WL_LOCK(wl);
- if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) {
- WL_NONE(("%s: Setting listen interval to %d\n",
- __func__, conf->listen_interval));
- @@ -431,6 +430,7 @@ static int wl_ops_config(struct ieee8021
- }
- config_out:
- + WL_UNLOCK(wl);
- return err;
- }
- @@ -559,14 +559,20 @@ wl_ops_set_tim(struct ieee80211_hw *hw,
- static void wl_ops_sw_scan_start(struct ieee80211_hw *hw)
- {
- + struct wl_info *wl = hw->priv;
- WL_NONE(("Scan Start\n"));
- - return;
- + WL_LOCK(wl);
- + wlc_scan_start(wl->wlc);
- + WL_UNLOCK(wl);
- }
- static void wl_ops_sw_scan_complete(struct ieee80211_hw *hw)
- {
- + struct wl_info *wl = hw->priv;
- WL_NONE(("Scan Complete\n"));
- - return;
- + WL_LOCK(wl);
- + wlc_scan_stop(wl->wlc);
- + WL_UNLOCK(wl);
- }
- static void wl_ops_set_tsf(struct ieee80211_hw *hw, u64 tsf)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/mite.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/mite.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/mite.c 2011-04-01 17:56:56.652710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/mite.c 2011-04-02 01:37:43.002688353 +0200
- @@ -61,8 +61,6 @@
- #define PCI_DAQ_SIZE 4096
- #define PCI_DAQ_SIZE_660X 8192
- -MODULE_LICENSE("GPL");
- -
- struct mite_struct *mite_devices;
- EXPORT_SYMBOL(mite_devices);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_6527.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_6527.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_6527.c 2011-04-01 17:56:56.669710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_6527.c 2011-04-02 01:37:43.017688353 +0200
- @@ -527,3 +527,7 @@ static void __exit driver_ni6527_cleanup
- module_init(driver_ni6527_init_module);
- module_exit(driver_ni6527_cleanup_module);
- +
- +MODULE_AUTHOR("Comedi http://www.comedi.org");
- +MODULE_DESCRIPTION("Comedi low-level driver");
- +MODULE_LICENSE("GPL");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_65xx.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_65xx.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_65xx.c 2011-04-01 17:56:56.653710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_65xx.c 2011-04-02 01:37:43.002688353 +0200
- @@ -871,3 +871,7 @@ static void __exit driver_ni_65xx_cleanu
- module_init(driver_ni_65xx_init_module);
- module_exit(driver_ni_65xx_cleanup_module);
- +
- +MODULE_AUTHOR("Comedi http://www.comedi.org");
- +MODULE_DESCRIPTION("Comedi low-level driver");
- +MODULE_LICENSE("GPL");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_660x.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_660x.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_660x.c 2011-04-01 17:56:56.656710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_660x.c 2011-04-02 01:37:43.002688353 +0200
- @@ -1421,3 +1421,7 @@ static int ni_660x_dio_insn_config(struc
- };
- return 0;
- }
- +
- +MODULE_AUTHOR("Comedi http://www.comedi.org");
- +MODULE_DESCRIPTION("Comedi low-level driver");
- +MODULE_LICENSE("GPL");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_670x.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_670x.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_670x.c 2011-04-01 17:56:56.656710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_670x.c 2011-04-02 01:37:43.002688353 +0200
- @@ -384,3 +384,7 @@ static int ni_670x_find_device(struct co
- mite_list_devices();
- return -EIO;
- }
- +
- +MODULE_AUTHOR("Comedi http://www.comedi.org");
- +MODULE_DESCRIPTION("Comedi low-level driver");
- +MODULE_LICENSE("GPL");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_pcidio.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_pcidio.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_pcidio.c 2011-04-01 17:56:56.652710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_pcidio.c 2011-04-02 01:37:43.001688353 +0200
- @@ -1354,3 +1354,7 @@ static void __exit driver_pcidio_cleanup
- module_init(driver_pcidio_init_module);
- module_exit(driver_pcidio_cleanup_module);
- +
- +MODULE_AUTHOR("Comedi http://www.comedi.org");
- +MODULE_DESCRIPTION("Comedi low-level driver");
- +MODULE_LICENSE("GPL");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_pcimio.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_pcimio.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_pcimio.c 2011-04-01 17:56:56.669710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/comedi/drivers/ni_pcimio.c 2011-04-02 01:37:43.017688353 +0200
- @@ -1853,3 +1853,7 @@ static int pcimio_dio_change(struct come
- return 0;
- }
- +
- +MODULE_AUTHOR("Comedi http://www.comedi.org");
- +MODULE_DESCRIPTION("Comedi low-level driver");
- +MODULE_LICENSE("GPL");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/tidspbridge/rmgr/proc.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/tidspbridge/rmgr/proc.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/tidspbridge/rmgr/proc.c 2011-04-01 17:56:56.536710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/tidspbridge/rmgr/proc.c 2011-04-02 01:37:42.692688353 +0200
- @@ -781,12 +781,14 @@ int proc_begin_dma(void *hprocessor, voi
- (u32)pmpu_addr,
- ul_size, dir);
- + mutex_lock(&proc_lock);
- +
- /* find requested memory are in cached mapping information */
- map_obj = find_containing_mapping(pr_ctxt, (u32) pmpu_addr, ul_size);
- if (!map_obj) {
- pr_err("%s: find_containing_mapping failed\n", __func__);
- status = -EFAULT;
- - goto err_out;
- + goto no_map;
- }
- if (memory_give_ownership(map_obj, (u32) pmpu_addr, ul_size, dir)) {
- @@ -795,6 +797,8 @@ int proc_begin_dma(void *hprocessor, voi
- status = -EFAULT;
- }
- +no_map:
- + mutex_unlock(&proc_lock);
- err_out:
- return status;
- @@ -819,21 +823,24 @@ int proc_end_dma(void *hprocessor, void
- (u32)pmpu_addr,
- ul_size, dir);
- + mutex_lock(&proc_lock);
- +
- /* find requested memory are in cached mapping information */
- map_obj = find_containing_mapping(pr_ctxt, (u32) pmpu_addr, ul_size);
- if (!map_obj) {
- pr_err("%s: find_containing_mapping failed\n", __func__);
- status = -EFAULT;
- - goto err_out;
- + goto no_map;
- }
- if (memory_regain_ownership(map_obj, (u32) pmpu_addr, ul_size, dir)) {
- pr_err("%s: InValid address parameters %p %x\n",
- __func__, pmpu_addr, ul_size);
- status = -EFAULT;
- - goto err_out;
- }
- +no_map:
- + mutex_unlock(&proc_lock);
- err_out:
- return status;
- }
- @@ -1726,9 +1733,8 @@ int proc_un_map(void *hprocessor, void *
- (p_proc_object->hbridge_context, va_align, size_align);
- }
- - mutex_unlock(&proc_lock);
- if (status)
- - goto func_end;
- + goto unmap_failed;
- /*
- * A successful unmap should be followed by removal of map_obj
- @@ -1737,6 +1743,9 @@ int proc_un_map(void *hprocessor, void *
- */
- remove_mapping_information(pr_ctxt, (u32) map_addr, size_align);
- +unmap_failed:
- + mutex_unlock(&proc_lock);
- +
- func_end:
- dev_dbg(bridge, "%s: hprocessor: 0x%p map_addr: 0x%p status: 0x%x\n",
- __func__, hprocessor, map_addr, status);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci.h 2011-04-01 17:56:56.562710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci.h 2011-04-02 01:37:42.852688352 +0200
- @@ -100,9 +100,6 @@ struct vhci_hcd {
- * But, the index of this array begins from 0.
- */
- struct vhci_device vdev[VHCI_NPORTS];
- -
- - /* vhci_device which has not been assiged its address yet */
- - int pending_port;
- };
- @@ -119,6 +116,9 @@ void rh_port_disconnect(int rhport);
- void vhci_rx_loop(struct usbip_task *ut);
- void vhci_tx_loop(struct usbip_task *ut);
- +struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev,
- + __u32 seqnum);
- +
- #define hardware (&the_controller->pdev.dev)
- static inline struct vhci_device *port_to_vdev(__u32 port)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci_hcd.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci_hcd.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci_hcd.c 2011-04-01 17:56:56.562710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci_hcd.c 2011-04-02 01:37:42.852688352 +0200
- @@ -138,8 +138,6 @@ void rh_port_connect(int rhport, enum us
- * the_controller->vdev[rhport].ud.status = VDEV_CONNECT;
- * spin_unlock(&the_controller->vdev[rhport].ud.lock); */
- - the_controller->pending_port = rhport;
- -
- spin_unlock_irqrestore(&the_controller->lock, flags);
- usb_hcd_poll_rh_status(vhci_to_hcd(the_controller));
- @@ -559,6 +557,7 @@ static int vhci_urb_enqueue(struct usb_h
- struct device *dev = &urb->dev->dev;
- int ret = 0;
- unsigned long flags;
- + struct vhci_device *vdev;
- usbip_dbg_vhci_hc("enter, usb_hcd %p urb %p mem_flags %d\n",
- hcd, urb, mem_flags);
- @@ -574,6 +573,18 @@ static int vhci_urb_enqueue(struct usb_h
- return urb->status;
- }
- + vdev = port_to_vdev(urb->dev->portnum-1);
- +
- + /* refuse enqueue for dead connection */
- + spin_lock(&vdev->ud.lock);
- + if (vdev->ud.status == VDEV_ST_NULL || vdev->ud.status == VDEV_ST_ERROR) {
- + usbip_uerr("enqueue for inactive port %d\n", vdev->rhport);
- + spin_unlock(&vdev->ud.lock);
- + spin_unlock_irqrestore(&the_controller->lock, flags);
- + return -ENODEV;
- + }
- + spin_unlock(&vdev->ud.lock);
- +
- ret = usb_hcd_link_urb_to_ep(hcd, urb);
- if (ret)
- goto no_need_unlink;
- @@ -592,8 +603,6 @@ static int vhci_urb_enqueue(struct usb_h
- __u8 type = usb_pipetype(urb->pipe);
- struct usb_ctrlrequest *ctrlreq =
- (struct usb_ctrlrequest *) urb->setup_packet;
- - struct vhci_device *vdev =
- - port_to_vdev(the_controller->pending_port);
- if (type != PIPE_CONTROL || !ctrlreq) {
- dev_err(dev, "invalid request to devnum 0\n");
- @@ -607,7 +616,9 @@ static int vhci_urb_enqueue(struct usb_h
- dev_info(dev, "SetAddress Request (%d) to port %d\n",
- ctrlreq->wValue, vdev->rhport);
- - vdev->udev = urb->dev;
- + if (vdev->udev)
- + usb_put_dev(vdev->udev);
- + vdev->udev = usb_get_dev(urb->dev);
- spin_lock(&vdev->ud.lock);
- vdev->ud.status = VDEV_ST_USED;
- @@ -627,8 +638,9 @@ static int vhci_urb_enqueue(struct usb_h
- "Get_Descriptor to device 0 "
- "(get max pipe size)\n");
- - /* FIXME: reference count? (usb_get_dev()) */
- - vdev->udev = urb->dev;
- + if (vdev->udev)
- + usb_put_dev(vdev->udev);
- + vdev->udev = usb_get_dev(urb->dev);
- goto out;
- default:
- @@ -805,7 +817,6 @@ static int vhci_urb_dequeue(struct usb_h
- return 0;
- }
- -
- static void vhci_device_unlink_cleanup(struct vhci_device *vdev)
- {
- struct vhci_unlink *unlink, *tmp;
- @@ -813,11 +824,34 @@ static void vhci_device_unlink_cleanup(s
- spin_lock(&vdev->priv_lock);
- list_for_each_entry_safe(unlink, tmp, &vdev->unlink_tx, list) {
- + usbip_uinfo("unlink cleanup tx %lu\n", unlink->unlink_seqnum);
- list_del(&unlink->list);
- kfree(unlink);
- }
- list_for_each_entry_safe(unlink, tmp, &vdev->unlink_rx, list) {
- + struct urb *urb;
- +
- + /* give back URB of unanswered unlink request */
- + usbip_uinfo("unlink cleanup rx %lu\n", unlink->unlink_seqnum);
- +
- + urb = pickup_urb_and_free_priv(vdev, unlink->unlink_seqnum);
- + if (!urb) {
- + usbip_uinfo("the urb (seqnum %lu) was already given back\n",
- + unlink->unlink_seqnum);
- + list_del(&unlink->list);
- + kfree(unlink);
- + continue;
- + }
- +
- + urb->status = -ENODEV;
- +
- + spin_lock(&the_controller->lock);
- + usb_hcd_unlink_urb_from_ep(vhci_to_hcd(the_controller), urb);
- + spin_unlock(&the_controller->lock);
- +
- + usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb, urb->status);
- +
- list_del(&unlink->list);
- kfree(unlink);
- }
- @@ -887,6 +921,10 @@ static void vhci_device_reset(struct usb
- vdev->speed = 0;
- vdev->devid = 0;
- + if (vdev->udev)
- + usb_put_dev(vdev->udev);
- + vdev->udev = NULL;
- +
- ud->tcp_socket = NULL;
- ud->status = VDEV_ST_NULL;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci_rx.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci_rx.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci_rx.c 2011-04-01 17:56:56.563710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/usbip/vhci_rx.c 2011-04-02 01:37:42.852688353 +0200
- @@ -23,16 +23,14 @@
- #include "vhci.h"
- -/* get URB from transmitted urb queue */
- -static struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev,
- +/* get URB from transmitted urb queue. caller must hold vdev->priv_lock */
- +struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev,
- __u32 seqnum)
- {
- struct vhci_priv *priv, *tmp;
- struct urb *urb = NULL;
- int status;
- - spin_lock(&vdev->priv_lock);
- -
- list_for_each_entry_safe(priv, tmp, &vdev->priv_rx, list) {
- if (priv->seqnum == seqnum) {
- urb = priv->urb;
- @@ -63,8 +61,6 @@ static struct urb *pickup_urb_and_free_p
- }
- }
- - spin_unlock(&vdev->priv_lock);
- -
- return urb;
- }
- @@ -74,9 +70,11 @@ static void vhci_recv_ret_submit(struct
- struct usbip_device *ud = &vdev->ud;
- struct urb *urb;
- + spin_lock(&vdev->priv_lock);
- urb = pickup_urb_and_free_priv(vdev, pdu->base.seqnum);
- + spin_unlock(&vdev->priv_lock);
- if (!urb) {
- usbip_uerr("cannot find a urb of seqnum %u\n",
- @@ -161,7 +159,12 @@ static void vhci_recv_ret_unlink(struct
- return;
- }
- + spin_lock(&vdev->priv_lock);
- +
- urb = pickup_urb_and_free_priv(vdev, unlink->unlink_seqnum);
- +
- + spin_unlock(&vdev->priv_lock);
- +
- if (!urb) {
- /*
- * I get the result of a unlink request. But, it seems that I
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/winbond/core.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/winbond/core.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/winbond/core.h 2011-04-01 17:56:56.575710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/staging/winbond/core.h 2011-04-02 01:37:42.860688354 +0200
- @@ -3,6 +3,7 @@
- #include <linux/wireless.h>
- #include <linux/types.h>
- +#include <linux/delay.h>
- #include "wbhal_s.h"
- #include "mto.h"
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/class/cdc-acm.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/class/cdc-acm.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/class/cdc-acm.c 2011-04-01 17:56:56.399710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/class/cdc-acm.c 2011-04-02 01:38:34.971688310 +0200
- @@ -297,6 +297,8 @@ static void acm_ctrl_irq(struct urb *urb
- if (!ACM_READY(acm))
- goto exit;
- + usb_mark_last_busy(acm->dev);
- +
- data = (unsigned char *)(dr + 1);
- switch (dr->bNotificationType) {
- case USB_CDC_NOTIFY_NETWORK_CONNECTION:
- @@ -336,7 +338,6 @@ static void acm_ctrl_irq(struct urb *urb
- break;
- }
- exit:
- - usb_mark_last_busy(acm->dev);
- retval = usb_submit_urb(urb, GFP_ATOMIC);
- if (retval)
- dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with "
- @@ -533,6 +534,8 @@ static void acm_softint(struct work_stru
- if (!ACM_READY(acm))
- return;
- tty = tty_port_tty_get(&acm->port);
- + if (!tty)
- + return;
- tty_wakeup(tty);
- tty_kref_put(tty);
- }
- @@ -646,8 +649,10 @@ static void acm_port_down(struct acm *ac
- usb_kill_urb(acm->ctrlurb);
- for (i = 0; i < ACM_NW; i++)
- usb_kill_urb(acm->wb[i].urb);
- + tasklet_disable(&acm->urb_task);
- for (i = 0; i < nr; i++)
- usb_kill_urb(acm->ru[i].urb);
- + tasklet_enable(&acm->urb_task);
- acm->control->needs_remote_wakeup = 0;
- usb_autopm_put_interface(acm->control);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/class/cdc-wdm.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/class/cdc-wdm.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/class/cdc-wdm.c 2011-04-01 17:56:56.399710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/class/cdc-wdm.c 2011-04-02 01:38:34.972688310 +0200
- @@ -281,7 +281,7 @@ static void cleanup(struct wdm_device *d
- desc->sbuf,
- desc->validity->transfer_dma);
- usb_free_coherent(interface_to_usbdev(desc->intf),
- - desc->wMaxCommand,
- + desc->bMaxPacketSize0,
- desc->inbuf,
- desc->response->transfer_dma);
- kfree(desc->orq);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/devio.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/devio.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/devio.c 2011-04-01 17:56:56.432710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/devio.c 2011-04-02 01:38:34.972688310 +0200
- @@ -802,7 +802,7 @@ static int proc_control(struct dev_state
- tbuf, ctrl.wLength, tmo);
- usb_lock_device(dev);
- snoop_urb(dev, NULL, pipe, max(i, 0), min(i, 0), COMPLETE,
- - tbuf, i);
- + tbuf, max(i, 0));
- if ((i > 0) && ctrl.wLength) {
- if (copy_to_user(ctrl.data, tbuf, i)) {
- free_page((unsigned long)tbuf);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hcd.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hcd.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hcd.c 2011-04-01 17:56:56.437710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hcd.c 2011-04-02 01:37:42.503688354 +0200
- @@ -984,7 +984,7 @@ static int register_root_hub(struct usb_
- spin_unlock_irq (&hcd_root_hub_lock);
- /* Did the HC die before the root hub was registered? */
- - if (hcd->state == HC_STATE_HALT)
- + if (HCD_DEAD(hcd) || hcd->state == HC_STATE_HALT)
- usb_hc_died (hcd); /* This time clean up */
- }
- @@ -1090,13 +1090,10 @@ int usb_hcd_link_urb_to_ep(struct usb_hc
- * Check the host controller's state and add the URB to the
- * endpoint's queue.
- */
- - switch (hcd->state) {
- - case HC_STATE_RUNNING:
- - case HC_STATE_RESUMING:
- + if (HCD_RH_RUNNING(hcd)) {
- urb->unlinked = 0;
- list_add_tail(&urb->urb_list, &urb->ep->urb_list);
- - break;
- - default:
- + } else {
- rc = -ESHUTDOWN;
- goto done;
- }
- @@ -1914,7 +1911,7 @@ int usb_hcd_get_frame_number (struct usb
- {
- struct usb_hcd *hcd = bus_to_hcd(udev->bus);
- - if (!HC_IS_RUNNING (hcd->state))
- + if (!HCD_RH_RUNNING(hcd))
- return -ESHUTDOWN;
- return hcd->driver->get_frame_number (hcd);
- }
- @@ -1931,9 +1928,15 @@ int hcd_bus_suspend(struct usb_device *r
- dev_dbg(&rhdev->dev, "bus %s%s\n",
- (msg.event & PM_EVENT_AUTO ? "auto-" : ""), "suspend");
- + if (HCD_DEAD(hcd)) {
- + dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "suspend");
- + return 0;
- + }
- +
- if (!hcd->driver->bus_suspend) {
- status = -ENOENT;
- } else {
- + clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
- hcd->state = HC_STATE_QUIESCING;
- status = hcd->driver->bus_suspend(hcd);
- }
- @@ -1941,7 +1944,12 @@ int hcd_bus_suspend(struct usb_device *r
- usb_set_device_state(rhdev, USB_STATE_SUSPENDED);
- hcd->state = HC_STATE_SUSPENDED;
- } else {
- - hcd->state = old_state;
- + spin_lock_irq(&hcd_root_hub_lock);
- + if (!HCD_DEAD(hcd)) {
- + set_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
- + hcd->state = old_state;
- + }
- + spin_unlock_irq(&hcd_root_hub_lock);
- dev_dbg(&rhdev->dev, "bus %s fail, err %d\n",
- "suspend", status);
- }
- @@ -1956,9 +1964,13 @@ int hcd_bus_resume(struct usb_device *rh
- dev_dbg(&rhdev->dev, "usb %s%s\n",
- (msg.event & PM_EVENT_AUTO ? "auto-" : ""), "resume");
- + if (HCD_DEAD(hcd)) {
- + dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "resume");
- + return 0;
- + }
- if (!hcd->driver->bus_resume)
- return -ENOENT;
- - if (hcd->state == HC_STATE_RUNNING)
- + if (HCD_RH_RUNNING(hcd))
- return 0;
- hcd->state = HC_STATE_RESUMING;
- @@ -1967,10 +1979,15 @@ int hcd_bus_resume(struct usb_device *rh
- if (status == 0) {
- /* TRSMRCY = 10 msec */
- msleep(10);
- - usb_set_device_state(rhdev, rhdev->actconfig
- - ? USB_STATE_CONFIGURED
- - : USB_STATE_ADDRESS);
- - hcd->state = HC_STATE_RUNNING;
- + spin_lock_irq(&hcd_root_hub_lock);
- + if (!HCD_DEAD(hcd)) {
- + usb_set_device_state(rhdev, rhdev->actconfig
- + ? USB_STATE_CONFIGURED
- + : USB_STATE_ADDRESS);
- + set_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
- + hcd->state = HC_STATE_RUNNING;
- + }
- + spin_unlock_irq(&hcd_root_hub_lock);
- } else {
- hcd->state = old_state;
- dev_dbg(&rhdev->dev, "bus %s fail, err %d\n",
- @@ -2081,7 +2098,7 @@ irqreturn_t usb_hcd_irq (int irq, void *
- */
- local_irq_save(flags);
- - if (unlikely(hcd->state == HC_STATE_HALT || !HCD_HW_ACCESSIBLE(hcd))) {
- + if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) {
- rc = IRQ_NONE;
- } else if (hcd->driver->irq(hcd) == IRQ_NONE) {
- rc = IRQ_NONE;
- @@ -2115,6 +2132,8 @@ void usb_hc_died (struct usb_hcd *hcd)
- dev_err (hcd->self.controller, "HC died; cleaning up\n");
- spin_lock_irqsave (&hcd_root_hub_lock, flags);
- + clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
- + set_bit(HCD_FLAG_DEAD, &hcd->flags);
- if (hcd->rh_registered) {
- clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
- @@ -2257,6 +2276,12 @@ int usb_add_hcd(struct usb_hcd *hcd,
- */
- device_init_wakeup(&rhdev->dev, 1);
- + /* HCD_FLAG_RH_RUNNING doesn't matter until the root hub is
- + * registered. But since the controller can die at any time,
- + * let's initialize the flag before touching the hardware.
- + */
- + set_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
- +
- /* "reset" is misnamed; its role is now one-time init. the controller
- * should already have been reset (and boot firmware kicked off etc).
- */
- @@ -2324,6 +2349,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
- return retval;
- error_create_attr_group:
- + clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
- if (HC_IS_RUNNING(hcd->state))
- hcd->state = HC_STATE_QUIESCING;
- spin_lock_irq(&hcd_root_hub_lock);
- @@ -2376,6 +2402,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
- usb_get_dev(rhdev);
- sysfs_remove_group(&rhdev->dev.kobj, &usb_bus_attr_group);
- + clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
- if (HC_IS_RUNNING (hcd->state))
- hcd->state = HC_STATE_QUIESCING;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hcd-pci.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hcd-pci.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hcd-pci.c 2011-04-01 17:56:56.434710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hcd-pci.c 2011-04-02 01:37:42.503688354 +0200
- @@ -364,8 +364,7 @@ static int check_root_hub_suspended(stru
- struct pci_dev *pci_dev = to_pci_dev(dev);
- struct usb_hcd *hcd = pci_get_drvdata(pci_dev);
- - if (!(hcd->state == HC_STATE_SUSPENDED ||
- - hcd->state == HC_STATE_HALT)) {
- + if (HCD_RH_RUNNING(hcd)) {
- dev_warn(dev, "Root hub is not suspended\n");
- return -EBUSY;
- }
- @@ -387,7 +386,7 @@ static int suspend_common(struct device
- if (retval)
- return retval;
- - if (hcd->driver->pci_suspend) {
- + if (hcd->driver->pci_suspend && !HCD_DEAD(hcd)) {
- /* Optimization: Don't suspend if a root-hub wakeup is
- * pending and it would cause the HCD to wake up anyway.
- */
- @@ -428,7 +427,7 @@ static int resume_common(struct device *
- struct usb_hcd *hcd = pci_get_drvdata(pci_dev);
- int retval;
- - if (hcd->state != HC_STATE_SUSPENDED) {
- + if (HCD_RH_RUNNING(hcd)) {
- dev_dbg(dev, "can't resume, not suspended!\n");
- return 0;
- }
- @@ -443,7 +442,7 @@ static int resume_common(struct device *
- clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
- - if (hcd->driver->pci_resume) {
- + if (hcd->driver->pci_resume && !HCD_DEAD(hcd)) {
- if (event != PM_EVENT_AUTO_RESUME)
- wait_for_companions(pci_dev, hcd);
- @@ -476,10 +475,10 @@ static int hcd_pci_suspend_noirq(struct
- pci_save_state(pci_dev);
- - /* If the root hub is HALTed rather than SUSPENDed,
- + /* If the root hub is dead rather than suspended,
- * disallow remote wakeup.
- */
- - if (hcd->state == HC_STATE_HALT)
- + if (HCD_DEAD(hcd))
- device_set_wakeup_enable(dev, 0);
- dev_dbg(dev, "wakeup: %d\n", device_may_wakeup(dev));
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hub.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hub.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hub.c 2011-04-01 17:56:56.432710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/hub.c 2011-04-02 01:37:42.499688354 +0200
- @@ -2672,17 +2672,13 @@ hub_port_init (struct usb_hub *hub, stru
- mutex_lock(&usb_address0_mutex);
- - if (!udev->config && oldspeed == USB_SPEED_SUPER) {
- - /* Don't reset USB 3.0 devices during an initial setup */
- - usb_set_device_state(udev, USB_STATE_DEFAULT);
- - } else {
- - /* Reset the device; full speed may morph to high speed */
- - /* FIXME a USB 2.0 device may morph into SuperSpeed on reset. */
- - retval = hub_port_reset(hub, port1, udev, delay);
- - if (retval < 0) /* error or disconnect */
- - goto fail;
- - /* success, speed is known */
- - }
- + /* Reset the device; full speed may morph to high speed */
- + /* FIXME a USB 2.0 device may morph into SuperSpeed on reset. */
- + retval = hub_port_reset(hub, port1, udev, delay);
- + if (retval < 0) /* error or disconnect */
- + goto fail;
- + /* success, speed is known */
- +
- retval = -ENODEV;
- if (oldspeed != USB_SPEED_UNKNOWN && oldspeed != udev->speed) {
- @@ -2744,6 +2740,11 @@ hub_port_init (struct usb_hub *hub, stru
- udev->ttport = hdev->ttport;
- } else if (udev->speed != USB_SPEED_HIGH
- && hdev->speed == USB_SPEED_HIGH) {
- + if (!hub->tt.hub) {
- + dev_err(&udev->dev, "parent hub has no TT\n");
- + retval = -EINVAL;
- + goto fail;
- + }
- udev->tt = &hub->tt;
- udev->ttport = port1;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/quirks.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/quirks.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/quirks.c 2011-04-01 17:56:56.437710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/quirks.c 2011-04-02 01:37:42.503688354 +0200
- @@ -48,6 +48,10 @@ static const struct usb_device_id usb_qu
- { USB_DEVICE(0x04b4, 0x0526), .driver_info =
- USB_QUIRK_CONFIG_INTF_STRINGS },
- + /* Samsung Android phone modem - ID conflict with SPH-I500 */
- + { USB_DEVICE(0x04e8, 0x6601), .driver_info =
- + USB_QUIRK_CONFIG_INTF_STRINGS },
- +
- /* Roland SC-8820 */
- { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME },
- @@ -68,6 +72,10 @@ static const struct usb_device_id usb_qu
- /* M-Systems Flash Disk Pioneers */
- { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
- + /* Keytouch QWERTY Panel keyboard */
- + { USB_DEVICE(0x0926, 0x3333), .driver_info =
- + USB_QUIRK_CONFIG_INTF_STRINGS },
- +
- /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */
- { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF },
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/urb.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/urb.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/urb.c 2011-04-01 17:56:56.434710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/core/urb.c 2011-04-02 01:37:42.503688354 +0200
- @@ -366,7 +366,16 @@ int usb_submit_urb(struct urb *urb, gfp_
- if (xfertype == USB_ENDPOINT_XFER_ISOC) {
- int n, len;
- - /* FIXME SuperSpeed isoc endpoints have up to 16 bursts */
- + /* SuperSpeed isoc endpoints have up to 16 bursts of up to
- + * 3 packets each
- + */
- + if (dev->speed == USB_SPEED_SUPER) {
- + int burst = 1 + ep->ss_ep_comp.bMaxBurst;
- + int mult = USB_SS_MULT(ep->ss_ep_comp.bmAttributes);
- + max *= burst;
- + max *= mult;
- + }
- +
- /* "high bandwidth" mode, 1-3 packets/uframe? */
- if (dev->speed == USB_SPEED_HIGH) {
- int mult = 1 + ((max >> 11) & 0x03);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/ehci-hub.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/ehci-hub.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/ehci-hub.c 2011-04-01 17:56:56.398710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/ehci-hub.c 2011-04-02 01:37:42.484688353 +0200
- @@ -106,6 +106,27 @@ static void ehci_handover_companion_port
- ehci->owned_ports = 0;
- }
- +static int ehci_port_change(struct ehci_hcd *ehci)
- +{
- + int i = HCS_N_PORTS(ehci->hcs_params);
- +
- + /* First check if the controller indicates a change event */
- +
- + if (ehci_readl(ehci, &ehci->regs->status) & STS_PCD)
- + return 1;
- +
- + /*
- + * Not all controllers appear to update this while going from D3 to D0,
- + * so check the individual port status registers as well
- + */
- +
- + while (i--)
- + if (ehci_readl(ehci, &ehci->regs->port_status[i]) & PORT_CSC)
- + return 1;
- +
- + return 0;
- +}
- +
- static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
- bool suspending, bool do_wakeup)
- {
- @@ -173,7 +194,7 @@ static void ehci_adjust_port_wakeup_flag
- }
- /* Does the root hub have a port wakeup pending? */
- - if (!suspending && (ehci_readl(ehci, &ehci->regs->status) & STS_PCD))
- + if (!suspending && ehci_port_change(ehci))
- usb_hcd_resume_root_hub(ehci_to_hcd(ehci));
- spin_unlock_irqrestore(&ehci->lock, flags);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/ehci-q.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/ehci-q.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/ehci-q.c 2011-04-01 17:56:56.391710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/ehci-q.c 2011-04-02 01:38:34.973688310 +0200
- @@ -315,7 +315,6 @@ qh_completions (struct ehci_hcd *ehci, s
- int stopped;
- unsigned count = 0;
- u8 state;
- - const __le32 halt = HALT_BIT(ehci);
- struct ehci_qh_hw *hw = qh->hw;
- if (unlikely (list_empty (&qh->qtd_list)))
- @@ -422,7 +421,6 @@ qh_completions (struct ehci_hcd *ehci, s
- && !(qtd->hw_alt_next
- & EHCI_LIST_END(ehci))) {
- stopped = 1;
- - goto halt;
- }
- /* stop scanning when we reach qtds the hc is using */
- @@ -456,16 +454,6 @@ qh_completions (struct ehci_hcd *ehci, s
- */
- ehci_clear_tt_buffer(ehci, qh, urb, token);
- }
- -
- - /* force halt for unlinked or blocked qh, so we'll
- - * patch the qh later and so that completions can't
- - * activate it while we "know" it's stopped.
- - */
- - if ((halt & hw->hw_token) == 0) {
- -halt:
- - hw->hw_token |= halt;
- - wmb ();
- - }
- }
- /* unless we already know the urb's status, collect qtd status
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/isp1760-hcd.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/isp1760-hcd.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/isp1760-hcd.c 2011-04-01 17:56:56.396710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/isp1760-hcd.c 2011-04-02 01:37:42.482688353 +0200
- @@ -33,6 +33,7 @@ struct isp1760_hcd {
- struct inter_packet_info atl_ints[32];
- struct inter_packet_info int_ints[32];
- struct memory_chunk memory_pool[BLOCKS];
- + u32 atl_queued;
- /* periodic schedule support */
- #define DEFAULT_I_TDPS 1024
- @@ -850,6 +851,11 @@ static void enqueue_an_ATL_packet(struct
- skip_map &= ~queue_entry;
- isp1760_writel(skip_map, hcd->regs + HC_ATL_PTD_SKIPMAP_REG);
- + priv->atl_queued++;
- + if (priv->atl_queued == 2)
- + isp1760_writel(INTERRUPT_ENABLE_SOT_MASK,
- + hcd->regs + HC_INTERRUPT_ENABLE);
- +
- buffstatus = isp1760_readl(hcd->regs + HC_BUFFER_STATUS_REG);
- buffstatus |= ATL_BUFFER;
- isp1760_writel(buffstatus, hcd->regs + HC_BUFFER_STATUS_REG);
- @@ -992,6 +998,7 @@ static void do_atl_int(struct usb_hcd *u
- u32 dw3;
- status = 0;
- + priv->atl_queued--;
- queue_entry = __ffs(done_map);
- done_map &= ~(1 << queue_entry);
- @@ -1054,11 +1061,6 @@ static void do_atl_int(struct usb_hcd *u
- * device is not able to send data fast enough.
- * This happens mostly on slower hardware.
- */
- - printk(KERN_NOTICE "Reloading ptd %p/%p... qh %p read: "
- - "%d of %zu done: %08x cur: %08x\n", qtd,
- - urb, qh, PTD_XFERRED_LENGTH(dw3),
- - qtd->length, done_map,
- - (1 << queue_entry));
- /* RL counter = ERR counter */
- dw3 &= ~(0xf << 19);
- @@ -1086,6 +1088,11 @@ static void do_atl_int(struct usb_hcd *u
- priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs +
- atl_regs, sizeof(ptd));
- + priv->atl_queued++;
- + if (priv->atl_queued == 2)
- + isp1760_writel(INTERRUPT_ENABLE_SOT_MASK,
- + usb_hcd->regs + HC_INTERRUPT_ENABLE);
- +
- buffstatus = isp1760_readl(usb_hcd->regs +
- HC_BUFFER_STATUS_REG);
- buffstatus |= ATL_BUFFER;
- @@ -1191,6 +1198,9 @@ static void do_atl_int(struct usb_hcd *u
- skip_map = isp1760_readl(usb_hcd->regs +
- HC_ATL_PTD_SKIPMAP_REG);
- }
- + if (priv->atl_queued <= 1)
- + isp1760_writel(INTERRUPT_ENABLE_MASK,
- + usb_hcd->regs + HC_INTERRUPT_ENABLE);
- }
- static void do_intl_int(struct usb_hcd *usb_hcd)
- @@ -1770,7 +1780,7 @@ static irqreturn_t isp1760_irq(struct us
- goto leave;
- isp1760_writel(imask, usb_hcd->regs + HC_INTERRUPT_REG);
- - if (imask & HC_ATL_INT)
- + if (imask & (HC_ATL_INT | HC_SOT_INT))
- do_atl_int(usb_hcd);
- if (imask & HC_INTL_INT)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/isp1760-hcd.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/isp1760-hcd.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/isp1760-hcd.h 2011-04-01 17:56:56.391710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/isp1760-hcd.h 2011-04-02 01:37:42.480688353 +0200
- @@ -69,6 +69,7 @@ void deinit_kmem_cache(void);
- #define HC_INTERRUPT_ENABLE 0x314
- #define INTERRUPT_ENABLE_MASK (HC_INTL_INT | HC_ATL_INT | HC_EOT_INT)
- +#define INTERRUPT_ENABLE_SOT_MASK (HC_INTL_INT | HC_SOT_INT | HC_EOT_INT)
- #define HC_ISO_INT (1 << 9)
- #define HC_ATL_INT (1 << 8)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/xhci.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/xhci.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/xhci.h 2011-04-01 17:56:56.391710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/xhci.h 2011-04-02 01:37:42.479688353 +0200
- @@ -648,6 +648,9 @@ struct xhci_ep_ctx {
- #define AVG_TRB_LENGTH_FOR_EP(p) ((p) & 0xffff)
- #define MAX_ESIT_PAYLOAD_FOR_EP(p) (((p) & 0xffff) << 16)
- +/* deq bitmasks */
- +#define EP_CTX_CYCLE_MASK (1 << 0)
- +
- /**
- * struct xhci_input_control_context
- @@ -750,6 +753,12 @@ struct xhci_virt_ep {
- struct timer_list stop_cmd_timer;
- int stop_cmds_pending;
- struct xhci_hcd *xhci;
- + /* Dequeue pointer and dequeue segment for a submitted Set TR Dequeue
- + * command. We'll need to update the ring's dequeue segment and dequeue
- + * pointer after the command completes.
- + */
- + struct xhci_segment *queued_deq_seg;
- + union xhci_trb *queued_deq_ptr;
- /*
- * Sometimes the xHC can not process isochronous endpoint ring quickly
- * enough, and it will miss some isoc tds on the ring and generate
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/xhci-ring.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/xhci-ring.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/xhci-ring.c 2011-04-01 17:56:56.390710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/host/xhci-ring.c 2011-04-02 01:37:42.478688353 +0200
- @@ -479,8 +479,11 @@ void xhci_find_new_dequeue_state(struct
- state->new_deq_seg = find_trb_seg(cur_td->start_seg,
- dev->eps[ep_index].stopped_trb,
- &state->new_cycle_state);
- - if (!state->new_deq_seg)
- - BUG();
- + if (!state->new_deq_seg) {
- + WARN_ON(1);
- + return;
- + }
- +
- /* Dig out the cycle state saved by the xHC during the stop ep cmd */
- xhci_dbg(xhci, "Finding endpoint context\n");
- ep_ctx = xhci_get_ep_ctx(xhci, dev->out_ctx, ep_index);
- @@ -491,8 +494,10 @@ void xhci_find_new_dequeue_state(struct
- state->new_deq_seg = find_trb_seg(state->new_deq_seg,
- state->new_deq_ptr,
- &state->new_cycle_state);
- - if (!state->new_deq_seg)
- - BUG();
- + if (!state->new_deq_seg) {
- + WARN_ON(1);
- + return;
- + }
- trb = &state->new_deq_ptr->generic;
- if ((trb->field[3] & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK) &&
- @@ -500,15 +505,26 @@ void xhci_find_new_dequeue_state(struct
- state->new_cycle_state = ~(state->new_cycle_state) & 0x1;
- next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr);
- + /*
- + * If there is only one segment in a ring, find_trb_seg()'s while loop
- + * will not run, and it will return before it has a chance to see if it
- + * needs to toggle the cycle bit. It can't tell if the stalled transfer
- + * ended just before the link TRB on a one-segment ring, or if the TD
- + * wrapped around the top of the ring, because it doesn't have the TD in
- + * question. Look for the one-segment case where stalled TRB's address
- + * is greater than the new dequeue pointer address.
- + */
- + if (ep_ring->first_seg == ep_ring->first_seg->next &&
- + state->new_deq_ptr < dev->eps[ep_index].stopped_trb)
- + state->new_cycle_state ^= 0x1;
- + xhci_dbg(xhci, "Cycle state = 0x%x\n", state->new_cycle_state);
- +
- /* Don't update the ring cycle state for the producer (us). */
- xhci_dbg(xhci, "New dequeue segment = %p (virtual)\n",
- state->new_deq_seg);
- addr = xhci_trb_virt_to_dma(state->new_deq_seg, state->new_deq_ptr);
- xhci_dbg(xhci, "New dequeue pointer = 0x%llx (DMA)\n",
- (unsigned long long) addr);
- - xhci_dbg(xhci, "Setting dequeue pointer in internal ring state.\n");
- - ep_ring->dequeue = state->new_deq_ptr;
- - ep_ring->deq_seg = state->new_deq_seg;
- }
- static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
- @@ -951,9 +967,26 @@ static void handle_set_deq_completion(st
- } else {
- xhci_dbg(xhci, "Successful Set TR Deq Ptr cmd, deq = @%08llx\n",
- ep_ctx->deq);
- + if (xhci_trb_virt_to_dma(dev->eps[ep_index].queued_deq_seg,
- + dev->eps[ep_index].queued_deq_ptr) ==
- + (ep_ctx->deq & ~(EP_CTX_CYCLE_MASK))) {
- + /* Update the ring's dequeue segment and dequeue pointer
- + * to reflect the new position.
- + */
- + ep_ring->deq_seg = dev->eps[ep_index].queued_deq_seg;
- + ep_ring->dequeue = dev->eps[ep_index].queued_deq_ptr;
- + } else {
- + xhci_warn(xhci, "Mismatch between completed Set TR Deq "
- + "Ptr command & xHCI internal state.\n");
- + xhci_warn(xhci, "ep deq seg = %p, deq ptr = %p\n",
- + dev->eps[ep_index].queued_deq_seg,
- + dev->eps[ep_index].queued_deq_ptr);
- + }
- }
- dev->eps[ep_index].ep_state &= ~SET_DEQ_PENDING;
- + dev->eps[ep_index].queued_deq_seg = NULL;
- + dev->eps[ep_index].queued_deq_ptr = NULL;
- /* Restart any rings with pending URBs */
- ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
- }
- @@ -2369,12 +2402,13 @@ static unsigned int count_sg_trbs_needed
- /* Scatter gather list entries may cross 64KB boundaries */
- running_total = TRB_MAX_BUFF_SIZE -
- - (sg_dma_address(sg) & ((1 << TRB_MAX_BUFF_SHIFT) - 1));
- + (sg_dma_address(sg) & (TRB_MAX_BUFF_SIZE - 1));
- + running_total &= TRB_MAX_BUFF_SIZE - 1;
- if (running_total != 0)
- num_trbs++;
- /* How many more 64KB chunks to transfer, how many more TRBs? */
- - while (running_total < sg_dma_len(sg)) {
- + while (running_total < sg_dma_len(sg) && running_total < temp) {
- num_trbs++;
- running_total += TRB_MAX_BUFF_SIZE;
- }
- @@ -2399,11 +2433,11 @@ static unsigned int count_sg_trbs_needed
- static void check_trb_math(struct urb *urb, int num_trbs, int running_total)
- {
- if (num_trbs != 0)
- - dev_dbg(&urb->dev->dev, "%s - ep %#x - Miscalculated number of "
- + dev_err(&urb->dev->dev, "%s - ep %#x - Miscalculated number of "
- "TRBs, %d left\n", __func__,
- urb->ep->desc.bEndpointAddress, num_trbs);
- if (running_total != urb->transfer_buffer_length)
- - dev_dbg(&urb->dev->dev, "%s - ep %#x - Miscalculated tx length, "
- + dev_err(&urb->dev->dev, "%s - ep %#x - Miscalculated tx length, "
- "queued %#x (%d), asked for %#x (%d)\n",
- __func__,
- urb->ep->desc.bEndpointAddress,
- @@ -2535,8 +2569,7 @@ static int queue_bulk_sg_tx(struct xhci_
- sg = urb->sg;
- addr = (u64) sg_dma_address(sg);
- this_sg_len = sg_dma_len(sg);
- - trb_buff_len = TRB_MAX_BUFF_SIZE -
- - (addr & ((1 << TRB_MAX_BUFF_SHIFT) - 1));
- + trb_buff_len = TRB_MAX_BUFF_SIZE - (addr & (TRB_MAX_BUFF_SIZE - 1));
- trb_buff_len = min_t(int, trb_buff_len, this_sg_len);
- if (trb_buff_len > urb->transfer_buffer_length)
- trb_buff_len = urb->transfer_buffer_length;
- @@ -2572,7 +2605,7 @@ static int queue_bulk_sg_tx(struct xhci_
- (unsigned int) (addr + TRB_MAX_BUFF_SIZE) & ~(TRB_MAX_BUFF_SIZE - 1),
- (unsigned int) addr + trb_buff_len);
- if (TRB_MAX_BUFF_SIZE -
- - (addr & ((1 << TRB_MAX_BUFF_SHIFT) - 1)) < trb_buff_len) {
- + (addr & (TRB_MAX_BUFF_SIZE - 1)) < trb_buff_len) {
- xhci_warn(xhci, "WARN: sg dma xfer crosses 64KB boundaries!\n");
- xhci_dbg(xhci, "Next boundary at %#x, end dma = %#x\n",
- (unsigned int) (addr + TRB_MAX_BUFF_SIZE) & ~(TRB_MAX_BUFF_SIZE - 1),
- @@ -2616,7 +2649,7 @@ static int queue_bulk_sg_tx(struct xhci_
- }
- trb_buff_len = TRB_MAX_BUFF_SIZE -
- - (addr & ((1 << TRB_MAX_BUFF_SHIFT) - 1));
- + (addr & (TRB_MAX_BUFF_SIZE - 1));
- trb_buff_len = min_t(int, trb_buff_len, this_sg_len);
- if (running_total + trb_buff_len > urb->transfer_buffer_length)
- trb_buff_len =
- @@ -2656,7 +2689,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
- num_trbs = 0;
- /* How much data is (potentially) left before the 64KB boundary? */
- running_total = TRB_MAX_BUFF_SIZE -
- - (urb->transfer_dma & ((1 << TRB_MAX_BUFF_SHIFT) - 1));
- + (urb->transfer_dma & (TRB_MAX_BUFF_SIZE - 1));
- + running_total &= TRB_MAX_BUFF_SIZE - 1;
- /* If there's some data on this 64KB chunk, or we have to send a
- * zero-length transfer, we need at least one TRB
- @@ -2699,8 +2733,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
- /* How much data is in the first TRB? */
- addr = (u64) urb->transfer_dma;
- trb_buff_len = TRB_MAX_BUFF_SIZE -
- - (urb->transfer_dma & ((1 << TRB_MAX_BUFF_SHIFT) - 1));
- - if (urb->transfer_buffer_length < trb_buff_len)
- + (urb->transfer_dma & (TRB_MAX_BUFF_SIZE - 1));
- + if (trb_buff_len > urb->transfer_buffer_length)
- trb_buff_len = urb->transfer_buffer_length;
- first_trb = true;
- @@ -2872,8 +2906,8 @@ static int count_isoc_trbs_needed(struct
- addr = (u64) (urb->transfer_dma + urb->iso_frame_desc[i].offset);
- td_len = urb->iso_frame_desc[i].length;
- - running_total = TRB_MAX_BUFF_SIZE -
- - (addr & ((1 << TRB_MAX_BUFF_SHIFT) - 1));
- + running_total = TRB_MAX_BUFF_SIZE - (addr & (TRB_MAX_BUFF_SIZE - 1));
- + running_total &= TRB_MAX_BUFF_SIZE - 1;
- if (running_total != 0)
- num_trbs++;
- @@ -3212,6 +3246,7 @@ static int queue_set_tr_deq(struct xhci_
- u32 trb_ep_index = EP_ID_FOR_TRB(ep_index);
- u32 trb_stream_id = STREAM_ID_FOR_TRB(stream_id);
- u32 type = TRB_TYPE(TRB_SET_DEQ);
- + struct xhci_virt_ep *ep;
- addr = xhci_trb_virt_to_dma(deq_seg, deq_ptr);
- if (addr == 0) {
- @@ -3220,6 +3255,14 @@ static int queue_set_tr_deq(struct xhci_
- deq_seg, deq_ptr);
- return 0;
- }
- + ep = &xhci->devs[slot_id]->eps[ep_index];
- + if ((ep->ep_state & SET_DEQ_PENDING)) {
- + xhci_warn(xhci, "WARN Cannot submit Set TR Deq Ptr\n");
- + xhci_warn(xhci, "A Set TR Deq Ptr command is pending.\n");
- + return 0;
- + }
- + ep->queued_deq_seg = deq_seg;
- + ep->queued_deq_ptr = deq_ptr;
- return queue_command(xhci, lower_32_bits(addr) | cycle_state,
- upper_32_bits(addr), trb_stream_id,
- trb_slot_id | trb_ep_index | type, false);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/misc/uss720.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/misc/uss720.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/misc/uss720.c 2011-04-01 17:56:56.412710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/misc/uss720.c 2011-04-02 01:38:34.973688310 +0200
- @@ -177,12 +177,11 @@ static struct uss720_async_request *subm
- spin_lock_irqsave(&priv->asynclock, flags);
- list_add_tail(&rq->asynclist, &priv->asynclist);
- spin_unlock_irqrestore(&priv->asynclock, flags);
- + kref_get(&rq->ref_count);
- ret = usb_submit_urb(rq->urb, mem_flags);
- - if (!ret) {
- - kref_get(&rq->ref_count);
- + if (!ret)
- return rq;
- - }
- - kref_put(&rq->ref_count, destroy_async);
- + destroy_async(&rq->ref_count);
- err("submit_async_request submit_urb failed with %d", ret);
- return NULL;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/musb/musb_core.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/musb/musb_core.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/musb/musb_core.c 2011-04-01 17:56:56.426710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/musb/musb_core.c 2011-04-02 01:37:42.499688353 +0200
- @@ -1880,6 +1880,7 @@ allocate_instance(struct device *dev,
- INIT_LIST_HEAD(&musb->out_bulk);
- hcd->uses_new_polling = 1;
- + hcd->has_tt = 1;
- musb->vbuserr_retry = VBUSERR_RETRY_COUNT;
- musb->a_wait_bcon = OTG_TIME_A_WAIT_BCON;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/musb/omap2430.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/musb/omap2430.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/musb/omap2430.c 2011-04-01 17:56:56.426710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/musb/omap2430.c 2011-04-02 01:37:42.499688353 +0200
- @@ -317,6 +317,7 @@ static int musb_platform_resume(struct m
- int musb_platform_exit(struct musb *musb)
- {
- + del_timer_sync(&musb_idle_timer);
- musb_platform_suspend(musb);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/ch341.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/ch341.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/ch341.c 2011-04-01 17:56:56.424710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/ch341.c 2011-04-02 01:37:42.495688354 +0200
- @@ -75,6 +75,7 @@ static int debug;
- static const struct usb_device_id id_table[] = {
- { USB_DEVICE(0x4348, 0x5523) },
- { USB_DEVICE(0x1a86, 0x7523) },
- + { USB_DEVICE(0x1a86, 0x5523) },
- { },
- };
- MODULE_DEVICE_TABLE(usb, id_table);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/kobil_sct.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/kobil_sct.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/kobil_sct.c 2011-04-01 17:56:56.423710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/kobil_sct.c 2011-04-02 01:37:42.492688354 +0200
- @@ -372,7 +372,7 @@ static void kobil_read_int_callback(stru
- }
- tty = tty_port_tty_get(&port->port);
- - if (urb->actual_length) {
- + if (tty && urb->actual_length) {
- /* BEGIN DEBUG */
- /*
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/option.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/option.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/option.c 2011-04-01 17:56:56.425710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/option.c 2011-04-02 01:37:42.496688354 +0200
- @@ -653,7 +653,8 @@ static const struct usb_device_id option
- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) },
- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) },
- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) },
- - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff) },
- + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff,
- + 0xff, 0xff), .driver_info = (kernel_ulong_t)&four_g_w14_blacklist },
- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) },
- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) },
- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0034, 0xff, 0xff, 0xff) },
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/sierra.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/sierra.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/sierra.c 2011-04-01 17:56:56.425710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/sierra.c 2011-04-02 01:37:42.495688354 +0200
- @@ -301,6 +301,9 @@ static const struct usb_device_id id_tab
- { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */
- .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
- },
- + { USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */
- + .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
- + },
- { USB_DEVICE(0x413C, 0x08133) }, /* Dell Computer Corp. Wireless 5720 VZW Mobile Broadband (EVDO Rev-A) Minicard GPS Port */
- { }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/usb-serial.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/usb-serial.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/usb-serial.c 2011-04-01 17:56:56.424710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/usb-serial.c 2011-04-02 01:37:42.495688354 +0200
- @@ -911,9 +911,8 @@ int usb_serial_probe(struct usb_interfac
- dev_err(&interface->dev, "No free urbs available\n");
- goto probe_error;
- }
- - buffer_size = serial->type->bulk_in_size;
- - if (!buffer_size)
- - buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
- + buffer_size = max_t(int, serial->type->bulk_in_size,
- + le16_to_cpu(endpoint->wMaxPacketSize));
- port->bulk_in_size = buffer_size;
- port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
- port->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/usb_wwan.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/usb_wwan.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/usb_wwan.c 2011-04-01 17:56:56.424710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/usb_wwan.c 2011-04-02 01:37:42.494688354 +0200
- @@ -216,12 +216,15 @@ static void usb_wwan_indat_callback(stru
- __func__, status, endpoint);
- } else {
- tty = tty_port_tty_get(&port->port);
- - if (urb->actual_length) {
- - tty_insert_flip_string(tty, data, urb->actual_length);
- - tty_flip_buffer_push(tty);
- - } else
- - dbg("%s: empty read urb received", __func__);
- - tty_kref_put(tty);
- + if (tty) {
- + if (urb->actual_length) {
- + tty_insert_flip_string(tty, data,
- + urb->actual_length);
- + tty_flip_buffer_push(tty);
- + } else
- + dbg("%s: empty read urb received", __func__);
- + tty_kref_put(tty);
- + }
- /* Resubmit urb so we continue receiving */
- if (status != -ESHUTDOWN) {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/visor.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/visor.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/visor.c 2011-04-01 17:56:56.425710689 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/usb/serial/visor.c 2011-04-02 01:37:42.495688354 +0200
- @@ -27,6 +27,7 @@
- #include <linux/uaccess.h>
- #include <linux/usb.h>
- #include <linux/usb/serial.h>
- +#include <linux/usb/cdc.h>
- #include "visor.h"
- /*
- @@ -479,6 +480,17 @@ static int visor_probe(struct usb_serial
- dbg("%s", __func__);
- + /*
- + * some Samsung Android phones in modem mode have the same ID
- + * as SPH-I500, but they are ACM devices, so dont bind to them
- + */
- + if (id->idVendor == SAMSUNG_VENDOR_ID &&
- + id->idProduct == SAMSUNG_SPH_I500_ID &&
- + serial->dev->descriptor.bDeviceClass == USB_CLASS_COMM &&
- + serial->dev->descriptor.bDeviceSubClass ==
- + USB_CDC_SUBCLASS_ACM)
- + return -ENODEV;
- +
- if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
- dev_err(&serial->dev->dev, "active config #%d != 1 ??\n",
- serial->dev->actconfig->desc.bConfigurationValue);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/video/console/tileblit.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/video/console/tileblit.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/video/console/tileblit.c 2011-04-01 17:56:56.236710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//drivers/video/console/tileblit.c 2011-04-02 01:38:34.973688310 +0200
- @@ -83,7 +83,7 @@ static void tile_cursor(struct vc_data *
- int softback_lines, int fg, int bg)
- {
- struct fb_tilecursor cursor;
- - int use_sw = (vc->vc_cursor_type & 0x01);
- + int use_sw = (vc->vc_cursor_type & 0x10);
- cursor.sx = vc->vc_x;
- cursor.sy = vc->vc_y;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/aio.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/aio.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/aio.c 2011-04-01 17:56:57.514710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/aio.c 2011-04-02 01:38:34.973688311 +0200
- @@ -512,7 +512,7 @@ static inline void really_put_req(struct
- ctx->reqs_active--;
- if (unlikely(!ctx->reqs_active && ctx->dead))
- - wake_up(&ctx->wait);
- + wake_up_all(&ctx->wait);
- }
- static void aio_fput_routine(struct work_struct *data)
- @@ -1233,7 +1233,7 @@ static void io_destroy(struct kioctx *io
- * by other CPUs at this point. Right now, we rely on the
- * locking done by the above calls to ensure this consistency.
- */
- - wake_up(&ioctx->wait);
- + wake_up_all(&ioctx->wait);
- put_ioctx(ioctx); /* once for the lookup */
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/block_dev.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/block_dev.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/block_dev.c 2011-04-01 17:56:57.441710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/block_dev.c 2011-04-02 01:37:43.656688352 +0200
- @@ -1217,9 +1217,9 @@ EXPORT_SYMBOL(open_by_devnum);
- * when a disk has been changed -- either by a media change or online
- * resize.
- */
- -static void flush_disk(struct block_device *bdev)
- +static void flush_disk(struct block_device *bdev, bool kill_dirty)
- {
- - if (__invalidate_device(bdev)) {
- + if (__invalidate_device(bdev, kill_dirty)) {
- char name[BDEVNAME_SIZE] = "";
- if (bdev->bd_disk)
- @@ -1256,7 +1256,7 @@ void check_disk_size_change(struct gendi
- "%s: detected capacity change from %lld to %lld\n",
- name, bdev_size, disk_size);
- i_size_write(bdev->bd_inode, disk_size);
- - flush_disk(bdev);
- + flush_disk(bdev, false);
- }
- }
- EXPORT_SYMBOL(check_disk_size_change);
- @@ -1308,7 +1308,7 @@ int check_disk_change(struct block_devic
- if (!bdops->media_changed(bdev->bd_disk))
- return 0;
- - flush_disk(bdev);
- + flush_disk(bdev, true);
- if (bdops->revalidate_disk)
- bdops->revalidate_disk(bdev->bd_disk);
- return 1;
- @@ -1776,7 +1776,7 @@ void close_bdev_exclusive(struct block_d
- EXPORT_SYMBOL(close_bdev_exclusive);
- -int __invalidate_device(struct block_device *bdev)
- +int __invalidate_device(struct block_device *bdev, bool kill_dirty)
- {
- struct super_block *sb = get_super(bdev);
- int res = 0;
- @@ -1789,7 +1789,7 @@ int __invalidate_device(struct block_dev
- * hold).
- */
- shrink_dcache_sb(sb);
- - res = invalidate_inodes(sb);
- + res = invalidate_inodes(sb, kill_dirty);
- drop_super(sb);
- }
- invalidate_bdev(bdev);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/btrfs/file.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/btrfs/file.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/btrfs/file.c 2011-04-01 17:57:39.341710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/btrfs/file.c 2011-04-02 01:37:43.697688353 +0200
- @@ -69,6 +69,19 @@ static noinline int btrfs_copy_from_user
- /* Flush processor's dcache for this page */
- flush_dcache_page(page);
- +
- + /*
- + * if we get a partial write, we can end up with
- + * partially up to date pages. These add
- + * a lot of complexity, so make sure they don't
- + * happen by forcing this copy to be retried.
- + *
- + * The rest of the btrfs_file_write code will fall
- + * back to page at a time copies after we return 0.
- + */
- + if (!PageUptodate(page) && copied < count)
- + copied = 0;
- +
- iov_iter_advance(i, copied);
- write_bytes -= copied;
- total_copied += copied;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/dcache.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/dcache.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/dcache.c 2011-04-01 17:56:57.442710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/dcache.c 2011-04-02 01:38:34.974688312 +0200
- @@ -1201,9 +1201,12 @@ struct dentry *d_obtain_alias(struct ino
- spin_unlock(&tmp->d_lock);
- spin_unlock(&dcache_lock);
- + security_d_instantiate(tmp, inode);
- return tmp;
- out_iput:
- + if (res && !IS_ERR(res))
- + security_d_instantiate(res, inode);
- iput(inode);
- return res;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/eventpoll.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/eventpoll.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/eventpoll.c 2011-04-01 17:56:57.521710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/eventpoll.c 2011-04-02 01:37:43.807688352 +0200
- @@ -63,6 +63,13 @@
- * cleanup path and it is also acquired by eventpoll_release_file()
- * if a file has been pushed inside an epoll set and it is then
- * close()d without a previous call toepoll_ctl(EPOLL_CTL_DEL).
- + * It is also acquired when inserting an epoll fd onto another epoll
- + * fd. We do this so that we walk the epoll tree and ensure that this
- + * insertion does not create a cycle of epoll file descriptors, which
- + * could lead to deadlock. We need a global mutex to prevent two
- + * simultaneous inserts (A into B and B into A) from racing and
- + * constructing a cycle without either insert observing that it is
- + * going to.
- * It is possible to drop the "ep->mtx" and to use the global
- * mutex "epmutex" (together with "ep->lock") to have it working,
- * but having "ep->mtx" will make the interface more scalable.
- @@ -224,6 +231,9 @@ static int max_user_watches __read_mostl
- */
- static DEFINE_MUTEX(epmutex);
- +/* Used to check for epoll file descriptor inclusion loops */
- +static struct nested_calls poll_loop_ncalls;
- +
- /* Used for safe wake up implementation */
- static struct nested_calls poll_safewake_ncalls;
- @@ -1195,6 +1205,62 @@ retry:
- return res;
- }
- +/**
- + * ep_loop_check_proc - Callback function to be passed to the @ep_call_nested()
- + * API, to verify that adding an epoll file inside another
- + * epoll structure, does not violate the constraints, in
- + * terms of closed loops, or too deep chains (which can
- + * result in excessive stack usage).
- + *
- + * @priv: Pointer to the epoll file to be currently checked.
- + * @cookie: Original cookie for this call. This is the top-of-the-chain epoll
- + * data structure pointer.
- + * @call_nests: Current dept of the @ep_call_nested() call stack.
- + *
- + * Returns: Returns zero if adding the epoll @file inside current epoll
- + * structure @ep does not violate the constraints, or -1 otherwise.
- + */
- +static int ep_loop_check_proc(void *priv, void *cookie, int call_nests)
- +{
- + int error = 0;
- + struct file *file = priv;
- + struct eventpoll *ep = file->private_data;
- + struct rb_node *rbp;
- + struct epitem *epi;
- +
- + mutex_lock(&ep->mtx);
- + for (rbp = rb_first(&ep->rbr); rbp; rbp = rb_next(rbp)) {
- + epi = rb_entry(rbp, struct epitem, rbn);
- + if (unlikely(is_file_epoll(epi->ffd.file))) {
- + error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS,
- + ep_loop_check_proc, epi->ffd.file,
- + epi->ffd.file->private_data, current);
- + if (error != 0)
- + break;
- + }
- + }
- + mutex_unlock(&ep->mtx);
- +
- + return error;
- +}
- +
- +/**
- + * ep_loop_check - Performs a check to verify that adding an epoll file (@file)
- + * another epoll file (represented by @ep) does not create
- + * closed loops or too deep chains.
- + *
- + * @ep: Pointer to the epoll private data structure.
- + * @file: Pointer to the epoll file to be checked.
- + *
- + * Returns: Returns zero if adding the epoll @file inside current epoll
- + * structure @ep does not violate the constraints, or -1 otherwise.
- + */
- +static int ep_loop_check(struct eventpoll *ep, struct file *file)
- +{
- + return ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS,
- + ep_loop_check_proc, file, ep, current);
- +}
- +
- /*
- * Open an eventpoll file descriptor.
- */
- @@ -1243,6 +1309,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, in
- struct epoll_event __user *, event)
- {
- int error;
- + int did_lock_epmutex = 0;
- struct file *file, *tfile;
- struct eventpoll *ep;
- struct epitem *epi;
- @@ -1284,6 +1351,25 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, in
- */
- ep = file->private_data;
- + /*
- + * When we insert an epoll file descriptor, inside another epoll file
- + * descriptor, there is the change of creating closed loops, which are
- + * better be handled here, than in more critical paths.
- + *
- + * We hold epmutex across the loop check and the insert in this case, in
- + * order to prevent two separate inserts from racing and each doing the
- + * insert "at the same time" such that ep_loop_check passes on both
- + * before either one does the insert, thereby creating a cycle.
- + */
- + if (unlikely(is_file_epoll(tfile) && op == EPOLL_CTL_ADD)) {
- + mutex_lock(&epmutex);
- + did_lock_epmutex = 1;
- + error = -ELOOP;
- + if (ep_loop_check(ep, tfile) != 0)
- + goto error_tgt_fput;
- + }
- +
- +
- mutex_lock(&ep->mtx);
- /*
- @@ -1319,6 +1405,9 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, in
- mutex_unlock(&ep->mtx);
- error_tgt_fput:
- + if (unlikely(did_lock_epmutex))
- + mutex_unlock(&epmutex);
- +
- fput(tfile);
- error_fput:
- fput(file);
- @@ -1437,6 +1526,12 @@ static int __init eventpoll_init(void)
- max_user_watches = (((si.totalram - si.totalhigh) / 25) << PAGE_SHIFT) /
- EP_ITEM_COST;
- + /*
- + * Initialize the structure used to perform epoll file descriptor
- + * inclusion loops checks.
- + */
- + ep_nested_calls_init(&poll_loop_ncalls);
- +
- /* Initialize the structure used to perform safe poll wait head wake ups */
- ep_nested_calls_init(&poll_safewake_ncalls);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext2/namei.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext2/namei.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext2/namei.c 2011-04-01 17:57:39.347710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext2/namei.c 2011-04-02 01:37:43.714688353 +0200
- @@ -344,7 +344,6 @@ static int ext2_rename (struct inode * o
- new_de = ext2_find_entry (new_dir, &new_dentry->d_name, &new_page);
- if (!new_de)
- goto out_dir;
- - inode_inc_link_count(old_inode);
- ext2_set_link(new_dir, new_de, new_page, old_inode, 1);
- new_inode->i_ctime = CURRENT_TIME_SEC;
- if (dir_de)
- @@ -356,12 +355,9 @@ static int ext2_rename (struct inode * o
- if (new_dir->i_nlink >= EXT2_LINK_MAX)
- goto out_dir;
- }
- - inode_inc_link_count(old_inode);
- err = ext2_add_link(new_dentry, old_inode);
- - if (err) {
- - inode_dec_link_count(old_inode);
- + if (err)
- goto out_dir;
- - }
- if (dir_de)
- inode_inc_link_count(new_dir);
- }
- @@ -369,12 +365,11 @@ static int ext2_rename (struct inode * o
- /*
- * Like most other Unix systems, set the ctime for inodes on a
- * rename.
- - * inode_dec_link_count() will mark the inode dirty.
- */
- old_inode->i_ctime = CURRENT_TIME_SEC;
- + mark_inode_dirty(old_inode);
- ext2_delete_entry (old_de, old_page);
- - inode_dec_link_count(old_inode);
- if (dir_de) {
- if (old_dir != new_dir)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext3/namei.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext3/namei.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext3/namei.c 2011-04-01 17:57:39.348710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext3/namei.c 2011-04-02 01:37:43.666688352 +0200
- @@ -1549,8 +1549,8 @@ static int ext3_dx_add_entry(handle_t *h
- goto cleanup;
- node2 = (struct dx_node *)(bh2->b_data);
- entries2 = node2->entries;
- + memset(&node2->fake, 0, sizeof(struct fake_dirent));
- node2->fake.rec_len = ext3_rec_len_to_disk(sb->s_blocksize);
- - node2->fake.inode = 0;
- BUFFER_TRACE(frame->bh, "get_write_access");
- err = ext3_journal_get_write_access(handle, frame->bh);
- if (err)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext3/super.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext3/super.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext3/super.c 2011-04-01 17:57:39.349710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext3/super.c 2011-04-02 01:38:34.974688312 +0200
- @@ -1442,6 +1442,13 @@ static void ext3_orphan_cleanup (struct
- return;
- }
- + /* Check if feature set allows readwrite operations */
- + if (EXT3_HAS_RO_COMPAT_FEATURE(sb, ~EXT3_FEATURE_RO_COMPAT_SUPP)) {
- + ext3_msg(sb, KERN_INFO, "Skipping orphan cleanup due to "
- + "unknown ROCOMPAT features");
- + return;
- + }
- +
- if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) {
- if (es->s_last_orphan)
- jbd_debug(1, "Errors on filesystem, "
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext4/super.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext4/super.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext4/super.c 2011-04-01 17:57:39.361710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ext4/super.c 2011-04-02 01:38:34.975688312 +0200
- @@ -76,6 +76,7 @@ static void ext4_write_super(struct supe
- static int ext4_freeze(struct super_block *sb);
- static struct dentry *ext4_mount(struct file_system_type *fs_type, int flags,
- const char *dev_name, void *data);
- +static int ext4_feature_set_ok(struct super_block *sb, int readonly);
- static void ext4_destroy_lazyinit_thread(void);
- static void ext4_unregister_li_request(struct super_block *sb);
- static void ext4_clear_request_list(void);
- @@ -2124,6 +2125,13 @@ static void ext4_orphan_cleanup(struct s
- return;
- }
- + /* Check if feature set would not allow a r/w mount */
- + if (!ext4_feature_set_ok(sb, 0)) {
- + ext4_msg(sb, KERN_INFO, "Skipping orphan cleanup due to "
- + "unknown ROCOMPAT features");
- + return;
- + }
- +
- if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) {
- if (es->s_last_orphan)
- jbd_debug(1, "Errors on filesystem, "
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/fuse/file.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/fuse/file.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/fuse/file.c 2011-04-01 17:56:57.485710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/fuse/file.c 2011-04-02 01:37:43.712688353 +0200
- @@ -86,18 +86,52 @@ struct fuse_file *fuse_file_get(struct f
- return ff;
- }
- +static void fuse_release_async(struct work_struct *work)
- +{
- + struct fuse_req *req;
- + struct fuse_conn *fc;
- + struct path path;
- +
- + req = container_of(work, struct fuse_req, misc.release.work);
- + path = req->misc.release.path;
- + fc = get_fuse_conn(path.dentry->d_inode);
- +
- + fuse_put_request(fc, req);
- + path_put(&path);
- +}
- +
- static void fuse_release_end(struct fuse_conn *fc, struct fuse_req *req)
- {
- - path_put(&req->misc.release.path);
- + if (fc->destroy_req) {
- + /*
- + * If this is a fuseblk mount, then it's possible that
- + * releasing the path will result in releasing the
- + * super block and sending the DESTROY request. If
- + * the server is single threaded, this would hang.
- + * For this reason do the path_put() in a separate
- + * thread.
- + */
- + atomic_inc(&req->count);
- + INIT_WORK(&req->misc.release.work, fuse_release_async);
- + schedule_work(&req->misc.release.work);
- + } else {
- + path_put(&req->misc.release.path);
- + }
- }
- -static void fuse_file_put(struct fuse_file *ff)
- +static void fuse_file_put(struct fuse_file *ff, bool sync)
- {
- if (atomic_dec_and_test(&ff->count)) {
- struct fuse_req *req = ff->reserved_req;
- - req->end = fuse_release_end;
- - fuse_request_send_background(ff->fc, req);
- + if (sync) {
- + fuse_request_send(ff->fc, req);
- + path_put(&req->misc.release.path);
- + fuse_put_request(ff->fc, req);
- + } else {
- + req->end = fuse_release_end;
- + fuse_request_send_background(ff->fc, req);
- + }
- kfree(ff);
- }
- }
- @@ -219,8 +253,12 @@ void fuse_release_common(struct file *fi
- * Normally this will send the RELEASE request, however if
- * some asynchronous READ or WRITE requests are outstanding,
- * the sending will be delayed.
- + *
- + * Make the release synchronous if this is a fuseblk mount,
- + * synchronous RELEASE is allowed (and desirable) in this case
- + * because the server can be trusted not to screw up.
- */
- - fuse_file_put(ff);
- + fuse_file_put(ff, ff->fc->destroy_req != NULL);
- }
- static int fuse_open(struct inode *inode, struct file *file)
- @@ -558,7 +596,7 @@ static void fuse_readpages_end(struct fu
- page_cache_release(page);
- }
- if (req->ff)
- - fuse_file_put(req->ff);
- + fuse_file_put(req->ff, false);
- }
- static void fuse_send_readpages(struct fuse_req *req, struct file *file)
- @@ -1137,7 +1175,7 @@ static ssize_t fuse_direct_write(struct
- static void fuse_writepage_free(struct fuse_conn *fc, struct fuse_req *req)
- {
- __free_page(req->pages[0]);
- - fuse_file_put(req->ff);
- + fuse_file_put(req->ff, false);
- }
- static void fuse_writepage_finish(struct fuse_conn *fc, struct fuse_req *req)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/fuse/fuse_i.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/fuse/fuse_i.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/fuse/fuse_i.h 2011-04-01 17:56:57.485710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/fuse/fuse_i.h 2011-04-02 01:37:43.712688353 +0200
- @@ -21,6 +21,7 @@
- #include <linux/rwsem.h>
- #include <linux/rbtree.h>
- #include <linux/poll.h>
- +#include <linux/workqueue.h>
- /** Max number of pages that can be used in a single read request */
- #define FUSE_MAX_PAGES_PER_REQ 32
- @@ -257,7 +258,10 @@ struct fuse_req {
- union {
- struct fuse_forget_in forget_in;
- struct {
- - struct fuse_release_in in;
- + union {
- + struct fuse_release_in in;
- + struct work_struct work;
- + };
- struct path path;
- } release;
- struct fuse_init_in init_in;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/inode.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/inode.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/inode.c 2011-04-01 18:06:10.777710241 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/inode.c 2011-04-02 01:37:43.656688352 +0200
- @@ -525,11 +525,14 @@ void evict_inodes(struct super_block *sb
- /**
- * invalidate_inodes - attempt to free all inodes on a superblock
- * @sb: superblock to operate on
- + * @kill_dirty: flag to guide handling of dirty inodes
- *
- * Attempts to free all inodes for a given superblock. If there were any
- * busy inodes return a non-zero value, else zero.
- + * If @kill_dirty is set, discard dirty inodes too, otherwise treat
- + * them as busy.
- */
- -int invalidate_inodes(struct super_block *sb)
- +int invalidate_inodes(struct super_block *sb, bool kill_dirty)
- {
- int busy = 0;
- struct inode *inode, *next;
- @@ -541,6 +544,10 @@ int invalidate_inodes(struct super_block
- list_for_each_entry_safe(inode, next, &sb->s_inodes, i_sb_list) {
- if (inode->i_state & (I_NEW | I_FREEING | I_WILL_FREE))
- continue;
- + if (inode->i_state & I_DIRTY && !kill_dirty) {
- + busy = 1;
- + continue;
- + }
- if (atomic_read(&inode->i_count)) {
- busy = 1;
- continue;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/internal.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/internal.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/internal.h 2011-04-01 17:57:39.364710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/internal.h 2011-04-02 01:37:43.655688352 +0200
- @@ -107,7 +107,7 @@ extern void release_open_intent(struct n
- */
- extern int get_nr_dirty_inodes(void);
- extern void evict_inodes(struct super_block *);
- -extern int invalidate_inodes(struct super_block *);
- +extern int invalidate_inodes(struct super_block *, bool);
- /*
- * fs-writeback.c
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs2xdr.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs2xdr.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs2xdr.c 2011-04-01 17:56:57.502710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs2xdr.c 2011-04-02 01:37:43.744688352 +0200
- @@ -477,11 +477,13 @@ nfs_decode_dirent(struct xdr_stream *xdr
- entry->ino = ntohl(*p++);
- entry->len = ntohl(*p++);
- - p = xdr_inline_decode(xdr, entry->len + 4);
- + p = xdr_inline_decode(xdr, entry->len);
- if (unlikely(!p))
- goto out_overflow;
- entry->name = (const char *) p;
- - p += XDR_QUADLEN(entry->len);
- + p = xdr_inline_decode(xdr, 4);
- + if (unlikely(!p))
- + goto out_overflow;
- entry->prev_cookie = entry->cookie;
- entry->cookie = ntohl(*p++);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs3xdr.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs3xdr.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs3xdr.c 2011-04-01 17:56:57.502710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs3xdr.c 2011-04-02 01:37:43.744688353 +0200
- @@ -614,11 +614,13 @@ nfs3_decode_dirent(struct xdr_stream *xd
- p = xdr_decode_hyper(p, &entry->ino);
- entry->len = ntohl(*p++);
- - p = xdr_inline_decode(xdr, entry->len + 8);
- + p = xdr_inline_decode(xdr, entry->len);
- if (unlikely(!p))
- goto out_overflow;
- entry->name = (const char *) p;
- - p += XDR_QUADLEN(entry->len);
- + p = xdr_inline_decode(xdr, 8);
- + if (unlikely(!p))
- + goto out_overflow;
- entry->prev_cookie = entry->cookie;
- p = xdr_decode_hyper(p, &entry->cookie);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs4proc.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs4proc.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs4proc.c 2011-04-01 17:56:57.502710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs4proc.c 2011-04-02 01:37:43.734688352 +0200
- @@ -49,6 +49,7 @@
- #include <linux/mount.h>
- #include <linux/module.h>
- #include <linux/sunrpc/bc_xprt.h>
- +#include <linux/mm.h>
- #include "nfs4_fs.h"
- #include "delegation.h"
- @@ -3216,6 +3217,35 @@ static void buf_to_pages(const void *buf
- }
- }
- +static int buf_to_pages_noslab(const void *buf, size_t buflen,
- + struct page **pages, unsigned int *pgbase)
- +{
- + struct page *newpage, **spages;
- + int rc = 0;
- + size_t len;
- + spages = pages;
- +
- + do {
- + len = min_t(size_t, PAGE_CACHE_SIZE, buflen);
- + newpage = alloc_page(GFP_KERNEL);
- +
- + if (newpage == NULL)
- + goto unwind;
- + memcpy(page_address(newpage), buf, len);
- + buf += len;
- + buflen -= len;
- + *pages++ = newpage;
- + rc++;
- + } while (buflen != 0);
- +
- + return rc;
- +
- +unwind:
- + for(; rc > 0; rc--)
- + __free_page(spages[rc-1]);
- + return -ENOMEM;
- +}
- +
- struct nfs4_cached_acl {
- int cached;
- size_t len;
- @@ -3384,13 +3414,23 @@ static int __nfs4_proc_set_acl(struct in
- .rpc_argp = &arg,
- .rpc_resp = &res,
- };
- - int ret;
- + int ret, i;
- if (!nfs4_server_supports_acls(server))
- return -EOPNOTSUPP;
- + i = buf_to_pages_noslab(buf, buflen, arg.acl_pages, &arg.acl_pgbase);
- + if (i < 0)
- + return i;
- nfs_inode_return_delegation(inode);
- - buf_to_pages(buf, buflen, arg.acl_pages, &arg.acl_pgbase);
- ret = nfs4_call_sync(server, &msg, &arg, &res, 1);
- +
- + /*
- + * Free each page after tx, so the only ref left is
- + * held by the network stack
- + */
- + for (; i > 0; i--)
- + put_page(pages[i-1]);
- +
- /*
- * Acl update can result in inode attribute update.
- * so mark the attribute cache invalid.
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs4xdr.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs4xdr.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs4xdr.c 2011-04-01 17:56:57.503710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfs4xdr.c 2011-04-02 01:37:43.744688353 +0200
- @@ -6212,9 +6212,6 @@ __be32 *nfs4_decode_dirent(struct xdr_st
- if (entry->fattr->valid & NFS_ATTR_FATTR_TYPE)
- entry->d_type = nfs_umode_to_dtype(entry->fattr->mode);
- - if (verify_attr_len(xdr, p, len) < 0)
- - goto out_overflow;
- -
- return p;
- out_overflow:
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfsroot.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfsroot.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfsroot.c 2011-04-01 17:56:57.503710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/nfsroot.c 2011-04-02 01:37:43.744688353 +0200
- @@ -86,11 +86,14 @@
- /* Default path we try to mount. "%s" gets replaced by our IP address */
- #define NFS_ROOT "/tftpboot/%s"
- +/* Default NFSROOT mount options. */
- +#define NFS_DEF_OPTIONS "udp"
- +
- /* Parameters passed from the kernel command line */
- static char nfs_root_parms[256] __initdata = "";
- /* Text-based mount options passed to super.c */
- -static char nfs_root_options[256] __initdata = "";
- +static char nfs_root_options[256] __initdata = NFS_DEF_OPTIONS;
- /* Address of NFS server */
- static __be32 servaddr __initdata = htonl(INADDR_NONE);
- @@ -160,8 +163,14 @@ static int __init root_nfs_copy(char *de
- }
- static int __init root_nfs_cat(char *dest, const char *src,
- - const size_t destlen)
- + const size_t destlen)
- {
- + size_t len = strlen(dest);
- +
- + if (len && dest[len - 1] != ',')
- + if (strlcat(dest, ",", destlen) > destlen)
- + return -1;
- +
- if (strlcat(dest, src, destlen) > destlen)
- return -1;
- return 0;
- @@ -194,16 +203,6 @@ static int __init root_nfs_parse_options
- if (root_nfs_cat(nfs_root_options, incoming,
- sizeof(nfs_root_options)))
- return -1;
- -
- - /*
- - * Possibly prepare for more options to be appended
- - */
- - if (nfs_root_options[0] != '\0' &&
- - nfs_root_options[strlen(nfs_root_options)] != ',')
- - if (root_nfs_cat(nfs_root_options, ",",
- - sizeof(nfs_root_options)))
- - return -1;
- -
- return 0;
- }
- @@ -217,7 +216,7 @@ static int __init root_nfs_parse_options
- */
- static int __init root_nfs_data(char *cmdline)
- {
- - char addr_option[sizeof("nolock,addr=") + INET_ADDRSTRLEN + 1];
- + char mand_options[sizeof("nolock,addr=") + INET_ADDRSTRLEN + 1];
- int len, retval = -1;
- char *tmp = NULL;
- const size_t tmplen = sizeof(nfs_export_path);
- @@ -244,9 +243,9 @@ static int __init root_nfs_data(char *cm
- * Append mandatory options for nfsroot so they override
- * what has come before
- */
- - snprintf(addr_option, sizeof(addr_option), "nolock,addr=%pI4",
- + snprintf(mand_options, sizeof(mand_options), "nolock,addr=%pI4",
- &servaddr);
- - if (root_nfs_cat(nfs_root_options, addr_option,
- + if (root_nfs_cat(nfs_root_options, mand_options,
- sizeof(nfs_root_options)))
- goto out_optionstoolong;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/write.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/write.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/write.c 2011-04-01 17:57:39.370710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfs/write.c 2011-04-02 01:38:34.975688312 +0200
- @@ -1277,13 +1277,17 @@ int nfs_writeback_done(struct rpc_task *
- #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
- static int nfs_commit_set_lock(struct nfs_inode *nfsi, int may_wait)
- {
- + int ret;
- +
- if (!test_and_set_bit(NFS_INO_COMMIT, &nfsi->flags))
- return 1;
- - if (may_wait && !out_of_line_wait_on_bit_lock(&nfsi->flags,
- - NFS_INO_COMMIT, nfs_wait_bit_killable,
- - TASK_KILLABLE))
- - return 1;
- - return 0;
- + if (!may_wait)
- + return 0;
- + ret = out_of_line_wait_on_bit_lock(&nfsi->flags,
- + NFS_INO_COMMIT,
- + nfs_wait_bit_killable,
- + TASK_KILLABLE);
- + return (ret < 0) ? ret : 1;
- }
- static void nfs_commit_clear_lock(struct nfs_inode *nfsi)
- @@ -1463,9 +1467,10 @@ int nfs_commit_inode(struct inode *inode
- pgoff_t first_index;
- pgoff_t last_index;
- int may_wait = how & FLUSH_SYNC;
- - int res = 0;
- + int res;
- - if (!nfs_commit_set_lock(NFS_I(inode), may_wait))
- + res = nfs_commit_set_lock(NFS_I(inode), may_wait);
- + if (res <= 0)
- goto out_mark_dirty;
- spin_lock(&inode->i_lock);
- res = nfs_scan_commit(inode, &head, 0, 0);
- @@ -1479,12 +1484,14 @@ int nfs_commit_inode(struct inode *inode
- last_index - first_index + 1);
- if (error < 0)
- return error;
- - if (may_wait)
- - wait_on_bit(&NFS_I(inode)->flags, NFS_INO_COMMIT,
- - nfs_wait_bit_killable,
- - TASK_KILLABLE);
- - else
- + if (!may_wait)
- goto out_mark_dirty;
- + error = wait_on_bit(&NFS_I(inode)->flags,
- + NFS_INO_COMMIT,
- + nfs_wait_bit_killable,
- + TASK_KILLABLE);
- + if (error < 0)
- + return error;
- } else
- nfs_commit_clear_lock(NFS_I(inode));
- return res;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4proc.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4proc.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4proc.c 2011-04-01 17:56:57.483710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4proc.c 2011-04-02 01:38:34.976688311 +0200
- @@ -954,8 +954,8 @@ typedef __be32(*nfsd4op_func)(struct svc
- void *);
- enum nfsd4_op_flags {
- ALLOWED_WITHOUT_FH = 1 << 0, /* No current filehandle required */
- - ALLOWED_ON_ABSENT_FS = 2 << 0, /* ops processed on absent fs */
- - ALLOWED_AS_FIRST_OP = 3 << 0, /* ops reqired first in compound */
- + ALLOWED_ON_ABSENT_FS = 1 << 1, /* ops processed on absent fs */
- + ALLOWED_AS_FIRST_OP = 1 << 2, /* ops reqired first in compound */
- };
- struct nfsd4_operation {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4state.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4state.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4state.c 2011-04-01 17:56:57.483710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4state.c 2011-04-02 01:38:34.978688310 +0200
- @@ -327,64 +327,6 @@ static struct list_head unconf_id_hashtb
- static struct list_head client_lru;
- static struct list_head close_lru;
- -static void unhash_generic_stateid(struct nfs4_stateid *stp)
- -{
- - list_del(&stp->st_hash);
- - list_del(&stp->st_perfile);
- - list_del(&stp->st_perstateowner);
- -}
- -
- -static void free_generic_stateid(struct nfs4_stateid *stp)
- -{
- - put_nfs4_file(stp->st_file);
- - kmem_cache_free(stateid_slab, stp);
- -}
- -
- -static void release_lock_stateid(struct nfs4_stateid *stp)
- -{
- - struct file *file;
- -
- - unhash_generic_stateid(stp);
- - file = find_any_file(stp->st_file);
- - if (file)
- - locks_remove_posix(file, (fl_owner_t)stp->st_stateowner);
- - free_generic_stateid(stp);
- -}
- -
- -static void unhash_lockowner(struct nfs4_stateowner *sop)
- -{
- - struct nfs4_stateid *stp;
- -
- - list_del(&sop->so_idhash);
- - list_del(&sop->so_strhash);
- - list_del(&sop->so_perstateid);
- - while (!list_empty(&sop->so_stateids)) {
- - stp = list_first_entry(&sop->so_stateids,
- - struct nfs4_stateid, st_perstateowner);
- - release_lock_stateid(stp);
- - }
- -}
- -
- -static void release_lockowner(struct nfs4_stateowner *sop)
- -{
- - unhash_lockowner(sop);
- - nfs4_put_stateowner(sop);
- -}
- -
- -static void
- -release_stateid_lockowners(struct nfs4_stateid *open_stp)
- -{
- - struct nfs4_stateowner *lock_sop;
- -
- - while (!list_empty(&open_stp->st_lockowners)) {
- - lock_sop = list_entry(open_stp->st_lockowners.next,
- - struct nfs4_stateowner, so_perstateid);
- - /* list_del(&open_stp->st_lockowners); */
- - BUG_ON(lock_sop->so_is_open_owner);
- - release_lockowner(lock_sop);
- - }
- -}
- -
- /*
- * We store the NONE, READ, WRITE, and BOTH bits separately in the
- * st_{access,deny}_bmap field of the stateid, in order to track not
- @@ -457,13 +399,71 @@ static int nfs4_access_bmap_to_omode(str
- return nfs4_access_to_omode(access);
- }
- -static void release_open_stateid(struct nfs4_stateid *stp)
- +static void unhash_generic_stateid(struct nfs4_stateid *stp)
- +{
- + list_del(&stp->st_hash);
- + list_del(&stp->st_perfile);
- + list_del(&stp->st_perstateowner);
- +}
- +
- +static void free_generic_stateid(struct nfs4_stateid *stp)
- {
- int oflag = nfs4_access_bmap_to_omode(stp);
- + nfs4_file_put_access(stp->st_file, oflag);
- + put_nfs4_file(stp->st_file);
- + kmem_cache_free(stateid_slab, stp);
- +}
- +
- +static void release_lock_stateid(struct nfs4_stateid *stp)
- +{
- + struct file *file;
- +
- + unhash_generic_stateid(stp);
- + file = find_any_file(stp->st_file);
- + if (file)
- + locks_remove_posix(file, (fl_owner_t)stp->st_stateowner);
- + free_generic_stateid(stp);
- +}
- +
- +static void unhash_lockowner(struct nfs4_stateowner *sop)
- +{
- + struct nfs4_stateid *stp;
- +
- + list_del(&sop->so_idhash);
- + list_del(&sop->so_strhash);
- + list_del(&sop->so_perstateid);
- + while (!list_empty(&sop->so_stateids)) {
- + stp = list_first_entry(&sop->so_stateids,
- + struct nfs4_stateid, st_perstateowner);
- + release_lock_stateid(stp);
- + }
- +}
- +
- +static void release_lockowner(struct nfs4_stateowner *sop)
- +{
- + unhash_lockowner(sop);
- + nfs4_put_stateowner(sop);
- +}
- +
- +static void
- +release_stateid_lockowners(struct nfs4_stateid *open_stp)
- +{
- + struct nfs4_stateowner *lock_sop;
- +
- + while (!list_empty(&open_stp->st_lockowners)) {
- + lock_sop = list_entry(open_stp->st_lockowners.next,
- + struct nfs4_stateowner, so_perstateid);
- + /* list_del(&open_stp->st_lockowners); */
- + BUG_ON(lock_sop->so_is_open_owner);
- + release_lockowner(lock_sop);
- + }
- +}
- +
- +static void release_open_stateid(struct nfs4_stateid *stp)
- +{
- unhash_generic_stateid(stp);
- release_stateid_lockowners(stp);
- - nfs4_file_put_access(stp->st_file, oflag);
- free_generic_stateid(stp);
- }
- @@ -3661,6 +3661,7 @@ alloc_init_lock_stateid(struct nfs4_stat
- stp->st_stateid.si_stateownerid = sop->so_id;
- stp->st_stateid.si_fileid = fp->fi_id;
- stp->st_stateid.si_generation = 0;
- + stp->st_access_bmap = 0;
- stp->st_deny_bmap = open_stp->st_deny_bmap;
- stp->st_openstp = open_stp;
- @@ -3675,6 +3676,17 @@ check_lock_length(u64 offset, u64 length
- LOFF_OVERFLOW(offset, length)));
- }
- +static void get_lock_access(struct nfs4_stateid *lock_stp, u32 access)
- +{
- + struct nfs4_file *fp = lock_stp->st_file;
- + int oflag = nfs4_access_to_omode(access);
- +
- + if (test_bit(access, &lock_stp->st_access_bmap))
- + return;
- + nfs4_file_get_access(fp, oflag);
- + __set_bit(access, &lock_stp->st_access_bmap);
- +}
- +
- /*
- * LOCK operation
- */
- @@ -3691,7 +3703,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struc
- struct file_lock conflock;
- __be32 status = 0;
- unsigned int strhashval;
- - unsigned int cmd;
- int err;
- dprintk("NFSD: nfsd4_lock: start=%Ld length=%Ld\n",
- @@ -3773,22 +3784,18 @@ nfsd4_lock(struct svc_rqst *rqstp, struc
- switch (lock->lk_type) {
- case NFS4_READ_LT:
- case NFS4_READW_LT:
- - if (find_readable_file(lock_stp->st_file)) {
- - nfs4_get_vfs_file(rqstp, fp, &cstate->current_fh, NFS4_SHARE_ACCESS_READ);
- - filp = find_readable_file(lock_stp->st_file);
- - }
- + filp = find_readable_file(lock_stp->st_file);
- + if (filp)
- + get_lock_access(lock_stp, NFS4_SHARE_ACCESS_READ);
- file_lock.fl_type = F_RDLCK;
- - cmd = F_SETLK;
- - break;
- + break;
- case NFS4_WRITE_LT:
- case NFS4_WRITEW_LT:
- - if (find_writeable_file(lock_stp->st_file)) {
- - nfs4_get_vfs_file(rqstp, fp, &cstate->current_fh, NFS4_SHARE_ACCESS_WRITE);
- - filp = find_writeable_file(lock_stp->st_file);
- - }
- + filp = find_writeable_file(lock_stp->st_file);
- + if (filp)
- + get_lock_access(lock_stp, NFS4_SHARE_ACCESS_WRITE);
- file_lock.fl_type = F_WRLCK;
- - cmd = F_SETLK;
- - break;
- + break;
- default:
- status = nfserr_inval;
- goto out;
- @@ -3812,7 +3819,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struc
- * Note: locks.c uses the BKL to protect the inode's lock list.
- */
- - err = vfs_lock_file(filp, cmd, &file_lock, &conflock);
- + err = vfs_lock_file(filp, F_SETLK, &file_lock, &conflock);
- switch (-err) {
- case 0: /* success! */
- update_stateid(&lock_stp->st_stateid);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4xdr.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4xdr.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4xdr.c 2011-04-01 17:56:57.484710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nfsd/nfs4xdr.c 2011-04-02 01:38:34.978688311 +0200
- @@ -1180,8 +1180,6 @@ nfsd4_decode_create_session(struct nfsd4
- READ_BUF(4);
- READ32(dummy);
- READ_BUF(dummy * 4);
- - for (i = 0; i < dummy; ++i)
- - READ32(dummy);
- break;
- case RPC_AUTH_GSS:
- dprintk("RPC_AUTH_GSS callback secflavor "
- @@ -1197,7 +1195,6 @@ nfsd4_decode_create_session(struct nfsd4
- READ_BUF(4);
- READ32(dummy);
- READ_BUF(dummy);
- - p += XDR_QUADLEN(dummy);
- break;
- default:
- dprintk("Illegal callback secflavor\n");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nilfs2/segment.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nilfs2/segment.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nilfs2/segment.c 2011-04-01 17:56:57.485710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/nilfs2/segment.c 2011-04-02 01:37:43.713688353 +0200
- @@ -430,7 +430,8 @@ static void nilfs_segctor_begin_finfo(st
- nilfs_segctor_map_segsum_entry(
- sci, &sci->sc_binfo_ptr, sizeof(struct nilfs_finfo));
- - if (inode->i_sb && !test_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags))
- + if (NILFS_I(inode)->i_root &&
- + !test_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags))
- set_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags);
- /* skip finfo */
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ocfs2/refcounttree.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ocfs2/refcounttree.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ocfs2/refcounttree.c 2011-04-01 17:56:57.431710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ocfs2/refcounttree.c 2011-04-02 01:37:43.649688352 +0200
- @@ -3228,7 +3228,7 @@ static int ocfs2_make_clusters_writable(
- u32 num_clusters, unsigned int e_flags)
- {
- int ret, delete, index, credits = 0;
- - u32 new_bit, new_len;
- + u32 new_bit, new_len, orig_num_clusters;
- unsigned int set_len;
- struct ocfs2_super *osb = OCFS2_SB(sb);
- handle_t *handle;
- @@ -3261,6 +3261,8 @@ static int ocfs2_make_clusters_writable(
- goto out;
- }
- + orig_num_clusters = num_clusters;
- +
- while (num_clusters) {
- ret = ocfs2_get_refcount_rec(ref_ci, context->ref_root_bh,
- p_cluster, num_clusters,
- @@ -3348,7 +3350,8 @@ static int ocfs2_make_clusters_writable(
- * in write-back mode.
- */
- if (context->get_clusters == ocfs2_di_get_clusters) {
- - ret = ocfs2_cow_sync_writeback(sb, context, cpos, num_clusters);
- + ret = ocfs2_cow_sync_writeback(sb, context, cpos,
- + orig_num_clusters);
- if (ret)
- mlog_errno(ret);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ocfs2/super.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ocfs2/super.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ocfs2/super.c 2011-04-01 17:57:39.372710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/ocfs2/super.c 2011-04-02 01:37:43.650688352 +0200
- @@ -1311,7 +1311,7 @@ static int ocfs2_parse_options(struct su
- struct mount_options *mopt,
- int is_remount)
- {
- - int status;
- + int status, user_stack = 0;
- char *p;
- u32 tmp;
- @@ -1454,6 +1454,15 @@ static int ocfs2_parse_options(struct su
- memcpy(mopt->cluster_stack, args[0].from,
- OCFS2_STACK_LABEL_LEN);
- mopt->cluster_stack[OCFS2_STACK_LABEL_LEN] = '\0';
- + /*
- + * Open code the memcmp here as we don't have
- + * an osb to pass to
- + * ocfs2_userspace_stack().
- + */
- + if (memcmp(mopt->cluster_stack,
- + OCFS2_CLASSIC_CLUSTER_STACK,
- + OCFS2_STACK_LABEL_LEN))
- + user_stack = 1;
- break;
- case Opt_inode64:
- mopt->mount_opt |= OCFS2_MOUNT_INODE64;
- @@ -1509,13 +1518,16 @@ static int ocfs2_parse_options(struct su
- }
- }
- - /* Ensure only one heartbeat mode */
- - tmp = mopt->mount_opt & (OCFS2_MOUNT_HB_LOCAL | OCFS2_MOUNT_HB_GLOBAL |
- - OCFS2_MOUNT_HB_NONE);
- - if (hweight32(tmp) != 1) {
- - mlog(ML_ERROR, "Invalid heartbeat mount options\n");
- - status = 0;
- - goto bail;
- + if (user_stack == 0) {
- + /* Ensure only one heartbeat mode */
- + tmp = mopt->mount_opt & (OCFS2_MOUNT_HB_LOCAL |
- + OCFS2_MOUNT_HB_GLOBAL |
- + OCFS2_MOUNT_HB_NONE);
- + if (hweight32(tmp) != 1) {
- + mlog(ML_ERROR, "Invalid heartbeat mount options\n");
- + status = 0;
- + goto bail;
- + }
- }
- status = 1;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/partitions/ldm.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/partitions/ldm.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/partitions/ldm.c 2011-04-01 17:56:57.504710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/partitions/ldm.c 2011-04-02 01:37:43.748688353 +0200
- @@ -251,6 +251,11 @@ static bool ldm_parse_vmdb (const u8 *da
- }
- vm->vblk_size = get_unaligned_be32(data + 0x08);
- + if (vm->vblk_size == 0) {
- + ldm_error ("Illegal VBLK size");
- + return false;
- + }
- +
- vm->vblk_offset = get_unaligned_be32(data + 0x0C);
- vm->last_vblk_seq = get_unaligned_be32(data + 0x04);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/partitions/osf.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/partitions/osf.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/partitions/osf.c 2011-04-01 17:56:57.504710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/partitions/osf.c 2011-04-02 01:37:43.748688353 +0200
- @@ -10,10 +10,13 @@
- #include "check.h"
- #include "osf.h"
- +#define MAX_OSF_PARTITIONS 18
- +
- int osf_partition(struct parsed_partitions *state)
- {
- int i;
- int slot = 1;
- + unsigned int npartitions;
- Sector sect;
- unsigned char *data;
- struct disklabel {
- @@ -45,7 +48,7 @@ int osf_partition(struct parsed_partitio
- u8 p_fstype;
- u8 p_frag;
- __le16 p_cpg;
- - } d_partitions[8];
- + } d_partitions[MAX_OSF_PARTITIONS];
- } * label;
- struct d_partition * partition;
- @@ -63,7 +66,12 @@ int osf_partition(struct parsed_partitio
- put_dev_sector(sect);
- return 0;
- }
- - for (i = 0 ; i < le16_to_cpu(label->d_npartitions); i++, partition++) {
- + npartitions = le16_to_cpu(label->d_npartitions);
- + if (npartitions > MAX_OSF_PARTITIONS) {
- + put_dev_sector(sect);
- + return 0;
- + }
- + for (i = 0 ; i < npartitions; i++, partition++) {
- if (slot == state->limit)
- break;
- if (le32_to_cpu(partition->p_size))
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/proc/array.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/proc/array.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/proc/array.c 2011-04-01 17:56:57.453710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/proc/array.c 2011-04-02 01:38:34.978688311 +0200
- @@ -489,8 +489,8 @@ static int do_task_stat(struct seq_file
- vsize,
- mm ? get_mm_rss(mm) : 0,
- rsslim,
- - mm ? mm->start_code : 0,
- - mm ? mm->end_code : 0,
- + mm ? (permitted ? mm->start_code : 1) : 0,
- + mm ? (permitted ? mm->end_code : 1) : 0,
- (permitted && mm) ? mm->start_stack : 0,
- esp,
- eip,
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/proc/task_mmu.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/proc/task_mmu.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/proc/task_mmu.c 2011-04-01 17:56:57.448710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/proc/task_mmu.c 2011-04-02 01:38:34.979688312 +0200
- @@ -248,8 +248,8 @@ static void show_map_vma(struct seq_file
- const char *name = arch_vma_name(vma);
- if (!name) {
- if (mm) {
- - if (vma->vm_start <= mm->start_brk &&
- - vma->vm_end >= mm->brk) {
- + if (vma->vm_start <= mm->brk &&
- + vma->vm_end >= mm->start_brk) {
- name = "[heap]";
- } else if (vma->vm_start <= mm->start_stack &&
- vma->vm_end >= mm->start_stack) {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/super.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/super.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/super.c 2011-04-01 17:57:39.433710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/super.c 2011-04-02 01:38:34.979688312 +0200
- @@ -71,6 +71,7 @@ static struct super_block *alloc_super(s
- #else
- INIT_LIST_HEAD(&s->s_files);
- #endif
- + s->s_bdi = &default_backing_dev_info;
- INIT_LIST_HEAD(&s->s_instances);
- INIT_HLIST_HEAD(&s->s_anon);
- INIT_LIST_HEAD(&s->s_inodes);
- @@ -999,6 +1000,7 @@ vfs_kern_mount(struct file_system_type *
- }
- BUG_ON(!mnt->mnt_sb);
- WARN_ON(!mnt->mnt_sb->s_bdi);
- + WARN_ON(mnt->mnt_sb->s_bdi == &default_backing_dev_info);
- mnt->mnt_sb->s_flags |= MS_BORN;
- error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/sync.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/sync.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/sync.c 2011-04-01 17:57:39.434710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//fs/sync.c 2011-04-02 01:38:34.979688312 +0200
- @@ -33,7 +33,7 @@ static int __sync_filesystem(struct supe
- * This should be safe, as we require bdi backing to actually
- * write out data in the first place
- */
- - if (!sb->s_bdi || sb->s_bdi == &noop_backing_dev_info)
- + if (sb->s_bdi == &noop_backing_dev_info)
- return 0;
- if (sb->s_qcop && sb->s_qcop->quota_sync)
- @@ -79,7 +79,7 @@ EXPORT_SYMBOL_GPL(sync_filesystem);
- static void sync_one_sb(struct super_block *sb, void *arg)
- {
- - if (!(sb->s_flags & MS_RDONLY) && sb->s_bdi)
- + if (!(sb->s_flags & MS_RDONLY))
- __sync_filesystem(sb, *(int *)arg);
- }
- /*
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/drm/drmP.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/drm/drmP.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/drm/drmP.h 2011-04-01 17:56:57.240710686 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/drm/drmP.h 2011-04-02 01:37:43.256688354 +0200
- @@ -1022,7 +1022,7 @@ struct drm_device {
- struct platform_device *platformdev; /**< Platform device struture */
- struct drm_sg_mem *sg; /**< Scatter gather memory */
- - int num_crtcs; /**< Number of CRTCs on this device */
- + unsigned int num_crtcs; /**< Number of CRTCs on this device */
- void *dev_private; /**< device private data */
- void *mm_private;
- struct address_space *dev_mapping;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/keys/rxrpc-type.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/keys/rxrpc-type.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/keys/rxrpc-type.h 2011-04-01 17:56:57.241710686 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/keys/rxrpc-type.h 2011-04-02 01:37:43.261688354 +0200
- @@ -99,7 +99,6 @@ struct rxrpc_key_token {
- * structure of raw payloads passed to add_key() or instantiate key
- */
- struct rxrpc_key_data_v1 {
- - u32 kif_version; /* 1 */
- u16 security_index;
- u16 ticket_length;
- u32 expiry; /* time_t */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/blkdev.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/blkdev.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/blkdev.h 2011-04-01 17:56:57.278710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/blkdev.h 2011-04-02 01:37:43.370688353 +0200
- @@ -700,7 +700,7 @@ extern void blk_start_queue(struct reque
- extern void blk_stop_queue(struct request_queue *q);
- extern void blk_sync_queue(struct request_queue *q);
- extern void __blk_stop_queue(struct request_queue *q);
- -extern void __blk_run_queue(struct request_queue *);
- +extern void __blk_run_queue(struct request_queue *q, bool force_kblockd);
- extern void blk_run_queue(struct request_queue *);
- extern int blk_rq_map_user(struct request_queue *, struct request *,
- struct rq_map_data *, void __user *, unsigned long,
- @@ -1089,7 +1089,6 @@ static inline void put_dev_sector(Sector
- struct work_struct;
- int kblockd_schedule_work(struct request_queue *q, struct work_struct *work);
- -int kblockd_schedule_delayed_work(struct request_queue *q, struct delayed_work *dwork, unsigned long delay);
- #ifdef CONFIG_BLK_CGROUP
- /*
- @@ -1137,7 +1136,6 @@ static inline uint64_t rq_io_start_time_
- extern int blk_throtl_init(struct request_queue *q);
- extern void blk_throtl_exit(struct request_queue *q);
- extern int blk_throtl_bio(struct request_queue *q, struct bio **bio);
- -extern void throtl_schedule_delayed_work(struct request_queue *q, unsigned long delay);
- extern void throtl_shutdown_timer_wq(struct request_queue *q);
- #else /* CONFIG_BLK_DEV_THROTTLING */
- static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio)
- @@ -1147,7 +1145,6 @@ static inline int blk_throtl_bio(struct
- static inline int blk_throtl_init(struct request_queue *q) { return 0; }
- static inline int blk_throtl_exit(struct request_queue *q) { return 0; }
- -static inline void throtl_schedule_delayed_work(struct request_queue *q, unsigned long delay) {}
- static inline void throtl_shutdown_timer_wq(struct request_queue *q) {}
- #endif /* CONFIG_BLK_DEV_THROTTLING */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/ethtool.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/ethtool.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/ethtool.h 2011-04-01 17:56:57.276710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/ethtool.h 2011-04-02 01:38:34.980688312 +0200
- @@ -13,6 +13,9 @@
- #ifndef _LINUX_ETHTOOL_H
- #define _LINUX_ETHTOOL_H
- +#ifdef __KERNEL__
- +#include <linux/compat.h>
- +#endif
- #include <linux/types.h>
- #include <linux/if_ether.h>
- @@ -449,6 +452,37 @@ struct ethtool_rxnfc {
- __u32 rule_locs[0];
- };
- +#ifdef __KERNEL__
- +#ifdef CONFIG_COMPAT
- +
- +struct compat_ethtool_rx_flow_spec {
- + u32 flow_type;
- + union {
- + struct ethtool_tcpip4_spec tcp_ip4_spec;
- + struct ethtool_tcpip4_spec udp_ip4_spec;
- + struct ethtool_tcpip4_spec sctp_ip4_spec;
- + struct ethtool_ah_espip4_spec ah_ip4_spec;
- + struct ethtool_ah_espip4_spec esp_ip4_spec;
- + struct ethtool_usrip4_spec usr_ip4_spec;
- + struct ethhdr ether_spec;
- + u8 hdata[72];
- + } h_u, m_u;
- + compat_u64 ring_cookie;
- + u32 location;
- +};
- +
- +struct compat_ethtool_rxnfc {
- + u32 cmd;
- + u32 flow_type;
- + compat_u64 data;
- + struct compat_ethtool_rx_flow_spec fs;
- + u32 rule_cnt;
- + u32 rule_locs[0];
- +};
- +
- +#endif /* CONFIG_COMPAT */
- +#endif /* __KERNEL__ */
- +
- /**
- * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection
- * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/fs.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/fs.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/fs.h 2011-04-01 17:57:39.439710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/fs.h 2011-04-02 01:37:43.368688353 +0200
- @@ -2142,7 +2142,7 @@ extern void check_disk_size_change(struc
- struct block_device *bdev);
- extern int revalidate_disk(struct gendisk *);
- extern int check_disk_change(struct block_device *);
- -extern int __invalidate_device(struct block_device *);
- +extern int __invalidate_device(struct block_device *, bool);
- extern int invalidate_partition(struct gendisk *, int);
- #endif
- unsigned long invalidate_mapping_pages(struct address_space *mapping,
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/ftrace.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/ftrace.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/ftrace.h 2011-04-01 17:56:57.282710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/ftrace.h 2011-04-02 01:37:43.376688352 +0200
- @@ -428,6 +428,7 @@ extern void unregister_ftrace_graph(void
- extern void ftrace_graph_init_task(struct task_struct *t);
- extern void ftrace_graph_exit_task(struct task_struct *t);
- +extern void ftrace_graph_init_idle_task(struct task_struct *t, int cpu);
- static inline int task_curr_ret_stack(struct task_struct *t)
- {
- @@ -451,6 +452,7 @@ static inline void unpause_graph_tracing
- static inline void ftrace_graph_init_task(struct task_struct *t) { }
- static inline void ftrace_graph_exit_task(struct task_struct *t) { }
- +static inline void ftrace_graph_init_idle_task(struct task_struct *t, int cpu) { }
- static inline int register_ftrace_graph(trace_func_graph_ret_t retfunc,
- trace_func_graph_ent_t entryfunc)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/netdevice.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/netdevice.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/netdevice.h 2011-04-01 17:56:57.245710686 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/netdevice.h 2011-04-02 01:37:43.267688354 +0200
- @@ -2336,6 +2336,9 @@ extern int netdev_notice(const struct ne
- extern int netdev_info(const struct net_device *dev, const char *format, ...)
- __attribute__ ((format (printf, 2, 3)));
- +#define MODULE_ALIAS_NETDEV(device) \
- + MODULE_ALIAS("netdev-" device)
- +
- #if defined(DEBUG)
- #define netdev_dbg(__dev, format, args...) \
- netdev_printk(KERN_DEBUG, __dev, format, ##args)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/pm.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/pm.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/pm.h 2011-04-01 17:56:57.268710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/pm.h 2011-04-02 01:37:43.304688352 +0200
- @@ -470,6 +470,8 @@ struct dev_pm_info {
- struct list_head entry;
- struct completion completion;
- struct wakeup_source *wakeup;
- +#else
- + unsigned int should_wakeup:1;
- #endif
- #ifdef CONFIG_PM_RUNTIME
- struct timer_list suspend_timer;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/pm_wakeup.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/pm_wakeup.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/pm_wakeup.h 2011-04-01 17:56:57.282710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/pm_wakeup.h 2011-04-02 01:37:43.377688352 +0200
- @@ -109,11 +109,6 @@ static inline bool device_can_wakeup(str
- return dev->power.can_wakeup;
- }
- -static inline bool device_may_wakeup(struct device *dev)
- -{
- - return false;
- -}
- -
- static inline struct wakeup_source *wakeup_source_create(const char *name)
- {
- return NULL;
- @@ -134,24 +129,32 @@ static inline void wakeup_source_unregis
- static inline int device_wakeup_enable(struct device *dev)
- {
- - return -EINVAL;
- + dev->power.should_wakeup = true;
- + return 0;
- }
- static inline int device_wakeup_disable(struct device *dev)
- {
- + dev->power.should_wakeup = false;
- return 0;
- }
- -static inline int device_init_wakeup(struct device *dev, bool val)
- +static inline int device_set_wakeup_enable(struct device *dev, bool enable)
- {
- - dev->power.can_wakeup = val;
- - return val ? -EINVAL : 0;
- + dev->power.should_wakeup = enable;
- + return 0;
- }
- +static inline int device_init_wakeup(struct device *dev, bool val)
- +{
- + device_set_wakeup_capable(dev, val);
- + device_set_wakeup_enable(dev, val);
- + return 0;
- +}
- -static inline int device_set_wakeup_enable(struct device *dev, bool enable)
- +static inline bool device_may_wakeup(struct device *dev)
- {
- - return -EINVAL;
- + return dev->power.can_wakeup && dev->power.should_wakeup;
- }
- static inline void __pm_stay_awake(struct wakeup_source *ws) {}
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/ch9.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/ch9.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/ch9.h 2011-04-01 17:56:57.272710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/ch9.h 2011-04-02 01:37:43.320688354 +0200
- @@ -575,6 +575,8 @@ struct usb_ss_ep_comp_descriptor {
- #define USB_DT_SS_EP_COMP_SIZE 6
- /* Bits 4:0 of bmAttributes if this is a bulk endpoint */
- #define USB_SS_MAX_STREAMS(p) (1 << (p & 0x1f))
- +/* Bits 1:0 of bmAttributes if this is an isoc endpoint */
- +#define USB_SS_MULT(p) (1 + ((p) & 0x3))
- /*-------------------------------------------------------------------------*/
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/hcd.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/hcd.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/hcd.h 2011-04-01 17:56:57.273710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/hcd.h 2011-04-02 01:37:43.365688353 +0200
- @@ -99,6 +99,8 @@ struct usb_hcd {
- #define HCD_FLAG_POLL_RH 2 /* poll for rh status? */
- #define HCD_FLAG_POLL_PENDING 3 /* status has changed? */
- #define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */
- +#define HCD_FLAG_RH_RUNNING 5 /* root hub is running? */
- +#define HCD_FLAG_DEAD 6 /* controller has died? */
- /* The flags can be tested using these macros; they are likely to
- * be slightly faster than test_bit().
- @@ -108,6 +110,8 @@ struct usb_hcd {
- #define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH))
- #define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING))
- #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING))
- +#define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING))
- +#define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD))
- /* Flags that get set only during HCD registration or removal. */
- unsigned rh_registered:1;/* is root hub registered? */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/serial.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/serial.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/serial.h 2011-04-01 17:56:57.273710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//include/linux/usb/serial.h 2011-04-02 01:37:43.320688354 +0200
- @@ -191,7 +191,8 @@ static inline void usb_set_serial_data(s
- * @id_table: pointer to a list of usb_device_id structures that define all
- * of the devices this structure can support.
- * @num_ports: the number of different ports this device will have.
- - * @bulk_in_size: bytes to allocate for bulk-in buffer (0 = end-point size)
- + * @bulk_in_size: minimum number of bytes to allocate for bulk-in buffer
- + * (0 = end-point size)
- * @bulk_out_size: bytes to allocate for bulk-out buffer (0 = end-point size)
- * @calc_num_ports: pointer to a function to determine how many ports this
- * device has dynamically. It will be called after the probe()
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/cgroup.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/cgroup.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/cgroup.c 2011-04-01 17:56:58.891710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/cgroup.c 2011-04-02 01:38:34.981688311 +0200
- @@ -1791,10 +1791,8 @@ int cgroup_attach_task(struct cgroup *cg
- /* Update the css_set linked lists if we're using them */
- write_lock(&css_set_lock);
- - if (!list_empty(&tsk->cg_list)) {
- - list_del(&tsk->cg_list);
- - list_add(&tsk->cg_list, &newcg->tasks);
- - }
- + if (!list_empty(&tsk->cg_list))
- + list_move(&tsk->cg_list, &newcg->tasks);
- write_unlock(&css_set_lock);
- for_each_subsys(root, ss) {
- @@ -3630,12 +3628,12 @@ again:
- spin_lock(&release_list_lock);
- set_bit(CGRP_REMOVED, &cgrp->flags);
- if (!list_empty(&cgrp->release_list))
- - list_del(&cgrp->release_list);
- + list_del_init(&cgrp->release_list);
- spin_unlock(&release_list_lock);
- cgroup_lock_hierarchy(cgrp->root);
- /* delete this cgroup from parent->children */
- - list_del(&cgrp->sibling);
- + list_del_init(&cgrp->sibling);
- cgroup_unlock_hierarchy(cgrp->root);
- spin_lock(&cgrp->dentry->d_lock);
- @@ -3856,7 +3854,7 @@ void cgroup_unload_subsys(struct cgroup_
- subsys[ss->subsys_id] = NULL;
- /* remove subsystem from rootnode's list of subsystems */
- - list_del(&ss->sibling);
- + list_del_init(&ss->sibling);
- /*
- * disentangle the css from all css_sets attached to the dummytop. as
- @@ -4230,7 +4228,7 @@ void cgroup_exit(struct task_struct *tsk
- if (!list_empty(&tsk->cg_list)) {
- write_lock(&css_set_lock);
- if (!list_empty(&tsk->cg_list))
- - list_del(&tsk->cg_list);
- + list_del_init(&tsk->cg_list);
- write_unlock(&css_set_lock);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/cpuset.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/cpuset.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/cpuset.c 2011-04-01 17:56:58.893710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/cpuset.c 2011-04-02 01:37:46.875688349 +0200
- @@ -1575,8 +1575,10 @@ static int cpuset_write_resmask(struct c
- return -ENODEV;
- trialcs = alloc_trial_cpuset(cs);
- - if (!trialcs)
- - return -ENOMEM;
- + if (!trialcs) {
- + retval = -ENOMEM;
- + goto out;
- + }
- switch (cft->private) {
- case FILE_CPULIST:
- @@ -1591,6 +1593,7 @@ static int cpuset_write_resmask(struct c
- }
- free_trial_cpuset(trialcs);
- +out:
- cgroup_unlock();
- return retval;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/perf_event.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/perf_event.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/perf_event.c 2011-04-01 17:56:58.929710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/perf_event.c 2011-04-02 01:38:34.984688310 +0200
- @@ -4414,7 +4414,7 @@ static int perf_exclude_event(struct per
- struct pt_regs *regs)
- {
- if (event->hw.state & PERF_HES_STOPPED)
- - return 0;
- + return 1;
- if (regs) {
- if (event->attr.exclude_user && user_mode(regs))
- @@ -4770,6 +4770,8 @@ static int perf_tp_event_match(struct pe
- struct perf_sample_data *data,
- struct pt_regs *regs)
- {
- + if (event->hw.state & PERF_HES_STOPPED)
- + return 0;
- /*
- * All tracepoints are from kernel-space.
- */
- @@ -5861,17 +5863,20 @@ __perf_event_exit_task(struct perf_event
- struct perf_event_context *child_ctx,
- struct task_struct *child)
- {
- - struct perf_event *parent_event;
- + if (child_event->parent) {
- + raw_spin_lock_irq(&child_ctx->lock);
- + perf_group_detach(child_event);
- + raw_spin_unlock_irq(&child_ctx->lock);
- + }
- perf_event_remove_from_context(child_event);
- - parent_event = child_event->parent;
- /*
- - * It can happen that parent exits first, and has events
- + * It can happen that the parent exits first, and has events
- * that are still around due to the child reference. These
- - * events need to be zapped - but otherwise linger.
- + * events need to be zapped.
- */
- - if (parent_event) {
- + if (child_event->parent) {
- sync_child_event(child_event, child);
- free_event(child_event);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sched.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sched.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sched.c 2011-04-01 17:57:39.458710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sched.c 2011-04-02 01:37:46.303688349 +0200
- @@ -5762,7 +5762,7 @@ void __cpuinit init_idle(struct task_str
- * The idle tasks have their own, simple scheduling class:
- */
- idle->sched_class = &idle_sched_class;
- - ftrace_graph_init_task(idle);
- + ftrace_graph_init_idle_task(idle, cpu);
- }
- /*
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sched_rt.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sched_rt.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sched_rt.c 2011-04-01 17:57:39.462710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sched_rt.c 2011-04-02 01:37:46.880688351 +0200
- @@ -210,11 +210,12 @@ static void dequeue_rt_entity(struct sch
- static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
- {
- - int this_cpu = smp_processor_id();
- struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr;
- struct sched_rt_entity *rt_se;
- - rt_se = rt_rq->tg->rt_se[this_cpu];
- + int cpu = cpu_of(rq_of_rt_rq(rt_rq));
- +
- + rt_se = rt_rq->tg->rt_se[cpu];
- if (rt_rq->rt_nr_running) {
- if (rt_se && !on_rt_rq(rt_se))
- @@ -226,10 +227,10 @@ static void sched_rt_rq_enqueue(struct r
- static void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
- {
- - int this_cpu = smp_processor_id();
- struct sched_rt_entity *rt_se;
- + int cpu = cpu_of(rq_of_rt_rq(rt_rq));
- - rt_se = rt_rq->tg->rt_se[this_cpu];
- + rt_se = rt_rq->tg->rt_se[cpu];
- if (rt_se && on_rt_rq(rt_se))
- dequeue_rt_entity(rt_se);
- @@ -565,8 +566,11 @@ static int do_sched_rt_period_timer(stru
- if (rt_rq->rt_time || rt_rq->rt_nr_running)
- idle = 0;
- raw_spin_unlock(&rt_rq->rt_runtime_lock);
- - } else if (rt_rq->rt_nr_running)
- + } else if (rt_rq->rt_nr_running) {
- idle = 0;
- + if (!rt_rq_throttled(rt_rq))
- + enqueue = 1;
- + }
- if (enqueue)
- sched_rt_rq_enqueue(rt_rq);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/signal.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/signal.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/signal.c 2011-04-01 17:56:58.892710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/signal.c 2011-04-02 01:38:34.984688311 +0200
- @@ -2421,9 +2421,13 @@ SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t,
- return -EFAULT;
- /* Not even root can pretend to send signals from the kernel.
- - Nor can they impersonate a kill(), which adds source info. */
- - if (info.si_code >= 0)
- + * Nor can they impersonate a kill()/tgkill(), which adds source info.
- + */
- + if (info.si_code != SI_QUEUE) {
- + /* We used to allow any < 0 si_code */
- + WARN_ON_ONCE(info.si_code < 0);
- return -EPERM;
- + }
- info.si_signo = sig;
- /* POSIX.1b doesn't mention process groups. */
- @@ -2437,9 +2441,13 @@ long do_rt_tgsigqueueinfo(pid_t tgid, pi
- return -EINVAL;
- /* Not even root can pretend to send signals from the kernel.
- - Nor can they impersonate a kill(), which adds source info. */
- - if (info->si_code >= 0)
- + * Nor can they impersonate a kill()/tgkill(), which adds source info.
- + */
- + if (info->si_code != SI_QUEUE) {
- + /* We used to allow any < 0 si_code */
- + WARN_ON_ONCE(info->si_code < 0);
- return -EPERM;
- + }
- info->si_signo = sig;
- return do_send_specific(tgid, pid, sig, info);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/smp.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/smp.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/smp.c 2011-04-01 17:57:39.462710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/smp.c 2011-04-02 01:37:46.880688351 +0200
- @@ -449,7 +449,7 @@ void smp_call_function_many(const struct
- {
- struct call_function_data *data;
- unsigned long flags;
- - int cpu, next_cpu, this_cpu = smp_processor_id();
- + int refs, cpu, next_cpu, this_cpu = smp_processor_id();
- /*
- * Can deadlock when called with interrupts disabled.
- @@ -460,7 +460,7 @@ void smp_call_function_many(const struct
- WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled()
- && !oops_in_progress);
- - /* So, what's a CPU they want? Ignoring this one. */
- + /* Try to fastpath. So, what's a CPU they want? Ignoring this one. */
- cpu = cpumask_first_and(mask, cpu_online_mask);
- if (cpu == this_cpu)
- cpu = cpumask_next_and(cpu, mask, cpu_online_mask);
- @@ -482,22 +482,49 @@ void smp_call_function_many(const struct
- data = &__get_cpu_var(cfd_data);
- csd_lock(&data->csd);
- +
- + /* This BUG_ON verifies our reuse assertions and can be removed */
- BUG_ON(atomic_read(&data->refs) || !cpumask_empty(data->cpumask));
- + /*
- + * The global call function queue list add and delete are protected
- + * by a lock, but the list is traversed without any lock, relying
- + * on the rcu list add and delete to allow safe concurrent traversal.
- + * We reuse the call function data without waiting for any grace
- + * period after some other cpu removes it from the global queue.
- + * This means a cpu might find our data block as it is being
- + * filled out.
- + *
- + * We hold off the interrupt handler on the other cpu by
- + * ordering our writes to the cpu mask vs our setting of the
- + * refs counter. We assert only the cpu owning the data block
- + * will set a bit in cpumask, and each bit will only be cleared
- + * by the subject cpu. Each cpu must first find its bit is
- + * set and then check that refs is set indicating the element is
- + * ready to be processed, otherwise it must skip the entry.
- + *
- + * On the previous iteration refs was set to 0 by another cpu.
- + * To avoid the use of transitivity, set the counter to 0 here
- + * so the wmb will pair with the rmb in the interrupt handler.
- + */
- + atomic_set(&data->refs, 0); /* convert 3rd to 1st party write */
- +
- data->csd.func = func;
- data->csd.info = info;
- - cpumask_and(data->cpumask, mask, cpu_online_mask);
- - cpumask_clear_cpu(this_cpu, data->cpumask);
- - /*
- - * To ensure the interrupt handler gets an complete view
- - * we order the cpumask and refs writes and order the read
- - * of them in the interrupt handler. In addition we may
- - * only clear our own cpu bit from the mask.
- - */
- + /* Ensure 0 refs is visible before mask. Also orders func and info */
- smp_wmb();
- - atomic_set(&data->refs, cpumask_weight(data->cpumask));
- + /* We rely on the "and" being processed before the store */
- + cpumask_and(data->cpumask, mask, cpu_online_mask);
- + cpumask_clear_cpu(this_cpu, data->cpumask);
- + refs = cpumask_weight(data->cpumask);
- +
- + /* Some callers race with other cpus changing the passed mask */
- + if (unlikely(!refs)) {
- + csd_unlock(&data->csd);
- + return;
- + }
- raw_spin_lock_irqsave(&call_function.lock, flags);
- /*
- @@ -506,6 +533,12 @@ void smp_call_function_many(const struct
- * will not miss any other list entries:
- */
- list_add_rcu(&data->csd.list, &call_function.queue);
- + /*
- + * We rely on the wmb() in list_add_rcu to complete our writes
- + * to the cpumask before this write to refs, which indicates
- + * data is on the list and is ready to be processed.
- + */
- + atomic_set(&data->refs, refs);
- raw_spin_unlock_irqrestore(&call_function.lock, flags);
- /*
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sysctl.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sysctl.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sysctl.c 2011-04-01 17:57:39.464710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/sysctl.c 2011-04-02 01:38:34.985688312 +0200
- @@ -172,6 +172,11 @@ static int proc_taint(struct ctl_table *
- void __user *buffer, size_t *lenp, loff_t *ppos);
- #endif
- +#ifdef CONFIG_PRINTK
- +static int proc_dmesg_restrict(struct ctl_table *table, int write,
- + void __user *buffer, size_t *lenp, loff_t *ppos);
- +#endif
- +
- #ifdef CONFIG_MAGIC_SYSRQ
- /* Note: sysrq code uses it's own private copy */
- static int __sysrq_enabled = SYSRQ_DEFAULT_ENABLE;
- @@ -1475,7 +1480,7 @@ static struct ctl_table fs_table[] = {
- .data = &suid_dumpable,
- .maxlen = sizeof(int),
- .mode = 0644,
- - .proc_handler = proc_dointvec_minmax,
- + .proc_handler = proc_dmesg_restrict,
- .extra1 = &zero,
- .extra2 = &two,
- },
- @@ -2406,6 +2411,17 @@ static int proc_taint(struct ctl_table *
- return err;
- }
- +#ifdef CONFIG_PRINTK
- +static int proc_dmesg_restrict(struct ctl_table *table, int write,
- + void __user *buffer, size_t *lenp, loff_t *ppos)
- +{
- + if (write && !capable(CAP_SYS_ADMIN))
- + return -EPERM;
- +
- + return proc_dointvec_minmax(table, write, buffer, lenp, ppos);
- +}
- +#endif
- +
- struct do_proc_dointvec_minmax_conv_param {
- int *min;
- int *max;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-broadcast.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-broadcast.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-broadcast.c 2011-04-01 17:56:58.892710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-broadcast.c 2011-04-02 01:37:46.874688351 +0200
- @@ -600,4 +600,14 @@ int tick_broadcast_oneshot_active(void)
- return tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT;
- }
- +/*
- + * Check whether the broadcast device supports oneshot.
- + */
- +bool tick_broadcast_oneshot_available(void)
- +{
- + struct clock_event_device *bc = tick_broadcast_device.evtdev;
- +
- + return bc ? bc->features & CLOCK_EVT_FEAT_ONESHOT : false;
- +}
- +
- #endif
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-common.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-common.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-common.c 2011-04-01 17:56:58.892710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-common.c 2011-04-02 01:37:46.874688351 +0200
- @@ -51,7 +51,11 @@ int tick_is_oneshot_available(void)
- {
- struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev;
- - return dev && (dev->features & CLOCK_EVT_FEAT_ONESHOT);
- + if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT))
- + return 0;
- + if (!(dev->features & CLOCK_EVT_FEAT_C3STOP))
- + return 1;
- + return tick_broadcast_oneshot_available();
- }
- /*
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-internal.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-internal.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-internal.h 2011-04-01 17:56:58.892710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/time/tick-internal.h 2011-04-02 01:37:46.874688351 +0200
- @@ -36,6 +36,7 @@ extern void tick_shutdown_broadcast_ones
- extern int tick_resume_broadcast_oneshot(struct clock_event_device *bc);
- extern int tick_broadcast_oneshot_active(void);
- extern void tick_check_oneshot_broadcast(int cpu);
- +bool tick_broadcast_oneshot_available(void);
- # else /* BROADCAST */
- static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
- {
- @@ -46,6 +47,7 @@ static inline void tick_broadcast_switch
- static inline void tick_shutdown_broadcast_oneshot(unsigned int *cpup) { }
- static inline int tick_broadcast_oneshot_active(void) { return 0; }
- static inline void tick_check_oneshot_broadcast(int cpu) { }
- +static inline bool tick_broadcast_oneshot_available(void) { return true; }
- # endif /* !BROADCAST */
- #else /* !ONESHOT */
- @@ -76,6 +78,7 @@ static inline int tick_resume_broadcast_
- return 0;
- }
- static inline int tick_broadcast_oneshot_active(void) { return 0; }
- +static inline bool tick_broadcast_oneshot_available(void) { return false; }
- #endif /* !TICK_ONESHOT */
- /*
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/trace/ftrace.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/trace/ftrace.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/trace/ftrace.c 2011-04-01 17:56:58.903710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//kernel/trace/ftrace.c 2011-04-02 01:37:46.875688349 +0200
- @@ -3328,7 +3328,7 @@ static int start_graph_tracing(void)
- /* The cpu_boot init_task->ret_stack will never be freed */
- for_each_online_cpu(cpu) {
- if (!idle_task(cpu)->ret_stack)
- - ftrace_graph_init_task(idle_task(cpu));
- + ftrace_graph_init_idle_task(idle_task(cpu), cpu);
- }
- do {
- @@ -3418,6 +3418,49 @@ void unregister_ftrace_graph(void)
- mutex_unlock(&ftrace_lock);
- }
- +static DEFINE_PER_CPU(struct ftrace_ret_stack *, idle_ret_stack);
- +
- +static void
- +graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack)
- +{
- + atomic_set(&t->tracing_graph_pause, 0);
- + atomic_set(&t->trace_overrun, 0);
- + t->ftrace_timestamp = 0;
- + /* make curr_ret_stack visable before we add the ret_stack */
- + smp_wmb();
- + t->ret_stack = ret_stack;
- +}
- +
- +/*
- + * Allocate a return stack for the idle task. May be the first
- + * time through, or it may be done by CPU hotplug online.
- + */
- +void ftrace_graph_init_idle_task(struct task_struct *t, int cpu)
- +{
- + t->curr_ret_stack = -1;
- + /*
- + * The idle task has no parent, it either has its own
- + * stack or no stack at all.
- + */
- + if (t->ret_stack)
- + WARN_ON(t->ret_stack != per_cpu(idle_ret_stack, cpu));
- +
- + if (ftrace_graph_active) {
- + struct ftrace_ret_stack *ret_stack;
- +
- + ret_stack = per_cpu(idle_ret_stack, cpu);
- + if (!ret_stack) {
- + ret_stack = kmalloc(FTRACE_RETFUNC_DEPTH
- + * sizeof(struct ftrace_ret_stack),
- + GFP_KERNEL);
- + if (!ret_stack)
- + return;
- + per_cpu(idle_ret_stack, cpu) = ret_stack;
- + }
- + graph_init_task(t, ret_stack);
- + }
- +}
- +
- /* Allocate a return stack for newly created task */
- void ftrace_graph_init_task(struct task_struct *t)
- {
- @@ -3433,12 +3476,7 @@ void ftrace_graph_init_task(struct task_
- GFP_KERNEL);
- if (!ret_stack)
- return;
- - atomic_set(&t->tracing_graph_pause, 0);
- - atomic_set(&t->trace_overrun, 0);
- - t->ftrace_timestamp = 0;
- - /* make curr_ret_stack visable before we add the ret_stack */
- - smp_wmb();
- - t->ret_stack = ret_stack;
- + graph_init_task(t, ret_stack);
- }
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//lib/swiotlb.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//lib/swiotlb.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//lib/swiotlb.c 2011-04-01 17:56:56.742710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//lib/swiotlb.c 2011-04-02 01:37:43.111688352 +0200
- @@ -686,8 +686,10 @@ dma_addr_t swiotlb_map_page(struct devic
- /*
- * Ensure that the address returned is DMA'ble
- */
- - if (!dma_capable(dev, dev_addr, size))
- - panic("map_single: bounce buffer is not DMA'ble");
- + if (!dma_capable(dev, dev_addr, size)) {
- + swiotlb_tbl_unmap_single(dev, map, size, dir);
- + dev_addr = swiotlb_virt_to_bus(dev, io_tlb_overflow_buffer);
- + }
- return dev_addr;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//Makefile linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//Makefile
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//Makefile 2011-04-01 17:57:39.469710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//Makefile 2011-04-02 01:38:34.985688312 +0200
- @@ -1,7 +1,7 @@
- VERSION = 2
- PATCHLEVEL = 6
- SUBLEVEL = 37
- -EXTRAVERSION = .2
- +EXTRAVERSION = .6
- NAME = Flesh-Eating Bats with Fangs
- # *DOCUMENTATION*
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/backing-dev.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/backing-dev.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/backing-dev.c 2011-04-01 17:57:39.469710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/backing-dev.c 2011-04-02 01:38:34.986688312 +0200
- @@ -608,7 +608,7 @@ static void bdi_prune_sb(struct backing_
- spin_lock(&sb_lock);
- list_for_each_entry(sb, &super_blocks, s_list) {
- if (sb->s_bdi == bdi)
- - sb->s_bdi = NULL;
- + sb->s_bdi = &default_backing_dev_info;
- }
- spin_unlock(&sb_lock);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/mremap.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/mremap.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/mremap.c 2011-04-01 17:57:39.481710654 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/mremap.c 2011-04-02 01:37:46.299688353 +0200
- @@ -91,9 +91,7 @@ static void move_ptes(struct vm_area_str
- */
- mapping = vma->vm_file->f_mapping;
- mutex_lock(&mapping->i_mmap_lock);
- - if (new_vma->vm_truncate_count &&
- - new_vma->vm_truncate_count != vma->vm_truncate_count)
- - new_vma->vm_truncate_count = 0;
- + new_vma->vm_truncate_count = 0;
- }
- /*
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/oom_kill.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/oom_kill.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/oom_kill.c 2011-04-01 17:56:58.874710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/oom_kill.c 2011-04-02 01:38:34.986688312 +0200
- @@ -31,6 +31,7 @@
- #include <linux/memcontrol.h>
- #include <linux/mempolicy.h>
- #include <linux/security.h>
- +#include <linux/ptrace.h>
- int sysctl_panic_on_oom;
- int sysctl_oom_kill_allocating_task;
- @@ -292,13 +293,15 @@ static struct task_struct *select_bad_pr
- unsigned long totalpages, struct mem_cgroup *mem,
- const nodemask_t *nodemask)
- {
- - struct task_struct *p;
- + struct task_struct *g, *p;
- struct task_struct *chosen = NULL;
- *ppoints = 0;
- - for_each_process(p) {
- + do_each_thread(g, p) {
- unsigned int points;
- + if (!p->mm)
- + continue;
- if (oom_unkillable_task(p, mem, nodemask))
- continue;
- @@ -314,22 +317,29 @@ static struct task_struct *select_bad_pr
- if (test_tsk_thread_flag(p, TIF_MEMDIE))
- return ERR_PTR(-1UL);
- - /*
- - * This is in the process of releasing memory so wait for it
- - * to finish before killing some other task by mistake.
- - *
- - * However, if p is the current task, we allow the 'kill' to
- - * go ahead if it is exiting: this will simply set TIF_MEMDIE,
- - * which will allow it to gain access to memory reserves in
- - * the process of exiting and releasing its resources.
- - * Otherwise we could get an easy OOM deadlock.
- - */
- - if (thread_group_empty(p) && (p->flags & PF_EXITING) && p->mm) {
- - if (p != current)
- - return ERR_PTR(-1UL);
- -
- - chosen = p;
- - *ppoints = 1000;
- + if (p->flags & PF_EXITING) {
- + /*
- + * If p is the current task and is in the process of
- + * releasing memory, we allow the "kill" to set
- + * TIF_MEMDIE, which will allow it to gain access to
- + * memory reserves. Otherwise, it may stall forever.
- + *
- + * The loop isn't broken here, however, in case other
- + * threads are found to have already been oom killed.
- + */
- + if (p == current) {
- + chosen = p;
- + *ppoints = 1000;
- + } else {
- + /*
- + * If this task is not being ptraced on exit,
- + * then wait for it to finish before killing
- + * some other task unnecessarily.
- + */
- + if (!(task_ptrace(p->group_leader) &
- + PT_TRACE_EXIT))
- + return ERR_PTR(-1UL);
- + }
- }
- points = oom_badness(p, mem, nodemask, totalpages);
- @@ -337,7 +347,7 @@ static struct task_struct *select_bad_pr
- chosen = p;
- *ppoints = points;
- }
- - }
- + } while_each_thread(g, p);
- return chosen;
- }
- @@ -491,6 +501,8 @@ static int oom_kill_process(struct task_
- list_for_each_entry(child, &t->children, sibling) {
- unsigned int child_points;
- + if (child->mm == p->mm)
- + continue;
- /*
- * oom_badness() returns 0 if the thread is unkillable
- */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/page_alloc.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/page_alloc.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/page_alloc.c 2011-04-01 17:57:39.484710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/page_alloc.c 2011-04-02 01:37:46.301688350 +0200
- @@ -5353,10 +5353,9 @@ __count_immobile_pages(struct zone *zone
- for (found = 0, iter = 0; iter < pageblock_nr_pages; iter++) {
- unsigned long check = pfn + iter;
- - if (!pfn_valid_within(check)) {
- - iter++;
- + if (!pfn_valid_within(check))
- continue;
- - }
- +
- page = pfn_to_page(check);
- if (!page_count(page)) {
- if (PageBuddy(page))
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/shmem.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/shmem.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/shmem.c 2011-04-01 17:56:58.882710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/shmem.c 2011-04-02 01:38:34.987688311 +0200
- @@ -2784,5 +2784,6 @@ int shmem_zero_setup(struct vm_area_stru
- fput(vma->vm_file);
- vma->vm_file = file;
- vma->vm_ops = &shmem_vm_ops;
- + vma->vm_flags |= VM_CAN_NONLINEAR;
- return 0;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/slab.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/slab.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/slab.c 2011-04-01 17:56:58.882710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/slab.c 2011-04-02 01:38:34.988688311 +0200
- @@ -2288,8 +2288,8 @@ kmem_cache_create (const char *name, siz
- if (ralign < align) {
- ralign = align;
- }
- - /* disable debug if not aligning with REDZONE_ALIGN */
- - if (ralign & (__alignof__(unsigned long long) - 1))
- + /* disable debug if necessary */
- + if (ralign > __alignof__(unsigned long long))
- flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
- /*
- * 4) Store it.
- @@ -2315,8 +2315,8 @@ kmem_cache_create (const char *name, siz
- */
- if (flags & SLAB_RED_ZONE) {
- /* add space for red zone words */
- - cachep->obj_offset += align;
- - size += align + sizeof(unsigned long long);
- + cachep->obj_offset += sizeof(unsigned long long);
- + size += 2 * sizeof(unsigned long long);
- }
- if (flags & SLAB_STORE_USER) {
- /* user store requires one word storage behind the end of
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/swapfile.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/swapfile.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/swapfile.c 2011-04-01 17:57:39.488710653 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//mm/swapfile.c 2011-04-02 01:38:34.989688310 +0200
- @@ -2175,8 +2175,13 @@ bad_swap_2:
- p->flags = 0;
- spin_unlock(&swap_lock);
- vfree(swap_map);
- - if (swap_file)
- + if (swap_file) {
- + if (did_down) {
- + mutex_unlock(&inode->i_mutex);
- + did_down = 0;
- + }
- filp_close(swap_file, NULL);
- + }
- out:
- if (page && !IS_ERR(page)) {
- kunmap(page);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/core/dev.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/core/dev.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/core/dev.c 2011-04-01 17:56:57.235710686 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/core/dev.c 2011-04-02 01:37:43.235688354 +0200
- @@ -1116,13 +1116,21 @@ EXPORT_SYMBOL(netdev_bonding_change);
- void dev_load(struct net *net, const char *name)
- {
- struct net_device *dev;
- + int no_module;
- rcu_read_lock();
- dev = dev_get_by_name_rcu(net, name);
- rcu_read_unlock();
- - if (!dev && capable(CAP_NET_ADMIN))
- - request_module("%s", name);
- + no_module = !dev;
- + if (no_module && capable(CAP_NET_ADMIN))
- + no_module = request_module("netdev-%s", name);
- + if (no_module && capable(CAP_SYS_MODULE)) {
- + if (!request_module("%s", name))
- + pr_err("Loading kernel module for a network device "
- +"with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-%s "
- +"instead\n", name);
- + }
- }
- EXPORT_SYMBOL(dev_load);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/dccp/input.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/dccp/input.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/dccp/input.c 2011-04-01 17:56:56.797710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/dccp/input.c 2011-04-02 01:37:43.193688353 +0200
- @@ -621,6 +621,9 @@ int dccp_rcv_state_process(struct sock *
- /* Caller (dccp_v4_do_rcv) will send Reset */
- dcb->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
- return 1;
- + } else if (sk->sk_state == DCCP_CLOSED) {
- + dcb->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
- + return 1;
- }
- if (sk->sk_state != DCCP_REQUESTING && sk->sk_state != DCCP_RESPOND) {
- @@ -683,10 +686,6 @@ int dccp_rcv_state_process(struct sock *
- }
- switch (sk->sk_state) {
- - case DCCP_CLOSED:
- - dcb->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
- - return 1;
- -
- case DCCP_REQUESTING:
- queued = dccp_rcv_request_sent_state_process(sk, skb, dh, len);
- if (queued >= 0)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/dns_resolver/dns_key.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/dns_resolver/dns_key.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/dns_resolver/dns_key.c 2011-04-01 17:56:56.749710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/dns_resolver/dns_key.c 2011-04-02 01:37:43.120688353 +0200
- @@ -67,8 +67,9 @@ dns_resolver_instantiate(struct key *key
- size_t result_len = 0;
- const char *data = _data, *end, *opt;
- - kenter("%%%d,%s,'%s',%zu",
- - key->serial, key->description, data, datalen);
- + kenter("%%%d,%s,'%*.*s',%zu",
- + key->serial, key->description,
- + (int)datalen, (int)datalen, data, datalen);
- if (datalen <= 1 || !data || data[datalen - 1] != '\0')
- return -EINVAL;
- @@ -217,6 +218,19 @@ static void dns_resolver_describe(const
- seq_printf(m, ": %u", key->datalen);
- }
- +/*
- + * read the DNS data
- + * - the key's semaphore is read-locked
- + */
- +static long dns_resolver_read(const struct key *key,
- + char __user *buffer, size_t buflen)
- +{
- + if (key->type_data.x[0])
- + return key->type_data.x[0];
- +
- + return user_read(key, buffer, buflen);
- +}
- +
- struct key_type key_type_dns_resolver = {
- .name = "dns_resolver",
- .instantiate = dns_resolver_instantiate,
- @@ -224,7 +238,7 @@ struct key_type key_type_dns_resolver =
- .revoke = user_revoke,
- .destroy = user_destroy,
- .describe = dns_resolver_describe,
- - .read = user_read,
- + .read = dns_resolver_read,
- };
- static int __init init_dns_resolver(void)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/devinet.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/devinet.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/devinet.c 2011-04-01 17:56:56.756710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/devinet.c 2011-04-02 01:37:43.138688353 +0200
- @@ -1030,6 +1030,21 @@ static inline bool inetdev_valid_mtu(uns
- return mtu >= 68;
- }
- +static void inetdev_send_gratuitous_arp(struct net_device *dev,
- + struct in_device *in_dev)
- +
- +{
- + struct in_ifaddr *ifa = in_dev->ifa_list;
- +
- + if (!ifa)
- + return;
- +
- + arp_send(ARPOP_REQUEST, ETH_P_ARP,
- + ifa->ifa_address, dev,
- + ifa->ifa_address, NULL,
- + dev->dev_addr, NULL);
- +}
- +
- /* Called only under RTNL semaphore */
- static int inetdev_event(struct notifier_block *this, unsigned long event,
- @@ -1082,18 +1097,13 @@ static int inetdev_event(struct notifier
- }
- ip_mc_up(in_dev);
- /* fall through */
- - case NETDEV_NOTIFY_PEERS:
- case NETDEV_CHANGEADDR:
- + if (!IN_DEV_ARP_NOTIFY(in_dev))
- + break;
- + /* fall through */
- + case NETDEV_NOTIFY_PEERS:
- /* Send gratuitous ARP to notify of link change */
- - if (IN_DEV_ARP_NOTIFY(in_dev)) {
- - struct in_ifaddr *ifa = in_dev->ifa_list;
- -
- - if (ifa)
- - arp_send(ARPOP_REQUEST, ETH_P_ARP,
- - ifa->ifa_address, dev,
- - ifa->ifa_address, NULL,
- - dev->dev_addr, NULL);
- - }
- + inetdev_send_gratuitous_arp(dev, in_dev);
- break;
- case NETDEV_DOWN:
- ip_mc_down(in_dev);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/inet_timewait_sock.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/inet_timewait_sock.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/inet_timewait_sock.c 2011-04-01 17:56:56.752710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/inet_timewait_sock.c 2011-04-02 01:37:43.127688354 +0200
- @@ -505,7 +505,9 @@ restart:
- }
- rcu_read_unlock();
- + local_bh_disable();
- inet_twsk_deschedule(tw, twdr);
- + local_bh_enable();
- inet_twsk_put(tw);
- goto restart_rcu;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/ip_gre.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/ip_gre.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/ip_gre.c 2011-04-01 17:56:56.756710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/ip_gre.c 2011-04-02 01:37:43.138688353 +0200
- @@ -1775,3 +1775,4 @@ module_exit(ipgre_fini);
- MODULE_LICENSE("GPL");
- MODULE_ALIAS_RTNL_LINK("gre");
- MODULE_ALIAS_RTNL_LINK("gretap");
- +MODULE_ALIAS_NETDEV("gre0");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/ipip.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/ipip.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/ipip.c 2011-04-01 17:56:56.756710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/ipip.c 2011-04-02 01:37:43.131688354 +0200
- @@ -921,3 +921,4 @@ static void __exit ipip_fini(void)
- module_init(ipip_init);
- module_exit(ipip_fini);
- MODULE_LICENSE("GPL");
- +MODULE_ALIAS_NETDEV("tunl0");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/netfilter/arpt_mangle.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/netfilter/arpt_mangle.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/netfilter/arpt_mangle.c 2011-04-01 17:56:56.755710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/netfilter/arpt_mangle.c 2011-04-02 01:37:43.131688353 +0200
- @@ -60,12 +60,12 @@ static int checkentry(const struct xt_tg
- if (mangle->flags & ~ARPT_MANGLE_MASK ||
- !(mangle->flags & ARPT_MANGLE_MASK))
- - return false;
- + return -EINVAL;
- if (mangle->target != NF_DROP && mangle->target != NF_ACCEPT &&
- mangle->target != XT_CONTINUE)
- - return false;
- - return true;
- + return -EINVAL;
- + return 0;
- }
- static struct xt_target arpt_mangle_reg __read_mostly = {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c 2011-04-01 17:56:56.755710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c 2011-04-02 01:37:43.131688353 +0200
- @@ -97,7 +97,7 @@ static int ct_show_secctx(struct seq_fil
- ret = security_secid_to_secctx(ct->secmark, &secctx, &len);
- if (ret)
- - return ret;
- + return 0;
- ret = seq_printf(s, "secctx=%s ", secctx);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv6/ip6_tunnel.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv6/ip6_tunnel.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv6/ip6_tunnel.c 2011-04-01 17:56:56.803710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv6/ip6_tunnel.c 2011-04-02 01:37:43.210688354 +0200
- @@ -57,6 +57,7 @@
- MODULE_AUTHOR("Ville Nuorvala");
- MODULE_DESCRIPTION("IPv6 tunneling device");
- MODULE_LICENSE("GPL");
- +MODULE_ALIAS_NETDEV("ip6tnl0");
- #define IPV6_TLV_TEL_DST_SIZE 8
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv6/sit.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv6/sit.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv6/sit.c 2011-04-01 17:56:57.227710676 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/ipv6/sit.c 2011-04-02 01:37:43.212688353 +0200
- @@ -1292,4 +1292,4 @@ static int __init sit_init(void)
- module_init(sit_init);
- module_exit(sit_cleanup);
- MODULE_LICENSE("GPL");
- -MODULE_ALIAS("sit0");
- +MODULE_ALIAS_NETDEV("sit0");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/ipvs/ip_vs_ctl.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/ipvs/ip_vs_ctl.c 2011-04-01 17:56:56.768710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/ipvs/ip_vs_ctl.c 2011-04-02 01:37:43.157688354 +0200
- @@ -810,9 +810,9 @@ __ip_vs_update_dest(struct ip_vs_service
- dest->u_threshold = udest->u_threshold;
- dest->l_threshold = udest->l_threshold;
- - spin_lock(&dest->dst_lock);
- + spin_lock_bh(&dest->dst_lock);
- ip_vs_dst_reset(dest);
- - spin_unlock(&dest->dst_lock);
- + spin_unlock_bh(&dest->dst_lock);
- if (add)
- ip_vs_new_estimator(&dest->stats);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_conntrack_netlink.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_conntrack_netlink.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_conntrack_netlink.c 2011-04-01 17:56:56.767710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_conntrack_netlink.c 2011-04-02 01:37:43.151688353 +0200
- @@ -254,7 +254,7 @@ ctnetlink_dump_secctx(struct sk_buff *sk
- ret = security_secid_to_secctx(ct->secmark, &secctx, &len);
- if (ret)
- - return ret;
- + return 0;
- ret = -1;
- nest_secctx = nla_nest_start(skb, CTA_SECCTX | NLA_F_NESTED);
- @@ -453,16 +453,22 @@ ctnetlink_counters_size(const struct nf_
- ;
- }
- -#ifdef CONFIG_NF_CONNTRACK_SECMARK
- -static int ctnetlink_nlmsg_secctx_size(const struct nf_conn *ct)
- +static inline int
- +ctnetlink_secctx_size(const struct nf_conn *ct)
- {
- - int len;
- +#ifdef CONFIG_NF_CONNTRACK_SECMARK
- + int len, ret;
- - security_secid_to_secctx(ct->secmark, NULL, &len);
- + ret = security_secid_to_secctx(ct->secmark, NULL, &len);
- + if (ret)
- + return 0;
- - return sizeof(char) * len;
- -}
- + return nla_total_size(0) /* CTA_SECCTX */
- + + nla_total_size(sizeof(char) * len); /* CTA_SECCTX_NAME */
- +#else
- + return 0;
- #endif
- +}
- static inline size_t
- ctnetlink_nlmsg_size(const struct nf_conn *ct)
- @@ -479,10 +485,7 @@ ctnetlink_nlmsg_size(const struct nf_con
- + nla_total_size(0) /* CTA_PROTOINFO */
- + nla_total_size(0) /* CTA_HELP */
- + nla_total_size(NF_CT_HELPER_NAME_LEN) /* CTA_HELP_NAME */
- -#ifdef CONFIG_NF_CONNTRACK_SECMARK
- - + nla_total_size(0) /* CTA_SECCTX */
- - + nla_total_size(ctnetlink_nlmsg_secctx_size(ct)) /* CTA_SECCTX_NAME */
- -#endif
- + + ctnetlink_secctx_size(ct)
- #ifdef CONFIG_NF_NAT_NEEDED
- + 2 * nla_total_size(0) /* CTA_NAT_SEQ_ADJ_ORIG|REPL */
- + 6 * nla_total_size(sizeof(u_int32_t)) /* CTA_NAT_SEQ_OFFSET */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_conntrack_standalone.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_conntrack_standalone.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_conntrack_standalone.c 2011-04-01 17:56:56.768710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_conntrack_standalone.c 2011-04-02 01:37:43.157688354 +0200
- @@ -118,7 +118,7 @@ static int ct_show_secctx(struct seq_fil
- ret = security_secid_to_secctx(ct->secmark, &secctx, &len);
- if (ret)
- - return ret;
- + return 0;
- ret = seq_printf(s, "secctx=%s ", secctx);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_log.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_log.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_log.c 2011-04-01 17:56:56.769710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/netfilter/nf_log.c 2011-04-02 01:37:43.158688354 +0200
- @@ -85,6 +85,8 @@ EXPORT_SYMBOL(nf_log_unregister);
- int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger)
- {
- + if (pf >= ARRAY_SIZE(nf_loggers))
- + return -EINVAL;
- mutex_lock(&nf_log_mutex);
- if (__find_logger(pf, logger->name) == NULL) {
- mutex_unlock(&nf_log_mutex);
- @@ -98,6 +100,8 @@ EXPORT_SYMBOL(nf_log_bind_pf);
- void nf_log_unbind_pf(u_int8_t pf)
- {
- + if (pf >= ARRAY_SIZE(nf_loggers))
- + return;
- mutex_lock(&nf_log_mutex);
- rcu_assign_pointer(nf_loggers[pf], NULL);
- mutex_unlock(&nf_log_mutex);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/socket.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/socket.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/socket.c 2011-04-01 17:56:56.784710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/socket.c 2011-04-02 01:38:34.990688310 +0200
- @@ -2566,23 +2566,123 @@ static int dev_ifconf(struct net *net, s
- static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
- {
- + struct compat_ethtool_rxnfc __user *compat_rxnfc;
- + bool convert_in = false, convert_out = false;
- + size_t buf_size = ALIGN(sizeof(struct ifreq), 8);
- + struct ethtool_rxnfc __user *rxnfc;
- struct ifreq __user *ifr;
- + u32 rule_cnt = 0, actual_rule_cnt;
- + u32 ethcmd;
- u32 data;
- - void __user *datap;
- + int ret;
- - ifr = compat_alloc_user_space(sizeof(*ifr));
- + if (get_user(data, &ifr32->ifr_ifru.ifru_data))
- + return -EFAULT;
- - if (copy_in_user(&ifr->ifr_name, &ifr32->ifr_name, IFNAMSIZ))
- + compat_rxnfc = compat_ptr(data);
- +
- + if (get_user(ethcmd, &compat_rxnfc->cmd))
- return -EFAULT;
- - if (get_user(data, &ifr32->ifr_ifru.ifru_data))
- + /* Most ethtool structures are defined without padding.
- + * Unfortunately struct ethtool_rxnfc is an exception.
- + */
- + switch (ethcmd) {
- + default:
- + break;
- + case ETHTOOL_GRXCLSRLALL:
- + /* Buffer size is variable */
- + if (get_user(rule_cnt, &compat_rxnfc->rule_cnt))
- + return -EFAULT;
- + if (rule_cnt > KMALLOC_MAX_SIZE / sizeof(u32))
- + return -ENOMEM;
- + buf_size += rule_cnt * sizeof(u32);
- + /* fall through */
- + case ETHTOOL_GRXRINGS:
- + case ETHTOOL_GRXCLSRLCNT:
- + case ETHTOOL_GRXCLSRULE:
- + convert_out = true;
- + /* fall through */
- + case ETHTOOL_SRXCLSRLDEL:
- + case ETHTOOL_SRXCLSRLINS:
- + buf_size += sizeof(struct ethtool_rxnfc);
- + convert_in = true;
- + break;
- + }
- +
- + ifr = compat_alloc_user_space(buf_size);
- + rxnfc = (void *)ifr + ALIGN(sizeof(struct ifreq), 8);
- +
- + if (copy_in_user(&ifr->ifr_name, &ifr32->ifr_name, IFNAMSIZ))
- return -EFAULT;
- - datap = compat_ptr(data);
- - if (put_user(datap, &ifr->ifr_ifru.ifru_data))
- + if (put_user(convert_in ? rxnfc : compat_ptr(data),
- + &ifr->ifr_ifru.ifru_data))
- return -EFAULT;
- - return dev_ioctl(net, SIOCETHTOOL, ifr);
- + if (convert_in) {
- + /* We expect there to be holes between fs.m_u and
- + * fs.ring_cookie and at the end of fs, but nowhere else.
- + */
- + BUILD_BUG_ON(offsetof(struct compat_ethtool_rxnfc, fs.m_u) +
- + sizeof(compat_rxnfc->fs.m_u) !=
- + offsetof(struct ethtool_rxnfc, fs.m_u) +
- + sizeof(rxnfc->fs.m_u));
- + BUILD_BUG_ON(
- + offsetof(struct compat_ethtool_rxnfc, fs.location) -
- + offsetof(struct compat_ethtool_rxnfc, fs.ring_cookie) !=
- + offsetof(struct ethtool_rxnfc, fs.location) -
- + offsetof(struct ethtool_rxnfc, fs.ring_cookie));
- +
- + if (copy_in_user(rxnfc, compat_rxnfc,
- + (void *)(&rxnfc->fs.m_u + 1) -
- + (void *)rxnfc) ||
- + copy_in_user(&rxnfc->fs.ring_cookie,
- + &compat_rxnfc->fs.ring_cookie,
- + (void *)(&rxnfc->fs.location + 1) -
- + (void *)&rxnfc->fs.ring_cookie) ||
- + copy_in_user(&rxnfc->rule_cnt, &compat_rxnfc->rule_cnt,
- + sizeof(rxnfc->rule_cnt)))
- + return -EFAULT;
- + }
- +
- + ret = dev_ioctl(net, SIOCETHTOOL, ifr);
- + if (ret)
- + return ret;
- +
- + if (convert_out) {
- + if (copy_in_user(compat_rxnfc, rxnfc,
- + (const void *)(&rxnfc->fs.m_u + 1) -
- + (const void *)rxnfc) ||
- + copy_in_user(&compat_rxnfc->fs.ring_cookie,
- + &rxnfc->fs.ring_cookie,
- + (const void *)(&rxnfc->fs.location + 1) -
- + (const void *)&rxnfc->fs.ring_cookie) ||
- + copy_in_user(&compat_rxnfc->rule_cnt, &rxnfc->rule_cnt,
- + sizeof(rxnfc->rule_cnt)))
- + return -EFAULT;
- +
- + if (ethcmd == ETHTOOL_GRXCLSRLALL) {
- + /* As an optimisation, we only copy the actual
- + * number of rules that the underlying
- + * function returned. Since Mallory might
- + * change the rule count in user memory, we
- + * check that it is less than the rule count
- + * originally given (as the user buffer size),
- + * which has been range-checked.
- + */
- + if (get_user(actual_rule_cnt, &rxnfc->rule_cnt))
- + return -EFAULT;
- + if (actual_rule_cnt < rule_cnt)
- + rule_cnt = actual_rule_cnt;
- + if (copy_in_user(&compat_rxnfc->rule_locs[0],
- + &rxnfc->rule_locs[0],
- + rule_cnt * sizeof(u32)))
- + return -EFAULT;
- + }
- + }
- +
- + return 0;
- }
- static int compat_siocwandev(struct net *net, struct compat_ifreq __user *uifr32)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/clnt.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/clnt.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/clnt.c 2011-04-01 17:56:56.788710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/clnt.c 2011-04-02 01:37:43.179688354 +0200
- @@ -436,7 +436,9 @@ void rpc_killall_tasks(struct rpc_clnt *
- if (!(rovr->tk_flags & RPC_TASK_KILLED)) {
- rovr->tk_flags |= RPC_TASK_KILLED;
- rpc_exit(rovr, -EIO);
- - rpc_wake_up_queued_task(rovr->tk_waitqueue, rovr);
- + if (RPC_IS_QUEUED(rovr))
- + rpc_wake_up_queued_task(rovr->tk_waitqueue,
- + rovr);
- }
- }
- spin_unlock(&clnt->cl_lock);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/sched.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/sched.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/sched.c 2011-04-01 17:56:56.784710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/sched.c 2011-04-02 01:37:43.177688353 +0200
- @@ -623,14 +623,12 @@ static void __rpc_execute(struct rpc_tas
- save_callback = task->tk_callback;
- task->tk_callback = NULL;
- save_callback(task);
- - }
- -
- - /*
- - * Perform the next FSM step.
- - * tk_action may be NULL when the task has been killed
- - * by someone else.
- - */
- - if (!RPC_IS_QUEUED(task)) {
- + } else {
- + /*
- + * Perform the next FSM step.
- + * tk_action may be NULL when the task has been killed
- + * by someone else.
- + */
- if (task->tk_action == NULL)
- break;
- task->tk_action(task);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/xprtsock.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/xprtsock.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/xprtsock.c 2011-04-01 17:56:56.784710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/sunrpc/xprtsock.c 2011-04-02 01:38:34.991688310 +0200
- @@ -710,6 +710,8 @@ static void xs_reset_transport(struct so
- if (sk == NULL)
- return;
- + transport->srcport = 0;
- +
- write_lock_bh(&sk->sk_callback_lock);
- transport->inet = NULL;
- transport->sock = NULL;
- @@ -1631,7 +1633,8 @@ static struct socket *xs_create_sock(str
- }
- xs_reclassify_socket(family, sock);
- - if (xs_bind(transport, sock)) {
- + err = xs_bind(transport, sock);
- + if (err) {
- sock_release(sock);
- goto out;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/wireless/wext-compat.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/wireless/wext-compat.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//net/wireless/wext-compat.c 2011-04-01 17:56:56.789710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//net/wireless/wext-compat.c 2011-04-02 01:37:43.183688354 +0200
- @@ -802,11 +802,11 @@ int cfg80211_wext_siwfreq(struct net_dev
- return freq;
- if (freq == 0)
- return -EINVAL;
- - wdev_lock(wdev);
- mutex_lock(&rdev->devlist_mtx);
- + wdev_lock(wdev);
- err = cfg80211_set_freq(rdev, wdev, freq, NL80211_CHAN_NO_HT);
- - mutex_unlock(&rdev->devlist_mtx);
- wdev_unlock(wdev);
- + mutex_unlock(&rdev->devlist_mtx);
- return err;
- default:
- return -EOPNOTSUPP;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//security/tomoyo/file.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//security/tomoyo/file.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//security/tomoyo/file.c 2011-04-01 17:56:56.726710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//security/tomoyo/file.c 2011-04-02 01:37:43.092688353 +0200
- @@ -927,7 +927,7 @@ int tomoyo_check_open_permission(struct
- struct path *path, const int flag)
- {
- const u8 acc_mode = ACC_MODE(flag);
- - int error = -ENOMEM;
- + int error = 0;
- struct tomoyo_path_info buf;
- struct tomoyo_request_info r;
- int idx;
- @@ -938,9 +938,6 @@ int tomoyo_check_open_permission(struct
- buf.name = NULL;
- r.mode = TOMOYO_CONFIG_DISABLED;
- idx = tomoyo_read_lock();
- - if (!tomoyo_get_realpath(&buf, path))
- - goto out;
- - error = 0;
- /*
- * If the filename is specified by "deny_rewrite" keyword,
- * we need to check "allow_rewrite" permission when the filename is not
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/drivers/aloop.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/drivers/aloop.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/drivers/aloop.c 2011-04-01 17:56:57.325710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/drivers/aloop.c 2011-04-02 01:37:43.414688352 +0200
- @@ -482,8 +482,9 @@ static unsigned int loopback_pos_update(
- cable->streams[SNDRV_PCM_STREAM_CAPTURE];
- unsigned long delta_play = 0, delta_capt = 0;
- unsigned int running;
- + unsigned long flags;
- - spin_lock(&cable->lock);
- + spin_lock_irqsave(&cable->lock, flags);
- running = cable->running ^ cable->pause;
- if (running & (1 << SNDRV_PCM_STREAM_PLAYBACK)) {
- delta_play = jiffies - dpcm_play->last_jiffies;
- @@ -495,10 +496,8 @@ static unsigned int loopback_pos_update(
- dpcm_capt->last_jiffies += delta_capt;
- }
- - if (delta_play == 0 && delta_capt == 0) {
- - spin_unlock(&cable->lock);
- - return running;
- - }
- + if (delta_play == 0 && delta_capt == 0)
- + goto unlock;
- if (delta_play > delta_capt) {
- loopback_bytepos_update(dpcm_play, delta_play - delta_capt,
- @@ -510,14 +509,14 @@ static unsigned int loopback_pos_update(
- delta_capt = delta_play;
- }
- - if (delta_play == 0 && delta_capt == 0) {
- - spin_unlock(&cable->lock);
- - return running;
- - }
- + if (delta_play == 0 && delta_capt == 0)
- + goto unlock;
- +
- /* note delta_capt == delta_play at this moment */
- loopback_bytepos_update(dpcm_capt, delta_capt, BYTEPOS_UPDATE_COPY);
- loopback_bytepos_update(dpcm_play, delta_play, BYTEPOS_UPDATE_POSONLY);
- - spin_unlock(&cable->lock);
- + unlock:
- + spin_unlock_irqrestore(&cable->lock, flags);
- return running;
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/asihpi/hpioctl.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/asihpi/hpioctl.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/asihpi/hpioctl.c 2011-04-01 17:56:57.376710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/asihpi/hpioctl.c 2011-04-02 01:37:43.570688353 +0200
- @@ -155,6 +155,11 @@ long asihpi_hpi_ioctl(struct file *file,
- goto out;
- }
- + if (hm->h.adapter_index >= HPI_MAX_ADAPTERS) {
- + err = -EINVAL;
- + goto out;
- + }
- +
- pa = &adapters[hm->h.adapter_index];
- hr->h.size = 0;
- if (hm->h.object == HPI_OBJ_SUBSYSTEM) {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctatc.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctatc.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctatc.c 2011-04-01 17:56:57.389710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctatc.c 2011-04-02 01:37:43.575688353 +0200
- @@ -869,7 +869,7 @@ spdif_passthru_playback_setup(struct ct_
- mutex_lock(&atc->atc_mutex);
- dao->ops->get_spos(dao, &status);
- if (((status >> 24) & IEC958_AES3_CON_FS) != iec958_con_fs) {
- - status &= ((~IEC958_AES3_CON_FS) << 24);
- + status &= ~(IEC958_AES3_CON_FS << 24);
- status |= (iec958_con_fs << 24);
- dao->ops->set_spos(dao, status);
- dao->ops->commit_write(dao);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctdaio.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctdaio.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctdaio.c 2011-04-01 17:56:57.388710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctdaio.c 2011-04-02 01:37:43.574688353 +0200
- @@ -176,6 +176,7 @@ static int dao_set_left_input(struct dao
- if (!entry)
- return -ENOMEM;
- + dao->ops->clear_left_input(dao);
- /* Program master and conjugate resources */
- input->ops->master(input);
- daio->rscl.ops->master(&daio->rscl);
- @@ -204,6 +205,7 @@ static int dao_set_right_input(struct da
- if (!entry)
- return -ENOMEM;
- + dao->ops->clear_right_input(dao);
- /* Program master and conjugate resources */
- input->ops->master(input);
- daio->rscr.ops->master(&daio->rscr);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctmixer.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctmixer.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctmixer.c 2011-04-01 17:56:57.389710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/ctxfi/ctmixer.c 2011-04-02 01:37:43.575688353 +0200
- @@ -566,19 +566,6 @@ static int ct_spdif_get_mask(struct snd_
- return 0;
- }
- -static int ct_spdif_default_get(struct snd_kcontrol *kcontrol,
- - struct snd_ctl_elem_value *ucontrol)
- -{
- - unsigned int status = SNDRV_PCM_DEFAULT_CON_SPDIF;
- -
- - ucontrol->value.iec958.status[0] = (status >> 0) & 0xff;
- - ucontrol->value.iec958.status[1] = (status >> 8) & 0xff;
- - ucontrol->value.iec958.status[2] = (status >> 16) & 0xff;
- - ucontrol->value.iec958.status[3] = (status >> 24) & 0xff;
- -
- - return 0;
- -}
- -
- static int ct_spdif_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- @@ -586,6 +573,10 @@ static int ct_spdif_get(struct snd_kcont
- unsigned int status;
- atc->spdif_out_get_status(atc, &status);
- +
- + if (status == 0)
- + status = SNDRV_PCM_DEFAULT_CON_SPDIF;
- +
- ucontrol->value.iec958.status[0] = (status >> 0) & 0xff;
- ucontrol->value.iec958.status[1] = (status >> 8) & 0xff;
- ucontrol->value.iec958.status[2] = (status >> 16) & 0xff;
- @@ -629,7 +620,7 @@ static struct snd_kcontrol_new iec958_de
- .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
- .count = 1,
- .info = ct_spdif_info,
- - .get = ct_spdif_default_get,
- + .get = ct_spdif_get,
- .put = ct_spdif_put,
- .private_value = MIXER_IEC958_DEFAULT
- };
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_cirrus.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_cirrus.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_cirrus.c 2011-04-01 17:56:57.369710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_cirrus.c 2011-04-02 01:37:43.559688353 +0200
- @@ -1039,9 +1039,11 @@ static struct hda_verb cs_errata_init_ve
- {0x11, AC_VERB_SET_PROC_COEF, 0x0008},
- {0x11, AC_VERB_SET_PROC_STATE, 0x00},
- +#if 0 /* Don't to set to D3 as we are in power-up sequence */
- {0x07, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Rx: D3 */
- {0x08, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Tx: D3 */
- /*{0x01, AC_VERB_SET_POWER_STATE, 0x03},*/ /* AFG: D3 This is already handled */
- +#endif
- {} /* terminator */
- };
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_conexant.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_conexant.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_conexant.c 2011-04-01 17:56:57.368710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_conexant.c 2011-04-02 01:37:43.559688353 +0200
- @@ -3106,6 +3106,8 @@ static struct snd_pci_quirk cxt5066_cfg_
- SND_PCI_QUIRK(0x1028, 0x0401, "Dell Vostro 1014", CXT5066_DELL_VOSTRO),
- SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO),
- SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD),
- + SND_PCI_QUIRK(0x1028, 0x050f, "Dell Inspiron", CXT5066_IDEAPAD),
- + SND_PCI_QUIRK(0x1028, 0x0510, "Dell Vostro", CXT5066_IDEAPAD),
- SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP),
- SND_PCI_QUIRK(0x1043, 0x13f3, "Asus A52J", CXT5066_HP_LAPTOP),
- SND_PCI_QUIRK(0x1179, 0xff1e, "Toshiba Satellite C650D", CXT5066_IDEAPAD),
- @@ -3890,6 +3892,8 @@ static struct hda_codec_preset snd_hda_p
- .patch = patch_cxt5066 },
- { .id = 0x14f15069, .name = "CX20585",
- .patch = patch_cxt5066 },
- + { .id = 0x14f1506e, .name = "CX20590",
- + .patch = patch_cxt5066 },
- { .id = 0x14f15097, .name = "CX20631",
- .patch = patch_conexant_auto },
- { .id = 0x14f15098, .name = "CX20632",
- @@ -3916,6 +3920,7 @@ MODULE_ALIAS("snd-hda-codec-id:14f15066"
- MODULE_ALIAS("snd-hda-codec-id:14f15067");
- MODULE_ALIAS("snd-hda-codec-id:14f15068");
- MODULE_ALIAS("snd-hda-codec-id:14f15069");
- +MODULE_ALIAS("snd-hda-codec-id:14f1506e");
- MODULE_ALIAS("snd-hda-codec-id:14f15097");
- MODULE_ALIAS("snd-hda-codec-id:14f15098");
- MODULE_ALIAS("snd-hda-codec-id:14f150a1");
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_realtek.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_realtek.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_realtek.c 2011-04-01 17:56:57.369710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_realtek.c 2011-04-02 01:37:43.560688353 +0200
- @@ -393,6 +393,7 @@ struct alc_spec {
- /* other flags */
- unsigned int no_analog :1; /* digital I/O only */
- unsigned int dual_adc_switch:1; /* switch ADCs (for ALC275) */
- + unsigned int single_input_src:1;
- int init_amp;
- int codec_variant; /* flag for other variants */
- @@ -1127,11 +1128,8 @@ static void alc_automute_speaker(struct
- nid = spec->autocfg.hp_pins[i];
- if (!nid)
- break;
- - if (snd_hda_jack_detect(codec, nid)) {
- - spec->jack_present = 1;
- - break;
- - }
- - alc_report_jack(codec, spec->autocfg.hp_pins[i]);
- + alc_report_jack(codec, nid);
- + spec->jack_present |= snd_hda_jack_detect(codec, nid);
- }
- mute = spec->jack_present ? HDA_AMP_MUTE : 0;
- @@ -3801,6 +3799,8 @@ static struct hda_amp_list alc880_lg_loo
- * Common callbacks
- */
- +static void alc_init_special_input_src(struct hda_codec *codec);
- +
- static int alc_init(struct hda_codec *codec)
- {
- struct alc_spec *spec = codec->spec;
- @@ -3811,6 +3811,7 @@ static int alc_init(struct hda_codec *co
- for (i = 0; i < spec->num_init_verbs; i++)
- snd_hda_sequence_write(codec, spec->init_verbs[i]);
- + alc_init_special_input_src(codec);
- if (spec->init_hook)
- spec->init_hook(codec);
- @@ -5444,6 +5445,7 @@ static void fixup_single_adc(struct hda_
- spec->capsrc_nids += i;
- spec->adc_nids += i;
- spec->num_adc_nids = 1;
- + spec->single_input_src = 1;
- }
- }
- @@ -5455,6 +5457,16 @@ static void fixup_dual_adc_switch(struct
- init_capsrc_for_pin(codec, spec->int_mic.pin);
- }
- +/* initialize some special cases for input sources */
- +static void alc_init_special_input_src(struct hda_codec *codec)
- +{
- + struct alc_spec *spec = codec->spec;
- + if (spec->dual_adc_switch)
- + fixup_dual_adc_switch(codec);
- + else if (spec->single_input_src)
- + init_capsrc_for_pin(codec, spec->autocfg.inputs[0].pin);
- +}
- +
- static void set_capture_mixer(struct hda_codec *codec)
- {
- struct alc_spec *spec = codec->spec;
- @@ -5470,7 +5482,7 @@ static void set_capture_mixer(struct hda
- int mux = 0;
- int num_adcs = spec->num_adc_nids;
- if (spec->dual_adc_switch)
- - fixup_dual_adc_switch(codec);
- + num_adcs = 1;
- else if (spec->auto_mic)
- fixup_automic_adc(codec);
- else if (spec->input_mux) {
- @@ -5479,8 +5491,6 @@ static void set_capture_mixer(struct hda
- else if (spec->input_mux->num_items == 1)
- fixup_single_adc(codec);
- }
- - if (spec->dual_adc_switch)
- - num_adcs = 1;
- spec->cap_mixer = caps[mux][num_adcs - 1];
- }
- }
- @@ -10739,23 +10749,28 @@ static void alc882_auto_init_hp_out(stru
- hda_nid_t pin, dac;
- int i;
- - for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
- - pin = spec->autocfg.hp_pins[i];
- - if (!pin)
- - break;
- - dac = spec->multiout.hp_nid;
- - if (!dac)
- - dac = spec->multiout.dac_nids[0]; /* to front */
- - alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
- + if (spec->autocfg.line_out_type != AUTO_PIN_HP_OUT) {
- + for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
- + pin = spec->autocfg.hp_pins[i];
- + if (!pin)
- + break;
- + dac = spec->multiout.hp_nid;
- + if (!dac)
- + dac = spec->multiout.dac_nids[0]; /* to front */
- + alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
- + }
- }
- - for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
- - pin = spec->autocfg.speaker_pins[i];
- - if (!pin)
- - break;
- - dac = spec->multiout.extra_out_nid[0];
- - if (!dac)
- - dac = spec->multiout.dac_nids[0]; /* to front */
- - alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
- +
- + if (spec->autocfg.line_out_type != AUTO_PIN_SPEAKER_OUT) {
- + for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
- + pin = spec->autocfg.speaker_pins[i];
- + if (!pin)
- + break;
- + dac = spec->multiout.extra_out_nid[0];
- + if (!dac)
- + dac = spec->multiout.dac_nids[0]; /* to front */
- + alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
- + }
- }
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_sigmatel.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_sigmatel.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_sigmatel.c 2011-04-01 17:56:57.369710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_sigmatel.c 2011-04-02 01:38:34.992688310 +0200
- @@ -94,6 +94,7 @@ enum {
- STAC_92HD83XXX_REF,
- STAC_92HD83XXX_PWR_REF,
- STAC_DELL_S14,
- + STAC_DELL_E5520M,
- STAC_92HD83XXX_HP,
- STAC_HP_DV7_4000,
- STAC_92HD83XXX_MODELS
- @@ -749,7 +750,7 @@ static int stac92xx_mux_enum_put(struct
- struct sigmatel_spec *spec = codec->spec;
- unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
- const struct hda_input_mux *imux = spec->input_mux;
- - unsigned int idx, prev_idx;
- + unsigned int idx, prev_idx, didx;
- idx = ucontrol->value.enumerated.item[0];
- if (idx >= imux->num_items)
- @@ -761,7 +762,8 @@ static int stac92xx_mux_enum_put(struct
- snd_hda_codec_write_cache(codec, spec->mux_nids[adc_idx], 0,
- AC_VERB_SET_CONNECT_SEL,
- imux->items[idx].index);
- - if (prev_idx >= spec->num_analog_muxes) {
- + if (prev_idx >= spec->num_analog_muxes &&
- + spec->mux_nids[adc_idx] != spec->dmux_nids[adc_idx]) {
- imux = spec->dinput_mux;
- /* 0 = analog */
- snd_hda_codec_write_cache(codec,
- @@ -771,9 +773,13 @@ static int stac92xx_mux_enum_put(struct
- }
- } else {
- imux = spec->dinput_mux;
- + /* first dimux item is hardcoded to select analog imux,
- + * so lets skip it
- + */
- + didx = idx - spec->num_analog_muxes + 1;
- snd_hda_codec_write_cache(codec, spec->dmux_nids[adc_idx], 0,
- AC_VERB_SET_CONNECT_SEL,
- - imux->items[idx - 1].index);
- + imux->items[didx].index);
- }
- spec->cur_mux[adc_idx] = idx;
- return 1;
- @@ -1644,6 +1650,13 @@ static unsigned int dell_s14_pin_configs
- 0x40f000f0, 0x40f000f0,
- };
- +/* Switch int mic from 0x20 to 0x11 */
- +static unsigned int dell_e5520m_pin_configs[10] = {
- + 0x04a11020, 0x0421101f, 0x400000f0, 0x90170110,
- + 0x23011050, 0x23a1102e, 0x400000f3, 0xd5a30130,
- + 0x400000f0, 0x40f000f0,
- +};
- +
- static unsigned int hp_dv7_4000_pin_configs[10] = {
- 0x03a12050, 0x0321201f, 0x40f000f0, 0x90170110,
- 0x40f000f0, 0x40f000f0, 0x90170110, 0xd5a30140,
- @@ -1654,6 +1667,7 @@ static unsigned int *stac92hd83xxx_brd_t
- [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs,
- [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs,
- [STAC_DELL_S14] = dell_s14_pin_configs,
- + [STAC_DELL_E5520M] = dell_e5520m_pin_configs,
- [STAC_HP_DV7_4000] = hp_dv7_4000_pin_configs,
- };
- @@ -1662,6 +1676,7 @@ static const char *stac92hd83xxx_models[
- [STAC_92HD83XXX_REF] = "ref",
- [STAC_92HD83XXX_PWR_REF] = "mic-ref",
- [STAC_DELL_S14] = "dell-s14",
- + [STAC_DELL_E5520M] = "dell-e5520m",
- [STAC_92HD83XXX_HP] = "hp",
- [STAC_HP_DV7_4000] = "hp-dv7-4000",
- };
- @@ -1674,6 +1689,14 @@ static struct snd_pci_quirk stac92hd83xx
- "DFI LanParty", STAC_92HD83XXX_REF),
- SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba,
- "unknown Dell", STAC_DELL_S14),
- + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x049a,
- + "Dell E5520", STAC_DELL_E5520M),
- + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x049b,
- + "Dell E5420", STAC_DELL_E5520M),
- + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x04eb,
- + "Dell E5420m", STAC_DELL_E5520M),
- + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x04ec,
- + "Dell E5520m", STAC_DELL_E5520M),
- SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x3600,
- "HP", STAC_92HD83XXX_HP),
- {} /* terminator */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_via.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_via.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_via.c 2011-04-01 17:56:57.369710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/pci/hda/patch_via.c 2011-04-02 01:38:34.994688310 +0200
- @@ -159,6 +159,7 @@ struct via_spec {
- #endif
- };
- +static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec);
- static struct via_spec * via_new_spec(struct hda_codec *codec)
- {
- struct via_spec *spec;
- @@ -169,6 +170,10 @@ static struct via_spec * via_new_spec(st
- codec->spec = spec;
- spec->codec = codec;
- + spec->codec_type = get_codec_type(codec);
- + /* VT1708BCE & VT1708S are almost same */
- + if (spec->codec_type == VT1708BCE)
- + spec->codec_type = VT1708S;
- return spec;
- }
- @@ -568,7 +573,7 @@ static void via_auto_init_analog_input(s
- hda_nid_t nid = cfg->inputs[i].pin;
- if (spec->smart51_enabled && is_smart51_pins(spec, nid))
- ctl = PIN_OUT;
- - else if (i == AUTO_PIN_MIC)
- + else if (cfg->inputs[i].type == AUTO_PIN_MIC)
- ctl = PIN_VREF50;
- else
- ctl = PIN_IN;
- @@ -1102,6 +1107,7 @@ static int via_mux_enum_put(struct snd_k
- struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
- struct via_spec *spec = codec->spec;
- unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
- + int ret;
- if (!spec->mux_nids[adc_idx])
- return -EINVAL;
- @@ -1110,12 +1116,14 @@ static int via_mux_enum_put(struct snd_k
- AC_VERB_GET_POWER_STATE, 0x00) != AC_PWRST_D0)
- snd_hda_codec_write(codec, spec->mux_nids[adc_idx], 0,
- AC_VERB_SET_POWER_STATE, AC_PWRST_D0);
- - /* update jack power state */
- - set_jack_power_state(codec);
- - return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,
- + ret = snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,
- spec->mux_nids[adc_idx],
- &spec->cur_mux[adc_idx]);
- + /* update jack power state */
- + set_jack_power_state(codec);
- +
- + return ret;
- }
- static int via_independent_hp_info(struct snd_kcontrol *kcontrol,
- @@ -1189,8 +1197,16 @@ static int via_independent_hp_put(struct
- /* Get Independent Mode index of headphone pin widget */
- spec->hp_independent_mode = spec->hp_independent_mode_index == pinsel
- ? 1 : 0;
- - snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, pinsel);
- + if (spec->codec_type == VT1718S)
- + snd_hda_codec_write(codec, nid, 0,
- + AC_VERB_SET_CONNECT_SEL, pinsel ? 2 : 0);
- + else
- + snd_hda_codec_write(codec, nid, 0,
- + AC_VERB_SET_CONNECT_SEL, pinsel);
- + if (spec->codec_type == VT1812)
- + snd_hda_codec_write(codec, 0x35, 0,
- + AC_VERB_SET_CONNECT_SEL, pinsel);
- if (spec->multiout.hp_nid && spec->multiout.hp_nid
- != spec->multiout.dac_nids[HDA_FRONT])
- snd_hda_codec_setup_stream(codec, spec->multiout.hp_nid,
- @@ -1209,6 +1225,8 @@ static int via_independent_hp_put(struct
- activate_ctl(codec, "Headphone Playback Switch",
- spec->hp_independent_mode);
- }
- + /* update jack power state */
- + set_jack_power_state(codec);
- return 0;
- }
- @@ -1249,9 +1267,12 @@ static int via_hp_build(struct hda_codec
- break;
- }
- - nums = snd_hda_get_connections(codec, nid, conn, HDA_MAX_CONNECTIONS);
- - if (nums <= 1)
- - return 0;
- + if (spec->codec_type != VT1708) {
- + nums = snd_hda_get_connections(codec, nid,
- + conn, HDA_MAX_CONNECTIONS);
- + if (nums <= 1)
- + return 0;
- + }
- knew = via_clone_control(spec, &via_hp_mixer[0]);
- if (knew == NULL)
- @@ -1311,6 +1332,11 @@ static void mute_aa_path(struct hda_code
- start_idx = 2;
- end_idx = 4;
- break;
- + case VT1718S:
- + nid_mixer = 0x21;
- + start_idx = 1;
- + end_idx = 3;
- + break;
- default:
- return;
- }
- @@ -2186,10 +2212,6 @@ static int via_init(struct hda_codec *co
- for (i = 0; i < spec->num_iverbs; i++)
- snd_hda_sequence_write(codec, spec->init_verbs[i]);
- - spec->codec_type = get_codec_type(codec);
- - if (spec->codec_type == VT1708BCE)
- - spec->codec_type = VT1708S; /* VT1708BCE & VT1708S are almost
- - same */
- /* Lydia Add for EAPD enable */
- if (!spec->dig_in_nid) { /* No Digital In connection */
- if (spec->dig_in_pin) {
- @@ -2437,7 +2459,14 @@ static int vt_auto_create_analog_input_c
- else
- type_idx = 0;
- label = hda_get_autocfg_input_label(codec, cfg, i);
- - err = via_new_analog_input(spec, label, type_idx, idx, cap_nid);
- + if (spec->codec_type == VT1708S ||
- + spec->codec_type == VT1702 ||
- + spec->codec_type == VT1716S)
- + err = via_new_analog_input(spec, label, type_idx,
- + idx+1, cap_nid);
- + else
- + err = via_new_analog_input(spec, label, type_idx,
- + idx, cap_nid);
- if (err < 0)
- return err;
- snd_hda_add_imux_item(imux, label, idx, NULL);
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/codecs/wm8978.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/codecs/wm8978.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/codecs/wm8978.c 2011-04-01 17:56:57.335710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/codecs/wm8978.c 2011-04-02 01:37:43.433688351 +0200
- @@ -147,18 +147,18 @@ static const struct snd_kcontrol_new wm8
- SOC_SINGLE("DAC Playback Limiter Threshold",
- WM8978_DAC_LIMITER_2, 4, 7, 0),
- SOC_SINGLE("DAC Playback Limiter Boost",
- - WM8978_DAC_LIMITER_2, 0, 15, 0),
- + WM8978_DAC_LIMITER_2, 0, 12, 0),
- SOC_ENUM("ALC Enable Switch", alc1),
- SOC_SINGLE("ALC Capture Min Gain", WM8978_ALC_CONTROL_1, 0, 7, 0),
- SOC_SINGLE("ALC Capture Max Gain", WM8978_ALC_CONTROL_1, 3, 7, 0),
- - SOC_SINGLE("ALC Capture Hold", WM8978_ALC_CONTROL_2, 4, 7, 0),
- + SOC_SINGLE("ALC Capture Hold", WM8978_ALC_CONTROL_2, 4, 10, 0),
- SOC_SINGLE("ALC Capture Target", WM8978_ALC_CONTROL_2, 0, 15, 0),
- SOC_ENUM("ALC Capture Mode", alc3),
- - SOC_SINGLE("ALC Capture Decay", WM8978_ALC_CONTROL_3, 4, 15, 0),
- - SOC_SINGLE("ALC Capture Attack", WM8978_ALC_CONTROL_3, 0, 15, 0),
- + SOC_SINGLE("ALC Capture Decay", WM8978_ALC_CONTROL_3, 4, 10, 0),
- + SOC_SINGLE("ALC Capture Attack", WM8978_ALC_CONTROL_3, 0, 10, 0),
- SOC_SINGLE("ALC Capture Noise Gate Switch", WM8978_NOISE_GATE, 3, 1, 0),
- SOC_SINGLE("ALC Capture Noise Gate Threshold",
- @@ -213,8 +213,10 @@ static const struct snd_kcontrol_new wm8
- WM8978_LOUT2_SPK_CONTROL, WM8978_ROUT2_SPK_CONTROL, 6, 1, 1),
- /* DAC / ADC oversampling */
- - SOC_SINGLE("DAC 128x Oversampling Switch", WM8978_DAC_CONTROL, 8, 1, 0),
- - SOC_SINGLE("ADC 128x Oversampling Switch", WM8978_ADC_CONTROL, 8, 1, 0),
- + SOC_SINGLE("DAC 128x Oversampling Switch", WM8978_DAC_CONTROL,
- + 5, 1, 0),
- + SOC_SINGLE("ADC 128x Oversampling Switch", WM8978_ADC_CONTROL,
- + 5, 1, 0),
- };
- /* Mixer #1: Output (OUT1, OUT2) Mixer: mix AUX, Input mixer output and DAC */
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/codecs/wm9081.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/codecs/wm9081.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/codecs/wm9081.c 2011-04-01 17:56:57.335710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/codecs/wm9081.c 2011-04-02 01:37:43.435688353 +0200
- @@ -15,6 +15,7 @@
- #include <linux/moduleparam.h>
- #include <linux/init.h>
- #include <linux/delay.h>
- +#include <linux/device.h>
- #include <linux/pm.h>
- #include <linux/i2c.h>
- #include <linux/platform_device.h>
- @@ -1338,6 +1339,10 @@ static __devinit int wm9081_i2c_probe(st
- wm9081->control_type = SND_SOC_I2C;
- wm9081->control_data = i2c;
- + if (dev_get_platdata(&i2c->dev))
- + memcpy(&wm9081->retune, dev_get_platdata(&i2c->dev),
- + sizeof(wm9081->retune));
- +
- ret = snd_soc_register_codec(&i2c->dev,
- &soc_codec_dev_wm9081, &wm9081_dai, 1);
- if (ret < 0)
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/imx/eukrea-tlv320.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/imx/eukrea-tlv320.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/imx/eukrea-tlv320.c 2011-04-01 17:56:57.330710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/imx/eukrea-tlv320.c 2011-04-02 01:37:43.417688353 +0200
- @@ -80,7 +80,7 @@ static struct snd_soc_dai_link eukrea_tl
- .name = "tlv320aic23",
- .stream_name = "TLV320AIC23",
- .codec_dai_name = "tlv320aic23-hifi",
- - .platform_name = "imx-pcm-audio.0",
- + .platform_name = "imx-fiq-pcm-audio.0",
- .codec_name = "tlv320aic23-codec.0-001a",
- .cpu_dai_name = "imx-ssi.0",
- .ops = &eukrea_tlv320_snd_ops,
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e740_wm9705.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e740_wm9705.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e740_wm9705.c 2011-04-01 17:56:57.332710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e740_wm9705.c 2011-04-02 01:37:43.421688351 +0200
- @@ -117,7 +117,7 @@ static struct snd_soc_dai_link e740_dai[
- {
- .name = "AC97",
- .stream_name = "AC97 HiFi",
- - .cpu_dai_name = "pxa-ac97.0",
- + .cpu_dai_name = "pxa2xx-ac97",
- .codec_dai_name = "wm9705-hifi",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9705-codec",
- @@ -126,7 +126,7 @@ static struct snd_soc_dai_link e740_dai[
- {
- .name = "AC97 Aux",
- .stream_name = "AC97 Aux",
- - .cpu_dai_name = "pxa-ac97.1",
- + .cpu_dai_name = "pxa2xx-ac97-aux",
- .codec_dai_name = "wm9705-aux",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9705-codec",
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e750_wm9705.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e750_wm9705.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e750_wm9705.c 2011-04-01 17:56:57.332710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e750_wm9705.c 2011-04-02 01:37:43.421688351 +0200
- @@ -99,7 +99,7 @@ static struct snd_soc_dai_link e750_dai[
- {
- .name = "AC97",
- .stream_name = "AC97 HiFi",
- - .cpu_dai_name = "pxa-ac97.0",
- + .cpu_dai_name = "pxa2xx-ac97",
- .codec_dai_name = "wm9705-hifi",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9705-codec",
- @@ -109,7 +109,7 @@ static struct snd_soc_dai_link e750_dai[
- {
- .name = "AC97 Aux",
- .stream_name = "AC97 Aux",
- - .cpu_dai_name = "pxa-ac97.1",
- + .cpu_dai_name = "pxa2xx-ac97-aux",
- .codec_dai_name ="wm9705-aux",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9705-codec",
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e800_wm9712.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e800_wm9712.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e800_wm9712.c 2011-04-01 17:56:57.332710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/e800_wm9712.c 2011-04-02 01:37:43.422688351 +0200
- @@ -89,7 +89,7 @@ static struct snd_soc_dai_link e800_dai[
- {
- .name = "AC97",
- .stream_name = "AC97 HiFi",
- - .cpu_dai_name = "pxa-ac97.0",
- + .cpu_dai_name = "pxa2xx-ac97",
- .codec_dai_name = "wm9712-hifi",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9712-codec",
- @@ -98,7 +98,7 @@ static struct snd_soc_dai_link e800_dai[
- {
- .name = "AC97 Aux",
- .stream_name = "AC97 Aux",
- - .cpu_dai_name = "pxa-ac97.1",
- + .cpu_dai_name = "pxa2xx-ac97-aux",
- .codec_dai_name ="wm9712-aux",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9712-codec",
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/em-x270.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/em-x270.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/em-x270.c 2011-04-01 17:56:57.331710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/em-x270.c 2011-04-02 01:37:43.421688351 +0200
- @@ -38,7 +38,7 @@ static struct snd_soc_dai_link em_x270_d
- {
- .name = "AC97",
- .stream_name = "AC97 HiFi",
- - .cpu_dai_name = "pxa-ac97.0",
- + .cpu_dai_name = "pxa2xx-ac97",
- .codec_dai_name = "wm9712-hifi",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9712-codec",
- @@ -46,7 +46,7 @@ static struct snd_soc_dai_link em_x270_d
- {
- .name = "AC97 Aux",
- .stream_name = "AC97 Aux",
- - .cpu_dai_name = "pxa-ac97.1",
- + .cpu_dai_name = "pxa2xx-ac97-aux",
- .codec_dai_name ="wm9712-aux",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9712-codec",
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/mioa701_wm9713.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/mioa701_wm9713.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/mioa701_wm9713.c 2011-04-01 17:56:57.332710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/mioa701_wm9713.c 2011-04-02 01:37:43.422688351 +0200
- @@ -162,7 +162,7 @@ static struct snd_soc_dai_link mioa701_d
- {
- .name = "AC97",
- .stream_name = "AC97 HiFi",
- - .cpu_dai_name = "pxa-ac97.0",
- + .cpu_dai_name = "pxa2xx-ac97",
- .codec_dai_name = "wm9713-hifi",
- .codec_name = "wm9713-codec",
- .init = mioa701_wm9713_init,
- @@ -172,7 +172,7 @@ static struct snd_soc_dai_link mioa701_d
- {
- .name = "AC97 Aux",
- .stream_name = "AC97 Aux",
- - .cpu_dai_name = "pxa-ac97.1",
- + .cpu_dai_name = "pxa2xx-ac97-aux",
- .codec_dai_name ="wm9713-aux",
- .codec_name = "wm9713-codec",
- .platform_name = "pxa-pcm-audio",
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/palm27x.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/palm27x.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/palm27x.c 2011-04-01 17:56:57.332710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/palm27x.c 2011-04-02 01:37:43.422688351 +0200
- @@ -132,7 +132,7 @@ static struct snd_soc_dai_link palm27x_d
- {
- .name = "AC97 HiFi",
- .stream_name = "AC97 HiFi",
- - .cpu_dai_name = "pxa-ac97.0",
- + .cpu_dai_name = "pxa2xx-ac97",
- .codec_dai_name = "wm9712-hifi",
- .codec_name = "wm9712-codec",
- .platform_name = "pxa-pcm-audio",
- @@ -141,7 +141,7 @@ static struct snd_soc_dai_link palm27x_d
- {
- .name = "AC97 Aux",
- .stream_name = "AC97 Aux",
- - .cpu_dai_name = "pxa-ac97.1",
- + .cpu_dai_name = "pxa2xx-ac97-aux",
- .codec_dai_name = "wm9712-aux",
- .codec_name = "wm9712-codec",
- .platform_name = "pxa-pcm-audio",
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/tosa.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/tosa.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/tosa.c 2011-04-01 17:56:57.332710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/tosa.c 2011-04-02 01:37:43.421688351 +0200
- @@ -217,7 +217,7 @@ static struct snd_soc_dai_link tosa_dai[
- {
- .name = "AC97",
- .stream_name = "AC97 HiFi",
- - .cpu_dai_name = "pxa-ac97.0",
- + .cpu_dai_name = "pxa2xx-ac97",
- .codec_dai_name = "wm9712-hifi",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9712-codec",
- @@ -227,7 +227,7 @@ static struct snd_soc_dai_link tosa_dai[
- {
- .name = "AC97 Aux",
- .stream_name = "AC97 Aux",
- - .cpu_dai_name = "pxa-ac97.1",
- + .cpu_dai_name = "pxa2xx-ac97-aux",
- .codec_dai_name = "wm9712-aux",
- .platform_name = "pxa-pcm-audio",
- .codec_name = "wm9712-codec",
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/zylonite.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/zylonite.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/zylonite.c 2011-04-01 17:56:57.332710687 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/soc/pxa/zylonite.c 2011-04-02 01:37:43.422688351 +0200
- @@ -166,7 +166,7 @@ static struct snd_soc_dai_link zylonite_
- .stream_name = "AC97 HiFi",
- .codec_name = "wm9713-codec",
- .platform_name = "pxa-pcm-audio",
- - .cpu_dai_name = "pxa-ac97.0",
- + .cpu_dai_name = "pxa2xx-ac97",
- .codec_name = "wm9713-hifi",
- .init = zylonite_wm9713_init,
- },
- @@ -175,7 +175,7 @@ static struct snd_soc_dai_link zylonite_
- .stream_name = "AC97 Aux",
- .codec_name = "wm9713-codec",
- .platform_name = "pxa-pcm-audio",
- - .cpu_dai_name = "pxa-ac97.1",
- + .cpu_dai_name = "pxa2xx-ac97-aux",
- .codec_name = "wm9713-aux",
- },
- {
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/card.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/card.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/card.c 2011-04-01 17:56:57.340710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/card.c 2011-04-02 01:37:43.444688353 +0200
- @@ -323,6 +323,7 @@ static int snd_usb_audio_create(struct u
- return -ENOMEM;
- }
- + mutex_init(&chip->shutdown_mutex);
- chip->index = idx;
- chip->dev = dev;
- chip->card = card;
- @@ -531,6 +532,7 @@ static void snd_usb_audio_disconnect(str
- chip = ptr;
- card = chip->card;
- mutex_lock(®ister_mutex);
- + mutex_lock(&chip->shutdown_mutex);
- chip->shutdown = 1;
- chip->num_interfaces--;
- if (chip->num_interfaces <= 0) {
- @@ -548,9 +550,11 @@ static void snd_usb_audio_disconnect(str
- snd_usb_mixer_disconnect(p);
- }
- usb_chip[chip->index] = NULL;
- + mutex_unlock(&chip->shutdown_mutex);
- mutex_unlock(®ister_mutex);
- snd_card_free_when_closed(card);
- } else {
- + mutex_unlock(&chip->shutdown_mutex);
- mutex_unlock(®ister_mutex);
- }
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/pcm.c linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/pcm.c
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/pcm.c 2011-04-01 17:56:57.341710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/pcm.c 2011-04-02 01:37:43.444688353 +0200
- @@ -361,6 +361,7 @@ static int snd_usb_hw_params(struct snd_
- }
- if (changed) {
- + mutex_lock(&subs->stream->chip->shutdown_mutex);
- /* format changed */
- snd_usb_release_substream_urbs(subs, 0);
- /* influenced: period_bytes, channels, rate, format, */
- @@ -368,6 +369,7 @@ static int snd_usb_hw_params(struct snd_
- params_rate(hw_params),
- snd_pcm_format_physical_width(params_format(hw_params)) *
- params_channels(hw_params));
- + mutex_unlock(&subs->stream->chip->shutdown_mutex);
- }
- return ret;
- @@ -385,8 +387,9 @@ static int snd_usb_hw_free(struct snd_pc
- subs->cur_audiofmt = NULL;
- subs->cur_rate = 0;
- subs->period_bytes = 0;
- - if (!subs->stream->chip->shutdown)
- - snd_usb_release_substream_urbs(subs, 0);
- + mutex_lock(&subs->stream->chip->shutdown_mutex);
- + snd_usb_release_substream_urbs(subs, 0);
- + mutex_unlock(&subs->stream->chip->shutdown_mutex);
- return snd_pcm_lib_free_vmalloc_buffer(substream);
- }
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/usbaudio.h linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/usbaudio.h
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/usbaudio.h 2011-04-01 17:56:57.341710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//sound/usb/usbaudio.h 2011-04-02 01:37:43.445688353 +0200
- @@ -36,6 +36,7 @@ struct snd_usb_audio {
- struct snd_card *card;
- u32 usb_id;
- int shutdown;
- + struct mutex shutdown_mutex;
- unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */
- int num_interfaces;
- int num_suspended_intf;
- diff -Nrupad linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//tools/perf/util/PERF-VERSION-GEN linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//tools/perf/util/PERF-VERSION-GEN
- --- linux-2.6.37.2_plus_v1_CFS_compaction_zcache_no-2.6.38//tools/perf/util/PERF-VERSION-GEN 2011-04-01 17:56:57.399710688 +0200
- +++ linux-2.6.37.6_plus_v1_CFS_compaction_zcache_no-2.6.38//tools/perf/util/PERF-VERSION-GEN 2011-04-02 01:37:43.600688353 +0200
- @@ -23,10 +23,10 @@ if test -d ../../.git -o -f ../../.git &
- then
- VN=$(echo "$VN" | sed -e 's/-/./g');
- else
- - eval `grep '^VERSION\s*=' ../../Makefile|tr -d ' '`
- - eval `grep '^PATCHLEVEL\s*=' ../../Makefile|tr -d ' '`
- - eval `grep '^SUBLEVEL\s*=' ../../Makefile|tr -d ' '`
- - eval `grep '^EXTRAVERSION\s*=' ../../Makefile|tr -d ' '`
- + eval $(grep '^VERSION[[:space:]]*=' ../../Makefile|tr -d ' ')
- + eval $(grep '^PATCHLEVEL[[:space:]]*=' ../../Makefile|tr -d ' ')
- + eval $(grep '^SUBLEVEL[[:space:]]*=' ../../Makefile|tr -d ' ')
- + eval $(grep '^EXTRAVERSION[[:space:]]*=' ../../Makefile|tr -d ' ')
- VN="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement