]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge master.kernel.org:/home/rmk/linux-2.6-serial
authorLinus Torvalds <torvalds@g5.osdl.org>
Wed, 8 Mar 2006 02:04:54 +0000 (18:04 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 8 Mar 2006 02:04:54 +0000 (18:04 -0800)
* master.kernel.org:/home/rmk/linux-2.6-serial:
  [SERIAL] ip22zilog: Fix oops on runlevel change with serial console
  [SERIAL] Fix two bugs in parport_serial

63 files changed:
arch/arm/Kconfig
arch/arm/kernel/time.c
arch/arm/mach-ixp4xx/nas100d-power.c
arch/arm/mm/tlb-v6.S
arch/h8300/kernel/process.c
arch/i386/kernel/efi.c
arch/i386/kernel/time.c
arch/sparc64/kernel/sys32.S
arch/sparc64/kernel/una_asm.S
arch/sparc64/lib/U1copy_from_user.S
arch/sparc64/lib/U1copy_to_user.S
arch/sparc64/lib/U3copy_from_user.S
arch/sparc64/lib/U3copy_to_user.S
arch/sparc64/lib/bzero.S
arch/sparc64/lib/copy_in_user.S
arch/sparc64/lib/csum_copy_from_user.S
arch/sparc64/lib/csum_copy_to_user.S
arch/sparc64/lib/strlen_user.S
arch/sparc64/lib/strncpy_from_user.S
arch/sparc64/solaris/entry64.S
arch/v850/kernel/process.c
arch/xtensa/kernel/process.c
drivers/atm/fore200e.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/isdn/hisax/config.c
drivers/isdn/hisax/hfc_pci.c
drivers/isdn/hisax/hfc_usb.c
drivers/isdn/i4l/isdn_tty.c
drivers/macintosh/windfarm_pid.c
drivers/net/chelsio/espi.c
drivers/net/s2io.c
drivers/net/tg3.c
drivers/s390/cio/chsc.c
drivers/scsi/sr_ioctl.c
drivers/usb/serial/usb-serial.c
fs/cifs/cifsproto.h
fs/cifs/connect.c
fs/cifs/misc.c
fs/cramfs/inode.c
fs/fifo.c
fs/proc/task_mmu.c
fs/ramfs/inode.c
include/asm-arm/tlbflush.h
include/asm-s390/system.h
include/asm-sparc64/futex.h
include/asm-sparc64/uaccess.h
include/linux/hrtimer.h
include/linux/kmalloc_sizes.h
include/linux/memory_hotplug.h
include/linux/pci_ids.h
kernel/hrtimer.c
kernel/sched.c
kernel/timer.c
mm/mempolicy.c
mm/slab.c
net/atm/signaling.c
net/bridge/br_if.c
net/bridge/br_stp_if.c
net/dccp/ccids/ccid3.c
net/ipv4/netfilter/ip_queue.c
net/ipv6/netfilter/ip6_queue.c
scripts/mod/file2alias.c
sound/core/control.c

index 15dc1a0dffbb6f2e048c837860bedf4b0c868779..9f80fa502f8fd975049fbe485ac87ed40898e822 100644 (file)
@@ -78,7 +78,7 @@ menu "System Type"
 
 choice
        prompt "ARM system type"
-       default ARCH_RPC
+       default ARCH_VERSATILE
 
 config ARCH_CLPS7500
        bool "Cirrus-CL-PS7500FE"
index d7d932c02866d51336414ecf44f3c98c935abedd..d6bd435a685722c1c59a249fa9d89d260e36e3c4 100644 (file)
@@ -422,12 +422,14 @@ static int timer_dyn_tick_disable(void)
 void timer_dyn_reprogram(void)
 {
        struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick;
+       unsigned long next, seq;
 
-       if (dyn_tick) {
-               write_seqlock(&xtime_lock);
-               if (dyn_tick->state & DYN_TICK_ENABLED)
+       if (dyn_tick && (dyn_tick->state & DYN_TICK_ENABLED)) {
+               next = next_timer_interrupt();
+               do {
+                       seq = read_seqbegin(&xtime_lock);
                        dyn_tick->reprogram(next_timer_interrupt() - jiffies);
-               write_sequnlock(&xtime_lock);
+               } while (read_seqretry(&xtime_lock, seq));
        }
 }
 
index 2bec69bfa715a2aadffab7cf887466e240988404..99d333d7ebdd56c0d9424a5851efe3baaa55a080 100644 (file)
@@ -56,6 +56,9 @@ static int __init nas100d_power_init(void)
 
 static void __exit nas100d_power_exit(void)
 {
+       if (!(machine_is_nas100d()))
+               return;
+
        free_irq(NAS100D_RB_IRQ, NULL);
 }
 
index 6f76b89ef46eab52fa7dbcaa483003ba28dd6527..fd6adde39091ef28cadf0d4fa273d8376fbbe707 100644 (file)
@@ -80,6 +80,7 @@ ENTRY(v6wbi_flush_kern_tlb_range)
        add     r0, r0, #PAGE_SZ
        cmp     r0, r1
        blo     1b
+       mcr     p15, 0, r2, c7, c10, 4          @ data synchronization barrier
        mov     pc, lr
 
        .section ".text.init", #alloc, #execinstr
index ed79ae20e88d4a58800da6204648820bd6171666..dd344f112cfec3457718879d090e62eb84df56d6 100644 (file)
@@ -45,6 +45,9 @@
 #include <asm/setup.h>
 #include <asm/pgtable.h>
 
+void (*pm_power_off)(void) = NULL;
+EXPORT_SYMBOL(pm_power_off);
+
 asmlinkage void ret_from_fork(void);
 
 /*
index e3e42fd6240115f97904eefde20d8828b4bb9f4f..c9cad7ba0d2d5eced0508ff256eb1c1a62c92764 100644 (file)
@@ -70,10 +70,13 @@ static void efi_call_phys_prelog(void)
 {
        unsigned long cr4;
        unsigned long temp;
+       struct Xgt_desc_struct *cpu_gdt_descr;
 
        spin_lock(&efi_rt_lock);
        local_irq_save(efi_rt_eflags);
 
+       cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0);
+
        /*
         * If I don't have PSE, I should just duplicate two entries in page
         * directory. If I have PSE, I just need to duplicate one entry in
@@ -103,18 +106,17 @@ static void efi_call_phys_prelog(void)
         */
        local_flush_tlb();
 
-       per_cpu(cpu_gdt_descr, 0).address =
-                                __pa(per_cpu(cpu_gdt_descr, 0).address);
-       load_gdt((struct Xgt_desc_struct *)__pa(&per_cpu(cpu_gdt_descr, 0)));
+       cpu_gdt_descr->address = __pa(cpu_gdt_descr->address);
+       load_gdt(cpu_gdt_descr);
 }
 
 static void efi_call_phys_epilog(void)
 {
        unsigned long cr4;
+       struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0);
 
-       per_cpu(cpu_gdt_descr, 0).address =
-                       (unsigned long)__va(per_cpu(cpu_gdt_descr, 0).address);
-       load_gdt((struct Xgt_desc_struct *)__va(&per_cpu(cpu_gdt_descr, 0)));
+       cpu_gdt_descr->address = __va(cpu_gdt_descr->address);
+       load_gdt(cpu_gdt_descr);
 
        cr4 = read_cr4();
 
index a14d594bfbebb2b9345e45619fb4387154057653..9d3074759856e0e1ff508b9ca6aec2b077c27075 100644 (file)
@@ -412,9 +412,9 @@ static int timer_resume(struct sys_device *dev)
        write_seqlock_irqsave(&xtime_lock, flags);
        xtime.tv_sec = sec;
        xtime.tv_nsec = 0;
-       write_sequnlock_irqrestore(&xtime_lock, flags);
-       jiffies += sleep_length;
+       jiffies_64 += sleep_length;
        wall_jiffies += sleep_length;
+       write_sequnlock_irqrestore(&xtime_lock, flags);
        if (last_timer->resume)
                last_timer->resume();
        cur_timer = last_timer;
index 60b59375aa78d31f78b832f76928fc6d4447ce72..c4a1cef4b1e547992ae671b7710f4952f1c291f1 100644 (file)
@@ -318,7 +318,7 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int)
        nop
        nop
 
-       .section        __ex_table
+       .section        __ex_table,"a"
        .align          4
        .word           1b, __retl_efault, 2b, __retl_efault
        .word           3b, __retl_efault, 4b, __retl_efault
