Merge master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Mon, 5 Jun 2006 19:30:28 +0000 (12:30 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 5 Jun 2006 19:30:28 +0000 (12:30 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6:
  [PATCH] pcmcia: fix zeroing of cm4000_cs.c data
  [PATCH] pcmcia: missing pcmcia_get_socket() result check

49 files changed:
Documentation/serial/driver
MAINTAINERS
arch/alpha/kernel/alpha_ksyms.c
arch/alpha/kernel/process.c
arch/alpha/kernel/smp.c
arch/alpha/kernel/sys_titan.c
arch/arm/mach-ixp23xx/core.c
arch/powerpc/platforms/powermac/pfunc_core.c
arch/sparc64/kernel/head.S
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/smp.c
arch/sparc64/lib/checksum.S
arch/sparc64/lib/csum_copy.S
arch/um/Makefile-i386
arch/um/include/kern_util.h
arch/um/kernel/time_kern.c
arch/um/os-Linux/main.c
arch/um/os-Linux/time.c
arch/um/sys-i386/syscalls.c
arch/um/sys-x86_64/signal.c
arch/um/sys-x86_64/syscalls.c
block/cfq-iosched.c
drivers/ieee1394/sbp2.c
drivers/infiniband/ulp/ipoib/ipoib_ib.c
drivers/message/fusion/mptbase.c
drivers/net/forcedeth.c
drivers/net/pcmcia/nmclan_cs.c
drivers/rtc/rtc-m48t86.c
drivers/s390/cio/css.h
drivers/s390/cio/device_fsm.c
drivers/scsi/ppa.c
drivers/scsi/sata_sil24.c
drivers/scsi/scsi_devinfo.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_transport_sas.c
fs/namei.c
include/asm-alpha/smp.h
include/asm-arm/arch-ixp23xx/memory.h
include/asm-generic/pgtable.h
include/asm-mips/pgtable.h
include/asm-s390/lowcore.h
include/asm-sparc64/pgtable.h
include/asm-um/irqflags.h [new file with mode: 0644]
include/asm-um/uaccess.h
include/linux/m48t86.h
include/linux/mmzone.h
mm/slab.c
net/ipv4/tcp_highspeed.c
security/selinux/hooks.c

index df82116a9f261c35998c3bb5a69eb1a38c8d83d1..88ad615dd338d75e2b282422c8f2d6f7f3af80b7 100644 (file)
@@ -214,12 +214,13 @@ hardware.
        The interaction of the iflag bits is as follows (parity error
        given as an example):
        Parity error    INPCK   IGNPAR
-       None            n/a     n/a     character received
-       Yes             n/a     0       character discarded
-       Yes             0       1       character received, marked as
+       n/a             0       n/a     character received, marked as
                                        TTY_NORMAL
-       Yes             1       1       character received, marked as
+       None            1       n/a     character received, marked as
+                                       TTY_NORMAL
+       Yes             1       0       character received, marked as
                                        TTY_PARITY
+       Yes             1       1       character discarded
 
        Other flags may be used (eg, xon/xoff characters) if your
        hardware supports hardware "soft" flow control.
index 74d71cafb17c313bf82a51b86495bfcaadf4dcf5..141c22269eba366cbd299851ad3bbc07502d028a 100644 (file)
@@ -568,6 +568,18 @@ L: linuxppc-dev@ozlabs.org
 W:     http://www.penguinppc.org/ppc64/
 S:     Supported
 
+BROADCOM BNX2 GIGABIT ETHERNET DRIVER
+P:     Michael Chan
+M:     mchan@broadcom.com
+L:     netdev@vger.kernel.org
+S:     Supported
+
+BROADCOM TG3 GIGABIT ETHERNET DRIVER
+P:     Michael Chan
+M:     mchan@broadcom.com
+L:     netdev@vger.kernel.org
+S:     Supported
+
 BTTV VIDEO4LINUX DRIVER
 P:     Mauro Carvalho Chehab
 M:     mchehab@infradead.org
index c645c5e14786fdd17efddf40bb3ae2b40524ffd8..2b245ad731ee8f85a4e02ce3de100713760a414c 100644 (file)
@@ -182,7 +182,6 @@ EXPORT_SYMBOL(smp_num_cpus);
 EXPORT_SYMBOL(smp_call_function);
 EXPORT_SYMBOL(smp_call_function_on_cpu);
 EXPORT_SYMBOL(_atomic_dec_and_lock);
-EXPORT_SYMBOL(cpu_present_mask);
 #endif /* CONFIG_SMP */
 
 /*
index 9924fd07743abfd5bb4cda9e78ac3e58ca72a9d7..c760a831fd1a250d45bdc2e6e70f6f5c243fd3c1 100644 (file)
@@ -94,7 +94,7 @@ common_shutdown_1(void *generic_ptr)
        if (cpuid != boot_cpuid) {
                flags |= 0x00040000UL; /* "remain halted" */
                *pflags = flags;
-               clear_bit(cpuid, &cpu_present_mask);
+               cpu_clear(cpuid, cpu_present_map);
                halt();
        }
 #endif
@@ -120,8 +120,8 @@ common_shutdown_1(void *generic_ptr)
 
 #ifdef CONFIG_SMP
        /* Wait for the secondaries to halt. */
-       cpu_clear(boot_cpuid, cpu_possible_map);
-       while (cpus_weight(cpu_possible_map))
+       cpu_clear(boot_cpuid, cpu_present_map);
+       while (cpus_weight(cpu_present_map))
                barrier();
 #endif
 
index 185255416e8538c22384ae89491720834aa6fcc1..4dc273e537fdd38830deb0ede8a3b560827a8ab0 100644 (file)
@@ -68,7 +68,6 @@ enum ipi_message_type {
 static int smp_secondary_alive __initdata = 0;
 
 /* Which cpus ids came online.  */
-cpumask_t cpu_present_mask;
 cpumask_t cpu_online_map;
 
 EXPORT_SYMBOL(cpu_online_map);
@@ -439,7 +438,7 @@ setup_smp(void)
                        if ((cpu->flags & 0x1cc) == 0x1cc) {
                                smp_num_probed++;
                                /* Assume here that "whami" == index */
-                               cpu_set(i, cpu_present_mask);
+                               cpu_set(i, cpu_present_map);
                                cpu->pal_revision = boot_cpu_palrev;
                        }
 
@@ -450,11 +449,10 @@ setup_smp(void)
                }
        } else {
                smp_num_probed = 1;
-               cpu_set(boot_cpuid, cpu_present_mask);
        }
 
-       printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
-              smp_num_probed, cpu_possible_map.bits[0]);
+       printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n",
+              smp_num_probed, cpu_present_map.bits[0]);
 }
 
 /*
@@ -473,7 +471,7 @@ smp_prepare_cpus(unsigned int max_cpus)
 
        /* Nothing to do on a UP box, or when told not to.  */
        if (smp_num_probed == 1 || max_cpus == 0) {
-               cpu_present_mask = cpumask_of_cpu(boot_cpuid);
+               cpu_present_map = cpumask_of_cpu(boot_cpuid);
                printk(KERN_INFO "SMP mode deactivated.\n");
                return;
        }
@@ -486,10 +484,6 @@ smp_prepare_cpus(unsigned int max_cpus)
 void __devinit
 smp_prepare_boot_cpu(void)
 {
-       /*
-        * Mark the boot cpu (current cpu) as online
-        */ 
-       cpu_set(smp_processor_id(), cpu_online_map);
 }
 
 int __devinit
index 5f84417eeb7bee9502d0da72805bc895b864ca0f..2551fb49ae099150561407adc726e410b8e03c9f 100644 (file)
@@ -66,7 +66,7 @@ titan_update_irq_hw(unsigned long mask)
        register int bcpu = boot_cpuid;
 
 #ifdef CONFIG_SMP
