Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 20 Mar 2007 03:14:23 +0000 (20:14 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 20 Mar 2007 03:14:23 +0000 (20:14 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: new Novatel device ids for option driver
  USB: berry_charge: correct dbg string for second magic command
  usblp: quirk flag and device entry for Seiko Epson M129C printer
  airprime: USB ID for Novatel EV620 mini PCI-E card
  USB: necessary update for mos7720 driver
  USB: RAZR v3i unusual_devs
  USB: two more device ids for dm9601 usbnet driver
  USB: fix usb-serial regression

46 files changed:
arch/arm/kernel/setup.c
arch/mips/Kconfig
arch/mips/ddb5xxx/ddb5477/irq.c
arch/mips/emma2rh/markeins/irq.c
arch/mips/gt64120/ev64120/irq.c
arch/mips/gt64120/wrppmc/irq.c
arch/mips/jazz/irq.c
arch/mips/kernel/genex.S
arch/mips/mips-boards/generic/init.c
arch/mips/momentum/ocelot_c/irq.c
arch/mips/philips/pnx8550/common/int.c
arch/mips/qemu/q-smp.c
arch/mips/sgi-ip22/ip22-int.c
arch/mips/sgi-ip32/ip32-irq.c
arch/mips/sibyte/sb1250/irq.c
arch/mips/sni/pcimt.c
arch/mips/sni/pcit.c
arch/mips/tx4927/common/tx4927_irq.c
arch/s390/kernel/compat_wrapper.S
arch/s390/kernel/debug.c
arch/s390/kernel/early.c
arch/s390/kernel/ipl.c
arch/s390/kernel/syscalls.S
arch/sh/drivers/pci/pci-auto.c
arch/sh/kernel/cpu/init.c
arch/sh/kernel/cpu/sh2/entry.S
arch/sh/kernel/cpu/sh3/entry.S
arch/sh/kernel/cpu/sh4/probe.c
arch/sh/kernel/irq.c
drivers/ata/Kconfig
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/pata_ixp4xx_cf.c
drivers/ata/sata_inic162x.c
drivers/ata/sata_sil24.c
drivers/s390/cio/qdio.c
drivers/s390/crypto/ap_bus.c
drivers/s390/crypto/ap_bus.h
drivers/s390/crypto/zcrypt_api.c
drivers/serial/sh-sci.c
include/asm-arm/atomic.h
include/asm-s390/ipl.h
include/asm-s390/unistd.h
include/asm-sh/ioctls.h
include/asm-sh/irq.h
include/asm-sh/unistd.h

index 03e37af..0453dcc 100644 (file)
@@ -839,8 +839,11 @@ static int __init topology_init(void)
 {
        int cpu;
 
-       for_each_possible_cpu(cpu)
-               register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu);
+       for_each_possible_cpu(cpu) {
+               struct cpuinfo_arm *cpuinfo = &per_cpu(cpu_data, cpu);
+               cpuinfo->cpu.hotpluggable = 1;
+               register_cpu(&cpuinfo->cpu, cpu);
+       }
 
        return 0;
 }
index 5f29018..656f0ca 100644 (file)
@@ -542,6 +542,8 @@ config QEMU
        select SYS_SUPPORTS_LITTLE_ENDIAN
        select ARCH_SPARSEMEM_ENABLE
        select GENERIC_HARDIRQS_NO__DO_IRQ
+       select NR_CPUS_DEFAULT_1
+       select SYS_SUPPORTS_SMP
        help
          Qemu is a software emulator which among other architectures also
          can simulate a MIPS32 4Kc system.  This patch adds support for the
@@ -1805,6 +1807,9 @@ config SMP
 config SYS_SUPPORTS_SMP
        bool
 
+config NR_CPUS_DEFAULT_1
+       bool
+
 config NR_CPUS_DEFAULT_2
        bool
 
@@ -1825,8 +1830,9 @@ config NR_CPUS_DEFAULT_64
 
 config NR_CPUS
        int "Maximum number of CPUs (2-64)"
-       range 2 64
+       range 1 64 if NR_CPUS_DEFAULT_1
        depends on SMP
+       default "1" if NR_CPUS_DEFAULT_1
        default "2" if NR_CPUS_DEFAULT_2
        default "4" if NR_CPUS_DEFAULT_4
        default "8" if NR_CPUS_DEFAULT_8
@@ -1837,10 +1843,13 @@ config NR_CPUS
          This allows you to specify the maximum number of CPUs which this
          kernel will support.  The maximum supported value is 32 for 32-bit
          kernel and 64 for 64-bit kernels; the minimum value which makes
-         sense is 2.
+         sense is 1 for Qemu (useful only for kernel debugging purposes)
+         and 2 for all others.
 
          This is purely to save memory - each supported CPU adds
-         approximately eight kilobytes to the kernel image.
+         approximately eight kilobytes to the kernel image.  For best
+         performance should round up your number of processors to the next
+         power of two.
 
 #
 # Timer Interrupt Frequency Configuration
index 2b23234..faa4a50 100644 (file)
@@ -194,7 +194,7 @@ static void vrc5477_irq_dispatch(void)
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_cause() & read_c0_status();
+       unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
 
        if (pending & STATUSF_IP7)
                do_IRQ(CPU_IRQ_BASE + 7);
index e266300..6bcf6a0 100644 (file)
@@ -115,7 +115,7 @@ void __init arch_init_irq(void)
 
 asmlinkage void plat_irq_dispatch(void)
 {
-        unsigned int pending = read_c0_status() & read_c0_cause();
+        unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
 
        if (pending & STATUSF_IP7)
                do_IRQ(CPU_IRQ_BASE + 7);
index 04572b9..64e4c80 100644 (file)
@@ -48,7 +48,7 @@
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_status() & read_c0_cause();
+       unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
 
        if (pending & STATUSF_IP4)              /* int2 hardware line (timer) */
                do_IRQ(4);
index d3d9659..06177bf 100644 (file)
@@ -32,7 +32,7 @@
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_status() & read_c0_cause();
+       unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
 
        if (pending & STATUSF_IP7)
                do_IRQ(WRPPMC_MIPS_TIMER_IRQ);  /* CPU Compare/Count internal timer */
index 295892e..015cf4b 100644 (file)
@@ -122,7 +122,7 @@ static void ll_local_dev(void)
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
+       unsigned int pending = read_c0_cause() & read_c0_status();
 
        if (pending & IE_IRQ5)
                write_c0_compare(0);
index aacd4a0..83843a2 100644 (file)
@@ -181,13 +181,13 @@ NESTED(except_vec_vi, 0, sp)
         * during service by SMTC kernel, we also want to
         * pass the IM value to be cleared.
         */
-EXPORT(except_vec_vi_mori)
+FEXPORT(except_vec_vi_mori)
        ori     a0, $0, 0
 #endif /* CONFIG_MIPS_MT_SMTC */
-EXPORT(except_vec_vi_lui)
+FEXPORT(except_vec_vi_lui)
        lui     v0, 0           /* Patched */
        j       except_vec_vi_handler
-EXPORT(except_vec_vi_ori)
+FEXPORT(except_vec_vi_ori)
         ori    v0, 0           /* Patched */
        .set    pop
        END(except_vec_vi)
@@ -220,7 +220,17 @@ NESTED(except_vec_vi_handler, 0, sp)
        _ehb
 #endif /* CONFIG_MIPS_MT_SMTC */
        CLI
+#ifdef CONFIG_TRACE_IRQFLAGS
+       move    s0, v0
+#ifdef CONFIG_MIPS_MT_SMTC
+       move    s1, a0
+#endif
        TRACE_IRQS_OFF
+#ifdef CONFIG_MIPS_MT_SMTC
+       move    a0, s1
+#endif
+       move    v0, s0
+#endif
 
        LONG_L  s0, TI_REGS($28)
        LONG_S  sp, TI_REGS($28)
index 1acdf09..88e9c2a 100644 (file)
@@ -145,7 +145,7 @@ static void __init console_config(void)
        char parity = '\0', bits = '\0', flow = '\0';
        char *s;
 
-       if ((strstr(prom_getcmdline(), "console=ttyS")) == NULL) {
+       if ((strstr(prom_getcmdline(), "console=")) == NULL) {
                s = prom_getenv("modetty0");
                if (s) {
                        while (*s >= '0' && *s <= '9')
index 40472f7..844d566 100644 (file)
@@ -64,7 +64,7 @@ extern void ll_cpci_irq(void);
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_cause() & read_c0_status();
+       unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
 
        if (pending & STATUSF_IP0)
                do_IRQ(0);
index b1c4805..aad0342 100644 (file)
@@ -83,16 +83,15 @@ static void timer_irqdispatch(int irq)
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_status() & read_c0_cause();
+       unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
 
        if (pending & STATUSF_IP2)
                hw0_irqdispatch(2);
        else if (pending & STATUSF_IP7) {
                if (read_c0_config7() & 0x01c0)
                        timer_irqdispatch(7);
-       }
-
-       spurious_interrupt();
+       } else
+               spurious_interrupt();
 }
 
 static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask)
index 5a12354..786bbfa 100644 (file)
@@ -46,3 +46,10 @@ void __init prom_prepare_cpus(unsigned int max_cpus)
 void prom_boot_secondary(int cpu, struct task_struct *idle)
 {
 }
+
+void __init plat_smp_setup(void)
+{
+}
+void __init plat_prepare_cpus(unsigned int max_cpus)
+{
+}
index b454924..1834832 100644 (file)
@@ -237,7 +237,7 @@ extern void indy_8254timer_irq(void);
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_cause();
+       unsigned int pending = read_c0_status() & read_c0_cause();
 
        /*
         * First we check for r4k counter/timer IRQ.
index 8c450d9..fb9da9a 100644 (file)
@@ -454,7 +454,7 @@ static void ip32_irq5(void)
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_cause();
+       unsigned int pending = read_c0_status() & read_c0_cause();
 
        if (likely(pending & IE_IRQ0))
                ip32_irq0();
index 1482394..0e6a13c 100644 (file)
@@ -421,7 +421,7 @@ asmlinkage void plat_irq_dispatch(void)
         * blasting the high 32 bits.
         */
 
-       pending = read_c0_cause() & read_c0_status();
+       pending = read_c0_cause() & read_c0_status() & ST0_IM;
 
 #ifdef CONFIG_SIBYTE_SB1250_PROF
        if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */
index 39e5b4a..8e8593b 100644 (file)
@@ -333,7 +333,7 @@ static void pcimt_hwint3(void)
 
 static void sni_pcimt_hwint(void)
 {
-       u32 pending = (read_c0_cause() & read_c0_status());
+       u32 pending = read_c0_cause() & read_c0_status();
 
        if (pending & C_IRQ5)
                do_IRQ (MIPS_CPU_IRQ_BASE + 7);
index 8d6b3d5..1dfc3f0 100644 (file)
@@ -271,7 +271,7 @@ static void pcit_hwint0(void)
 
 static void sni_pcit_hwint(void)
 {
-       u32 pending = (read_c0_cause() & read_c0_status());
+       u32 pending = read_c0_cause() & read_c0_status();
 
        if (pending & C_IRQ1)
                pcit_hwint1();
@@ -285,7 +285,7 @@ static void sni_pcit_hwint(void)
 
 static void sni_pcit_hwint_cplus(void)
 {
-       u32 pending = (read_c0_cause() & read_c0_status());
+       u32 pending = read_c0_cause() & read_c0_status();
 
        if (pending & C_IRQ0)
                pcit_hwint0();
index e7f3e5b..3d25d01 100644 (file)
@@ -416,7 +416,7 @@ static int tx4927_irq_nested(void)
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_status() & read_c0_cause();
+       unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
 
        if (pending & STATUSF_IP7)                      /* cpu timer */
                do_IRQ(TX4927_IRQ_CPU_TIMER);
index 9790129..32a69a1 100644 (file)
@@ -1665,3 +1665,20 @@ sys_getcpu_wrapper:
        llgtr   %r3,%r3                 # unsigned *
        llgtr   %r4,%r4                 # struct getcpu_cache *
        jg      sys_getcpu
+
+       .globl  compat_sys_epoll_pwait_wrapper
+compat_sys_epoll_pwait_wrapper:
+       lgfr    %r2,%r2                 # int
+       llgtr   %r3,%r3                 # struct compat_epoll_event *
+       lgfr    %r4,%r4                 # int
+       lgfr    %r5,%r5                 # int
+       llgtr   %r6,%r6                 # compat_sigset_t *
+       llgf    %r0,164(%r15)           # compat_size_t
+       stg     %r0,160(%r15)
+       jg      compat_sys_epoll_pwait
+
+       .globl  compat_sys_utimes_wrapper
+compat_sys_utimes_wrapper:
+       llgtr   %r2,%r2                 # char *
+       llgtr   %r3,%r3                 # struct compat_timeval *
+       jg      compat_sys_utimes
index eca3fe5..dca6eaf 100644 (file)
@@ -268,7 +268,7 @@ debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size,
        rc->level          = level;
        rc->buf_size       = buf_size;
        rc->entry_size     = sizeof(debug_entry_t) + buf_size;
-       strlcpy(rc->name, name, sizeof(rc->name)-1);
+       strlcpy(rc->name, name, sizeof(rc->name));
        memset(rc->views, 0, DEBUG_MAX_VIEWS * sizeof(struct debug_view *));
        memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS *
                sizeof(struct dentry*));
index afca1c6..5e47936 100644 (file)
@@ -141,9 +141,9 @@ static noinline __init void detect_machine_type(void)
                machine_flags |= 4;
 }
 
+#ifdef CONFIG_64BIT
 static noinline __init int memory_fast_detect(void)
 {
-
        unsigned long val0 = 0;
        unsigned long val1 = 0xc;
        int ret = -ENOSYS;
@@ -161,9 +161,15 @@ static noinline __init int memory_fast_detect(void)
        if (ret || val0 != val1)
                return -ENOSYS;
 
-       memory_chunk[0].size = val0;
+       memory_chunk[0].size = val0 + 1;
        return 0;
 }
+#else
+static inline int memory_fast_detect(void)
+{
+       return -ENOSYS;
+}
+#endif
 
 #define ADDR2G (1UL << 31)
 
index d125a4e..f731185 100644 (file)
@@ -839,7 +839,7 @@ static int __init reipl_ccw_init(void)
        }
        reipl_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN;
        reipl_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION;
-       reipl_block_ccw->hdr.blk0_len = sizeof(reipl_block_ccw->ipl_info.ccw);
+       reipl_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
        reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
        /* check if read scp info worked and set loadparm */
        if (SCCB_VALID)
@@ -880,8 +880,7 @@ static int __init reipl_fcp_init(void)
        } else {
                reipl_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN;
                reipl_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION;
-               reipl_block_fcp->hdr.blk0_len =
-                       sizeof(reipl_block_fcp->ipl_info.fcp);
+               reipl_block_fcp->hdr.blk0_len = IPL_PARM_BLK0_FCP_LEN;
                reipl_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP;
                reipl_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_IPL;
        }
@@ -930,7 +929,7 @@ static int __init dump_ccw_init(void)
        }
        dump_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN;
        dump_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION;