index 1f5b5b708ce7210fd36e0abaa28362dfa8518a0a..be183fe41443f3a54594502e9b7c46b2172212cf 100644 (file)
@@ -47,7 +47,7 @@ __do_int_store:
         mov    0, %o0
        .size   __do_int_store, .-__do_int_store
 
-       .section        __ex_table
+       .section        __ex_table,"a"
        .word           4b, __retl_efault
        .word           5b, __retl_efault
        .word           6b, __retl_efault
@@ -129,7 +129,7 @@ do_int_load:
         mov    0, %o0
        .size   __do_int_load, .-__do_int_load
 
-       .section        __ex_table
+       .section        __ex_table,"a"
        .word           4b, __retl_efault
        .word           5b, __retl_efault
        .word           6b, __retl_efault
index 93146a81e2d35dc4be57089582b4769550536c5e..3192b0bf4fab93466ace297240a6b17e50d1e98a 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    1, %o0;         \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 1fccc521e2bd9071f3a41c77418a5db33c4627d7..d1210ffb0b82aa444b71079bb617c83025473d6c 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    1, %o0;         \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index df600b667e481e3901d7036f2dbe9f26422a96f5..f5bfc8d9d216686b031d685aa8f577fab4634324 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    1, %o0;         \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index f337f22ed82ead7ff95e253e621d36a9c5f224c1..2334f111bb0c81c36f4b1016725a238650e28d97 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    1, %o0;         \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 21a933ffb7c29dcaddbf691a1fe0838b2d455268..1d2abcfa4e524e8ce5045ff44569641ece9d1c43 100644 (file)
@@ -92,7 +92,7 @@ __bzero_done:
        .align 4;               \
 99:    retl;                   \
         mov    %o1, %o0;       \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 816076c0bc06528b45974106103c2a551fadd4ae..650af3f21f7860b6c5ad30234f48a04f595e797d 100644 (file)
@@ -13,7 +13,7 @@
        .align 4;               \
 99:    retl;                   \
         mov 1, %o0;            \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 817ebdae39f8efac9edfa052faaaa1953a6ed822..a22eddbe5dba50c6b9e32535862db7d7c3a3987f 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    -1, %o0;        \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index c2f9463ea1e26dccb5383610fc33110ebd3fffd6..d5b12f441f0263e82663240807f7521f35c2f8d0 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    -1, %o0;        \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 9ed54ba14fc63a263bdaff0a4e0f04f60968f66c..114ed111e2513606ace5a08fb5a78030092aa6ad 100644 (file)
@@ -85,7 +85,7 @@ __strnlen_user:
         retl
          clr    %o0
 
-       .section __ex_table,#alloc
+       .section __ex_table,"a"
        .align  4
 
        .word   10b, 30b
index e1264650ca7aa8cb31329227b8129c3c0abed0a0..b2f499f79427cf1ba5eacb9969bd1a6a2c5443fa 100644 (file)
@@ -125,7 +125,7 @@ __strncpy_from_user:
         add    %o2, %o3, %o0
        .size   __strncpy_from_user, .-__strncpy_from_user
 
-       .section __ex_table,#alloc
+       .section __ex_table,"a"
        .align  4
        .word   60b, __retl_efault
        .word   61b, __retl_efault
index eb314ed23cdbecb693ebef1ff3c797ca51e24696..f170324e8bf2447a3b51fce2cf7949f35d4fb1c1 100644 (file)
@@ -217,7 +217,7 @@ solaris_unimplemented:
        ba,pt           %xcc, ret_from_solaris
         nop
 
-       .section        __ex_table,#alloc
+       .section        __ex_table,"a"
        .align          4
        .word           exen, exenf
 
index eb909937958bcd5ba44c1a02121910ba63a7cd82..621111ddf907deb91c04353f6dcb18771070e497 100644 (file)
@@ -30,6 +30,9 @@
 #include <asm/system.h>
 #include <asm/pgtable.h>
 
+void (*pm_power_off)(void) = NULL;
+EXPORT_SYMBOL(pm_power_off);
+
 extern void ret_from_fork (void);
 
 
index f1f596644bfcd255c88a4aa9e4dac4dc06ef886c..64a649eb883f2d4261ade0f4465549bad64d00fc 100644 (file)
@@ -64,6 +64,9 @@ EXPORT_SYMBOL(init_task);
 
 struct task_struct *current_set[NR_CPUS] = {&init_task, };
 
+void (*pm_power_off)(void) = NULL;
+EXPORT_SYMBOL(pm_power_off);
+
 
 #if XCHAL_CP_NUM > 0
 