-       cpumask_t cpm = cpu_present_mask;
+       cpumask_t cpm = cpu_present_map;
        volatile unsigned long *dim0, *dim1, *dim2, *dim3;
        unsigned long mask0, mask1, mask2, mask3, dummy;
 
index 092ee12ced425dcfaaff125a4f8f4cc3324c85c3..affd1d5d744049c44c19d8214d74478317ccc672 100644 (file)
@@ -178,8 +178,12 @@ static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type)
 
 static void ixp23xx_irq_mask(unsigned int irq)
 {
-       volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
+       volatile unsigned long *intr_reg;
 
+       if (irq >= 56)
+               irq += 8;
+
+       intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
        *intr_reg &= ~(1 << (irq % 32));
 }
 
@@ -199,17 +203,25 @@ static void ixp23xx_irq_ack(unsigned int irq)
  */
 static void ixp23xx_irq_level_unmask(unsigned int irq)
 {
-       volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
+       volatile unsigned long *intr_reg;
 
        ixp23xx_irq_ack(irq);
 
+       if (irq >= 56)
+               irq += 8;
+
+       intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
        *intr_reg |= (1 << (irq % 32));
 }
 
 static void ixp23xx_irq_edge_unmask(unsigned int irq)
 {
-       volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
+       volatile unsigned long *intr_reg;
+
+       if (irq >= 56)
+               irq += 8;
 
+       intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
        *intr_reg |= (1 << (irq % 32));
 }
 
index 4baa75b1d36ff60a7cb9088a7e6ffa5d10301e0f..f08173b0f06593dd9da152025e728386934a5a30 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/spinlock.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 
 #include <asm/semaphore.h>
 #include <asm/prom.h>
@@ -546,6 +547,7 @@ struct pmf_device {
 
 static LIST_HEAD(pmf_devices);
 static spinlock_t pmf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_MUTEX(pmf_irq_mutex);
 
 static void pmf_release_device(struct kref *kref)
 {
@@ -864,15 +866,17 @@ int pmf_register_irq_client(struct device_node *target,
 
        spin_lock_irqsave(&pmf_lock, flags);
        func = __pmf_find_function(target, name, PMF_FLAGS_INT_GEN);
-       if (func == NULL) {
-               spin_unlock_irqrestore(&pmf_lock, flags);
+       if (func)
+               func = pmf_get_function(func);
+       spin_unlock_irqrestore(&pmf_lock, flags);
+       if (func == NULL)
                return -ENODEV;
-       }
+       mutex_lock(&pmf_irq_mutex);
        if (list_empty(&func->irq_clients))
                func->dev->handlers->irq_enable(func);
        list_add(&client->link, &func->irq_clients);
        client->func = func;
-       spin_unlock_irqrestore(&pmf_lock, flags);
+       mutex_unlock(&pmf_irq_mutex);
 
        return 0;
 }
@@ -881,16 +885,16 @@ EXPORT_SYMBOL_GPL(pmf_register_irq_client);
 void pmf_unregister_irq_client(struct pmf_irq_client *client)
 {
        struct pmf_function *func = client->func;
-       unsigned long flags;
 
        BUG_ON(func == NULL);
 
-       spin_lock_irqsave(&pmf_lock, flags);
+       mutex_lock(&pmf_irq_mutex);
        client->func = NULL;
        list_del(&client->link);
        if (list_empty(&func->irq_clients))
                func->dev->handlers->irq_disable(func);
-       spin_unlock_irqrestore(&pmf_lock, flags);
+       mutex_unlock(&pmf_irq_mutex);
+       pmf_put_function(func);
 }
 EXPORT_SYMBOL_GPL(pmf_unregister_irq_client);
 
index 3eadac5e171e489e157ffbb902609274a017ce17..31c5892f5acc49669c4326bf5162a42ebceb36ea 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/config.h>
 #include <linux/version.h>
 #include <linux/errno.h>
+#include <linux/threads.h>
 #include <asm/thread_info.h>
 #include <asm/asi.h>
 #include <asm/pstate.h>
@@ -493,6 +494,35 @@ tlb_fixup_done:
        call    prom_init
         mov    %l7, %o0                        ! OpenPROM cif handler
 
+       /* Initialize current_thread_info()->cpu as early as possible.
+        * In order to do that accurately we have to patch up the get_cpuid()
+        * assembler sequences.  And that, in turn, requires that we know
+        * if we are on a Starfire box or not.  While we're here, patch up
+        * the sun4v sequences as well.
+        */
+       call    check_if_starfire
+        nop
+       call    per_cpu_patch
+        nop
+       call    sun4v_patch
+        nop
+
+#ifdef CONFIG_SMP
+       call    hard_smp_processor_id
+        nop
+       cmp     %o0, NR_CPUS
+       blu,pt  %xcc, 1f
+        nop
+       call    boot_cpu_id_too_large
+        nop
+       /* Not reached... */
+
+1:
+#else
+       mov     0, %o0
+#endif
+       stb     %o0, [%g6 + TI_CPU]
+
        /* Off we go.... */
        call    start_kernel
         nop
index 005167f82419b475cb7ae1e4ef109610ba61a5dd..9cf1c88cd774ffbcbe3b58da0574986c4e6860ff 100644 (file)
@@ -220,7 +220,7 @@ char reboot_command[COMMAND_LINE_SIZE];
 
 static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 };
 
-static void __init per_cpu_patch(void)
+void __init per_cpu_patch(void)
 {
        struct cpuid_patch_entry *p;
        unsigned long ver;
@@ -280,7 +280,7 @@ static void __init per_cpu_patch(void)
        }
 }
 
-static void __init sun4v_patch(void)
+void __init sun4v_patch(void)
 {
        struct sun4v_1insn_patch_entry *p1;
        struct sun4v_2insn_patch_entry *p2;
@@ -315,6 +315,15 @@ static void __init sun4v_patch(void)
        }
 }
 
+#ifdef CONFIG_SMP
+void __init boot_cpu_id_too_large(int cpu)
+{
+       prom_printf("Serious problem, boot cpu id (%d) >= NR_CPUS (%d)\n",
+                   cpu, NR_CPUS);
+       prom_halt();
+}
+#endif
+
 void __init setup_arch(char **cmdline_p)
 {
        /* Initialize PROM console and command line. */
@@ -332,16 +341,6 @@ void __init setup_arch(char **cmdline_p)
        conswitchp = &prom_con;
 #endif
 
-       /* Work out if we are starfire early on */
-       check_if_starfire();
-
-       /* Now we know enough to patch the get_cpuid sequences
-        * used by trap code.
-        */
-       per_cpu_patch();
-
-       sun4v_patch();
-
        boot_flags_init(*cmdline_p);
 
        idprom_init();
index 90eaca3ec9a628c40ba90f27c2a89e825afdf736..4e8cd79156e0e0adc4a737265290f1e7cf496871 100644 (file)
@@ -1264,7 +1264,6 @@ void __init smp_tick_init(void)
        boot_cpu_id = hard_smp_processor_id();
        current_tick_offset = timer_tick_offset;
 
-       cpu_set(boot_cpu_id, cpu_online_map);
        prof_counter(boot_cpu_id) = prof_multiplier(boot_cpu_id) = 1;
 }
 
@@ -1345,18 +1344,6 @@ void __init smp_setup_cpu_possible_map(void)
 
 void __devinit smp_prepare_boot_cpu(void)
 {
-       int cpu = hard_smp_processor_id();
-
-       if (cpu >= NR_CPUS) {
-               prom_printf("Serious problem, boot cpu id >= NR_CPUS\n");
-               prom_halt();
-       }
-
-       current_thread_info()->cpu = cpu;
-       __local_per_cpu_offset = __per_cpu_offset(cpu);
-
-       cpu_set(smp_processor_id(), cpu_online_map);
-       cpu_set(smp_processor_id(), phys_cpu_present_map);
 }
 
 int __devinit __cpu_up(unsigned int cpu)