-       dump_block_ccw->hdr.blk0_len = sizeof(reipl_block_ccw->ipl_info.ccw);
+       dump_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
        dump_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
        dump_capabilities |= IPL_TYPE_CCW;
        return 0;
@@ -954,7 +953,7 @@ static int __init dump_fcp_init(void)
        }
        dump_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN;
        dump_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION;
-       dump_block_fcp->hdr.blk0_len = sizeof(dump_block_fcp->ipl_info.fcp);
+       dump_block_fcp->hdr.blk0_len = IPL_PARM_BLK0_FCP_LEN;
        dump_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP;
        dump_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_DUMP;
        dump_capabilities |= IPL_TYPE_FCP;
index a52c444..c774f10 100644 (file)
@@ -320,4 +320,5 @@ SYSCALL(sys_tee,sys_tee,sys_tee_wrapper)
 SYSCALL(sys_vmsplice,sys_vmsplice,compat_sys_vmsplice_wrapper)
 NI_SYSCALL                                                     /* 310 sys_move_pages */
 SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
-SYSCALL(sys_epoll_pwait,sys_epoll_pwait,sys_ni_syscall)
+SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper)
+SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
index ecf1634..224e007 100644 (file)
@@ -214,6 +214,12 @@ retry:
                        continue;
                }
 