index 14f6a6201da3c0f29e8203401e49e0fc2858dd28..05983a312d504033745e65938cd87899c75e0605 100644 (file)
@@ -555,7 +555,7 @@ fore200e_pca_reset(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_pca_map(struct fore200e* fore200e)
 {
     DPRINTK(2, "device %s being mapped in memory\n", fore200e->name);
@@ -589,7 +589,7 @@ fore200e_pca_unmap(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_pca_configure(struct fore200e* fore200e)
 {
     struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev;
@@ -2125,7 +2125,7 @@ fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags)
 }
     
 
-static int __init
+static int __devinit
 fore200e_irq_request(struct fore200e* fore200e)
 {
     if (request_irq(fore200e->irq, fore200e_interrupt, SA_SHIRQ, fore200e->name, fore200e->atm_dev) < 0) {
@@ -2148,7 +2148,7 @@ fore200e_irq_request(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_get_esi(struct fore200e* fore200e)
 {
     struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA);
@@ -2180,7 +2180,7 @@ fore200e_get_esi(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_alloc_rx_buf(struct fore200e* fore200e)
 {
     int scheme, magn, nbr, size, i;
@@ -2245,7 +2245,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init_bs_queue(struct fore200e* fore200e)
 {
     int scheme, magn, i;
@@ -2308,7 +2308,7 @@ fore200e_init_bs_queue(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init_rx_queue(struct fore200e* fore200e)
 {
     struct host_rxq*     rxq =  &fore200e->host_rxq;
@@ -2368,7 +2368,7 @@ fore200e_init_rx_queue(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init_tx_queue(struct fore200e* fore200e)
 {
     struct host_txq*     txq =  &fore200e->host_txq;
@@ -2431,7 +2431,7 @@ fore200e_init_tx_queue(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init_cmd_queue(struct fore200e* fore200e)
 {
     struct host_cmdq*     cmdq =  &fore200e->host_cmdq;
@@ -2487,7 +2487,7 @@ fore200e_param_bs_queue(struct fore200e* fore200e,
 }
 
 
-static int __init
+static int __devinit
 fore200e_initialize(struct fore200e* fore200e)
 {
     struct cp_queues __iomem * cpq;
@@ -2539,7 +2539,7 @@ fore200e_initialize(struct fore200e* fore200e)
 }
 
 
-static void __init
+static void __devinit
 fore200e_monitor_putc(struct fore200e* fore200e, char c)
 {
     struct cp_monitor __iomem * monitor = fore200e->cp_monitor;
@@ -2551,7 +2551,7 @@ fore200e_monitor_putc(struct fore200e* fore200e, char c)
 }
 
 
-static int __init
+static int __devinit
 fore200e_monitor_getc(struct fore200e* fore200e)
 {
     struct cp_monitor __iomem * monitor = fore200e->cp_monitor;
@@ -2576,7 +2576,7 @@ fore200e_monitor_getc(struct fore200e* fore200e)
 }
 
 
-static void __init
+static void __devinit
 fore200e_monitor_puts(struct fore200e* fore200e, char* str)
 {
     while (*str) {
@@ -2591,7 +2591,7 @@ fore200e_monitor_puts(struct fore200e* fore200e, char* str)
 }
 
 
-static int __init
+static int __devinit
 fore200e_start_fw(struct fore200e* fore200e)
 {
     int               ok;
@@ -2622,7 +2622,7 @@ fore200e_start_fw(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_load_fw(struct fore200e* fore200e)
 {
     u32* fw_data = (u32*) fore200e->bus->fw_data;
@@ -2648,7 +2648,7 @@ fore200e_load_fw(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_register(struct fore200e* fore200e)
 {
     struct atm_dev* atm_dev;
@@ -2675,7 +2675,7 @@ fore200e_register(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init(struct fore200e* fore200e)
 {
     if (fore200e_register(fore200e) < 0)
@@ -2721,7 +2721,7 @@ fore200e_init(struct fore200e* fore200e)
        return -EBUSY;
 
     fore200e_supply(fore200e);
-    
+
     /* all done, board initialization is now complete */
     fore200e->state = FORE200E_STATE_COMPLETE;
     return 0;
index 2d2d4ac3525ab5af66bdc2805791ef18db493e05..960dae5c87d1d73d9b19fe24f094130df40ca1b4 100644 (file)
@@ -1155,6 +1155,12 @@ static int srp_send_tsk_mgmt(struct scsi_cmnd *scmnd, u8 func)
 
        spin_lock_irq(target->scsi_host->host_lock);
 
+       if (target->state == SRP_TARGET_DEAD ||
+           target->state == SRP_TARGET_REMOVED) {
+               scmnd->result = DID_BAD_TARGET << 16;
+               goto out;
+       }
+
        if (scmnd->host_scribble == (void *) -1L)
                goto out;
 
index 8159bcecd0c2e1c6fabe01a6dbbe13fbb2d86024..df9d652018198311f5d2b05d8e6e2ef81c7e81a9 100644 (file)
@@ -1929,6 +1929,8 @@ static struct pci_device_id hisax_pci_tbl[] __initdata = {
        {PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B00B,         PCI_ANY_ID, PCI_ANY_ID},
        {PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B00C,         PCI_ANY_ID, PCI_ANY_ID},
        {PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B100,         PCI_ANY_ID, PCI_ANY_ID},
+       {PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B700,         PCI_ANY_ID, PCI_ANY_ID},
+       {PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B701,         PCI_ANY_ID, PCI_ANY_ID},
        {PCI_VENDOR_ID_ABOCOM,   PCI_DEVICE_ID_ABOCOM_2BD1,      PCI_ANY_ID, PCI_ANY_ID},
        {PCI_VENDOR_ID_ASUSTEK,  PCI_DEVICE_ID_ASUSTEK_0675,     PCI_ANY_ID, PCI_ANY_ID},
        {PCI_VENDOR_ID_BERKOM,   PCI_DEVICE_ID_BERKOM_T_CONCEPT, PCI_ANY_ID, PCI_ANY_ID},
index 4866fc32d8d9f1697806ccd938b9edf2d13692eb..91d25acb5ede07f39d8859204e5b6daa9f150315 100644 (file)
@@ -51,6 +51,8 @@ static const PCI_ENTRY id_list[] =
        {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, "Billion", "B00B"},
        {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, "Billion", "B00C"},
        {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, "Seyeon", "B100"},
+       {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B700, "Primux II S0", "B700"},
+       {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B701, "Primux II S0 NT", "B701"},
        {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, "Abocom/Magitek", "2BD1"},
        {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, "Asuscom/Askey", "675"},
        {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, "German telekom", "T-Concept"},
index ca5b4a3b683e67c1fc2d04df730302890048d195..262c4412741904bb5dd16ac1252966474ada9a1d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * hfc_usb.c
  *
- * $Id: hfc_usb.c,v 4.36 2005/04/08 09:55:13 martinb1 Exp $
+ * $Id: hfc_usb.c,v 2.3.2.13 2006/02/17 17:17:22 mbachem Exp $
  *
  * modular HiSax ISDN driver for Colognechip HFC-S USB chip
  *
@@ -45,7 +45,7 @@
 #include "hfc_usb.h"
 
 static const char *hfcusb_revision =
-    "$Revision: 4.36 $ $Date: 2005/04/08 09:55:13 $ ";
+    "$Revision: 2.3.2.13 $ $Date: 2006/02/17 17:17:22 $ ";
 
 /* Hisax debug support
 * use "modprobe debug=x" where x is bitfield of USB_DBG & ISDN_DBG
@@ -219,7 +219,7 @@ symbolic(struct hfcusb_symbolic_list list[], const int num)
        for (i = 0; list[i].name != NULL; i++)
                if (list[i].num == num)
                        return (list[i].name);
-       return "<unkown ERROR>";
+       return "<unknown ERROR>";
 }
 
 
@@ -235,9 +235,9 @@ ctrl_start_transfer(hfcusb_data * hfc)
                hfc->ctrl_urb->transfer_buffer = NULL;
                hfc->ctrl_urb->transfer_buffer_length = 0;
                hfc->ctrl_write.wIndex =
-                   hfc->ctrl_buff[hfc->ctrl_out_idx].hfc_reg;
+                   cpu_to_le16(hfc->ctrl_buff[hfc->ctrl_out_idx].hfc_reg);
                hfc->ctrl_write.wValue =
-                   hfc->ctrl_buff[hfc->ctrl_out_idx].reg_val;
+                   cpu_to_le16(hfc->ctrl_buff[hfc->ctrl_out_idx].reg_val);
 
                usb_submit_urb(hfc->ctrl_urb, GFP_ATOMIC);      /* start transfer */
        }
@@ -1282,7 +1282,7 @@ usb_init(hfcusb_data * hfc)
        /* init the background machinery for control requests */
        hfc->ctrl_read.bRequestType = 0xc0;
        hfc->ctrl_read.bRequest = 1;
-       hfc->ctrl_read.wLength = 1;
+       hfc->ctrl_read.wLength = cpu_to_le16(1);
        hfc->ctrl_write.bRequestType = 0x40;
        hfc->ctrl_write.bRequest = 0;
        hfc->ctrl_write.wLength = 0;
@@ -1373,9 +1373,8 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
 
        vend_idx = 0xffff;
        for (i = 0; hfcusb_idtab[i].idVendor; i++) {
-               if (dev->descriptor.idVendor == hfcusb_idtab[i].idVendor
-                   && dev->descriptor.idProduct ==
-                   hfcusb_idtab[i].idProduct) {
+               if ((le16_to_cpu(dev->descriptor.idVendor) == hfcusb_idtab[i].idVendor)
+                   && (le16_to_cpu(dev->descriptor.idProduct) == hfcusb_idtab[i].idProduct)) {
                        vend_idx = i;
                        continue;
                }
@@ -1516,8 +1515,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
                                                            usb_transfer_mode
                                                            = USB_INT;
                                                        packet_size =
-                                                           ep->desc.
-                                                           wMaxPacketSize;
+                                                           le16_to_cpu(ep->desc.wMaxPacketSize);
                                                        break;
                                                case USB_ENDPOINT_XFER_BULK:
                                                        if (ep_addr & 0x80)
@@ -1545,8 +1543,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
                                                            usb_transfer_mode
                                                            = USB_BULK;
                                                        packet_size =
-                                                           ep->desc.
-                                                           wMaxPacketSize;
+                                                           le16_to_cpu(ep->desc.wMaxPacketSize);
                                                        break;
                                                case USB_ENDPOINT_XFER_ISOC:
                                                        if (ep_addr & 0x80)
@@ -1574,8 +1571,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
                                                            usb_transfer_mode
                                                            = USB_ISOC;
                                                        iso_packet_size =
-                                                           ep->desc.
-                                                           wMaxPacketSize;
+                                                           le16_to_cpu(ep->desc.wMaxPacketSize);
                                                        break;
                                                default:
                                                        context->
@@ -1588,10 +1584,8 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
                                                    fifonum = cidx;
                                                context->fifos[cidx].hfc =
                                                    context;
-                                               context->fifos[cidx].
-                                                   usb_packet_maxlen =
-                                                   ep->desc.
-                                                   wMaxPacketSize;
+                                               context->fifos[cidx].usb_packet_maxlen =
+                                                   le16_to_cpu(ep->desc.wMaxPacketSize);
                                                context->fifos[cidx].
                                                    intervall =
                                                    ep->desc.bInterval;
index 393633681f49fa852ac549b2aeb48fc4d9ebf07d..aeaa1db74bd87ad37bd103655df01791e2676a18 100644 (file)
@@ -1682,6 +1682,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
 #ifdef ISDN_DEBUG_MODEM_OPEN
                printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n");
 #endif
+               module_put(info->owner);
                return;
        }
        info->flags |= ISDN_ASYNC_CLOSING;
index 0842432e27ad10b74fefbef8f045323940691e8a..f10efb28cae42ef355e42c53d68d920b062b60d4 100644 (file)
@@ -143,3 +143,7 @@ s32 wf_cpu_pid_run(struct wf_cpu_pid_state *st, s32 new_power, s32 new_temp)
        return st->target;
 }
 EXPORT_SYMBOL_GPL(wf_cpu_pid_run);
+
+MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
+MODULE_DESCRIPTION("PID algorithm for PowerMacs thermal control");
+MODULE_LICENSE("GPL");
index 230642571c9247cad7dc91b6039ece1fb0c260b9..e824acaf188a89ddb99b281257f0b50fefe79f7c 100644 (file)
@@ -296,9 +296,7 @@ void t1_espi_destroy(struct peespi *espi)
 
 struct peespi *t1_espi_create(adapter_t *adapter)
 {
-       struct peespi *espi = kmalloc(sizeof(*espi), GFP_KERNEL);
-
-       memset(espi, 0, sizeof(*espi));
+       struct peespi *espi = kzalloc(sizeof(*espi), GFP_KERNEL);
 
        if (espi)
                espi->adapter = adapter;
index 49b597cbc19a076e1ed2e737ff68b7b653922044..b7f00d6eb6a6a49bd3b34f4729806cf77d867702 100644 (file)
@@ -4092,6 +4092,7 @@ static void s2io_set_multicast(struct net_device *dev)
                     i++, mclist = mclist->next) {
                        memcpy(sp->usr_addrs[i].addr, mclist->dmi_addr,
                               ETH_ALEN);
+                       mac_addr = 0;
                        for (j = 0; j < ETH_ALEN; j++) {
                                mac_addr |= mclist->dmi_addr[j];
                                mac_addr <<= 8;
index e8e92c853e89dbc867c34c701f86a011ce969517..15545620ab0e2d6a2efe77bdb07c99d2bc7a6938 100644 (file)
@@ -3532,9 +3532,23 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len)
                (base + len + 8 < base));
 }
 
+/* Test for DMA addresses > 40-bit */
+static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping,
+                                         int len)
+{
+#if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64)
+       if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)
+               return (((u64) mapping + len) > DMA_40BIT_MASK);
+       return 0;
+#else
+       return 0;
+#endif
+}
+
 static void tg3_set_txd(struct tg3 *, int, dma_addr_t, int, u32, u32);
 
-static int tigon3_4gb_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb,
+/* Workaround 4GB and 40-bit hardware DMA bugs. */
+static int tigon3_dma_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb,
                                       u32 last_plus_one, u32 *start,
                                       u32 base_flags, u32 mss)
 {
@@ -3742,6 +3756,9 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
                        if (tg3_4g_overflow_test(mapping, len))
                                would_hit_hwbug = 1;
 
+                       if (tg3_40bit_overflow_test(tp, mapping, len))
+                               would_hit_hwbug = 1;
+
                        if (tp->tg3_flags2 & TG3_FLG2_HW_TSO)
                                tg3_set_txd(tp, entry, mapping, len,
                                            base_flags, (i == last)|(mss << 1));
@@ -3763,7 +3780,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
                /* If the workaround fails due to memory/mapping
                 * failure, silently drop this packet.
                 */
-               if (tigon3_4gb_hwbug_workaround(tp, skb, last_plus_one,
+               if (tigon3_dma_hwbug_workaround(tp, skb, last_plus_one,
                                                &start, base_flags, mss))
                        goto out_unlock;
 
@@ -10608,8 +10625,9 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
        unsigned long tg3reg_base, tg3reg_len;
        struct net_device *dev;
        struct tg3 *tp;
-       int i, err, pci_using_dac, pm_cap;
+       int i, err, pm_cap;
        char str[40];
+       u64 dma_mask, persist_dma_mask;
 
        if (tg3_version_printed++ == 0)
                printk(KERN_INFO "%s", version);
@@ -10646,26 +10664,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
                goto err_out_free_res;
        }
 
-       /* Configure DMA attributes. */
-       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
-       if (!err) {
-               pci_using_dac = 1;
-               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
-               if (err < 0) {
-                       printk(KERN_ERR PFX "Unable to obtain 64 bit DMA "
-                              "for consistent allocations\n");
-                       goto err_out_free_res;
-               }
-       } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
-               if (err) {
-                       printk(KERN_ERR PFX "No usable DMA configuration, "
-                              "aborting.\n");
-                       goto err_out_free_res;
-               }
-               pci_using_dac = 0;
-       }
-
        tg3reg_base = pci_resource_start(pdev, 0);
        tg3reg_len = pci_resource_len(pdev, 0);
 
@@ -10679,8 +10677,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
        SET_MODULE_OWNER(dev);
        SET_NETDEV_DEV(dev, &pdev->dev);
 
-       if (pci_using_dac)
-               dev->features |= NETIF_F_HIGHDMA;
        dev->features |= NETIF_F_LLTX;
 #if TG3_VLAN_TAG_USED
        dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
@@ -10765,6 +10761,44 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
                goto err_out_iounmap;
        }
 
+       /* 5714, 5715 and 5780 cannot support DMA addresses > 40-bit.
+        * On 64-bit systems with IOMMU, use 40-bit dma_mask.
+        * On 64-bit systems without IOMMU, use 64-bit dma_mask and
+        * do DMA address check in tg3_start_xmit().
+        */
+       if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) {
+               persist_dma_mask = dma_mask = DMA_40BIT_MASK;
+#ifdef CONFIG_HIGHMEM
+               dma_mask = DMA_64BIT_MASK;
+#endif
+       } else if (tp->tg3_flags2 & TG3_FLG2_IS_5788)
+               persist_dma_mask = dma_mask = DMA_32BIT_MASK;
+       else
+               persist_dma_mask = dma_mask = DMA_64BIT_MASK;
+
+       /* Configure DMA attributes. */
+       if (dma_mask > DMA_32BIT_MASK) {
+               err = pci_set_dma_mask(pdev, dma_mask);
+               if (!err) {
+                       dev->features |= NETIF_F_HIGHDMA;
+                       err = pci_set_consistent_dma_mask(pdev,
+                                                         persist_dma_mask);
+                       if (err < 0) {
+                               printk(KERN_ERR PFX "Unable to obtain 64 bit "
+                                      "DMA for consistent allocations\n");
+                               goto err_out_iounmap;
+                       }
+               }
+       }
+       if (err || dma_mask == DMA_32BIT_MASK) {
+               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               if (err) {
+                       printk(KERN_ERR PFX "No usable DMA configuration, "
+                              "aborting.\n");
+                       goto err_out_iounmap;
+               }
+       }
+
        tg3_init_bufmgr_config(tp);
 
 #if TG3_TSO_SUPPORT != 0
@@ -10833,9 +10867,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
        } else
                tp->tg3_flags &= ~TG3_FLAG_RX_CHECKSUMS;
 
-       if (tp->tg3_flags2 & TG3_FLG2_IS_5788)
-               dev->features &= ~NETIF_F_HIGHDMA;
-
        /* flow control autonegotiation is default behavior */
        tp->tg3_flags |= TG3_FLAG_PAUSE_AUTONEG;
 
index 8cf9905d484be5fc120b2e05a65103f0acad95c9..f4183d660258108728a626b73c22798ba4699570 100644 (file)
@@ -1115,6 +1115,9 @@ chsc_enable_facility(int operation_code)
                goto out;
        }
        switch (sda_area->response.code) {
+       case 0x0001: /* everything ok */
+               ret = 0;
+               break;
        case 0x0003: /* invalid request block */
        case 0x0007:
                ret = -EINVAL;
@@ -1123,6 +1126,8 @@ chsc_enable_facility(int operation_code)
        case 0x0101: /* facility not provided */
                ret = -EOPNOTSUPP;
                break;
+       default: /* something went wrong */
+               ret = -EIO;
        }
  out:
        free_page((unsigned long)sda_area);
index 5d02ff4db6cc1e050d94ee83fa24899d9dc9050a..b65462f764849bce89b7c7213a4881a1e4abb40c 100644 (file)
@@ -192,7 +192,7 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
        SDev = cd->device;
 
        if (!sense) {
-               sense = kmalloc(sizeof(*sense), GFP_KERNEL);
+               sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);
                if (!sense) {
                        err = -ENOMEM;
                        goto out;
index 4dd6865d32b0b919418bfc14722d9f7297973a4c..b5c96e74a903c2eb466c56259b7444606780a068 100644 (file)
@@ -242,8 +242,10 @@ static void serial_close(struct tty_struct *tty, struct file * filp)
 
        down(&port->sem);
 
-       if (port->open_count == 0)
-               goto out;
+       if (port->open_count == 0) {
+               up(&port->sem);
+               return;
+       }
 
        --port->open_count;
        if (port->open_count == 0) {
@@ -260,10 +262,8 @@ static void serial_close(struct tty_struct *tty, struct file * filp)
                module_put(port->serial->type->driver.owner);
        }
 
-       kref_put(&port->serial->kref, destroy_serial);
-
-out:
        up(&port->sem);
+       kref_put(&port->serial->kref, destroy_serial);
 }
 
 static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count)
index 3c03aadaff0c479d28ae954469829b47039f0b9a..7b25463d3c14bb8b5b791d945be221c99391ca2f 100644 (file)
@@ -52,7 +52,7 @@ extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *,
                        int * /* type of buf returned */ , const int long_op);
 extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid);
 extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length);
-extern int is_valid_oplock_break(struct smb_hdr *smb);
+extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *);
 extern int is_size_safe_to_change(struct cifsInodeInfo *);
 extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *);
 extern unsigned int smbCalcSize(struct smb_hdr *ptr);
index ef5ae6f93c75daa4129128095a0cd0c490d949da..2a0c1f4ca0ae9ba19badbeaa7290592c20c69bb0 100644 (file)
@@ -630,7 +630,7 @@ multi_t2_fnd:
                                        smallbuf = NULL;
                        }
                        wake_up_process(task_to_wake);
-               } else if ((is_valid_oplock_break(smb_buffer) == FALSE)
+               } else if ((is_valid_oplock_break(smb_buffer, server) == FALSE)
                    && (isMultiRsp == FALSE)) {                          
                        cERROR(1, ("No task to wake, unknown frame rcvd!"));
                        cifs_dump_mem("Received Data is: ",(char *)smb_buffer,
index 812c6bb0fe38adff74cc25c8dc7848cbae3315bd..432ba15e2c2dc2b07b31ca26ffeca869f6a3b5c8 100644 (file)
@@ -475,7 +475,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
        return 0;
 }
 int
-is_valid_oplock_break(struct smb_hdr *buf)
+is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
 {    
        struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf;
        struct list_head *tmp;
@@ -535,7 +535,7 @@ is_valid_oplock_break(struct smb_hdr *buf)
        read_lock(&GlobalSMBSeslock);
        list_for_each(tmp, &GlobalTreeConnectionList) {
                tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-               if (tcon->tid == buf->Tid) {
+               if ((tcon->tid == buf->Tid) && (srv == tcon->ses->server)) {
                        cifs_stats_inc(&tcon->num_oplock_brks);
                        list_for_each(tmp1,&tcon->openFileList){
                                netfile = list_entry(tmp1,struct cifsFileInfo,
index 7fe85415ae7c2d7aa7788bb91f5ccb4d412b0612..8ad52f5bf25551c66ac654ab4f58ffa45fb2860c 100644 (file)
@@ -36,7 +36,7 @@ static DECLARE_MUTEX(read_mutex);
 
 /* These two macros may change in future, to provide better st_ino
    semantics. */
-#define CRAMINO(x)     ((x)->offset?(x)->offset<<2:1)
+#define CRAMINO(x)     (((x)->offset && (x)->size)?(x)->offset<<2:1)
 #define OFFSET(x)      ((x)->i_ino)
 
 
@@ -66,8 +66,36 @@ static int cramfs_iget5_test(struct inode *inode, void *opaque)
 
 static int cramfs_iget5_set(struct inode *inode, void *opaque)
 {
+       static struct timespec zerotime;
        struct cramfs_inode *cramfs_inode = opaque;
+       inode->i_mode = cramfs_inode->mode;
+       inode->i_uid = cramfs_inode->uid;
+       inode->i_size = cramfs_inode->size;
+       inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1;
+       inode->i_blksize = PAGE_CACHE_SIZE;
+       inode->i_gid = cramfs_inode->gid;
+       /* Struct copy intentional */
+       inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime;
        inode->i_ino = CRAMINO(cramfs_inode);
+       /* inode->i_nlink is left 1 - arguably wrong for directories,
+          but it's the best we can do without reading the directory
+           contents.  1 yields the right result in GNU find, even
+          without -noleaf option. */
+       if (S_ISREG(inode->i_mode)) {
+               inode->i_fop = &generic_ro_fops;
+               inode->i_data.a_ops = &cramfs_aops;
+       } else if (S_ISDIR(inode->i_mode)) {
+               inode->i_op = &cramfs_dir_inode_operations;
+               inode->i_fop = &cramfs_directory_operations;
+       } else if (S_ISLNK(inode->i_mode)) {
+               inode->i_op = &page_symlink_inode_operations;
+               inode->i_data.a_ops = &cramfs_aops;
+       } else {
+               inode->i_size = 0;
+               inode->i_blocks = 0;
+               init_special_inode(inode, inode->i_mode,
+                       old_decode_dev(cramfs_inode->size));
+       }
        return 0;
 }
 
@@ -77,37 +105,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb,
        struct inode *inode = iget5_locked(sb, CRAMINO(cramfs_inode),
                                            cramfs_iget5_test, cramfs_iget5_set,
                                            cramfs_inode);
-       static struct timespec zerotime;
-
        if (inode && (inode->i_state & I_NEW)) {
-               inode->i_mode = cramfs_inode->mode;
-               inode->i_uid = cramfs_inode->uid;
-               inode->i_size = cramfs_inode->size;
-               inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1;
-               inode->i_blksize = PAGE_CACHE_SIZE;
-               inode->i_gid = cramfs_inode->gid;
-               /* Struct copy intentional */
-               inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime;
-               inode->i_ino = CRAMINO(cramfs_inode);
-               /* inode->i_nlink is left 1 - arguably wrong for directories,
-                  but it's the best we can do without reading the directory
-                  contents.  1 yields the right result in GNU find, even
-                  without -noleaf option. */
-               if (S_ISREG(inode->i_mode)) {
-                       inode->i_fop = &generic_ro_fops;
-                       inode->i_data.a_ops = &cramfs_aops;
-               } else if (S_ISDIR(inode->i_mode)) {
-                       inode->i_op = &cramfs_dir_inode_operations;
-                       inode->i_fop = &cramfs_directory_operations;
-               } else if (S_ISLNK(inode->i_mode)) {
-                       inode->i_op = &page_symlink_inode_operations;
-                       inode->i_data.a_ops = &cramfs_aops;
-               } else {
-                       inode->i_size = 0;
-                       inode->i_blocks = 0;
-                       init_special_inode(inode, inode->i_mode,
-                               old_decode_dev(cramfs_inode->size));
-               }
                unlock_new_inode(inode);
        }
        return inode;
index 923371b753ab0c04d1d8c57c56072bf40042fa30..d13fcd3ec803bd52e335ef340d09c817421b05fb 100644 (file)
--- a/fs/fifo.c
+++ b/fs/fifo.c
@@ -34,10 +34,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
 {
        int ret;
 
-       ret = -ERESTARTSYS;
-       if (mutex_lock_interruptible(PIPE_MUTEX(*inode)))
-               goto err_nolock_nocleanup;
-
+       mutex_lock(PIPE_MUTEX(*inode));
        if (!inode->i_pipe) {
                ret = -ENOMEM;
                if(!pipe_new(inode))
@@ -140,8 +137,6 @@ err:
 
 err_nocleanup:
        mutex_unlock(PIPE_MUTEX(*inode));
-
-err_nolock_nocleanup:
        return ret;
 }
 
index 0eaad41f4658f3f4eaaf526078dafa24e1ec0094..91b7c15ab3730c4f17ffc4a2f4bdb5e22da54edf 100644 (file)
@@ -204,7 +204,6 @@ static void smaps_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
 {
        pte_t *pte, ptent;
        spinlock_t *ptl;
-       unsigned long pfn;
        struct page *page;
 
        pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
@@ -214,12 +213,12 @@ static void smaps_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
                        continue;
 
                mss->resident += PAGE_SIZE;
-               pfn = pte_pfn(ptent);
-               if (!pfn_valid(pfn))
+
+               page = vm_normal_page(vma, addr, ptent);
+               if (!page)
                        continue;
 
-               page = pfn_to_page(pfn);
-               if (page_count(page) >= 2) {
+               if (page_mapcount(page) >= 2) {
                        if (pte_dirty(ptent))
                                mss->shared_dirty += PAGE_SIZE;
                        else
@@ -289,7 +288,7 @@ static int show_smap(struct seq_file *m, void *v)
        struct mem_size_stats mss;
 
        memset(&mss, 0, sizeof mss);
-       if (vma->vm_mm)
+       if (vma->vm_mm && !is_vm_hugetlb_page(vma))
                smaps_pgd_range(vma, vma->vm_start, vma->vm_end, &mss);
        return show_map_internal(m, v, &mss);
 }
index cde5d48994ae676806034f232775ef662c0cbd15..14bd2246fb6d3403ad2dbe97c36a3988145a0026 100644 (file)
@@ -137,6 +137,7 @@ static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char *
                                inode->i_gid = dir->i_gid;
                        d_instantiate(dentry, inode);
                        dget(dentry);
+                       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
                } else
                        iput(inode);
        }
index 9387a5e1ffe007ef5ed62c4ad79308f651749118..0c2acc944a0a7bca9cb90ca6b7b5b15d4bb9025f 100644 (file)
@@ -340,6 +340,12 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
                asm("mcr%? p15, 0, %0, c8, c6, 1" : : "r" (kaddr));
        if (tlb_flag(TLB_V6_I_PAGE))
                asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (kaddr));
+
+       /* The ARM ARM states that the completion of a TLB maintenance
+        * operation is only guaranteed by a DSB instruction
+        */
+       if (tlb_flag(TLB_V6_U_PAGE | TLB_V6_D_PAGE | TLB_V6_I_PAGE))
+               asm("mcr%? p15, 0, %0, c7, c10, 4" : : "r" (zero));
 }
 
 /*
index b2e65e8bf812b9aa14cc92aec006caebb42340d8..6a89dbb03c1e363e86870718e2633fdbc112a6d3 100644 (file)
@@ -118,6 +118,8 @@ static inline void sched_cacheflush(void)
 extern void account_vtime(struct task_struct *);
 extern void account_tick_vtime(struct task_struct *);
 extern void account_system_vtime(struct task_struct *);
+#else
+#define account_vtime(x) do { /* empty */ } while (0)
 #endif
 
 #define finish_arch_switch(prev) do {                                       \
index 0caf60147e9746ed58627625066bff7cc3297aa9..34c4b43d3f9829a80cc4c4386c9097e5167bfd70 100644 (file)
@@ -20,7 +20,7 @@
        "4:     ba      3b\n"                           \
        "        mov    %5, %0\n"                       \
        "       .previous\n"                            \
-       "       .section __ex_table,#alloc\n"           \
+       "       .section __ex_table,\"a\"\n"            \
        "       .align  4\n"                            \
        "       .word   1b, 4b\n"                       \
        "       .word   2b, 4b\n"                       \
index 203e8eee63515db1fa9a7dd5ed998aacfe99b460..c91d1e38eac6490c4d63453ca98a69c5b7c7fd26 100644 (file)
@@ -136,7 +136,7 @@ __asm__ __volatile__(                                                       \
        "b      2b\n\t"                                                 \
        " mov   %3, %0\n\n\t"                                           \
        ".previous\n\t"                                                 \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, 3b\n\t"                                             \
        ".previous\n\n\t"                                               \
@@ -148,7 +148,7 @@ if (__builtin_constant_p(ret) && ret == -EFAULT)                    \
 __asm__ __volatile__(                                                  \
        "/* Put user asm ret, inline. */\n"                             \
 "1:\t" "st"#size "a %1, [%2] %%asi\n\n\t"                              \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, __ret_efault\n\n\t"                                 \
        ".previous\n\n\t"                                               \
@@ -163,7 +163,7 @@ __asm__ __volatile__(                                                       \
        "ret\n\t"                                                       \
        " restore %%g0, %3, %%o0\n\n\t"                                 \
        ".previous\n\t"                                                 \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, 3b\n\n\t"                                           \
        ".previous\n\n\t"                                               \
@@ -206,7 +206,7 @@ __asm__ __volatile__(                                                       \
        "b      2b\n\t"                                                 \
        " mov   %3, %0\n\n\t"                                           \
        ".previous\n\t"                                                 \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, 3b\n\n\t"                                           \
        ".previous\n\t"                                                 \
@@ -218,7 +218,7 @@ if (__builtin_constant_p(retval) && retval == -EFAULT)                      \
 __asm__ __volatile__(                                                  \
        "/* Get user asm ret, inline. */\n"                             \
 "1:\t" "ld"#size "a [%1] %%asi, %0\n\n\t"                              \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b,__ret_efault\n\n\t"                                  \
        ".previous\n\t"                                                 \
@@ -233,7 +233,7 @@ __asm__ __volatile__(                                                       \
        "ret\n\t"                                                       \
        " restore %%g0, %2, %%o0\n\n\t"                                 \
        ".previous\n\t"                                                 \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, 3b\n\n\t"                                           \
        ".previous\n\t"                                                 \
index 6361544bb6ae5fef3ee1dcd84dc8788262bd7917..6401c31d6add4e2025a4ca7bf72d7290ed4b34c1 100644 (file)
@@ -116,6 +116,10 @@ extern int hrtimer_try_to_cancel(struct hrtimer *timer);
 extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer);
 extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp);
 
+#ifdef CONFIG_NO_IDLE_HZ
+extern ktime_t hrtimer_get_next_event(void);
+#endif
+
 static inline int hrtimer_active(const struct hrtimer *timer)
 {
        return timer->state == HRTIMER_PENDING;
index d82d4c05c12d7043a3021706c3d2c384b187147d..bda23e00ed710e634152be31f4c1db207cca0721 100644 (file)
        CACHE(32768)
        CACHE(65536)
        CACHE(131072)
-#ifndef CONFIG_MMU
+#if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || !defined(CONFIG_MMU)
        CACHE(262144)
+#endif
+#ifndef CONFIG_MMU
        CACHE(524288)
        CACHE(1048576)
 #ifdef CONFIG_LARGE_ALLOCS
index 01f03bc06effcefafe9f2a2ea36834f3c345d256..968b1aa3732cb1fe13f7f3ea81df13722375000d 100644 (file)
@@ -6,6 +6,10 @@
 #include <linux/mmzone.h>
 #include <linux/notifier.h>
 
+struct page;
+struct zone;
+struct pglist_data;
+
 #ifdef CONFIG_MEMORY_HOTPLUG
 /*
  * pgdat resizing functions
index 82b83da25d77c9535d849e454ae2d372baeafc6e..1709b5009d2e2c1ae2425faf74c3224f7fd0889f 100644 (file)
 #define PCI_DEVICE_ID_CCD_B00B         0xb00b
 #define PCI_DEVICE_ID_CCD_B00C         0xb00c
 #define PCI_DEVICE_ID_CCD_B100         0xb100
+#define PCI_DEVICE_ID_CCD_B700         0xb700
+#define PCI_DEVICE_ID_CCD_B701         0xb701
 
 #define PCI_VENDOR_ID_EXAR             0x13a8
 #define PCI_DEVICE_ID_EXAR_XR17C152    0x0152
index 5ae51f1bc7c80347d091bd4da0df2e8840c0bae4..14bc9cfa63999eee7fa1b25e4129ee67463e53bc 100644 (file)
@@ -505,6 +505,41 @@ ktime_t hrtimer_get_remaining(const struct hrtimer *timer)
        return rem;
 }
 
+#ifdef CONFIG_NO_IDLE_HZ
+/**
+ * hrtimer_get_next_event - get the time until next expiry event
+ *
+ * Returns the delta to the next expiry event or KTIME_MAX if no timer
+ * is pending.
+ */
+ktime_t hrtimer_get_next_event(void)
+{
+       struct hrtimer_base *base = __get_cpu_var(hrtimer_bases);
+       ktime_t delta, mindelta = { .tv64 = KTIME_MAX };
+       unsigned long flags;
+       int i;
+
+       for (i = 0; i < MAX_HRTIMER_BASES; i++, base++) {
+               struct hrtimer *timer;
+
+               spin_lock_irqsave(&base->lock, flags);
+               if (!base->first) {
+                       spin_unlock_irqrestore(&base->lock, flags);
+                       continue;
+               }
+               timer = rb_entry(base->first, struct hrtimer, node);
+               delta.tv64 = timer->expires.tv64;
+               spin_unlock_irqrestore(&base->lock, flags);
+               delta = ktime_sub(delta, base->get_time());
+               if (delta.tv64 < mindelta.tv64)
+                       mindelta.tv64 = delta.tv64;
+       }
+       if (mindelta.tv64 < 0)
+               mindelta.tv64 = 0;
+       return mindelta;
+}
+#endif
+
 /**
  * hrtimer_init - initialize a timer to the given clock
  *
index 12d291bf3379a38c94d11e600bdb1455781f3d01..3454bb869fd068c070e8fbf219e981018305df99 100644 (file)
@@ -4028,6 +4028,8 @@ static inline void __cond_resched(void)
         */
        if (unlikely(preempt_count()))
                return;
+       if (unlikely(system_state != SYSTEM_RUNNING))
+               return;
        do {
                add_preempt_count(PREEMPT_ACTIVE);
                schedule();
index fc6646fd5aabe74e4210f2f4d96e849d8800cc88..bf7c4193b936ee1723281db43f46daba7de1165b 100644 (file)
@@ -489,9 +489,21 @@ unsigned long next_timer_interrupt(void)
        struct list_head *list;
        struct timer_list *nte;
        unsigned long expires;
+       unsigned long hr_expires = MAX_JIFFY_OFFSET;
+       ktime_t hr_delta;
        tvec_t *varray[4];
        int i, j;
 
+       hr_delta = hrtimer_get_next_event();
+       if (hr_delta.tv64 != KTIME_MAX) {
+               struct timespec tsdelta;
+               tsdelta = ktime_to_timespec(hr_delta);
+               hr_expires = timespec_to_jiffies(&tsdelta);
+               if (hr_expires < 3)
+                       return hr_expires + jiffies;
+       }
+       hr_expires += jiffies;
+
        base = &__get_cpu_var(tvec_bases);
        spin_lock(&base->t_base.lock);
        expires = base->timer_jiffies + (LONG_MAX >> 1);
@@ -542,6 +554,10 @@ found:
                }
        }
        spin_unlock(&base->t_base.lock);
+
+       if (time_before(hr_expires, expires))
+               return hr_expires;
+
        return expires;
 }
 #endif
@@ -925,6 +941,8 @@ static inline void update_times(void)
 void do_timer(struct pt_regs *regs)
 {
        jiffies_64++;
+       /* prevent loading jiffies before storing new jiffies_64 value. */
+       barrier();
        update_times();
        softlockup_tick(regs);
 }
index 1a210088ad8011ae12f9d89d0f452ba1b265c052..d80fa7d8f720e2b985fbbcfbd45282ee9e629e09 100644 (file)
@@ -197,7 +197,7 @@ static struct mempolicy *mpol_new(int mode, nodemask_t *nodes)
        return policy;
 }
 
-static void gather_stats(struct page *, void *);
+static void gather_stats(struct page *, void *, int pte_dirty);
 static void migrate_page_add(struct page *page, struct list_head *pagelist,
                                unsigned long flags);
 
@@ -239,7 +239,7 @@ static int check_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
                        continue;
 
                if (flags & MPOL_MF_STATS)
-                       gather_stats(page, private);
+                       gather_stats(page, private, pte_dirty(*pte));
                else if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))
                        migrate_page_add(page, private, flags);
                else
@@ -1753,67 +1753,137 @@ static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
 struct numa_maps {
        unsigned long pages;
        unsigned long anon;
-       unsigned long mapped;
+       unsigned long active;
+       unsigned long writeback;
        unsigned long mapcount_max;
+       unsigned long dirty;
+       unsigned long swapcache;
        unsigned long node[MAX_NUMNODES];
 };
 
-static void gather_stats(struct page *page, void *private)
+static void gather_stats(struct page *page, void *private, int pte_dirty)
 {
        struct numa_maps *md = private;
        int count = page_mapcount(page);
 
-       if (count)
-               md->mapped++;
+       md->pages++;
+       if (pte_dirty || PageDirty(page))
+               md->dirty++;
 
-       if (count > md->mapcount_max)
-               md->mapcount_max = count;
+       if (PageSwapCache(page))
+               md->swapcache++;
 
-       md->pages++;
+       if (PageActive(page))
+               md->active++;
+
+       if (PageWriteback(page))
+               md->writeback++;
 
        if (PageAnon(page))
                md->anon++;
 
+       if (count > md->mapcount_max)
+               md->mapcount_max = count;
+
        md->node[page_to_nid(page)]++;
        cond_resched();
 }
 
+static void check_huge_range(struct vm_area_struct *vma,
+               unsigned long start, unsigned long end,
+               struct numa_maps *md)
+{
+       unsigned long addr;
+       struct page *page;
+
+       for (addr = start; addr < end; addr += HPAGE_SIZE) {
+               pte_t *ptep = huge_pte_offset(vma->vm_mm, addr & HPAGE_MASK);
+               pte_t pte;
+
+               if (!ptep)
+                       continue;
+
+               pte = *ptep;
+               if (pte_none(pte))
+                       continue;
+
+               page = pte_page(pte);
+               if (!page)
+                       continue;
+
+               gather_stats(page, md, pte_dirty(*ptep));
+       }
+}
+
 int show_numa_map(struct seq_file *m, void *v)
 {
        struct task_struct *task = m->private;
        struct vm_area_struct *vma = v;
        struct numa_maps *md;
+       struct file *file = vma->vm_file;
+       struct mm_struct *mm = vma->vm_mm;
        int n;
        char buffer[50];
 
-       if (!vma->vm_mm)
+       if (!mm)
                return 0;
 
        md = kzalloc(sizeof(struct numa_maps), GFP_KERNEL);
        if (!md)
                return 0;
 
-       if (!is_vm_hugetlb_page(vma))
+       mpol_to_str(buffer, sizeof(buffer),
+                       get_vma_policy(task, vma, vma->vm_start));
+
+       seq_printf(m, "%08lx %s", vma->vm_start, buffer);
+
+       if (file) {
+               seq_printf(m, " file=");
+               seq_path(m, file->f_vfsmnt, file->f_dentry, "\n\t= ");
+       } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
+               seq_printf(m, " heap");
+       } else if (vma->vm_start <= mm->start_stack &&
+                       vma->vm_end >= mm->start_stack) {
+               seq_printf(m, " stack");
+       }
+
+       if (is_vm_hugetlb_page(vma)) {
+               check_huge_range(vma, vma->vm_start, vma->vm_end, md);
+               seq_printf(m, " huge");
+       } else {
                check_pgd_range(vma, vma->vm_start, vma->vm_end,
-                   &node_online_map, MPOL_MF_STATS, md);
+                               &node_online_map, MPOL_MF_STATS, md);
+       }
+
+       if (!md->pages)
+               goto out;
 
-       if (md->pages) {
-               mpol_to_str(buffer, sizeof(buffer),
-                           get_vma_policy(task, vma, vma->vm_start));
+       if (md->anon)
+               seq_printf(m," anon=%lu",md->anon);
 
-               seq_printf(m, "%08lx %s pages=%lu mapped=%lu maxref=%lu",
-                          vma->vm_start, buffer, md->pages,
-                          md->mapped, md->mapcount_max);
+       if (md->dirty)
+               seq_printf(m," dirty=%lu",md->dirty);
 
-               if (md->anon)
-                       seq_printf(m," anon=%lu",md->anon);
+       if (md->pages != md->anon && md->pages != md->dirty)
+               seq_printf(m, " mapped=%lu", md->pages);
 
-               for_each_online_node(n)
-                       if (md->node[n])
-                               seq_printf(m, " N%d=%lu", n, md->node[n]);
+       if (md->mapcount_max > 1)
+               seq_printf(m, " mapmax=%lu", md->mapcount_max);
 
-               seq_putc(m, '\n');
-       }
+       if (md->swapcache)
+               seq_printf(m," swapcache=%lu", md->swapcache);
+
+       if (md->active < md->pages && !is_vm_hugetlb_page(vma))
+               seq_printf(m," active=%lu", md->active);
+
+       if (md->writeback)
+               seq_printf(m," writeback=%lu", md->writeback);
+
+       for_each_online_node(n)
+               if (md->node[n])
+                       seq_printf(m, " N%d=%lu", n, md->node[n]);
+out:
+       seq_putc(m, '\n');
        kfree(md);
 
        if (m->count < m->size)
index add05d808a4a6fe96823cf3a5899d1c9a5a3f95b..f2e92dc1c9ce3d1fe1ca8cdfe685684f5bc1005d 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1628,36 +1628,36 @@ static inline size_t calculate_slab_order(struct kmem_cache *cachep,
                        size_t size, size_t align, unsigned long flags)
 {
        size_t left_over = 0;
+       int gfporder;
 
-       for (;; cachep->gfporder++) {
+       for (gfporder = 0 ; gfporder <= MAX_GFP_ORDER; gfporder++) {
                unsigned int num;
                size_t remainder;
 
-               if (cachep->gfporder > MAX_GFP_ORDER) {
-                       cachep->num = 0;
-                       break;
-               }
-
-               cache_estimate(cachep->gfporder, size, align, flags,
-                              &remainder, &num);
+               cache_estimate(gfporder, size, align, flags, &remainder, &num);
                if (!num)
                        continue;
+
                /* More than offslab_limit objects will cause problems */
-               if (flags & CFLGS_OFF_SLAB && cachep->num > offslab_limit)
+               if ((flags & CFLGS_OFF_SLAB) && num > offslab_limit)
                        break;
 
+               /* Found something acceptable - save it away */
                cachep->num = num;
+               cachep->gfporder = gfporder;
                left_over = remainder;
 
                /*
                 * Large number of objects is good, but very large slabs are
                 * currently bad for the gfp()s.
                 */
-               if (cachep->gfporder >= slab_break_gfp_order)
+               if (gfporder >= slab_break_gfp_order)
                        break;
 
-               if ((left_over * 8) <= (PAGE_SIZE << cachep->gfporder))
-                       /* Acceptable internal fragmentation */
+               /*
+                * Acceptable internal fragmentation?
+                */
+               if ((left_over * 8) <= (PAGE_SIZE << gfporder))
                        break;
        }
        return left_over;
@@ -2554,7 +2554,7 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp)
                       "slab: Internal list corruption detected in cache '%s'(%d), slabp %p(%d). Hexdump:\n",
                       cachep->name, cachep->num, slabp, slabp->inuse);
                for (i = 0;
-                    i < sizeof(slabp) + cachep->num * sizeof(kmem_bufctl_t);
+                    i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t);
                     i++) {
                        if ((i % 16) == 0)
                                printk("\n%03x:", i);
index 93ad59a28ef56c50f1d3dd190fdde489ab60d117..31d98b57e1deafdea9f6b91054313f21e1408c6b 100644 (file)
@@ -39,25 +39,19 @@ static DECLARE_WAIT_QUEUE_HEAD(sigd_sleep);
 static void sigd_put_skb(struct sk_buff *skb)
 {
 #ifdef WAIT_FOR_DEMON
-       static unsigned long silence;
        DECLARE_WAITQUEUE(wait,current);
 
        add_wait_queue(&sigd_sleep,&wait);
        while (!sigd) {
                set_current_state(TASK_UNINTERRUPTIBLE);
-               if (time_after(jiffies, silence) || silence == 0) {
-                       printk(KERN_INFO "atmsvc: waiting for signaling demon "
-                           "...\n");
-                       silence = (jiffies+30*HZ)|1;
-               }
+               DPRINTK("atmsvc: waiting for signaling demon...\n");
                schedule();
        }
        current->state = TASK_RUNNING;
        remove_wait_queue(&sigd_sleep,&wait);
 #else
        if (!sigd) {
-               if (net_ratelimit())
-                       printk(KERN_WARNING "atmsvc: no signaling demon\n");
+               DPRINTK("atmsvc: no signaling demon\n");
                kfree_skb(skb);
                return;
        }
index 7fa3a5a9971f29ecf1ff422f1b29fddae87a4f97..f36b35edd60cefcbb27c7f3752a9ca3348242f94 100644 (file)
@@ -81,26 +81,27 @@ static void port_carrier_check(void *arg)
 {
        struct net_device *dev = arg;
        struct net_bridge_port *p;
+       struct net_bridge *br;
 
        rtnl_lock();
        p = dev->br_port;
        if (!p)
                goto done;
-
-       if (netif_carrier_ok(p->dev)) {
-               u32 cost = port_cost(p->dev);
-
-               spin_lock_bh(&p->br->lock);
-               if (p->state == BR_STATE_DISABLED) {
-                       p->path_cost = cost;
-                       br_stp_enable_port(p);
+       br = p->br;
+
+       if (netif_carrier_ok(dev))
+               p->path_cost = port_cost(dev);
+
+       if (br->dev->flags & IFF_UP) {
+               spin_lock_bh(&br->lock);
+               if (netif_carrier_ok(dev)) {
+                       if (p->state == BR_STATE_DISABLED)
+                               br_stp_enable_port(p);
+               } else {
+                       if (p->state != BR_STATE_DISABLED)
+                               br_stp_disable_port(p);
                }
-               spin_unlock_bh(&p->br->lock);
-       } else {
-               spin_lock_bh(&p->br->lock);
-               if (p->state != BR_STATE_DISABLED)
-                       br_stp_disable_port(p);
-               spin_unlock_bh(&p->br->lock);
+               spin_unlock_bh(&br->lock);
        }
 done:
        rtnl_unlock();
@@ -168,6 +169,7 @@ static void del_nbp(struct net_bridge_port *p)
 
        rcu_assign_pointer(dev->br_port, NULL);
 
+       kobject_uevent(&p->kobj, KOBJ_REMOVE);
        kobject_del(&p->kobj);
 
        call_rcu(&p->rcu, destroy_nbp_rcu);
@@ -276,8 +278,9 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br,
        br_init_port(p);
        p->state = BR_STATE_DISABLED;
        INIT_WORK(&p->carrier_check, port_carrier_check, dev);
-       kobject_init(&p->kobj);
+       br_stp_port_timer_init(p);
 
+       kobject_init(&p->kobj);
        kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR);
        p->kobj.ktype = &brport_ktype;
        p->kobj.parent = &(dev->class_dev.kobj);
index 35cf3a07408725608f368ccfe97e338b3ab9e678..23dea1422c9a90873c13145ae52f7287afcb9633 100644 (file)
@@ -39,8 +39,6 @@ void br_init_port(struct net_bridge_port *p)
        p->state = BR_STATE_BLOCKING;
        p->topology_change_ack = 0;
        p->config_pending = 0;
-
-       br_stp_port_timer_init(p);
 }
 
 /* called under bridge lock */
index aa68e0ab274d4b837a8147b6cb4d677d53740185..35d1d347541c025cbddd421cabcf6f4cefe36baa 100644 (file)
@@ -2,7 +2,7 @@
  *  net/dccp/ccids/ccid3.c
  *
  *  Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand.
- *  Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz>
+ *  Copyright (c) 2005-6 Ian McDonald <imcdnzl@gmail.com>
  *
  *  An implementation of the DCCP protocol
  *
@@ -1033,9 +1033,13 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
        p_prev = hcrx->ccid3hcrx_p;
        
        /* Calculate loss event rate */
-       if (!list_empty(&hcrx->ccid3hcrx_li_hist))
+       if (!list_empty(&hcrx->ccid3hcrx_li_hist)) {
+               u32 i_mean = dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist);
+
                /* Scaling up by 1000000 as fixed decimal */
-               hcrx->ccid3hcrx_p = 1000000 / dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist);
+               if (i_mean != 0)
+                       hcrx->ccid3hcrx_p = 1000000 / i_mean;
+       }
 
        if (hcrx->ccid3hcrx_p > p_prev) {
                ccid3_hc_rx_send_feedback(sk);
index 36339eb39e172b3c0fa7dab9f816ced70003d51b..08f80e2ea2aa0fe1a1bd214de7384726dee4f209 100644 (file)
@@ -524,7 +524,7 @@ ipq_rcv_skb(struct sk_buff *skb)
        write_unlock_bh(&queue_lock);
        
        status = ipq_receive_peer(NLMSG_DATA(nlh), type,
-                                 skblen - NLMSG_LENGTH(0));
+                                 nlmsglen - NLMSG_LENGTH(0));
        if (status < 0)
                RCV_SKB_FAIL(status);
                
index 5027bbe6415e7e89da9d27fcbc797c1f7432b2ee..af0635084df8217dcc226a82c1a4ea3183e4df58 100644 (file)
@@ -522,7 +522,7 @@ ipq_rcv_skb(struct sk_buff *skb)
        write_unlock_bh(&queue_lock);
        
        status = ipq_receive_peer(NLMSG_DATA(nlh), type,
-                                 skblen - NLMSG_LENGTH(0));
+                                 nlmsglen - NLMSG_LENGTH(0));
        if (status < 0)
                RCV_SKB_FAIL(status);
                
index be97caf664bbf47bc6e7ff5e98cf5f6b297f2e62..c164b230ad6fbe2518e873ee143ed9655df137f0 100644 (file)
@@ -246,7 +246,7 @@ static int do_ccw_entry(const char *filename,
            id->cu_model);
        ADD(alias, "dt", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE,
            id->dev_type);
-       ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE,
+       ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_MODEL,
            id->dev_model);
        return 1;
 }
index abd62f9437267bcb2addeb0a0d6f311264aa112b..0c29679a8576b0dee6d913c5282f72d02fbd1d78 100644 (file)
@@ -959,17 +959,15 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
        kctl.private_free = snd_ctl_elem_user_free;
        _kctl = snd_ctl_new(&kctl, access);
        if (_kctl == NULL) {
-               kfree(_kctl->private_data);
+               kfree(ue);
                return -ENOMEM;
        }
        _kctl->private_data = ue;
        for (idx = 0; idx < _kctl->count; idx++)
                _kctl->vd[idx].owner = file;
        err = snd_ctl_add(card, _kctl);
-       if (err < 0) {
-               snd_ctl_free_one(_kctl);
+       if (err < 0)
                return err;
-       }
 
        down_write(&card->controls_rwsem);
        card->user_ctl_count++;