@@ -1433,4 +1420,7 @@ void __init setup_per_cpu_areas(void)
 
        for (i = 0; i < NR_CPUS; i++, ptr += size)
                memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
+
+       /* Setup %g5 for the boot cpu.  */
+       __local_per_cpu_offset = __per_cpu_offset(smp_processor_id());
 }
index ba9cd3ccc2b26a3f25bd7a2653c1063bf69d61f1..1d230f693dc4b1806e4c80b8df2918abeee878b8 100644 (file)
@@ -165,8 +165,9 @@ csum_partial_end_cruft:
        sll             %g1, 8, %g1
        or              %o5, %g1, %o4
 
-1:     add             %o2, %o4, %o2
+1:     addcc           %o2, %o4, %o2
+       addc            %g0, %o2, %o2
 
 csum_partial_finish:
        retl
-        mov            %o2, %o0
+        srl            %o2, 0, %o0
index 71af488390646d4e7658af9b96c8240d87995c04..e566c770a0f6372de5e4e7856ff520a9ac8920ac 100644 (file)
@@ -221,11 +221,12 @@ FUNC_NAME:                /* %o0=src, %o1=dst, %o2=len, %o3=sum */
        sll             %g1, 8, %g1
        or              %o5, %g1, %o4
 
-1:     add             %o3, %o4, %o3
+1:     addcc           %o3, %o4, %o3
+       addc            %g0, %o3, %o3
 
 70:
        retl
-        mov            %o3, %o0
+        srl            %o3, 0, %o0
 
 95:    mov             0, GLOBAL_SPARE
        brlez,pn        %o2, 4f
index 7a0e04e34bf96f2cb4a89a6be34cfbe8f1e6cf90..b65ca115ef7778553473a157998ada3c54869051 100644 (file)
@@ -33,5 +33,9 @@ include $(srctree)/arch/i386/Makefile.cpu
 # prevent gcc from keeping the stack 16 byte aligned. Taken from i386.
 cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
 
+# Prevent sprintf in nfsd from being converted to strcpy and resulting in
+# an unresolved reference.
+cflags-y += -ffreestanding
+
 CFLAGS += $(cflags-y)
 USER_CFLAGS += $(cflags-y)
index efa3d33c0be6577a6ab533449ce2ed34032957de..310980b3217395a591a0eeee7a748dcb4fdf2925 100644 (file)
@@ -120,20 +120,11 @@ extern int is_syscall(unsigned long addr);
 extern void free_irq(unsigned int, void *);
 extern int cpu(void);
 
+extern void time_init_kern(void);
+
 /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */
 extern int __cant_sleep(void);
 extern void segv_handler(int sig, union uml_pt_regs *regs);
 extern void sigio_handler(int sig, union uml_pt_regs *regs);
 
 #endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 528cf623f8b4144cbf77b4c0337a1ee6ab423185..86f51d04c98df366d7a139468cf3afb08c402251 100644 (file)
@@ -84,6 +84,16 @@ void timer_irq(union uml_pt_regs *regs)
        }
 }
 
+
+void time_init_kern(void)
+{
+       unsigned long long nsecs;
+
+       nsecs = os_nsecs();
+       set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION,
+                               -nsecs % BILLION);
+}
+
 void do_boot_timer_handler(struct sigcontext * sc)
 {
        struct pt_regs regs;
index 3a0ac38e978bffa982f68badb8e9dd1e168bd3f6..90912aaca7aa154ef577e63bbc0d9c6aa6d87800 100644 (file)
@@ -59,7 +59,7 @@ static __init void do_uml_initcalls(void)
        initcall_t *call;
 
        call = &__uml_initcall_start;
-       while (call < &__uml_initcall_end){;
+       while (call < &__uml_initcall_end){
                (*call)();
                call++;
        }
index 6f7626775acb983e7f2e663d2312533d80c1a792..280c4fb9b585a15813e4cf9669a0b3b258181623 100644 (file)
@@ -81,20 +81,12 @@ void uml_idle_timer(void)
        set_interval(ITIMER_REAL);
 }
 
-extern void ktime_get_ts(struct timespec *ts);
-#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
-
 void time_init(void)
 {
-       struct timespec now;
-
        if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR)
                panic("Couldn't set SIGVTALRM handler");
        set_interval(ITIMER_VIRTUAL);
-
-       do_posix_clock_monotonic_gettime(&now);
-       wall_to_monotonic.tv_sec = -now.tv_sec;
-       wall_to_monotonic.tv_nsec = -now.tv_nsec;
+       time_init_kern();
 }
 
 unsigned long long os_nsecs(void)