+               if (bar_value < *lower_limit || (bar_value + bar_size) >= *upper_limit) {
+                       DBG(" unavailable -- skipping, value %x size %x\n",
+                                       bar_value, bar_size);
+                       continue;
+               }
+
 #ifdef CONFIG_PCI_AUTO_UPDATE_RESOURCES
                /* Write it out and update our limit */
                early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
index 4b339a6..726acfc 100644 (file)
@@ -3,7 +3,7 @@
  *
  * CPU init code
  *
- * Copyright (C) 2002 - 2006  Paul Mundt
+ * Copyright (C) 2002 - 2007  Paul Mundt
  * Copyright (C) 2003  Richard Curnow
  *
  * This file is subject to the terms and conditions of the GNU General Public
@@ -48,8 +48,19 @@ static void __init cache_init(void)
 {
        unsigned long ccr, flags;
 
-       if (current_cpu_data.type == CPU_SH_NONE)
-               panic("Unknown CPU");
+       /* First setup the rest of the I-cache info */
+       current_cpu_data.icache.entry_mask = current_cpu_data.icache.way_incr -
+                                     current_cpu_data.icache.linesz;
+
+       current_cpu_data.icache.way_size = current_cpu_data.icache.sets *
+                                   current_cpu_data.icache.linesz;
+
+       /* And the D-cache too */
+       current_cpu_data.dcache.entry_mask = current_cpu_data.dcache.way_incr -
+                                     current_cpu_data.dcache.linesz;
+
+       current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
+                                   current_cpu_data.dcache.linesz;
 
        jump_to_P2();
        ccr = ctrl_inl(CCR);
@@ -200,6 +211,9 @@ asmlinkage void __init sh_cpu_init(void)
        /* First, probe the CPU */
        detect_cpu_and_cache_system();
 
+       if (current_cpu_data.type == CPU_SH_NONE)
+               panic("Unknown CPU");
+
        /* Init the cache */
        cache_init();
 
index 7f7d292..c16dc8f 100644 (file)
@@ -165,6 +165,7 @@ ENTRY(exception_handler)
 
 interrupt_entry:
        mov     r9,r4
+       mov     r15,r5
        mov.l   6f,r9
        mov.l   7f,r8
        jmp     @r8
index c19205b..f3e827f 100644 (file)
@@ -514,13 +514,16 @@ skip_save:
 
 interrupt_exception:
        mov.l   1f, r9
+       mov.l   2f, r4
+       mov.l   @r4, r4
        jmp     @r9
-        nop
+        mov    r15, r5
        rts
         nop
 
        .align 2
 1:     .long   do_IRQ
+2:     .long   INTEVT
 
        .align  2
 ENTRY(exception_none)
index 9d28c88..58950de 100644 (file)
@@ -195,13 +195,6 @@ int __init detect_cpu_and_cache_system(void)
 
        }
 