index 749dd1bfe60f9009127adfbd4a958173d280e1b7..710d5fb807e1d6b9ae7e24e7542814aa36b69348 100644 (file)
@@ -99,11 +99,12 @@ long sys_ipc (uint call, int first, int second,
 
        switch (call) {
        case SEMOP:
-               return sys_semtimedop(first, (struct sembuf *) ptr, second,
-                                     NULL);
+               return sys_semtimedop(first, (struct sembuf __user *) ptr,
+                                     second, NULL);
        case SEMTIMEDOP:
-               return sys_semtimedop(first, (struct sembuf *) ptr, second,
-                                     (const struct timespec *) fifth);
+               return sys_semtimedop(first, (struct sembuf __user *) ptr,
+                                     second,
+                                     (const struct timespec __user *) fifth);
        case SEMGET:
                return sys_semget (first, second, third);
        case SEMCTL: {
index a4c46a8af00842078fb03e2f36592f4706abf49c..9edf114faf79c571831fd1ca84127204094bb846 100644 (file)
@@ -21,7 +21,7 @@
 #include "skas.h"
 
 static int copy_sc_from_user_skas(struct pt_regs *regs,
-                                 struct sigcontext *from)
+                                 struct sigcontext __user *from)
 {
        int err = 0;
 
@@ -54,7 +54,8 @@ static int copy_sc_from_user_skas(struct pt_regs *regs,
        return(err);
 }
 
-int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp,
+int copy_sc_to_user_skas(struct sigcontext __user *to,
+                        struct _fpstate __user *to_fp,
                         struct pt_regs *regs, unsigned long mask,
                         unsigned long sp)
 {
@@ -106,10 +107,11 @@ int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp,
 #endif
 
 #ifdef CONFIG_MODE_TT
-int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from,
+int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext __user *from,
                         int fpsize)
 {
-       struct _fpstate *to_fp, *from_fp;
+       struct _fpstate *to_fp;
+       struct _fpstate __user *from_fp;
        unsigned long sigs;
        int err;
 
@@ -124,13 +126,14 @@ int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from,
        return(err);
 }
 
-int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp,
+int copy_sc_to_user_tt(struct sigcontext __user *to, struct _fpstate __user *fp,
                       struct sigcontext *from, int fpsize, unsigned long sp)
 {
-       struct _fpstate *to_fp, *from_fp;
+       struct _fpstate __user *to_fp;
+       struct _fpstate *from_fp;
        int err;
 
-       to_fp = (fp ? fp : (struct _fpstate *) (to + 1));
+       to_fp = (fp ? fp : (struct _fpstate __user *) (to + 1));
        from_fp = from->fpstate;
        err = copy_to_user(to, from, sizeof(*to));
        /* The SP in the sigcontext is the updated one for the signal
@@ -158,7 +161,8 @@ static int copy_sc_from_user(struct pt_regs *to, void __user *from)
        return(ret);
 }
 
-static int copy_sc_to_user(struct sigcontext *to, struct _fpstate *fp,
+static int copy_sc_to_user(struct sigcontext __user *to,
+                          struct _fpstate __user *fp,
                           struct pt_regs *from, unsigned long mask,
                           unsigned long sp)
 {
@@ -169,7 +173,7 @@ static int copy_sc_to_user(struct sigcontext *to, struct _fpstate *fp,
 
 struct rt_sigframe
 {
-       char *pretcode;
+       char __user *pretcode;
        struct ucontext uc;
        struct siginfo info;
 };
@@ -188,7 +192,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig,
 
        frame = (struct rt_sigframe __user *)
                round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8;
-        frame = (struct rt_sigframe *) ((unsigned long) frame - 128);
+        frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128);
 
        if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate)))
                goto out;
index 6acee5c4ada6fcdff56ddd95313865dd295df508..6fce9f45dfdc0257aafafaf543afffcfc42127e3 100644 (file)
@@ -45,7 +45,7 @@ static long arch_prctl_tt(int code, unsigned long addr)
        case ARCH_GET_GS:
                ret = arch_prctl(code, (unsigned long) &tmp);
                if(!ret)
-                       ret = put_user(tmp, &addr);
+                       ret = put_user(tmp, (long __user *)addr);
                break;
        default:
                ret = -EINVAL;
index 11ce6aaf1bd02fdc8063f46566ecfeb2ff389159..8e9d84825e1c519500288da6602b208fcec33995 100644 (file)
@@ -133,6 +133,7 @@ struct cfq_data {
        mempool_t *crq_pool;
 
        int rq_in_driver;
+       int hw_tag;
 
        /*
         * schedule slice state info
@@ -500,10 +501,13 @@ static void cfq_resort_rr_list(struct cfq_queue *cfqq, int preempted)
 
        /*
         * if queue was preempted, just add to front to be fair. busy_rr
-        * isn't sorted.
+        * isn't sorted, but insert at the back for fairness.
         */
        if (preempted || list == &cfqd->busy_rr) {
-               list_add(&cfqq->cfq_list, list);
+               if (preempted)
+                       list = list->prev;
+
+               list_add_tail(&cfqq->cfq_list, list);
                return;
        }
 
@@ -664,6 +668,15 @@ static void cfq_activate_request(request_queue_t *q, struct request *rq)
        struct cfq_data *cfqd = q->elevator->elevator_data;
 
        cfqd->rq_in_driver++;
+
+       /*
+        * If the depth is larger 1, it really could be queueing. But lets
+        * make the mark a little higher - idling could still be good for
+        * low queueing, and a low queueing number could also just indicate
+        * a SCSI mid layer like behaviour where limit+1 is often seen.
+        */
+       if (!cfqd->hw_tag && cfqd->rq_in_driver > 4)
+               cfqd->hw_tag = 1;
 }
 
 static void cfq_deactivate_request(request_queue_t *q, struct request *rq)
@@ -878,6 +891,13 @@ static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd)
        if (!list_empty(&cfqd->cur_rr) || cfq_get_next_prio_level(cfqd) != -1)
                cfqq = list_entry_cfqq(cfqd->cur_rr.next);
 
+       /*
+        * If no new queues are available, check if the busy list has some
+        * before falling back to idle io.
+        */
+       if (!cfqq && !list_empty(&cfqd->busy_rr))
+               cfqq = list_entry_cfqq(cfqd->busy_rr.next);
+
        /*
         * if we have idle queues and no rt or be queues had pending
         * requests, either allow immediate service if the grace period
@@ -1458,7 +1478,8 @@ retry:
                 * set ->slice_left to allow preemption for a new process
                 */
                cfqq->slice_left = 2 * cfqd->cfq_slice_idle;
-               cfq_mark_cfqq_idle_window(cfqq);
+               if (!cfqd->hw_tag)
+                       cfq_mark_cfqq_idle_window(cfqq);
                cfq_mark_cfqq_prio_changed(cfqq);
                cfq_init_prio_data(cfqq);
        }
@@ -1649,7 +1670,7 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq,
 {
        int enable_idle = cfq_cfqq_idle_window(cfqq);
 
-       if (!cic->ioc->task || !cfqd->cfq_slice_idle)
+       if (!cic->ioc->task || !cfqd->cfq_slice_idle || cfqd->hw_tag)
                enable_idle = 0;
        else if (sample_valid(cic->ttime_samples)) {
                if (cic->ttime_mean > cfqd->cfq_slice_idle)
@@ -1740,14 +1761,24 @@ cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
 
        cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq);
 
+       cic = crq->io_context;
+
        /*
         * we never wait for an async request and we don't allow preemption
         * of an async request. so just return early
         */
-       if (!cfq_crq_is_sync(crq))
+       if (!cfq_crq_is_sync(crq)) {
+               /*
+                * sync process issued an async request, if it's waiting
+                * then expire it and kick rq handling.
+                */
+               if (cic == cfqd->active_cic &&
+                   del_timer(&cfqd->idle_slice_timer)) {
+                       cfq_slice_expired(cfqd, 0);
+                       cfq_start_queueing(cfqd, cfqq);
+               }
                return;
-
-       cic = crq->io_context;
+       }
 
        cfq_update_io_thinktime(cfqd, cic);
        cfq_update_io_seektime(cfqd, cic, crq);
@@ -2165,10 +2196,9 @@ static void cfq_idle_class_timer(unsigned long data)
         * race with a non-idle queue, reset timer
         */
        end = cfqd->last_end_request + CFQ_IDLE_GRACE;
-       if (!time_after_eq(jiffies, end)) {
-               cfqd->idle_class_timer.expires = end;
-               add_timer(&cfqd->idle_class_timer);
-       } else
+       if (!time_after_eq(jiffies, end))
+               mod_timer(&cfqd->idle_class_timer, end);
+       else
                cfq_schedule_dispatch(cfqd);
 
        spin_unlock_irqrestore(cfqd->queue->queue_lock, flags);
index 8a23fb54c6939bdbdac285570a45974e74740b48..5413dc43b9f1b2eb5bda4f976434535e91af3e1e 100644 (file)
@@ -845,7 +845,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud
                        &sbp2_highlevel, ud->ne->host, &sbp2_ops,
                        sizeof(struct sbp2_status_block), sizeof(quadlet_t),
                        0x010000000000ULL, CSR1212_ALL_SPACE_END);
-       if (!scsi_id->status_fifo_addr) {
+       if (scsi_id->status_fifo_addr == ~0ULL) {
                SBP2_ERR("failed to allocate status FIFO address range");
                goto failed_alloc;
        }
index a54da42849ae1e9e19d3335326be70fe3c44880b..8406839b91cf3879bff26215f08cd9addc7ab312 100644 (file)
@@ -275,6 +275,7 @@ static void ipoib_ib_handle_wc(struct net_device *dev,
                spin_lock_irqsave(&priv->tx_lock, flags);
                ++priv->tx_tail;
                if (netif_queue_stopped(dev) &&
+                   test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags) &&
                    priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1)
                        netif_wake_queue(dev);
                spin_unlock_irqrestore(&priv->tx_lock, flags);
index 9080853fe283554c986f6636b34ee3bc42008b43..a30084076ac8884168c444d04d9377a32238507d 100644 (file)
@@ -1605,6 +1605,21 @@ mpt_resume(struct pci_dev *pdev)
 }
 #endif
 
+static int
+mpt_signal_reset(int index, MPT_ADAPTER *ioc, int reset_phase)
+{
+       if ((MptDriverClass[index] == MPTSPI_DRIVER &&
+            ioc->bus_type != SPI) ||
+           (MptDriverClass[index] == MPTFC_DRIVER &&
+            ioc->bus_type != FC) ||
+           (MptDriverClass[index] == MPTSAS_DRIVER &&
+            ioc->bus_type != SAS))
+               /* make sure we only call the relevant reset handler
+                * for the bus */
+               return 0;
+       return (MptResetHandlers[index])(ioc, reset_phase);
+}
+
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
  *     mpt_do_ioc_recovery - Initialize or recover MPT adapter.
@@ -1885,14 +1900,14 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
                        if ((ret == 0) && MptResetHandlers[ii]) {
                                dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n",
                                                ioc->name, ii));
-                               rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET);
+                               rc += mpt_signal_reset(ii, ioc, MPT_IOC_POST_RESET);
                                handlers++;
                        }
 
                        if (alt_ioc_ready && MptResetHandlers[ii]) {
                                drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n",
                                                ioc->name, ioc->alt_ioc->name, ii));
-                               rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET);
+                               rc += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_POST_RESET);
                                handlers++;
                        }
                }
@@ -3267,11 +3282,11 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
                                if (MptResetHandlers[ii]) {
                                        dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n",
                                                        ioc->name, ii));
-                                       r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET);
+                                       r += mpt_signal_reset(ii, ioc, MPT_IOC_PRE_RESET);
                                        if (ioc->alt_ioc) {
                                                dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n",
                                                                ioc->name, ioc->alt_ioc->name, ii));
-                                               r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET);
+                                               r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_PRE_RESET);
                                        }
                                }
                        }
@@ -5706,11 +5721,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
                        if (MptResetHandlers[ii]) {
                                dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n",
                                                ioc->name, ii));
-                               r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET);
+                               r += mpt_signal_reset(ii, ioc, MPT_IOC_SETUP_RESET);
                                if (ioc->alt_ioc) {
                                        dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n",
                                                        ioc->name, ioc->alt_ioc->name, ii));
-                                       r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET);
+                                       r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_SETUP_RESET);
                                }
                        }
                }
index 705e1229d89db994aa0db6e0d11a0653e19b9a84..feb5b223cd60ed09e0dca642701d1d16f388fd49 100644 (file)
@@ -2615,6 +2615,18 @@ static int nv_nway_reset(struct net_device *dev)
        return ret;
 }
 
+#ifdef NETIF_F_TSO
+static int nv_set_tso(struct net_device *dev, u32 value)
+{
+       struct fe_priv *np = netdev_priv(dev);
+
+       if ((np->driver_data & DEV_HAS_CHECKSUM))
+               return ethtool_op_set_tso(dev, value);
+       else
+               return value ? -EOPNOTSUPP : 0;
+}
+#endif
+
 static struct ethtool_ops ops = {
        .get_drvinfo = nv_get_drvinfo,
        .get_link = ethtool_op_get_link,
@@ -2626,6 +2638,10 @@ static struct ethtool_ops ops = {
        .get_regs = nv_get_regs,
        .nway_reset = nv_nway_reset,
        .get_perm_addr = ethtool_op_get_perm_addr,
+#ifdef NETIF_F_TSO
+       .get_tso = ethtool_op_get_tso,
+       .set_tso = nv_set_tso
+#endif
 };
 
 static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
index 4260c2128f4722c61cc267fc6a0290ebde330be9..a8f6bfc96fd28cbdd4cb75c0c60517fa54d84709 100644 (file)
@@ -1204,7 +1204,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt)
 
        dev->last_rx = jiffies;
        lp->linux_stats.rx_packets++;
-       lp->linux_stats.rx_bytes += skb->len;
+       lp->linux_stats.rx_bytes += pkt_len;
        outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */
        continue;
       } else {
index f6e7ee04f3dc634002383f84438db3ad937b91c5..8c0d1a6739adb23012a1c92bf9a102898b9a94cf 100644 (file)
@@ -48,33 +48,33 @@ static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm)
        struct platform_device *pdev = to_platform_device(dev);
        struct m48t86_ops *ops = pdev->dev.platform_data;
 
-       reg = ops->readb(M48T86_REG_B);
+       reg = ops->readbyte(M48T86_REG_B);
 
        if (reg & M48T86_REG_B_DM) {
                /* data (binary) mode */
-               tm->tm_sec      = ops->readb(M48T86_REG_SEC);
-               tm->tm_min      = ops->readb(M48T86_REG_MIN);
-               tm->tm_hour     = ops->readb(M48T86_REG_HOUR) & 0x3F;
-               tm->tm_mday     = ops->readb(M48T86_REG_DOM);
+               tm->tm_sec      = ops->readbyte(M48T86_REG_SEC);
+               tm->tm_min      = ops->readbyte(M48T86_REG_MIN);
+               tm->tm_hour     = ops->readbyte(M48T86_REG_HOUR) & 0x3F;
+               tm->tm_mday     = ops->readbyte(M48T86_REG_DOM);
                /* tm_mon is 0-11 */
-               tm->tm_mon      = ops->readb(M48T86_REG_MONTH) - 1;
-               tm->tm_year     = ops->readb(M48T86_REG_YEAR) + 100;
-               tm->tm_wday     = ops->readb(M48T86_REG_DOW);
+               tm->tm_mon      = ops->readbyte(M48T86_REG_MONTH) - 1;
+               tm->tm_year     = ops->readbyte(M48T86_REG_YEAR) + 100;
+               tm->tm_wday     = ops->readbyte(M48T86_REG_DOW);
        } else {
                /* bcd mode */
-               tm->tm_sec      = BCD2BIN(ops->readb(M48T86_REG_SEC));
-               tm->tm_min      = BCD2BIN(ops->readb(M48T86_REG_MIN));
-               tm->tm_hour     = BCD2BIN(ops->readb(M48T86_REG_HOUR) & 0x3F);
-               tm->tm_mday     = BCD2BIN(ops->readb(M48T86_REG_DOM));
+               tm->tm_sec      = BCD2BIN(ops->readbyte(M48T86_REG_SEC));
+               tm->tm_min      = BCD2BIN(ops->readbyte(M48T86_REG_MIN));
+               tm->tm_hour     = BCD2BIN(ops->readbyte(M48T86_REG_HOUR) & 0x3F);
+               tm->tm_mday     = BCD2BIN(ops->readbyte(M48T86_REG_DOM));
                /* tm_mon is 0-11 */
-               tm->tm_mon      = BCD2BIN(ops->readb(M48T86_REG_MONTH)) - 1;
-               tm->tm_year     = BCD2BIN(ops->readb(M48T86_REG_YEAR)) + 100;
-               tm->tm_wday     = BCD2BIN(ops->readb(M48T86_REG_DOW));
+               tm->tm_mon      = BCD2BIN(ops->readbyte(M48T86_REG_MONTH)) - 1;
+               tm->tm_year     = BCD2BIN(ops->readbyte(M48T86_REG_YEAR)) + 100;
+               tm->tm_wday     = BCD2BIN(ops->readbyte(M48T86_REG_DOW));
        }
 
        /* correct the hour if the clock is in 12h mode */
        if (!(reg & M48T86_REG_B_H24))
-               if (ops->readb(M48T86_REG_HOUR) & 0x80)
+               if (ops->readbyte(M48T86_REG_HOUR) & 0x80)
                        tm->tm_hour += 12;
 
        return 0;
@@ -86,35 +86,35 @@ static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm)
        struct platform_device *pdev = to_platform_device(dev);
        struct m48t86_ops *ops = pdev->dev.platform_data;
 
-       reg = ops->readb(M48T86_REG_B);
+       reg = ops->readbyte(M48T86_REG_B);
 
        /* update flag and 24h mode */
        reg |= M48T86_REG_B_SET | M48T86_REG_B_H24;