-       /* Setup the rest of the I-cache info */
-       current_cpu_data.icache.entry_mask = current_cpu_data.icache.way_incr -
-                                     current_cpu_data.icache.linesz;
-
-       current_cpu_data.icache.way_size = current_cpu_data.icache.sets *
-                                   current_cpu_data.icache.linesz;
-
        /* And the rest of the D-cache */
        if (current_cpu_data.dcache.ways > 1) {
                size = sizes[(cvr >> 16) & 0xf];
@@ -209,12 +202,6 @@ int __init detect_cpu_and_cache_system(void)
                current_cpu_data.dcache.sets            = (size >> 6);
        }
 
-       current_cpu_data.dcache.entry_mask = current_cpu_data.dcache.way_incr -
-                                     current_cpu_data.dcache.linesz;
-
-       current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
-                                   current_cpu_data.dcache.linesz;
-
        /*
         * Setup the L2 cache desc
         *
index 67be2b6..9bdd8a0 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/module.h>
 #include <linux/kernel_stat.h>
 #include <linux/seq_file.h>
-#include <linux/io.h>
 #include <linux/irq.h>
 #include <asm/processor.h>
 #include <asm/uaccess.h>
@@ -82,13 +81,9 @@ static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly;
 static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
 #endif
 
-asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
-                     unsigned long r6, unsigned long r7,
-                     struct pt_regs __regs)
+asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
 {
-       struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
        struct pt_regs *old_regs = set_irq_regs(regs);
-       int irq;
 #ifdef CONFIG_4KSTACKS
        union irq_ctx *curctx, *irqctx;
 #endif
@@ -111,13 +106,7 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
        }
 #endif
 
-#ifdef CONFIG_CPU_HAS_INTEVT
-       irq = evt2irq(ctrl_inl(INTEVT));
-#else
-       irq = r4;
-#endif
-
-       irq = irq_demux(irq);
+       irq = irq_demux(evt2irq(irq));
 
 #ifdef CONFIG_4KSTACKS
        curctx = (union irq_ctx *)current_thread_info();
index d16b5b0..7bdbe5a 100644 (file)
@@ -564,7 +564,7 @@ config PATA_IXP4XX_CF
 
 config PATA_SCC
        tristate "Toshiba's Cell Reference Set IDE support"
-       depends on PCI && PPC_IBM_CELL_BLADE
+       depends on PCI && PPC_CELLEB
        help
          This option enables support for the built-in IDE controller on
          Toshiba Cell Reference Board.
index 3c1f883..bf327d4 100644 (file)
@@ -826,7 +826,7 @@ static u64 ata_id_n_sectors(const u16 *id)
 /**
  *     ata_id_to_dma_mode      -       Identify DMA mode from id block
  *     @dev: device to identify
- *     @mode: mode to assume if we cannot tell
+ *     @unknown: mode to assume if we cannot tell
  *
  *     Set up the timing values for the device based upon the identify
  *     reported values for the DMA mode. This function is used by drivers
index 7349c3d..361953a 100644 (file)
@@ -1625,8 +1625,14 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
                rc = prereset(ap);
                if (rc) {
                        if (rc == -ENOENT) {
-                               ata_port_printk(ap, KERN_DEBUG, "port disabled. ignoring.\n");
+                               ata_port_printk(ap, KERN_DEBUG,
+                                               "port disabled. ignoring.\n");
                                ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
+
+                               for (i = 0; i < ATA_MAX_DEVICES; i++)
+                                       classes[i] = ATA_DEV_NONE;
+
+                               rc = 0;
                        } else
                                ata_port_printk(ap, KERN_ERR,
                                        "prereset failed (errno=%d)\n", rc);
index 9a0523b..c6f0e19 100644 (file)
@@ -193,7 +193,7 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev)
 
        irq = platform_get_irq(pdev, 0);
        if (irq)
-               set_irq_type(irq, IRQT_HIGH);
+               set_irq_type(irq, IRQT_RISING);
 
        /* Setup expansion bus chip selects */
        *data->cs0_cfg = data->cs0_bits;