-       ops->writeb(reg, M48T86_REG_B);
+       ops->writebyte(reg, M48T86_REG_B);
 
        if (reg & M48T86_REG_B_DM) {
                /* data (binary) mode */
-               ops->writeb(tm->tm_sec, M48T86_REG_SEC);
-               ops->writeb(tm->tm_min, M48T86_REG_MIN);
-               ops->writeb(tm->tm_hour, M48T86_REG_HOUR);
-               ops->writeb(tm->tm_mday, M48T86_REG_DOM);
-               ops->writeb(tm->tm_mon + 1, M48T86_REG_MONTH);
-               ops->writeb(tm->tm_year % 100, M48T86_REG_YEAR);
-               ops->writeb(tm->tm_wday, M48T86_REG_DOW);
+               ops->writebyte(tm->tm_sec, M48T86_REG_SEC);
+               ops->writebyte(tm->tm_min, M48T86_REG_MIN);
+               ops->writebyte(tm->tm_hour, M48T86_REG_HOUR);
+               ops->writebyte(tm->tm_mday, M48T86_REG_DOM);
+               ops->writebyte(tm->tm_mon + 1, M48T86_REG_MONTH);
+               ops->writebyte(tm->tm_year % 100, M48T86_REG_YEAR);
+               ops->writebyte(tm->tm_wday, M48T86_REG_DOW);
        } else {
                /* bcd mode */
-               ops->writeb(BIN2BCD(tm->tm_sec), M48T86_REG_SEC);
-               ops->writeb(BIN2BCD(tm->tm_min), M48T86_REG_MIN);
-               ops->writeb(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR);
-               ops->writeb(BIN2BCD(tm->tm_mday), M48T86_REG_DOM);
-               ops->writeb(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH);
-               ops->writeb(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR);
-               ops->writeb(BIN2BCD(tm->tm_wday), M48T86_REG_DOW);
+               ops->writebyte(BIN2BCD(tm->tm_sec), M48T86_REG_SEC);
+               ops->writebyte(BIN2BCD(tm->tm_min), M48T86_REG_MIN);
+               ops->writebyte(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR);
+               ops->writebyte(BIN2BCD(tm->tm_mday), M48T86_REG_DOM);
+               ops->writebyte(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH);
+               ops->writebyte(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR);
+               ops->writebyte(BIN2BCD(tm->tm_wday), M48T86_REG_DOW);
        }
 
        /* update ended */
        reg &= ~M48T86_REG_B_SET;
-       ops->writeb(reg, M48T86_REG_B);
+       ops->writebyte(reg, M48T86_REG_B);
 
        return 0;
 }
@@ -125,12 +125,12 @@ static int m48t86_rtc_proc(struct device *dev, struct seq_file *seq)
        struct platform_device *pdev = to_platform_device(dev);
        struct m48t86_ops *ops = pdev->dev.platform_data;
 
-       reg = ops->readb(M48T86_REG_B);
+       reg = ops->readbyte(M48T86_REG_B);
 
        seq_printf(seq, "mode\t\t: %s\n",
                 (reg & M48T86_REG_B_DM) ? "binary" : "bcd");
 
-       reg = ops->readb(M48T86_REG_D);
+       reg = ops->readbyte(M48T86_REG_D);
 
        seq_printf(seq, "battery\t\t: %s\n",
                 (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted");
@@ -157,7 +157,7 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev)
        platform_set_drvdata(dev, rtc);
 
        /* read battery status */
-       reg = ops->readb(M48T86_REG_D);
+       reg = ops->readbyte(M48T86_REG_D);
        dev_info(&dev->dev, "battery %s\n",
                (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted");
 
index 74a257b23383abb94c8d1e011e896e97a50c1265..e210f89a24499c65f9bedea44df54d3e299c96d4 100644 (file)
@@ -45,11 +45,11 @@ struct pgid {
        union {
                __u8 fc;        /* SPID function code */
                struct path_state ps;   /* SNID path state */
-       } inf;
+       } __attribute__ ((packed)) inf;
        union {
                __u32 cpu_addr  : 16;   /* CPU address */
                struct extended_cssid ext_cssid;
-       } pgid_high;
+       } __attribute__ ((packed)) pgid_high;
        __u32 cpu_id    : 24;   /* CPU identification */
        __u32 cpu_model : 16;   /* CPU model */
        __u32 tod_high;         /* high word TOD clock */
index 180b3bf8b90ded2eeef4f004fb8d5e4926299076..49ec562d7f60b7d9d5d3c7658851394c11020d8d 100644 (file)
@@ -749,7 +749,7 @@ ccw_device_irq(struct ccw_device *cdev, enum dev_event dev_event)
                        /* Unit check but no sense data. Need basic sense. */
                        if (ccw_device_do_sense(cdev, irb) != 0)
                                goto call_handler_unsol;
-                       memcpy(irb, &cdev->private->irb, sizeof(struct irb));
+                       memcpy(&cdev->private->irb, irb, sizeof(struct irb));
                        cdev->private->state = DEV_STATE_W4SENSE;
                        cdev->private->intparm = 0;
                        return;
index fee843fab1c7d5a0760285f9b4472da260efb8b7..108910f512e477c14bc083c8922b31c1b1640e82 100644 (file)
@@ -982,6 +982,12 @@ static int device_check(ppa_struct *dev)
        return -ENODEV;
 }
 
+static int ppa_adjust_queue(struct scsi_device *device)
+{
+       blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH);
+       return 0;
+}
+
 static struct scsi_host_template ppa_template = {
        .module                 = THIS_MODULE,
        .proc_name              = "ppa",
@@ -997,6 +1003,7 @@ static struct scsi_host_template ppa_template = {
        .cmd_per_lun            = 1,
        .use_clustering         = ENABLE_CLUSTERING,
        .can_queue              = 1,
+       .slave_alloc            = ppa_adjust_queue,
 };
 
 /***************************************************************************
index f7264fd611c2226bc71e6d8e552478a8eaaf2748..cb9082fd7e2fd7ff2afaec77e0f36fbbdf8c430b 100644 (file)
@@ -454,7 +454,7 @@ static int sil24_softreset(struct ata_port *ap, int verbose,
         */
        msleep(10);
 
-       prb->ctrl = PRB_CTRL_SRST;
+       prb->ctrl = cpu_to_le16(PRB_CTRL_SRST);
        prb->fis[1] = 0; /* no PM yet */
 
        writel((u32)paddr, port + PORT_CMD_ACTIVATE);
@@ -551,9 +551,9 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc)
 
                if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) {
                        if (qc->tf.flags & ATA_TFLAG_WRITE)
-                               prb->ctrl = PRB_CTRL_PACKET_WRITE;
+                               prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_WRITE);
                        else
-                               prb->ctrl = PRB_CTRL_PACKET_READ;
+                               prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_READ);
                } else
                        prb->ctrl = 0;
 
index 941c1e15c8992cfe19a3fdeb2deddbc424afafa7..62f8cb7b3d2bac60319fd7b9017537345b445c0f 100644 (file)
@@ -165,6 +165,7 @@ static struct {
        {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD},
        {"HP", "C1557A", NULL, BLIST_FORCELUN},
        {"HP", "C3323-300", "4269", BLIST_NOTQ},
+       {"HP", "C5713A", NULL, BLIST_NOREPORTLUN},
        {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN},
        {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
        {"IBM", "2105", NULL, BLIST_RETRY_HWERROR},
index 764a8b375ead1005ff2a49e130f1f80418748be7..faee4757c03adb712363eb09527c5af357c0bef3 100644 (file)
@@ -367,7 +367,7 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl,
                           int nsegs, unsigned bufflen, gfp_t gfp)
 {
        struct request_queue *q = rq->q;
-       int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT;
+       int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
        unsigned int data_len = 0, len, bytes, off;
        struct page *page;
        struct bio *bio = NULL;
index 8b6d65e21bae3a23ac362d65ac9b95d57732b6f3..f3b16066387cf210ddc4b37246558ef18e8c92a8 100644 (file)
@@ -955,7 +955,8 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel,
        list_for_each_entry(rphy, &sas_host->rphy_list, list) {
                struct sas_phy *parent = dev_to_phy(rphy->dev.parent);
 
-               if (rphy->scsi_target_id == -1)
+               if (rphy->identify.device_type != SAS_END_DEVICE ||
+                   rphy->scsi_target_id == -1)
                        continue;
 
                if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) &&
@@ -977,7 +978,6 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel,
 #define SETUP_TEMPLATE(attrb, field, perm, test)                               \
        i->private_##attrb[count] = class_device_attr_##field;          \
        i->private_##attrb[count].attr.mode = perm;                     \
-       i->private_##attrb[count].store = NULL;                         \
        i->attrb[count] = &i->private_##attrb[count];                   \
        if (test)                                                       \
                count++
index 96723ae83c89d5283b335320b7b4315145a02d6b..d6e2ee251736b4eb9bc692e4f0057af5633942c7 100644 (file)
@@ -1080,8 +1080,8 @@ static int fastcall do_path_lookup(int dfd, const char *name,
        nd->flags = flags;
        nd->depth = 0;
 
-       read_lock(&current->fs->lock);
        if (*name=='/') {
+               read_lock(&current->fs->lock);
                if (current->fs->altroot && !(nd->flags & LOOKUP_NOALT)) {
                        nd->mnt = mntget(current->fs->altrootmnt);
                        nd->dentry = dget(current->fs->altroot);
@@ -1092,33 +1092,35 @@ static int fastcall do_path_lookup(int dfd, const char *name,
                }
                nd->mnt = mntget(current->fs->rootmnt);
                nd->dentry = dget(current->fs->root);
+               read_unlock(&current->fs->lock);
        } else if (dfd == AT_FDCWD) {
+               read_lock(&current->fs->lock);
                nd->mnt = mntget(current->fs->pwdmnt);
                nd->dentry = dget(current->fs->pwd);
+               read_unlock(&current->fs->lock);
        } else {
                struct dentry *dentry;
 
                file = fget_light(dfd, &fput_needed);
                retval = -EBADF;
                if (!file)
-                       goto unlock_fail;
+                       goto out_fail;
 
                dentry = file->f_dentry;
 
                retval = -ENOTDIR;
                if (!S_ISDIR(dentry->d_inode->i_mode))
-                       goto fput_unlock_fail;
+                       goto fput_fail;
 
                retval = file_permission(file, MAY_EXEC);
                if (retval)
-                       goto fput_unlock_fail;
+                       goto fput_fail;
 
                nd->mnt = mntget(file->f_vfsmnt);
                nd->dentry = dget(dentry);
 
                fput_light(file, fput_needed);
        }
-       read_unlock(&current->fs->lock);
        current->total_link_count = 0;
        retval = link_path_walk(name, nd);
 out:
@@ -1127,13 +1129,12 @@ out:
                                nd->dentry->d_inode))
                audit_inode(name, nd->dentry->d_inode, flags);
        }
+out_fail:
        return retval;
 
-fput_unlock_fail:
+fput_fail:
        fput_light(file, fput_needed);
-unlock_fail:
-       read_unlock(&current->fs->lock);
-       return retval;
+       goto out_fail;
 }
 
 int fastcall path_lookup(const char *name, unsigned int flags,
index 9950706abdf8289f0d2815dd45102aa787016038..e1432102be05a55a150c0726d8ea55dec123d356 100644 (file)
@@ -45,10 +45,8 @@ extern struct cpuinfo_alpha cpu_data[NR_CPUS];
 #define hard_smp_processor_id()        __hard_smp_processor_id()
 #define raw_smp_processor_id() (current_thread_info()->cpu)
 
-extern cpumask_t cpu_present_mask;
-extern cpumask_t cpu_online_map;
 extern int smp_num_cpus;
-#define cpu_possible_map       cpu_present_mask
+#define cpu_possible_map       cpu_present_map
 
 int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, int wait, cpumask_t cpu);
 