@@ -232,7 +232,6 @@ static __devexit int ixp4xx_pata_remove(struct platform_device *dev)
        struct ata_host *host = platform_get_drvdata(dev);
 
        ata_host_detach(host);
-       platform_set_drvdata(dev, NULL);
 
        return 0;
 }
index 3193a60..1e21688 100644 (file)
@@ -672,10 +672,6 @@ static int inic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (rc)
                return rc;
 
-       rc = pci_request_regions(pdev, DRV_NAME);
-       if (rc)
-               return rc;
-
        rc = pcim_iomap_regions(pdev, 0x3f, DRV_NAME);
        if (rc)
                return rc;
index 75d9615..5614df8 100644 (file)
@@ -346,6 +346,7 @@ static const struct pci_device_id sil24_pci_tbl[] = {
        { PCI_VDEVICE(CMD, 0x3124), BID_SIL3124 },
        { PCI_VDEVICE(INTEL, 0x3124), BID_SIL3124 },
        { PCI_VDEVICE(CMD, 0x3132), BID_SIL3132 },
+       { PCI_VDEVICE(CMD, 0x0242), BID_SIL3132 },
        { PCI_VDEVICE(CMD, 0x3131), BID_SIL3131 },
        { PCI_VDEVICE(CMD, 0x3531), BID_SIL3131 },
 
index 5b1e3ff..05fac07 100644 (file)
@@ -210,9 +210,11 @@ again:
                goto again;
        }
        if (rc < 0) {
-                QDIO_DBF_TEXT3(1,trace,"sqberr");
-                sprintf(dbf_text,"%2x,%2x,%d,%d",tmp_cnt,*cnt,ccq,q_no);
-                QDIO_DBF_TEXT3(1,trace,dbf_text);
+               QDIO_DBF_TEXT3(1,trace,"sqberr");
+               sprintf(dbf_text,"%2x,%2x",tmp_cnt,*cnt);
+               QDIO_DBF_TEXT3(1,trace,dbf_text);
+               sprintf(dbf_text,"%d,%d",ccq,q_no);
+               QDIO_DBF_TEXT3(1,trace,dbf_text);
                q->handler(q->cdev,QDIO_STATUS_ACTIVATE_CHECK_CONDITION|
                                QDIO_STATUS_LOOK_FOR_ERROR,
                                0, 0, 0, -1, -1, q->int_parm);
@@ -1250,7 +1252,6 @@ qdio_is_inbound_q_done(struct qdio_q *q)
        if (!no_used) {
                QDIO_DBF_TEXT4(0,trace,"inqisdnA");
                QDIO_DBF_HEX4(0,trace,&q,sizeof(void*));
-               QDIO_DBF_TEXT4(0,trace,dbf_text);
                return 1;
        }
        if (irq->is_qebsm) {
@@ -3371,10 +3372,15 @@ qdio_do_qdio_fill_input(struct qdio_q *q, unsigned int qidx,
                        unsigned int count, struct qdio_buffer *buffers)
 {
        struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr;
+       int tmp = 0;
+
        qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1);
        if (irq->is_qebsm) {
-               while (count)
-                       set_slsb(q, &qidx, SLSB_CU_INPUT_EMPTY, &count);
+               while (count) {
+                       tmp = set_slsb(q, &qidx, SLSB_CU_INPUT_EMPTY, &count);
+                       if (!tmp)
+                               return;
+               }
                return;
        }
        for (;;) {
@@ -3390,11 +3396,15 @@ qdio_do_qdio_fill_output(struct qdio_q *q, unsigned int qidx,
                         unsigned int count, struct qdio_buffer *buffers)
 {
        struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr;
+       int tmp = 0;
 
        qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1);
        if (irq->is_qebsm) {
-               while (count)
-                       set_slsb(q, &qidx, SLSB_CU_OUTPUT_PRIMED, &count);
+               while (count) {
+                       tmp = set_slsb(q, &qidx, SLSB_CU_OUTPUT_PRIMED, &count);
+                       if (!tmp)
+                               return;
+               }
                return;
        }
 
index c7d1355..181b517 100644 (file)
@@ -65,6 +65,8 @@ module_param_named(poll_thread, ap_thread_flag, int, 0000);
 MODULE_PARM_DESC(poll_thread, "Turn on/off poll thread, default is 1 (on).");
 
 static struct device *ap_root_device = NULL;
+static DEFINE_SPINLOCK(ap_device_lock);
+static LIST_HEAD(ap_device_list);
 
 /**
  * Workqueue & timer for bus rescan.
@@ -457,6 +459,9 @@ static int ap_device_probe(struct device *dev)
        int rc;
 
        ap_dev->drv = ap_drv;
+       spin_lock_bh(&ap_device_lock);
+       list_add(&ap_dev->list, &ap_device_list);
+       spin_unlock_bh(&ap_device_lock);
        rc = ap_drv->probe ? ap_drv->probe(ap_dev) : -ENODEV;
        return rc;
 }
@@ -497,6 +502,9 @@ static int ap_device_remove(struct device *dev)
        ap_flush_queue(ap_dev);
        if (ap_drv->remove)
                ap_drv->remove(ap_dev);
+       spin_lock_bh(&ap_device_lock);
+       list_del_init(&ap_dev->list);
+       spin_unlock_bh(&ap_device_lock);
        return 0;
 }
 
@@ -772,6 +780,7 @@ static void ap_scan_bus(struct work_struct *unused)
                spin_lock_init(&ap_dev->lock);
                INIT_LIST_HEAD(&ap_dev->pendingq);
                INIT_LIST_HEAD(&ap_dev->requestq);
+               INIT_LIST_HEAD(&ap_dev->list);
                if (device_type == 0)
                        ap_probe_device_type(ap_dev);
                else
@@ -1033,14 +1042,13 @@ static void ap_poll_timeout(unsigned long unused)
  * polling until bit 2^0 of the control flags is not set. If bit 2^1
  * of the control flags has been set arm the poll timer.
  */
-static int __ap_poll_all(struct device *dev, void *data)
+static int __ap_poll_all(struct ap_device *ap_dev, unsigned long *flags)
 {
-       struct ap_device *ap_dev = to_ap_dev(dev);
        int rc;
 
        spin_lock(&ap_dev->lock);
        if (!ap_dev->unregistered) {
-               rc = ap_poll_queue(to_ap_dev(dev), (unsigned long *) data);
+               rc = ap_poll_queue(ap_dev, flags);
                if (rc)
                        ap_dev->unregistered = 1;
        } else
@@ -1054,10 +1062,15 @@ static int __ap_poll_all(struct device *dev, void *data)
 static void ap_poll_all(unsigned long dummy)
 {
        unsigned long flags;
+       struct ap_device *ap_dev;
 
        do {
                flags = 0;
-               bus_for_each_dev(&ap_bus_type, NULL, &flags, __ap_poll_all);
+               spin_lock(&ap_device_lock);
+               list_for_each_entry(ap_dev, &ap_device_list, list) {
+                       __ap_poll_all(ap_dev, &flags);
+               }
+               spin_unlock(&ap_device_lock);
        } while (flags & 1);
        if (flags & 2)
                ap_schedule_poll_timer();
@@ -1075,6 +1088,7 @@ static int ap_poll_thread(void *data)
        DECLARE_WAITQUEUE(wait, current);
        unsigned long flags;
        int requests;
+       struct ap_device *ap_dev;
 
        set_user_nice(current, 19);
        while (1) {
@@ -1092,10 +1106,12 @@ static int ap_poll_thread(void *data)
                set_current_state(TASK_RUNNING);
                remove_wait_queue(&ap_poll_wait, &wait);
 
-               local_bh_disable();
                flags = 0;
-               bus_for_each_dev(&ap_bus_type, NULL, &flags, __ap_poll_all);
-               local_bh_enable();
+               spin_lock_bh(&ap_device_lock);
+               list_for_each_entry(ap_dev, &ap_device_list, list) {
+                       __ap_poll_all(ap_dev, &flags);
+               }
+               spin_unlock_bh(&ap_device_lock);
        }
        set_current_state(TASK_RUNNING);
        remove_wait_queue(&ap_poll_wait, &wait);
index 83b69c0..008559e 100644 (file)
@@ -106,6 +106,7 @@ struct ap_device {
        struct device device;
        struct ap_driver *drv;          /* Pointer to AP device driver. */
        spinlock_t lock;                /* Per device lock. */
+       struct list_head list;          /* private list of all AP devices. */
 
        ap_qid_t qid;                   /* AP queue id. */
        int queue_depth;                /* AP queue depth.*/
index 9976139..e3625a4 100644 (file)
@@ -298,14 +298,14 @@ static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex)
                get_device(&zdev->ap_dev->device);
                zdev->request_count++;
                __zcrypt_decrease_preference(zdev);
-               spin_unlock_bh(&zcrypt_device_lock);
                if (try_module_get(zdev->ap_dev->drv->driver.owner)) {
+                       spin_unlock_bh(&zcrypt_device_lock);
                        rc = zdev->ops->rsa_modexpo(zdev, mex);
+                       spin_lock_bh(&zcrypt_device_lock);
                        module_put(zdev->ap_dev->drv->driver.owner);
                }
                else
                        rc = -EAGAIN;
-               spin_lock_bh(&zcrypt_device_lock);
                zdev->request_count--;
                __zcrypt_increase_preference(zdev);
                put_device(&zdev->ap_dev->device);
@@ -373,14 +373,14 @@ static long zcrypt_rsa_crt(struct ica_rsa_modexpo_crt *crt)
                get_device(&zdev->ap_dev->device);
                zdev->request_count++;
                __zcrypt_decrease_preference(zdev);
-               spin_unlock_bh(&zcrypt_device_lock);
                if (try_module_get(zdev->ap_dev->drv->driver.owner)) {
+                       spin_unlock_bh(&zcrypt_device_lock);
                        rc = zdev->ops->rsa_modexpo_crt(zdev, crt);
+                       spin_lock_bh(&zcrypt_device_lock);
                        module_put(zdev->ap_dev->drv->driver.owner);
                }
                else
                        rc = -EAGAIN;
-               spin_lock_bh(&zcrypt_device_lock);
                zdev->request_count--;
                __zcrypt_increase_preference(zdev);
                put_device(&zdev->ap_dev->device);
@@ -408,14 +408,14 @@ static long zcrypt_send_cprb(struct ica_xcRB *xcRB)
                get_device(&zdev->ap_dev->device);
                zdev->request_count++;
                __zcrypt_decrease_preference(zdev);
-               spin_unlock_bh(&zcrypt_device_lock);
                if (try_module_get(zdev->ap_dev->drv->driver.owner)) {
+                       spin_unlock_bh(&zcrypt_device_lock);
                        rc = zdev->ops->send_cprb(zdev, xcRB);
+                       spin_lock_bh(&zcrypt_device_lock);
                        module_put(zdev->ap_dev->drv->driver.owner);
                }
                else
                        rc = -EAGAIN;
-               spin_lock_bh(&zcrypt_device_lock);
                zdev->request_count--;
                __zcrypt_increase_preference(zdev);
                put_device(&zdev->ap_dev->device);
index c53b696..46c40bb 100644 (file)
@@ -17,6 +17,9 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  */
+#if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+#define SUPPORT_SYSRQ
+#endif
 
 #undef DEBUG
 
 #endif
 
 #include <asm/sci.h>
-
-#if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-#define SUPPORT_SYSRQ
-#endif
-
 #include "sh-sci.h"
 
 struct sci_port {
@@ -645,6 +643,9 @@ static inline int sci_handle_breaks(struct uart_port *port)
        struct tty_struct *tty = port->info->tty;
        struct sci_port *s = &sci_ports[port->line];
 
+       if (uart_handle_break(port))
+               return 0;
+
        if (!s->break_flag && status & SCxSR_BRK(port)) {
 #if defined(CONFIG_CPU_SH3)
                /* Debounce break */
index ea88aa6..f266c27 100644 (file)
@@ -103,9 +103,9 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
        unsigned long tmp, tmp2;
 
        __asm__ __volatile__("@ atomic_clear_mask\n"
-"1:    ldrex   %0, %2\n"
+"1:    ldrex   %0, [%2]\n"
 "      bic     %0, %0, %3\n"
-"      strex   %1, %0, %2\n"
+"      strex   %1, %0, [%2]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
        : "=&r" (tmp), "=&r" (tmp2)
index 660f782..0eb6408 100644 (file)
 #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \
                              sizeof(struct ipl_block_fcp))
 
+#define IPL_PARM_BLK0_FCP_LEN (sizeof(struct ipl_block_fcp) + 8)
+
 #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \
                              sizeof(struct ipl_block_ccw))
 
+#define IPL_PARM_BLK0_CCW_LEN (sizeof(struct ipl_block_ccw) + 8)
+
 #define IPL_MAX_SUPPORTED_VERSION (0)
 
 #define IPL_PARMBLOCK_START    ((struct ipl_parameter_block *) \
@@ -58,6 +62,7 @@ struct ipl_block_ccw {
        u8  vm_flags;
        u8  reserved3[3];
        u32 vm_parm_len;
+       u8  reserved4[80];
 } __attribute__((packed));
 
 struct ipl_parameter_block {
index fb6fef9..5c6f00d 100644 (file)
 /* Number 310 is reserved for new sys_move_pages */
 #define __NR_getcpu            311
 #define __NR_epoll_pwait       312
+#define __NR_utimes            313
 
-#define NR_syscalls 313
+#define NR_syscalls 314
 
 /* 
  * There are some system calls that are not present on 64 bit, some
index 9d84a2d..35805df 100644 (file)
 #define TCSETSW                0x5403
 #define TCSETSF                0x5404
 
-#define TCGETA         _IOR('t', 23, struct termio)
-#define TCSETA         _IOW('t', 24, struct termio)
-#define TCSETAW                _IOW('t', 25, struct termio)
-#define TCSETAF                _IOW('t', 28, struct termio)
+#define TCGETA         0x80127417      /* _IOR('t', 23, struct termio) */
+#define TCSETA         0x40127418      /* _IOW('t', 24, struct termio) */
+#define TCSETAW                0x40127419      /* _IOW('t', 25, struct termio) */
+#define TCSETAF                0x4012741C      /* _IOW('t', 28, struct termio) */
 
 #define TCSBRK         _IO('t', 29)
 #define TCXONC         _IO('t', 30)
 #define TCFLSH         _IO('t', 31)
 
-#define TIOCSWINSZ     _IOW('t', 103, struct winsize)
-#define TIOCGWINSZ     _IOR('t', 104, struct winsize)
+#define TIOCSWINSZ     0x40087467      /* _IOW('t', 103, struct winsize) */
+#define TIOCGWINSZ     0x80087468      /* _IOR('t', 104, struct winsize) */
 #define        TIOCSTART       _IO('t', 110)           /* start output, like ^Q */
 #define        TIOCSTOP        _IO('t', 111)           /* stop output, like ^S */
 #define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
@@ -59,8 +59,8 @@
 #define TIOCSSOFTCAR   _IOW('T', 26, unsigned int) /* 0x541A */
 #define TIOCLINUX      _IOW('T', 28, char) /* 0x541C */
 #define TIOCCONS       _IO('T', 29) /* 0x541D */
-#define TIOCGSERIAL    _IOR('T', 30, struct serial_struct) /* 0x541E */
-#define TIOCSSERIAL    _IOW('T', 31, struct serial_struct) /* 0x541F */
+#define TIOCGSERIAL    0x803C541E      /* _IOR('T', 30, struct serial_struct) 0x541E */
+#define TIOCSSERIAL    0x403C541F      /* _IOW('T', 31, struct serial_struct) 0x541F */
 #define TIOCPKT                _IOW('T', 32, int) /* 0x5420 */
 # define TIOCPKT_DATA           0
 # define TIOCPKT_FLUSHREAD      1
 #define TIOCSERSWILD   _IOW('T', 85,  int) /* 0x5455 */
 #define TIOCGLCKTRMIOS 0x5456
 #define TIOCSLCKTRMIOS 0x5457
-#define TIOCSERGSTRUCT _IOR('T', 88, struct async_struct) /* 0x5458 */ /* For debugging only */
+#define TIOCSERGSTRUCT 0x80d85458      /* _IOR('T', 88, struct async_struct) 0x5458 */ /* For debugging only */
 #define TIOCSERGETLSR   _IOR('T', 89, unsigned int) /* 0x5459 */ /* Get line status register */
   /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 # define TIOCSER_TEMT    0x01  /* Transmitter physically empty */
-#define TIOCSERGETMULTI _IOR('T', 90, struct serial_multiport_struct) /* 0x545A */ /* Get multiport config  */
-#define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* 0x545B */ /* Set multiport config */
+#define TIOCSERGETMULTI 0x80A8545A     /* _IOR('T', 90, struct serial_multiport_struct) 0x545A */ /* Get multiport config */
+#define TIOCSERSETMULTI 0x40A8545B     /* _IOW('T', 91, struct serial_multiport_struct) 0x545B */ /* Set multiport config */
 
 #define TIOCMIWAIT     _IO('T', 92) /* 0x545C */       /* wait for a change on serial input line(s) */
 #define TIOCGICOUNT    0x545D  /* read serial port inline interrupt counts */
index 8ccf7ae..afe188f 100644 (file)
 /*
  * Convert back and forth between INTEVT and IRQ values.
  */
+#ifdef CONFIG_CPU_HAS_INTEVT
 #define evt2irq(evt)           (((evt) >> 5) - 16)
 #define irq2evt(irq)           (((irq) + 16) << 5)
+#else
+#define evt2irq(evt)           (evt)
+#define irq2evt(irq)           (irq)
+#endif
 
 /*
  * Simple Mask Register Support
index 17f527b..49be50a 100644 (file)
 #define __NR_fcntl64           221
 /* 223 is unused */
 #define __NR_gettid            224
+#define __NR_readahead         225
 #define __NR_setxattr          226
 #define __NR_lsetxattr         227
 #define __NR_fsetxattr         228