index 6e19f46d54d1c2aaf947aca24fdc01c4569390fc..c85fc06a043c10dc00392d72b3ef726aa40eece9 100644 (file)
@@ -49,7 +49,7 @@ static inline int __ixp23xx_arch_is_coherent(void)
 {
        extern unsigned int processor_id;
 
-       if (((processor_id & 15) >= 2) || machine_is_roadrunner())
+       if (((processor_id & 15) >= 4) || machine_is_roadrunner())
                return 1;
 
        return 0;
index 358e4d309ceb179776f2a7036dabce02cdfad1d2..c2059a3a06216cb936a163255501e20d464c6b21 100644 (file)
@@ -159,17 +159,8 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
 #define lazy_mmu_prot_update(pte)      do { } while (0)
 #endif
 
-#ifndef __HAVE_ARCH_MULTIPLE_ZERO_PAGE
+#ifndef __HAVE_ARCH_MOVE_PTE
 #define move_pte(pte, prot, old_addr, new_addr)        (pte)
-#else
-#define move_pte(pte, prot, old_addr, new_addr)                                \
-({                                                                     \
-       pte_t newpte = (pte);                                           \
-       if (pte_present(pte) && pfn_valid(pte_pfn(pte)) &&              \
-                       pte_page(pte) == ZERO_PAGE(old_addr))           \
-               newpte = mk_pte(ZERO_PAGE(new_addr), (prot));           \
-       newpte;                                                         \
-})
 #endif
 
 /*
index 174a3cda8c2605fe1b0c7c5c425bcea293eb948c..f80fe75c780063c28805cd4ee183a2f3c0ab7e95 100644 (file)
@@ -70,7 +70,15 @@ extern unsigned long zero_page_mask;
 #define ZERO_PAGE(vaddr) \
        (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))
 
-#define __HAVE_ARCH_MULTIPLE_ZERO_PAGE
+#define __HAVE_ARCH_MOVE_PTE
+#define move_pte(pte, prot, old_addr, new_addr)                                \
+({                                                                     \
+       pte_t newpte = (pte);                                           \
+       if (pte_present(pte) && pfn_valid(pte_pfn(pte)) &&              \
+                       pte_page(pte) == ZERO_PAGE(old_addr))           \
+               newpte = mk_pte(ZERO_PAGE(new_addr), (prot));           \
+       newpte;                                                         \
+})
 
 extern void paging_init(void);
 
index db0606c1abd4fbf56c938905790f8785a904c364..bea7279042872672c7bc3904cb9e1000a8eb41a8 100644 (file)
@@ -98,8 +98,8 @@
 #define __LC_KERNEL_ASCE               0xD58
 #define __LC_USER_ASCE                 0xD60
 #define __LC_PANIC_STACK                0xD68
-#define __LC_CPUID                      0xD90
-#define __LC_CPUADDR                    0xD98
+#define __LC_CPUID                     0xD80
+#define __LC_CPUADDR                   0xD88
 #define __LC_IPLDEV                     0xDB8
 #define __LC_JIFFY_TIMER               0xDC0
 #define __LC_CURRENT                   0xDD8
index c44e7466534e9dab3f4d1cd3c5936cec1b45a80b..cd464f469a2c2b27fe5d157e684e30b2b4fbf051 100644 (file)
@@ -689,6 +689,23 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *p
 #define pte_clear(mm,addr,ptep)                \
        set_pte_at((mm), (addr), (ptep), __pte(0UL))
 
+#ifdef DCACHE_ALIASING_POSSIBLE
+#define __HAVE_ARCH_MOVE_PTE
+#define move_pte(pte, prot, old_addr, new_addr)                                \
+({                                                                     \
+       pte_t newpte = (pte);                                           \
+       if (tlb_type != hypervisor && pte_present(pte)) {               \
+               unsigned long this_pfn = pte_pfn(pte);                  \
+                                                                       \
+               if (pfn_valid(this_pfn) &&                              \
+                   (((old_addr) ^ (new_addr)) & (1 << 13)))            \
+                       flush_dcache_page_all(current->mm,              \
+                                             pfn_to_page(this_pfn));   \
+       }                                                               \
+       newpte;                                                         \
+})
+#endif
+
 extern pgd_t swapper_pg_dir[2048];
 extern pmd_t swapper_low_pmd_dir[2048];
 
diff --git a/include/asm-um/irqflags.h b/include/asm-um/irqflags.h
new file mode 100644 (file)
index 0000000..659b9ab
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef __UM_IRQFLAGS_H
+#define __UM_IRQFLAGS_H
+
+/* Empty for now */
+
+#endif
index bea5a015f6674b4102030cf81de18813a07e2883..16c734af9193c8442fbed9ff7d561420ec8157ec 100644 (file)
 
 #define __get_user(x, ptr) \
 ({ \
-       const __typeof__(ptr) __private_ptr = ptr;      \
+       const __typeof__(*(ptr)) __user *__private_ptr = (ptr); \
        __typeof__(x) __private_val;                    \
        int __private_ret = -EFAULT;                    \
        (x) = (__typeof__(*(__private_ptr)))0;                          \
-       if (__copy_from_user((void *) &__private_val, (__private_ptr),  \
+       if (__copy_from_user((__force void *)&__private_val, (__private_ptr),\
                             sizeof(*(__private_ptr))) == 0) {          \
                (x) = (__typeof__(*(__private_ptr))) __private_val;     \
                __private_ret = 0;                                      \
@@ -62,7 +62,7 @@
 
 #define __put_user(x, ptr) \
 ({ \
-        __typeof__(ptr) __private_ptr = ptr; \
+        __typeof__(*(ptr)) __user *__private_ptr = ptr; \
         __typeof__(*(__private_ptr)) __private_val; \
         int __private_ret = -EFAULT; \
         __private_val = (__typeof__(*(__private_ptr))) (x); \
index 9065199319d033cc0560c1f91305930980827039..915d6b4f0f89689a81d749b6a87b5b2c0ea2d432 100644 (file)
@@ -11,6 +11,6 @@
 
 struct m48t86_ops
 {
-       void (*writeb)(unsigned char value, unsigned long addr);
-       unsigned char (*readb)(unsigned long addr);
+       void (*writebyte)(unsigned char value, unsigned long addr);
+       unsigned char (*readbyte)(unsigned long addr);
 };
index 36740354d4db474c7034beaff63f558891f1f6bc..2d8337150493a9ffe7eb9060b6ee84c5a3c45fb1 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/seqlock.h>
 #include <linux/nodemask.h>
 #include <asm/atomic.h>
+#include <asm/page.h>
 
 /* Free memory management - zoned buddy allocator.  */
 #ifndef CONFIG_FORCE_MAX_ZONEORDER
index d31a06bfbea5c78998e3c68a5a484b98b3e4579f..f1b644eb39d816b3865400caf8d589d458756a17 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -207,11 +207,6 @@ typedef unsigned int kmem_bufctl_t;
 #define        BUFCTL_ACTIVE   (((kmem_bufctl_t)(~0U))-2)
 #define        SLAB_LIMIT      (((kmem_bufctl_t)(~0U))-3)
 
-/* Max number of objs-per-slab for caches which use off-slab slabs.
- * Needed to avoid a possible looping condition in cache_grow().
- */
-static unsigned long offslab_limit;
-
 /*
  * struct slab
  *
@@ -1356,12 +1351,6 @@ void __init kmem_cache_init(void)
                                        NULL, NULL);
                }
 
-               /* Inc off-slab bufctl limit until the ceiling is hit. */
-               if (!(OFF_SLAB(sizes->cs_cachep))) {
-                       offslab_limit = sizes->cs_size - sizeof(struct slab);
-                       offslab_limit /= sizeof(kmem_bufctl_t);
-               }
-
                sizes->cs_dmacachep = kmem_cache_create(names->name_dma,
                                        sizes->cs_size,
                                        ARCH_KMALLOC_MINALIGN,
@@ -1780,6 +1769,7 @@ static void set_up_list3s(struct kmem_cache *cachep, int index)
 static size_t calculate_slab_order(struct kmem_cache *cachep,
                        size_t size, size_t align, unsigned long flags)
 {
+       unsigned long offslab_limit;
        size_t left_over = 0;
        int gfporder;
 
@@ -1791,9 +1781,18 @@ static size_t calculate_slab_order(struct kmem_cache *cachep,
                if (!num)
                        continue;
 
-               /* More than offslab_limit objects will cause problems */
-               if ((flags & CFLGS_OFF_SLAB) && num > offslab_limit)
-                       break;
+               if (flags & CFLGS_OFF_SLAB) {
+                       /*
+                        * Max number of objs-per-slab for caches which
+                        * use off-slab slabs. Needed to avoid a possible
+                        * looping condition in cache_grow().
+                        */
+                       offslab_limit = size - sizeof(struct slab);
+                       offslab_limit /= sizeof(kmem_bufctl_t);
+
+                       if (num > offslab_limit)
+                               break;
+               }
 
                /* Found something acceptable - save it away */
                cachep->num = num;
index b72fa55dfb84d114484bf6f7d1b4751449d9c4e3..ba7c63ca5bb10838f9e81a64b81cf9131be1a3f2 100644 (file)
@@ -135,7 +135,8 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt,
 
                /* Do additive increase */
                if (tp->snd_cwnd < tp->snd_cwnd_clamp) {
-                       tp->snd_cwnd_cnt += ca->ai;
+                       /* cwnd = cwnd + a(w) / cwnd */
+                       tp->snd_cwnd_cnt += ca->ai + 1;
                        if (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
                                tp->snd_cwnd_cnt -= tp->snd_cwnd;
                                tp->snd_cwnd++;
index 21dad415b8960d7e389a7e4d8376a9972b0e7abe..90b4cdc0c94806ca1cba335aaa6213dc9012229a 100644 (file)
@@ -4422,6 +4422,7 @@ void selinux_complete_init(void)
 
        /* Set up any superblocks initialized prior to the policy load. */
        printk(KERN_INFO "SELinux:  Setting up existing superblocks.\n");
+       spin_lock(&sb_lock);
        spin_lock(&sb_security_lock);
 next_sb:
        if (!list_empty(&superblock_security_head)) {
@@ -4430,19 +4431,20 @@ next_sb:
                                           struct superblock_security_struct,
                                           list);
                struct super_block *sb = sbsec->sb;
-               spin_lock(&sb_lock);
                sb->s_count++;
-               spin_unlock(&sb_lock);
                spin_unlock(&sb_security_lock);
+               spin_unlock(&sb_lock);
                down_read(&sb->s_umount);
                if (sb->s_root)
                        superblock_doinit(sb, NULL);
                drop_super(sb);
+               spin_lock(&sb_lock);
                spin_lock(&sb_security_lock);
                list_del_init(&sbsec->list);
                goto next_sb;
        }
        spin_unlock(&sb_security_lock);
+       spin_unlock(&sb_lock);
 }
 
 /* SELinux requires early initialization in order to label