Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 28 Mar 2007 21:01:21 +0000 (14:01 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 28 Mar 2007 21:01:21 +0000 (14:01 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [VIDEO]: Fix section mismatch in cg3.c
  [SPARC]: sparc64 gcc-4.2.0 20070317 -Werror failure
  [VIDEO] ffb: Fix two DAC handling bugs.
  [SPARC32]: Fix SMP build regression
  [DRM]: Delete sparc64 FFB driver code that never gets built.

89 files changed:
MAINTAINERS
arch/cris/arch-v32/drivers/pci/bios.c
arch/frv/mb93090-mb00/pci-vdk.c
arch/i386/kernel/hpet.c
arch/i386/pci/common.c
arch/ia64/pci/pci.c
arch/sh/kernel/sh_ksyms.c
arch/um/include/sysdep-x86_64/ptrace.h
arch/um/os-Linux/skas/mem.c
arch/um/os-Linux/skas/process.c
arch/um/os-Linux/sys-i386/registers.c
arch/um/os-Linux/sys-x86_64/registers.c
arch/x86_64/kernel/acpi/sleep.c
block/elevator.c
block/ll_rw_blk.c
drivers/ata/ahci.c
drivers/ata/libata-acpi.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata.h
drivers/ata/pata_pdc202xx_old.c
drivers/char/generic_serial.c
drivers/clocksource/acpi_pm.c
drivers/cpufreq/cpufreq.c
drivers/eisa/pci_eisa.c
drivers/infiniband/hw/cxgb3/cxio_hal.c
drivers/infiniband/hw/mthca/mthca_mr.c
drivers/infiniband/ulp/iser/iser_initiator.c
drivers/isdn/hisax/isar.c
drivers/kvm/vmx.c
drivers/md/md.c
drivers/md/raid5.c
drivers/media/common/ir-functions.c
drivers/media/dvb/dvb-core/dmxdev.c
drivers/media/dvb/dvb-core/dvb_demux.c
drivers/media/dvb/dvb-core/dvbdev.c
drivers/media/dvb/frontends/isl6421.c
drivers/media/radio/Kconfig
drivers/media/video/msp3400-driver.c
drivers/media/video/saa7115.c
drivers/media/video/tuner-core.c
drivers/message/fusion/mptsas.c
drivers/message/i2o/i2o_block.c
drivers/net/atl1/atl1_hw.c
drivers/net/forcedeth.c
drivers/net/mv643xx_eth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/qla3xxx.c
drivers/net/qla3xxx.h
drivers/net/sun3lance.c
drivers/net/wireless/bcm43xx/bcm43xx_phy.c
drivers/net/wireless/bcm43xx/bcm43xx_radio.c
drivers/oprofile/event_buffer.c
drivers/oprofile/oprofilefs.c
drivers/pcmcia/au1000_generic.c
drivers/scsi/gdth.c
drivers/scsi/lpfc/lpfc_init.c
drivers/spi/spi.c
fs/aio.c
fs/compat_ioctl.c
fs/nfsd/nfs3xdr.c
fs/nfsd/nfs4acl.c
fs/nfsd/nfs4state.c
fs/proc/Makefile
fs/splice.c
include/asm-i386/termbits.h
include/asm-sh/hp6xx.h
include/asm-sh/system.h
include/asm-um/common.lds.S
include/linux/eventpoll.h
include/linux/ipc.h
include/linux/pipe_fs_i.h
include/linux/utsname.h
include/linux/wireless.h
include/media/saa7146_vv.h
include/net/iw_handler.h
ipc/util.c
kernel/hrtimer.c
kernel/power/disk.c
kernel/power/user.c
kernel/time/ntp.c
mm/bounce.c
net/core/rtnetlink.c
net/core/wireless.c
net/dccp/proto.c
net/ipv6/addrconf.c
net/sched/Makefile
net/sched/sch_hfsc.c
net/sched/sch_htb.c

index 2524323671b0d563d0a57fd8f1b8dbf30901401e..8c8090e02d8e1abb43a7b88ce0616d995530e5f1 100644 (file)
@@ -1585,12 +1585,6 @@ L:       i2c@lm-sensors.org
 T:     quilt http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/
 S:     Maintained
 
-I2O
-P:     Markus Lidel
-M:     markus.lidel@shadowconnect.com
-W:     http://i2o.shadowconnect.com/
-S:     Maintained
-
 i386 BOOT CODE
 P:     Riley H. Williams
 M:     Riley@Williams.Name
index a2b9c60c2777e6cf39b94b0789fccf15307ced19..5b79a7a772d4cae43c230429820acfff4a5d15e8 100644 (file)
@@ -100,7 +100,9 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
        if ((err = pcibios_enable_resources(dev, mask)) < 0)
                return err;
 
-       return pcibios_enable_irq(dev);
+       if (!dev->msi_enabled)
+               pcibios_enable_irq(dev);
+       return 0;
 }
 
 int pcibios_assign_resources(void)
index f7279d78995a8580157f2a77f25a124009f50ce6..0b581e3cf7c75602cfc122d9f58098620dccecdc 100644 (file)
@@ -466,6 +466,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
 
        if ((err = pcibios_enable_resources(dev, mask)) < 0)
                return err;
-       pcibios_enable_irq(dev);
+       if (!dev->msi_enabled)
+               pcibios_enable_irq(dev);
        return 0;
 }
index f3ab61ee749826282b8d1ee905f631c7b1efb06c..76afea67f6919644d676f4f99e1dad57e4475a5f 100644 (file)
@@ -197,7 +197,7 @@ static int hpet_next_event(unsigned long delta,
        cnt += delta;
        hpet_writel(cnt, HPET_T0_CMP);
 
-       return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0);
+       return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0) ? -ETIME : 0;
 }
 
 /*
index 9484366653856afe6bf1ffacbe32072a08f14171..3f78d4d8ecf31a00798e00790e52a81404a4cee0 100644 (file)
@@ -434,11 +434,13 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
        if ((err = pcibios_enable_resources(dev, mask)) < 0)
                return err;
 
-       return pcibios_enable_irq(dev);
+       if (!dev->msi_enabled)
+               return pcibios_enable_irq(dev);
+       return 0;
 }
 
 void pcibios_disable_device (struct pci_dev *dev)
 {
-       if (pcibios_disable_irq)
+       if (!dev->msi_enabled && pcibios_disable_irq)
                pcibios_disable_irq(dev);
 }
index 474d179966dc02e221ee81d8083ae566e255e804..f8bcccd6d41774630e8a31ce84baf8eadab22b1d 100644 (file)
@@ -557,14 +557,18 @@ pcibios_enable_device (struct pci_dev *dev, int mask)
        if (ret < 0)
                return ret;
 
-       return acpi_pci_irq_enable(dev);
+       if (!dev->msi_enabled)
+               return acpi_pci_irq_enable(dev);
+       return 0;
 }
 
 void
 pcibios_disable_device (struct pci_dev *dev)
 {
        BUG_ON(atomic_read(&dev->enable_cnt));
-       acpi_pci_irq_disable(dev);
+       if (!dev->msi_enabled)
+               acpi_pci_irq_disable(dev);
+       return 0;
 }
 
 void
index fe1b276c97c6140a1a8f2ae911ff0697af3a2734..6e0d10fac4a8e5ef7fe3dd1095f05984e1450460 100644 (file)
@@ -82,9 +82,6 @@ DECLARE_EXPORT(__movstr);
 DECLARE_EXPORT(__movmem_i4_even);
 DECLARE_EXPORT(__movmem_i4_odd);
 DECLARE_EXPORT(__movmemSI12_i4);
-DECLARE_EXPORT(__sdivsi3_i4i);
-DECLARE_EXPORT(__udiv_qrnnd_16);
-DECLARE_EXPORT(__udivsi3_i4i);
 #else /* GCC 3.x */
 DECLARE_EXPORT(__movstr_i4_even);
 DECLARE_EXPORT(__movstr_i4_odd);
index 66cb400c2c92bb18e103036ff299e76b52512b96..62403bd9966194e1c7e32eb47cefb9fa931f9c47 100644 (file)
@@ -104,10 +104,6 @@ union uml_pt_regs {
 #endif
 #ifdef UML_CONFIG_MODE_SKAS
        struct skas_regs {
-               /* x86_64 ptrace uses sizeof(user_regs_struct) as its register
-                * file size, while i386 uses FRAME_SIZE.  Therefore, we need
-                * to use UM_FRAME_SIZE here instead of HOST_FRAME_SIZE.
-                */
                unsigned long regs[MAX_REG_NR];
                unsigned long fp[HOST_FP_SIZE];
                 struct faultinfo faultinfo;
index b3c11cfa995a7464a991978efdc3388bf9713389..9383e8751ae7721267c910690d0b231958ca2503 100644 (file)
@@ -48,7 +48,7 @@ int multi_op_count = 0;
 static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr)
 {
        unsigned long regs[MAX_REG_NR];
-       int n;
+       int n, i;
        long ret, offset;
        unsigned long * data;
        unsigned long * syscall;
@@ -66,9 +66,13 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr)
                 (unsigned long) &__syscall_stub_start);
 
        n = ptrace_setregs(pid, regs);
-       if(n < 0)
+       if(n < 0){
+               printk("Registers - \n");
+               for(i = 0; i < MAX_REG_NR; i++)
+                       printk("\t%d\t0x%lx\n", i, regs[i]);
                panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n",
-                     n);
+                     -n);
+       }
 
        wait_stub_done(pid, 0, "do_syscall_stub");
 
index dda06789bcb01f7d8edf4dec2a264723a4fb7f9f..0564422c155f2601d8329eabe3175bc1c4166e52 100644 (file)
@@ -67,7 +67,7 @@ void wait_stub_done(int pid, int sig, char * fname)
 
        if((n < 0) || !WIFSTOPPED(status) ||
           (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){
-               unsigned long regs[HOST_FRAME_SIZE];
+               unsigned long regs[MAX_REG_NR];
 
                if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0)
                        printk("Failed to get registers from stub, "
@@ -76,7 +76,7 @@ void wait_stub_done(int pid, int sig, char * fname)
                        int i;
 
                        printk("Stub registers -\n");
-                       for(i = 0; i < HOST_FRAME_SIZE; i++)
+                       for(i = 0; i < ARRAY_SIZE(regs); i++)
                                printk("\t%d - %lx\n", i, regs[i]);
                }
                panic("%s : failed to wait for SIGUSR1/SIGTRAP, "
@@ -328,7 +328,7 @@ void userspace(union uml_pt_regs *regs)
 int copy_context_skas0(unsigned long new_stack, int pid)
 {
        int err;
-       unsigned long regs[HOST_FRAME_SIZE];
+       unsigned long regs[MAX_REG_NR];
        unsigned long fp_regs[HOST_FP_SIZE];
        unsigned long current_stack = current_stub_stack();
        struct stub_data *data = (struct stub_data *) current_stack;
index 79cd93c8c5ed62d08ebe0d1d99461e4f98105f1c..84b44f9cd42a48e0299d0e3e5caeb940a5544a94 100644 (file)
@@ -15,7 +15,7 @@
 
 /* These are set once at boot time and not changed thereafter */
 
-static unsigned long exec_regs[HOST_FRAME_SIZE];
+static unsigned long exec_regs[MAX_REG_NR];
 static unsigned long exec_fp_regs[HOST_FP_SIZE];
 static unsigned long exec_fpx_regs[HOST_XFP_SIZE];
 static int have_fpx_regs = 1;
@@ -101,6 +101,7 @@ void init_registers(int pid)
 {
        int err;
 
+       memset(exec_regs, 0, sizeof(exec_regs));
        err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs);
        if(err)
                panic("check_ptrace : PTRACE_GETREGS failed, errno = %d",
@@ -124,7 +125,7 @@ void init_registers(int pid)
 
 void get_safe_registers(unsigned long *regs, unsigned long *fp_regs)
 {
-       memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long));
+       memcpy(regs, exec_regs, sizeof(exec_regs));
        if(fp_regs != NULL)
                memcpy(fp_regs, exec_fp_regs,
                       HOST_FP_SIZE * sizeof(unsigned long));
index a2d7e0c603f798efe99beb39da79b35f3ca9199e..e6fc2179d1bc4ebb9944f934604b29ac6836b33f 100644 (file)
@@ -14,7 +14,7 @@
 
 /* These are set once at boot time and not changed thereafter */
 
-static unsigned long exec_regs[HOST_FRAME_SIZE];
+static unsigned long exec_regs[MAX_REG_NR];
 static unsigned long exec_fp_regs[HOST_FP_SIZE];
 
 void init_thread_registers(union uml_pt_regs *to)
@@ -72,7 +72,7 @@ void init_registers(int pid)
 
 void get_safe_registers(unsigned long *regs, unsigned long *fp_regs)
 {
-       memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long));
+       memcpy(regs, exec_regs, sizeof(exec_regs));
        if(fp_regs != NULL)
                memcpy(fp_regs, exec_fp_regs,
                       HOST_FP_SIZE * sizeof(unsigned long));
index 23178ce6c78380bc29f85e146e375676cd4e5242..e1548fbe95aec688540f2a6ce5443655bdde6e35 100644 (file)
@@ -66,8 +66,10 @@ static void init_low_mapping(void)
 {
        pgd_t *slot0 = pgd_offset(current->mm, 0UL);
        low_ptr = *slot0;
+       /* FIXME: We're playing with the current task's page tables here, which
+        * is potentially dangerous on SMP systems.
+        */
        set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET));
-       WARN_ON(num_online_cpus() != 1);
        local_flush_tlb();
 }
 
index 25f6ef28e3bb34567db40fb0d8472f39038d0ae5..96a00c822748cf8a673071a32806358963f5cdad 100644 (file)
@@ -964,17 +964,18 @@ void elv_unregister_queue(struct request_queue *q)
 
 int elv_register(struct elevator_type *e)
 {
+       char *def = "";
        spin_lock_irq(&elv_list_lock);
        BUG_ON(elevator_find(e->elevator_name));
        list_add_tail(&e->list, &elv_list);
        spin_unlock_irq(&elv_list_lock);
 
-       printk(KERN_INFO "io scheduler %s registered", e->elevator_name);
        if (!strcmp(e->elevator_name, chosen_elevator) ||
                        (!*chosen_elevator &&
                         !strcmp(e->elevator_name, CONFIG_DEFAULT_IOSCHED)))
-                               printk(" (default)");
-       printk("\n");
+                               def = " (default)";
+
+       printk(KERN_INFO "io scheduler %s registered%s\n", e->elevator_name, def);
        return 0;
 }
 EXPORT_SYMBOL_GPL(elv_register);
index 38c293b987b77212bec48450dd1529d71a3f582f..3de06953ac33d24ce669c35f0e8ffdbb4bcb9661 100644 (file)
@@ -1221,7 +1221,7 @@ void blk_recount_segments(request_queue_t *q, struct bio *bio)
                 * considered part of another segment, since that might
                 * change with the bounce page.
                 */
-               high = page_to_pfn(bv->bv_page) >= q->bounce_pfn;
+               high = page_to_pfn(bv->bv_page) > q->bounce_pfn;
                if (high || highprv)
                        goto new_hw_segment;
                if (cluster) {
@@ -3658,8 +3658,8 @@ int __init blk_dev_init(void)
        open_softirq(BLOCK_SOFTIRQ, blk_done_softirq, NULL);
        register_hotcpu_notifier(&blk_cpu_notifier);
 
-       blk_max_low_pfn = max_low_pfn;
-       blk_max_pfn = max_pfn;
+       blk_max_low_pfn = max_low_pfn - 1;
+       blk_max_pfn = max_pfn - 1;
 
        return 0;
 }
index dc7b562259232990cee4edd7b819fe88b3642658..fd27227771b48a8038ec867c62f9804fc34aa9af 100644 (file)
@@ -80,6 +80,7 @@ enum {
        board_ahci_pi           = 1,
        board_ahci_vt8251       = 2,
        board_ahci_ign_iferr    = 3,
+       board_ahci_sb600        = 4,
 
        /* global controller registers */
        HOST_CAP                = 0x00, /* host capabilities */
@@ -168,6 +169,7 @@ enum {
        AHCI_FLAG_NO_NCQ                = (1 << 24),
        AHCI_FLAG_IGN_IRQ_IF_ERR        = (1 << 25), /* ignore IRQ_IF_ERR */
        AHCI_FLAG_HONOR_PI              = (1 << 26), /* honor PORTS_IMPL */
+       AHCI_FLAG_IGN_SERR_INTERNAL     = (1 << 27), /* ignore SERR_INTERNAL */
 };
 
 struct ahci_cmd_hdr {
@@ -362,6 +364,18 @@ static const struct ata_port_info ahci_port_info[] = {
                .udma_mask      = 0x7f, /* udma0-6 ; FIXME */
                .port_ops       = &ahci_ops,
        },
+       /* board_ahci_sb600 */
+       {
+               .sht            = &ahci_sht,
+               .flags          = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
+                                 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
+                                 ATA_FLAG_SKIP_D2H_BSY |
+                                 AHCI_FLAG_IGN_SERR_INTERNAL,
+               .pio_mask       = 0x1f, /* pio0-4 */
+               .udma_mask      = 0x7f, /* udma0-6 ; FIXME */
+               .port_ops       = &ahci_ops,
+       },
+
 };
 
 static const struct pci_device_id ahci_pci_tbl[] = {
@@ -399,7 +413,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
          PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci_ign_iferr },
 
        /* ATI */
-       { PCI_VDEVICE(ATI, 0x4380), board_ahci }, /* ATI SB600 non-raid */
+       { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 non-raid */
        { PCI_VDEVICE(ATI, 0x4381), board_ahci }, /* ATI SB600 raid */
 
        /* VIA */
@@ -1067,8 +1081,11 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)
        if (ap->flags & AHCI_FLAG_IGN_IRQ_IF_ERR)
                irq_stat &= ~PORT_IRQ_IF_ERR;
 
-       if (irq_stat & PORT_IRQ_TF_ERR)
+       if (irq_stat & PORT_IRQ_TF_ERR) {
                err_mask |= AC_ERR_DEV;
+               if (ap->flags & AHCI_FLAG_IGN_SERR_INTERNAL)
+                       serror &= ~SERR_INTERNAL;
+       }
 
        if (irq_stat & (PORT_IRQ_HBUS_ERR | PORT_IRQ_HBUS_DATA_ERR)) {
                err_mask |= AC_ERR_HOST_BUS;
index c428a56e6f315e3e7e221f82c25206129af9acab..03a0acff6cfa495b916e56de667542116700a39b 100644 (file)
@@ -305,7 +305,7 @@ static int do_drive_get_GTF(struct ata_port *ap, int ix,
        *gtf_address = 0UL;
        *obj_loc = 0UL;
 
-       if (noacpi)
+       if (libata_noacpi)
                return 0;
 
        if (ata_msg_probe(ap))
@@ -531,7 +531,7 @@ static int do_drive_set_taskfiles(struct ata_port *ap,
                ata_dev_printk(atadev, KERN_DEBUG, "%s: ENTER: port#: %d\n",
                               __FUNCTION__, ap->port_no);
 
-       if (noacpi || !(ap->cbl == ATA_CBL_SATA))
+       if (libata_noacpi || !(ap->cbl == ATA_CBL_SATA))
                return 0;
 
        if (!ata_dev_enabled(atadev) || (ap->flags & ATA_FLAG_DISABLED))
@@ -574,7 +574,7 @@ int ata_acpi_exec_tfs(struct ata_port *ap)
        unsigned long   gtf_address;
        unsigned long   obj_loc;
 
-       if (noacpi)
+       if (libata_noacpi)
                return 0;
        /*
         * TBD - implement PATA support.  For now,
@@ -636,7 +636,7 @@ int ata_acpi_push_id(struct ata_port *ap, unsigned int ix)
        struct acpi_object_list         input;
        union acpi_object               in_params[1];
 
-       if (noacpi)
+       if (libata_noacpi)
                return 0;
 
        if (ata_msg_probe(ap))
index bf327d473ce9053f81f7614a923b74611597735d..f1f595f53d95ef8da2d13615cc589d39a1a127e9 100644 (file)
@@ -93,8 +93,8 @@ static int ata_probe_timeout = ATA_TMOUT_INTERNAL / HZ;
 module_param(ata_probe_timeout, int, 0444);
 MODULE_PARM_DESC(ata_probe_timeout, "Set ATA probing timeout (seconds)");
 
-int noacpi;
-module_param(noacpi, int, 0444);
+int libata_noacpi = 1;
+module_param_named(noacpi, libata_noacpi, int, 0444);
 MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set");
 
 MODULE_AUTHOR("Jeff Garzik");
@@ -3359,6 +3359,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
         { "WDC WD740ADFD-00",   NULL,          ATA_HORKAGE_NONCQ },
        /* http://thread.gmane.org/gmane.linux.ide/14907 */
        { "FUJITSU MHT2060BH",  NULL,           ATA_HORKAGE_NONCQ },
+       /* NCQ is broken */
+       { "Maxtor 6L250S0",     "BANC1G10",     ATA_HORKAGE_NONCQ },
 
        /* Devices with NCQ limits */
 
index 361953a502035e4c846196f05ad3ad256ac6220b..c89664a77a9c44c0367dc6cb22e9d16feaa5974d 100644 (file)
@@ -1743,12 +1743,17 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,
 {
        struct ata_eh_context *ehc = &ap->eh_context;
        struct ata_device *dev;
+       unsigned int new_mask = 0;
        unsigned long flags;
        int i, rc = 0;
 
        DPRINTK("ENTER\n");
 
-       for (i = 0; i < ATA_MAX_DEVICES; i++) {
+       /* For PATA drive side cable detection to work, IDENTIFY must
+        * be done backwards such that PDIAG- is released by the slave
+        * device before the master device is identified.
+        */
+       for (i = ATA_MAX_DEVICES - 1; i >= 0; i--) {
                unsigned int action, readid_flags = 0;
 
                dev = &ap->device[i];
@@ -1760,13 +1765,13 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,
                if (action & ATA_EH_REVALIDATE && ata_dev_ready(dev)) {
                        if (ata_port_offline(ap)) {
                                rc = -EIO;
-                               break;
+                               goto err;
                        }
 
                        ata_eh_about_to_do(ap, dev, ATA_EH_REVALIDATE);
                        rc = ata_dev_revalidate(dev, readid_flags);
                        if (rc)
-                               break;
+                               goto err;
 
                        ata_eh_done(ap, dev, ATA_EH_REVALIDATE);
 
@@ -1784,40 +1789,53 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,
 
                        rc = ata_dev_read_id(dev, &dev->class, readid_flags,
                                             dev->id);
-                       if (rc == 0) {
-                               ehc->i.flags |= ATA_EHI_PRINTINFO;
-                               rc = ata_dev_configure(dev);
-                               ehc->i.flags &= ~ATA_EHI_PRINTINFO;
-                       } else if (rc == -ENOENT) {
+                       switch (rc) {
+                       case 0:
+                               new_mask |= 1 << i;
+                               break;
+                       case -ENOENT:
                                /* IDENTIFY was issued to non-existent
                                 * device.  No need to reset.  Just
                                 * thaw and kill the device.
                                 */
                                ata_eh_thaw_port(ap);
-                               dev->class = ATA_DEV_UNKNOWN;
-                               rc = 0;
-                       }
-
-                       if (rc) {
                                dev->class = ATA_DEV_UNKNOWN;
                                break;
+                       default:
+                               dev->class = ATA_DEV_UNKNOWN;
+                               goto err;
                        }
+               }
+       }
 
-                       if (ata_dev_enabled(dev)) {
-                               spin_lock_irqsave(ap->lock, flags);
-                               ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
-                               spin_unlock_irqrestore(ap->lock, flags);
+       /* Configure new devices forward such that user doesn't see
+        * device detection messages backwards.
+        */
+       for (i = 0; i < ATA_MAX_DEVICES; i++) {
+               dev = &ap->device[i];
 
-                               /* new device discovered, configure xfermode */
-                               ehc->i.flags |= ATA_EHI_SETMODE;
-                       }
-               }
+               if (!(new_mask & (1 << i)))
+                       continue;
+
+               ehc->i.flags |= ATA_EHI_PRINTINFO;
+               rc = ata_dev_configure(dev);
+               ehc->i.flags &= ~ATA_EHI_PRINTINFO;
+               if (rc)
+                       goto err;
+
+               spin_lock_irqsave(ap->lock, flags);
+               ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
+               spin_unlock_irqrestore(ap->lock, flags);
+
+               /* new device discovered, configure xfermode */
+               ehc->i.flags |= ATA_EHI_SETMODE;
        }
 
-       if (rc)
-               *r_failed_dev = dev;
+       return 0;
 
-       DPRINTK("EXIT\n");
+ err:
+       *r_failed_dev = dev;
+       DPRINTK("EXIT rc=%d\n", rc);
        return rc;
 }
 
index c42671493e8c4bf035d141b3d69b3e3702453ede..1f1e3a51f85965f7cebadb3f6b10cfbdb07afb29 100644 (file)
@@ -56,7 +56,7 @@ extern struct workqueue_struct *ata_aux_wq;
 extern int atapi_enabled;
 extern int atapi_dmadir;
 extern int libata_fua;
-extern int noacpi;
+extern int libata_noacpi;
 extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
 extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
                           u64 block, u32 n_block, unsigned int tf_flags,
index acdc52cbe38a0bbddcc44cca91b9592d82036f90..0a149339891395d6264f7c3f1b01be7dde85cb84 100644 (file)
@@ -195,7 +195,7 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc)
        /* Cases the state machine will not complete correctly without help */
        if ((tf->flags & ATA_TFLAG_LBA48) ||  tf->protocol == ATA_PROT_ATAPI_DMA)
        {
-               len = qc->nbytes;
+               len = qc->nbytes / 2;
 
                if (tf->flags & ATA_TFLAG_WRITE)
                        len |= 0x06000000;
index 337bbcdcf13dfb84642ea646c975bc7abe99a07c..8ea02755b1c9c844c73ab78a185cdd870e3d64b1 100644 (file)
@@ -710,12 +710,6 @@ void gs_close(struct tty_struct * tty, struct file * filp)
 }
 
 
-static unsigned int     gs_baudrates[] = {
-  0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
-  9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600
-};
-
-
 void gs_set_termios (struct tty_struct * tty, 
                      struct ktermios * old_termios)
 {
@@ -771,7 +765,6 @@ void gs_set_termios (struct tty_struct * tty,
 
        baudrate = tty_get_baud_rate(tty);
 
-       baudrate = gs_baudrates[baudrate];
        if ((tiosp->c_cflag & CBAUD) == B38400) {
                if (     (port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
                        baudrate = 57600;
index d42060ede93024481916f3497d479a45e5848184..5ac309ee7f05c39d97f22c562bc3318aee85215c 100644 (file)
@@ -90,7 +90,7 @@ __setup("acpi_pm_good", acpi_pm_good_setup);
 static inline void acpi_pm_need_workaround(void)
 {
        clocksource_acpi_pm.read = acpi_pm_read_slow;
-       clocksource_acpi_pm.rating = 110;
+       clocksource_acpi_pm.rating = 120;
 }
 
 /*
index f52facc570f57c97841b7a4bd809f6929bbe88a8..3162010900c9ebca87408a8d9af763a3852b4c32 100644 (file)
@@ -1015,6 +1015,10 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev)
 {
        unsigned int cpu = sys_dev->id;
        int retval;
+
+       if (cpu_is_offline(cpu))
+               return 0;
+
        if (unlikely(lock_policy_rwsem_write(cpu)))
                BUG();
 
index 9e913629ef39aa44d5ab0518d86b54fcec94d398..74edb1d0110f7675f2635d26f5dc4ade609a96ac 100644 (file)
@@ -19,8 +19,8 @@
 /* There is only *one* pci_eisa device per machine, right ? */
 static struct eisa_root_device pci_eisa_root;
 
-static int __devinit pci_eisa_init (struct pci_dev *pdev,
-                                   const struct pci_device_id *ent)
+static int __init pci_eisa_init(struct pci_dev *pdev,
+                               const struct pci_device_id *ent)
 {
        int rc;
 
index 818cf1aee8c7b1e58bdf1dc229e3b6797799bb0e..f5e9aeec6f6e68748a54ad3d43f7edd520e5e191 100644 (file)
@@ -498,9 +498,9 @@ static int cxio_hal_init_ctrl_qp(struct cxio_rdev *rdev_p)
        u64 sge_cmd, ctx0, ctx1;
        u64 base_addr;
        struct t3_modify_qp_wr *wqe;
-       struct sk_buff *skb = alloc_skb(sizeof(*wqe), GFP_KERNEL);
-
+       struct sk_buff *skb;
 
+       skb = alloc_skb(sizeof(*wqe), GFP_KERNEL);
        if (!skb) {
                PDBG("%s alloc_skb failed\n", __FUNCTION__);
                return -ENOMEM;
@@ -508,7 +508,7 @@ static int cxio_hal_init_ctrl_qp(struct cxio_rdev *rdev_p)
        err = cxio_hal_init_ctrl_cq(rdev_p);
        if (err) {
                PDBG("%s err %d initializing ctrl_cq\n", __FUNCTION__, err);
-               return err;
+               goto err;
        }
        rdev_p->ctrl_qp.workq = dma_alloc_coherent(
                                        &(rdev_p->rnic_info.pdev->dev),
@@ -518,7 +518,8 @@ static int cxio_hal_init_ctrl_qp(struct cxio_rdev *rdev_p)
                                        GFP_KERNEL);
        if (!rdev_p->ctrl_qp.workq) {
                PDBG("%s dma_alloc_coherent failed\n", __FUNCTION__);
-               return -ENOMEM;
+               err = -ENOMEM;
+               goto err;
        }
        pci_unmap_addr_set(&rdev_p->ctrl_qp, mapping,
                           rdev_p->ctrl_qp.dma_addr);
@@ -556,6 +557,9 @@ static int cxio_hal_init_ctrl_qp(struct cxio_rdev *rdev_p)
             rdev_p->ctrl_qp.workq, 1 << T3_CTRL_QP_SIZE_LOG2);
        skb->priority = CPL_PRIORITY_CONTROL;
        return (cxgb3_ofld_send(rdev_p->t3cdev_p, skb));
+err:
+       kfree_skb(skb);
+       return err;
 }
 
 static int cxio_hal_destroy_ctrl_qp(struct cxio_rdev *rdev_p)
index 8e4846b5c641ea3451452e636485883df9b7019e..fdb576dcfaa852bd859d8c4ed8d72f9141148c5f 100644 (file)
@@ -881,8 +881,8 @@ int mthca_init_mr_table(struct mthca_dev *dev)
                }
                mpts = mtts = 1 << i;
        } else {
-               mpts = dev->limits.num_mtt_segs;
-               mtts = dev->limits.num_mpts;
+               mtts = dev->limits.num_mtt_segs;
+               mpts = dev->limits.num_mpts;
        }
 
        if (!mthca_is_memfree(dev) &&
index 89e37283c83689a9896b7beee38bc6491939e6de..278fcbccc2d995e21b167d7623575009f2fa948c 100644 (file)
@@ -658,6 +658,7 @@ void iser_ctask_rdma_finalize(struct iscsi_iser_cmd_task *iser_ctask)
 {
        int deferred;
        int is_rdma_aligned = 1;
+       struct iser_regd_buf *regd;
 
        /* if we were reading, copy back to unaligned sglist,
         * anyway dma_unmap and free the copy
@@ -672,20 +673,20 @@ void iser_ctask_rdma_finalize(struct iscsi_iser_cmd_task *iser_ctask)
        }
 
        if (iser_ctask->dir[ISER_DIR_IN]) {
-               deferred = iser_regd_buff_release
-                       (&iser_ctask->rdma_regd[ISER_DIR_IN]);
+               regd = &iser_ctask->rdma_regd[ISER_DIR_IN];
+               deferred = iser_regd_buff_release(regd);
                if (deferred) {
-                       iser_err("References remain for BUF-IN rdma reg\n");
-                       BUG();
+                       iser_err("%d references remain for BUF-IN rdma reg\n",
+                                atomic_read(&regd->ref_count));
                }
        }
 
        if (iser_ctask->dir[ISER_DIR_OUT]) {
-               deferred = iser_regd_buff_release
-                       (&iser_ctask->rdma_regd[ISER_DIR_OUT]);
+               regd = &iser_ctask->rdma_regd[ISER_DIR_OUT];
+               deferred = iser_regd_buff_release(regd);
                if (deferred) {
-                       iser_err("References remain for BUF-OUT rdma reg\n");
-                       BUG();
+                       iser_err("%d references remain for BUF-OUT rdma reg\n",
+                                atomic_read(&regd->ref_count));
                }
        }
 
index 9df9e3548cf15c81be313930feda87739ebfdcfb..c547a666505231be9847c50a84f7bd89f070a4a0 100644 (file)
@@ -440,7 +440,7 @@ isar_bh(struct work_struct *work)
 {
        struct BCState *bcs = container_of(work, struct BCState, tqueue);
 
-       BChannel_bh(bcs);
+       BChannel_bh(work);
        if (test_and_clear_bit(B_LL_NOCARRIER, &bcs->event))
                ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_NOCARR);
        if (test_and_clear_bit(B_LL_CONNECT, &bcs->event))
index bfa0ce42ea92b35518345244b26604cc3855bd6d..fbbf9d6b299fa16bed8f89a677dc393bc1c55ee1 100644 (file)
@@ -618,7 +618,7 @@ static void fix_pmode_dataseg(int seg, struct kvm_save_segment *save)
 {
        struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg];
 
-       if (vmcs_readl(sf->base) == save->base) {
+       if (vmcs_readl(sf->base) == save->base && (save->base & AR_S_MASK)) {
                vmcs_write16(sf->selector, save->selector);
                vmcs_writel(sf->base, save->base);
                vmcs_write32(sf->limit, save->limit);
@@ -1888,6 +1888,27 @@ again:
                [cr2]"i"(offsetof(struct kvm_vcpu, cr2))
              : "cc", "memory" );
 
+       /*
+        * Reload segment selectors ASAP. (it's needed for a functional
+        * kernel: x86 relies on having __KERNEL_PDA in %fs and x86_64
+        * relies on having 0 in %gs for the CPU PDA to work.)
+        */
+       if (fs_gs_ldt_reload_needed) {
+               load_ldt(ldt_sel);
+               load_fs(fs_sel);
+               /*
+                * If we have to reload gs, we must take care to
+                * preserve our gs base.
+                */
+               local_irq_disable();
+               load_gs(gs_sel);
+#ifdef CONFIG_X86_64
+               wrmsrl(MSR_GS_BASE, vmcs_readl(HOST_GS_BASE));
+#endif
+               local_irq_enable();
+
+               reload_tss();
+       }
        ++kvm_stat.exits;
 
        save_msrs(vcpu->guest_msrs, NR_BAD_MSRS);
@@ -1905,22 +1926,6 @@ again:
                kvm_run->exit_reason = vmcs_read32(VM_INSTRUCTION_ERROR);
                r = 0;
        } else {
-               if (fs_gs_ldt_reload_needed) {
-                       load_ldt(ldt_sel);
-                       load_fs(fs_sel);
-                       /*
-                        * If we have to reload gs, we must take care to
-                        * preserve our gs base.
-                        */
-                       local_irq_disable();
-                       load_gs(gs_sel);
-#ifdef CONFIG_X86_64
-                       wrmsrl(MSR_GS_BASE, vmcs_readl(HOST_GS_BASE));
-#endif
-                       local_irq_enable();
-
-                       reload_tss();
-               }
                /*
                 * Profile KVM exit RIPs:
                 */
index 6c06e825cff5af8f070ff9d370f987da7c64f34b..2a9b6a07e3a2382024e4c91e49a8db969c263e71 100644 (file)
@@ -1318,6 +1318,7 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev)
        char b[BDEVNAME_SIZE];
        struct kobject *ko;
        char *s;
+       int err;
 
        if (rdev->mddev) {
                MD_BUG();
@@ -1352,20 +1353,29 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev)
        while ( (s=strchr(rdev->kobj.k_name, '/')) != NULL)
                *s = '!';
                        
-       list_add(&rdev->same_set, &mddev->disks);
        rdev->mddev = mddev;
        printk(KERN_INFO "md: bind<%s>\n", b);
 
        rdev->kobj.parent = &mddev->kobj;
-       kobject_add(&rdev->kobj);
+       if ((err = kobject_add(&rdev->kobj)))
+               goto fail;
 
        if (rdev->bdev->bd_part)
                ko = &rdev->bdev->bd_part->kobj;
        else
                ko = &rdev->bdev->bd_disk->kobj;
-       sysfs_create_link(&rdev->kobj, ko, "block");
+       if ((err = sysfs_create_link(&rdev->kobj, ko, "block"))) {
+               kobject_del(&rdev->kobj);
+               goto fail;
+       }
+       list_add(&rdev->same_set, &mddev->disks);
        bd_claim_by_disk(rdev->bdev, rdev, mddev->gendisk);
        return 0;
+
+ fail:
+       printk(KERN_WARNING "md: failed to register dev-%s for %s\n",
+              b, mdname(mddev));
+       return err;
 }
 
 static void unbind_rdev_from_array(mdk_rdev_t * rdev)
@@ -2966,7 +2976,9 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data)
        mddev->kobj.k_name = NULL;
        snprintf(mddev->kobj.name, KOBJ_NAME_LEN, "%s", "md");
        mddev->kobj.ktype = &md_ktype;
-       kobject_register(&mddev->kobj);
+       if (kobject_register(&mddev->kobj))
+               printk(KERN_WARNING "md: cannot register %s/md - name in use\n",
+                      disk->disk_name);
        return NULL;
 }
 
@@ -3144,9 +3156,12 @@ static int do_md_run(mddev_t * mddev)
                bitmap_destroy(mddev);
                return err;
        }
-       if (mddev->pers->sync_request)
-               sysfs_create_group(&mddev->kobj, &md_redundancy_group);
-       else if (mddev->ro == 2) /* auto-readonly not meaningful */
+       if (mddev->pers->sync_request) {
+               if (sysfs_create_group(&mddev->kobj, &md_redundancy_group))
+                       printk(KERN_WARNING
+                              "md: cannot register extra attributes for %s\n",
+                              mdname(mddev));
+       } else if (mddev->ro == 2) /* auto-readonly not meaningful */
                mddev->ro = 0;
 
        atomic_set(&mddev->writes_pending,0);
@@ -3160,7 +3175,9 @@ static int do_md_run(mddev_t * mddev)
                if (rdev->raid_disk >= 0) {
                        char nm[20];
                        sprintf(nm, "rd%d", rdev->raid_disk);
-                       sysfs_create_link(&mddev->kobj, &rdev->kobj, nm);
+                       if (sysfs_create_link(&mddev->kobj, &rdev->kobj, nm))
+                               printk("md: cannot register %s for %s\n",
+                                      nm, mdname(mddev));
                }
        
        set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
@@ -3325,6 +3342,7 @@ static int do_md_stop(mddev_t * mddev, int mode)
                        mddev->queue->merge_bvec_fn = NULL;
                        mddev->queue->unplug_fn = NULL;
                        mddev->queue->issue_flush_fn = NULL;
+                       mddev->queue->backing_dev_info.congested_fn = NULL;
                        if (mddev->pers->sync_request)
                                sysfs_remove_group(&mddev->kobj, &md_redundancy_group);
 
@@ -5385,8 +5403,12 @@ static int remove_and_add_spares(mddev_t *mddev)
                                if (mddev->pers->hot_add_disk(mddev,rdev)) {
                                        char nm[20];
                                        sprintf(nm, "rd%d", rdev->raid_disk);
-                                       sysfs_create_link(&mddev->kobj,
-                                                         &rdev->kobj, nm);
+                                       if (sysfs_create_link(&mddev->kobj,
+                                                             &rdev->kobj, nm))
+                                               printk(KERN_WARNING
+                                                      "md: cannot register "
+                                                      "%s for %s\n",
+                                                      nm, mdname(mddev));
                                        spares++;
                                        md_new_event(mddev);
                                } else
index 54a1ad5eef42e5338c506894e71d03cc4ff36bcd..8d59914f2057a6d0a06527dd8b3c872ed3c1b842 100644 (file)
@@ -3642,12 +3642,15 @@ static int run(mddev_t *mddev)
        }
 
        /* Ok, everything is just fine now */
-       sysfs_create_group(&mddev->kobj, &raid5_attrs_group);
+       if (sysfs_create_group(&mddev->kobj, &raid5_attrs_group))
+               printk(KERN_WARNING
+                      "raid5: failed to create sysfs attributes for %s\n",
+                      mdname(mddev));
 
        mddev->queue->unplug_fn = raid5_unplug_device;
        mddev->queue->issue_flush_fn = raid5_issue_flush;
-       mddev->queue->backing_dev_info.congested_fn = raid5_congested;
        mddev->queue->backing_dev_info.congested_data = mddev;
+       mddev->queue->backing_dev_info.congested_fn = raid5_congested;
 
        mddev->array_size =  mddev->size * (conf->previous_raid_disks -
                                            conf->max_degraded);
@@ -3678,6 +3681,7 @@ static int stop(mddev_t *mddev)
        mddev->thread = NULL;
        shrink_stripes(conf);
        kfree(conf->stripe_hashtbl);
+       mddev->queue->backing_dev_info.congested_fn = NULL;
        blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
        sysfs_remove_group(&mddev->kobj, &raid5_attrs_group);
        kfree(conf->disks);
@@ -3950,7 +3954,12 @@ static int raid5_start_reshape(mddev_t *mddev)
                                added_devices++;
                                rdev->recovery_offset = 0;
                                sprintf(nm, "rd%d", rdev->raid_disk);
-                               sysfs_create_link(&mddev->kobj, &rdev->kobj, nm);
+                               if (sysfs_create_link(&mddev->kobj,
+                                                     &rdev->kobj, nm))
+                                       printk(KERN_WARNING
+                                              "raid5: failed to create "
+                                              " link %s for %s\n",
+                                              nm, mdname(mddev));
                        } else
                                break;
                }
@@ -4104,6 +4113,10 @@ static struct mdk_personality raid4_personality =
        .spare_active   = raid5_spare_active,
        .sync_request   = sync_request,
        .resize         = raid5_resize,
+#ifdef CONFIG_MD_RAID5_RESHAPE
+       .check_reshape  = raid5_check_reshape,
+       .start_reshape  = raid5_start_reshape,
+#endif
        .quiesce        = raid5_quiesce,
 };
 
index cbf7c05648896776e4a60b1bfd01c83956730051..fcb194135627f9e32bb01f8f33db53e4b2a41fdd 100644 (file)
@@ -310,13 +310,15 @@ void ir_rc5_timer_end(unsigned long data)
                    tv.tv_usec - ir->base_time.tv_usec;
        }
 
-       /* Allow some timmer jitter (RC5 is ~24ms anyway so this is ok) */
+       /* signal we're ready to start a new code */
+       ir->active = 0;
+
+       /* Allow some timer jitter (RC5 is ~24ms anyway so this is ok) */
        if (gap < 28000) {
                dprintk(1, "ir-common: spurious timer_end\n");
                return;
        }
 
-       ir->active = 0;
        if (ir->last_bit < 20) {
                /* ignore spurious codes (caused by light/other remotes) */
                dprintk(1, "ir-common: short code: %x\n", ir->code);
index fc77de45ca4dc415fdaa77634eda086a2e78945e..a5c0e1a3e6d14f1cd41f55247af56409f2b9bb46 100644 (file)
@@ -180,8 +180,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file)
        struct dvb_device *dvbdev = file->private_data;
        struct dmxdev *dmxdev = dvbdev->priv;
 
-       if (mutex_lock_interruptible(&dmxdev->mutex))
-               return -ERESTARTSYS;
+       mutex_lock(&dmxdev->mutex);
 
        if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
                dmxdev->demux->disconnect_frontend(dmxdev->demux);
@@ -673,13 +672,8 @@ static int dvb_demux_open(struct inode *inode, struct file *file)
 static int dvb_dmxdev_filter_free(struct dmxdev *dmxdev,
                                  struct dmxdev_filter *dmxdevfilter)
 {
-       if (mutex_lock_interruptible(&dmxdev->mutex))
-               return -ERESTARTSYS;
-
-       if (mutex_lock_interruptible(&dmxdevfilter->mutex)) {
-               mutex_unlock(&dmxdev->mutex);
-               return -ERESTARTSYS;
-       }
+       mutex_lock(&dmxdev->mutex);
+       mutex_lock(&dmxdevfilter->mutex);
 
        dvb_dmxdev_filter_stop(dmxdevfilter);
        dvb_dmxdev_filter_reset(dmxdevfilter);
index fcff5eab21a3fc050d5207f9538c99d6c6ee63bd..6d8d1c3df8631a4832b34954e44e5633cd3a34c6 100644 (file)
@@ -673,8 +673,7 @@ static int dmx_ts_feed_stop_filtering(struct dmx_ts_feed *ts_feed)
        struct dvb_demux *demux = feed->demux;
        int ret;
 
-       if (mutex_lock_interruptible(&demux->mutex))
-               return -ERESTARTSYS;
+       mutex_lock(&demux->mutex);
 
        if (feed->state < DMX_STATE_GO) {
                mutex_unlock(&demux->mutex);
@@ -748,8 +747,7 @@ static int dvbdmx_release_ts_feed(struct dmx_demux *dmx,
        struct dvb_demux *demux = (struct dvb_demux *)dmx;
        struct dvb_demux_feed *feed = (struct dvb_demux_feed *)ts_feed;
 
-       if (mutex_lock_interruptible(&demux->mutex))
-               return -ERESTARTSYS;
+       mutex_lock(&demux->mutex);
 
        if (feed->state == DMX_STATE_FREE) {
                mutex_unlock(&demux->mutex);
@@ -916,8 +914,7 @@ static int dmx_section_feed_stop_filtering(struct dmx_section_feed *feed)
        struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
        int ret;
 
-       if (mutex_lock_interruptible(&dvbdmx->mutex))
-               return -ERESTARTSYS;
+       mutex_lock(&dvbdmx->mutex);
 
        if (!dvbdmx->stop_feed) {
                mutex_unlock(&dvbdmx->mutex);
@@ -942,8 +939,7 @@ static int dmx_section_feed_release_filter(struct dmx_section_feed *feed,
        struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *)feed;
        struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
 
-       if (mutex_lock_interruptible(&dvbdmx->mutex))
-               return -ERESTARTSYS;
+       mutex_lock(&dvbdmx->mutex);
 
        if (dvbdmxfilter->feed != dvbdmxfeed) {
                mutex_unlock(&dvbdmx->mutex);
@@ -1016,8 +1012,7 @@ static int dvbdmx_release_section_feed(struct dmx_demux *demux,
        struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *)feed;
        struct dvb_demux *dvbdmx = (struct dvb_demux *)demux;
 
-       if (mutex_lock_interruptible(&dvbdmx->mutex))
-               return -ERESTARTSYS;
+       mutex_lock(&dvbdmx->mutex);
 
        if (dvbdmxfeed->state == DMX_STATE_FREE) {
                mutex_unlock(&dvbdmx->mutex);
@@ -1126,8 +1121,7 @@ static int dvbdmx_connect_frontend(struct dmx_demux *demux,
        if (demux->frontend)
                return -EINVAL;
 
-       if (mutex_lock_interruptible(&dvbdemux->mutex))
-               return -ERESTARTSYS;
+       mutex_lock(&dvbdemux->mutex);
 
        demux->frontend = frontend;
        mutex_unlock(&dvbdemux->mutex);
@@ -1138,8 +1132,7 @@ static int dvbdmx_disconnect_frontend(struct dmx_demux *demux)
 {
        struct dvb_demux *dvbdemux = (struct dvb_demux *)demux;
 
-       if (mutex_lock_interruptible(&dvbdemux->mutex))
-               return -ERESTARTSYS;
+       mutex_lock(&dvbdemux->mutex);
 
        demux->frontend = NULL;
        mutex_unlock(&dvbdemux->mutex);
index 490337b5ee3e2ec9c8007c536d8eec1b1fa783d9..14a372a0fe8bfa5b33d83343c49d12530c1a3103 100644 (file)
@@ -203,8 +203,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
 
        int id;
 
-       if (mutex_lock_interruptible(&dvbdev_register_lock))
-               return -ERESTARTSYS;
+       mutex_lock(&dvbdev_register_lock);
 
        if ((id = dvbdev_get_free_id (adap, type)) < 0){
                mutex_unlock(&dvbdev_register_lock);
@@ -294,8 +293,7 @@ int dvb_register_adapter(struct dvb_adapter *adap, const char *name, struct modu
 {
        int num;
 
-       if (mutex_lock_interruptible(&dvbdev_register_lock))
-               return -ERESTARTSYS;
+       mutex_lock(&dvbdev_register_lock);
 
        if ((num = dvbdev_get_free_adapter_num ()) < 0) {
                mutex_unlock(&dvbdev_register_lock);
@@ -323,8 +321,7 @@ EXPORT_SYMBOL(dvb_register_adapter);
 
 int dvb_unregister_adapter(struct dvb_adapter *adap)
 {
-       if (mutex_lock_interruptible(&dvbdev_register_lock))
-               return -ERESTARTSYS;
+       mutex_lock(&dvbdev_register_lock);
        list_del (&adap->list_head);
        mutex_unlock(&dvbdev_register_lock);
        return 0;
index ef319369ec262e2fd9016e0fa9d4b1674b433424..c967148a5945c6fd53a2da491b11c0b84cbfb3b2 100644 (file)
@@ -122,6 +122,7 @@ struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter
        /* detect if it is present or not */
        if (isl6421_set_voltage(fe, SEC_VOLTAGE_OFF)) {
                kfree(isl6421);
+               fe->sec_priv = NULL;
                return NULL;
        }
 
index 920b63f8cf051274d8459d2b828a2dd49263d759..af66a5d5ecd8b484af9ad661f59071c4714f8d5b 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 menu "Radio Adapters"
-       depends on VIDEO_DEV!=n
+       depends on VIDEO_DEV
 
 config RADIO_CADET
        tristate "ADS Cadet AM/FM Tuner"
index 2fb9fe6a1ae75ac39ea0a3865749459962adfeb5..ba1af3c8525e196fa3c6457b7b05ec9aacccf0f0 100644 (file)
@@ -780,18 +780,16 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
        return 0;
 }
 
-static int msp_suspend(struct device * dev, pm_message_t state)
+static int msp_suspend(struct i2c_client *client, pm_message_t state)
 {
-       struct i2c_client *client = container_of(dev, struct i2c_client, dev);
 
        v4l_dbg(1, msp_debug, client, "suspend\n");
        msp_reset(client);
        return 0;
 }
 
-static int msp_resume(struct device * dev)
+static int msp_resume(struct i2c_client *client)
 {
-       struct i2c_client *client = container_of(dev, struct i2c_client, dev);
 
        v4l_dbg(1, msp_debug, client, "resume\n");
        msp_wake_thread(client);
@@ -825,7 +823,7 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind)
        if (msp_reset(client) == -1) {
                v4l_dbg(1, msp_debug, client, "msp3400 not found\n");
                kfree(client);
-               return -1;
+               return 0;
        }
 
        state = kmalloc(sizeof(*state), GFP_KERNEL);
@@ -859,7 +857,7 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind)
                v4l_dbg(1, msp_debug, client, "not an msp3400 (cannot read chip version)\n");
                kfree(state);
                kfree(client);
-               return -1;
+               return 0;
        }
 
        msp_set_audio(client);
@@ -996,11 +994,11 @@ static struct i2c_driver i2c_driver = {
        .id             = I2C_DRIVERID_MSP3400,
        .attach_adapter = msp_probe,
        .detach_client  = msp_detach,
+       .suspend = msp_suspend,
+       .resume  = msp_resume,
        .command        = msp_command,
        .driver = {
                .name    = "msp3400",
-               .suspend = msp_suspend,
-               .resume  = msp_resume,
        },
 };
 
index 7735b6758921f6cda72663474b71be3b767fb517..4d5bbd859de1d6e13cf8f3226291594f0594afa9 100644 (file)
@@ -961,7 +961,7 @@ static void saa711x_set_v4lstd(struct i2c_client *client, v4l2_std_id std)
                        reg |= 0x10;
                } else if (std == V4L2_STD_NTSC_M_JP) {
                        reg |= 0x40;
-               } else if (std == V4L2_STD_SECAM) {
+               } else if (std & V4L2_STD_SECAM) {
                        reg |= 0x50;
                }
                saa711x_write(client, R_0E_CHROMA_CNTL_1, reg);
index 7be73e3763de4d14439a02a8c651a8aeb947bf0d..15dbc6bf42a71c97a23a2389eb623338d6798f19 100644 (file)
@@ -804,9 +804,8 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
        return 0;
 }
 
-static int tuner_suspend(struct device *dev, pm_message_t state)
+static int tuner_suspend(struct i2c_client *c, pm_message_t state)
 {
-       struct i2c_client *c = container_of (dev, struct i2c_client, dev);
        struct tuner *t = i2c_get_clientdata (c);
 
        tuner_dbg ("suspend\n");
@@ -814,9 +813,8 @@ static int tuner_suspend(struct device *dev, pm_message_t state)
        return 0;
 }
 
-static int tuner_resume(struct device *dev)
+static int tuner_resume(struct i2c_client *c)
 {
-       struct i2c_client *c = container_of (dev, struct i2c_client, dev);
        struct tuner *t = i2c_get_clientdata (c);
 
        tuner_dbg ("resume\n");
@@ -837,10 +835,10 @@ static struct i2c_driver driver = {
        .attach_adapter = tuner_probe,
        .detach_client = tuner_detach,
        .command = tuner_command,
+       .suspend = tuner_suspend,
+       .resume  = tuner_resume,
        .driver = {
                .name    = "tuner",
-               .suspend = tuner_suspend,
-               .resume  = tuner_resume,
        },
 };
 static struct i2c_client client_template = {
index 404c014db1bdaa30538a4f2fff0c25b2151f7e47..1d2d03f77894c75d8b42225da9529479173706c0 100644 (file)
@@ -815,7 +815,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
 static int
 mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
 {
-       MPT_SCSI_HOST   *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
+       MPT_SCSI_HOST   *hd;
        struct mptsas_target_reset_event *target_reset_list, *n;
        int rc;
 
@@ -827,7 +827,10 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
        if (reset_phase != MPT_IOC_POST_RESET)
                goto out;
 
-       if (!hd || !hd->ioc)
+       if (!ioc->sh || !ioc->sh->hostdata)
+               goto out;
+       hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
+       if (!hd->ioc)
                goto out;
 
        if (list_empty(&hd->target_reset_list))
index da9859f2caf2b3e083ebbc665d7e67a1268e5cca..b17c4b2bc9ef7f6e784c56f8ee571f67c8e4e533 100644 (file)
@@ -390,13 +390,6 @@ static int i2o_block_prep_req_fn(struct request_queue *q, struct request *req)
                return BLKPREP_KILL;
        }
 
-       /* request is already processed by us, so return */
-       if (blk_special_request(req)) {
-               osm_debug("REQ_SPECIAL already set!\n");
-               req->cmd_flags |= REQ_DONTPREP;
-               return BLKPREP_OK;
-       }
-
        /* connect the i2o_block_request to the request */
        if (!req->special) {
                ireq = i2o_block_request_alloc();
@@ -408,11 +401,8 @@ static int i2o_block_prep_req_fn(struct request_queue *q, struct request *req)
                ireq->i2o_blk_dev = i2o_blk_dev;
                req->special = ireq;
                ireq->req = req;
-       } else
-               ireq = req->special;
-
+       }
        /* do not come back here */
-       req->cmd_type = REQ_TYPE_SPECIAL;
        req->cmd_flags |= REQ_DONTPREP;
 
        return BLKPREP_OK;
index 314dbaabb642454a1e2389caeef97fcc87995eb8..69482e0d849b60673d58d07443708b6a42f4ab79 100644 (file)
@@ -334,7 +334,6 @@ u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr)
        int i;
 
        crc32 = ether_crc_le(6, mc_addr);
-       crc32 = ~crc32;
        for (i = 0; i < 32; i++)
                value |= (((crc32 >> i) & 1) << (31 - i));
 
index 46e1697d9cfd01638d9e5616027641a0ed639656..d04214e4e5814ad9fd0007d323f93ebf64cd807f 100644 (file)
@@ -2050,9 +2050,10 @@ static void nv_tx_timeout(struct net_device *dev)
                nv_drain_tx(dev);
                nv_init_tx(dev);
                setup_hw_rings(dev, NV_SETUP_TX_RING);
-               netif_wake_queue(dev);
        }
 
+       netif_wake_queue(dev);
+
        /* 4) restart tx engine */
        nv_start_tx(dev);
        spin_unlock_irq(&np->lock);
@@ -3536,7 +3537,10 @@ static void nv_do_nic_poll(unsigned long data)
        pci_push(base);
 
        if (!using_multi_irqs(dev)) {
-               nv_nic_irq(0, dev);
+               if (np->desc_ver == DESC_VER_3)
+                       nv_nic_irq_optimized(0, dev);
+               else
+                       nv_nic_irq(0, dev);
                if (np->msi_flags & NV_MSI_X_ENABLED)
                        enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
                else
index c9f55bc57edb3339523e5b484d23343dbc2f70f0..8015a7c5b0c96b2a1f30498570131c031c98dacd 100644 (file)
@@ -1379,7 +1379,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
 
        spin_lock_init(&mp->lock);
 
-       port_num = pd->port_number;
+       port_num = mp->port_num = pd->port_number;
 
        /* set default config values */
        eth_port_uc_addr_get(dev, dev->dev_addr);
@@ -1411,8 +1411,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
        duplex = pd->duplex;
        speed = pd->speed;
 
-       mp->port_num = port_num;
-
        /* Hook up MII support for ethtool */
        mp->mii.dev = dev;
        mp->mii.mdio_read = mv643xx_mdio_read;
index b05b20ef8c0aeb157a3da117a0acb44c2aa015ea..c216e6a5d2353ff4c2643e3b054c99910c6b5c2a 100644 (file)
@@ -71,7 +71,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.3.0-1.226"
+#define MYRI10GE_VERSION_STR "1.3.0-1.227"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -2015,10 +2015,9 @@ again:
        mss = 0;
        max_segments = MXGEFW_MAX_SEND_DESC;
 
-       if (skb->len > (dev->mtu + ETH_HLEN)) {
+       if (skb_is_gso(skb)) {
                mss = skb_shinfo(skb)->gso_size;
-               if (mss != 0)
-                       max_segments = MYRI10GE_MAX_SEND_DESC_TSO;
+               max_segments = MYRI10GE_MAX_SEND_DESC_TSO;
        }
 
        if ((unlikely(avail < max_segments))) {
index d3f65dab306c88568b0ce0900a651bfe5874a070..a8246eb2f8d93ba185e7e2a3a45ac140bb1c2f96 100755 (executable)
@@ -1688,6 +1688,27 @@ static int ql_populate_free_queue(struct ql3_adapter *qdev)
        return 0;
 }
 
+/*
+ * Caller holds hw_lock.
+ */
+static void ql_update_small_bufq_prod_index(struct ql3_adapter *qdev)
+{
+       struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers;
+       if (qdev->small_buf_release_cnt >= 16) {
+               while (qdev->small_buf_release_cnt >= 16) {
+                       qdev->small_buf_q_producer_index++;
+
+                       if (qdev->small_buf_q_producer_index ==
+                           NUM_SBUFQ_ENTRIES)
+                               qdev->small_buf_q_producer_index = 0;
+                       qdev->small_buf_release_cnt -= 8;
+               }
+               wmb();
+               writel(qdev->small_buf_q_producer_index,
+                       &port_regs->CommonRegs.rxSmallQProducerIndex);
+       }
+}
+
 /*
  * Caller holds hw_lock.
  */
@@ -1732,13 +1753,10 @@ static void ql_update_lrg_bufq_prod_index(struct ql3_adapter *qdev)
                                lrg_buf_q_ele = qdev->lrg_buf_q_virt_addr;
                        }
                }
-
+               wmb();
                qdev->lrg_buf_next_free = lrg_buf_q_ele;
-
-               ql_write_common_reg(qdev,
-                                   &port_regs->CommonRegs.
-                                   rxLargeQProducerIndex,
-                                   qdev->lrg_buf_q_producer_index);
+               writel(qdev->lrg_buf_q_producer_index,
+                       &port_regs->CommonRegs.rxLargeQProducerIndex);
        }
 }
 
@@ -1915,17 +1933,18 @@ static void ql_process_macip_rx_intr(struct ql3_adapter *qdev,
                u16 checksum = le16_to_cpu(ib_ip_rsp_ptr->checksum);
                if (checksum & 
                        (IB_IP_IOCB_RSP_3032_ICE | 
-                        IB_IP_IOCB_RSP_3032_CE | 
-                        IB_IP_IOCB_RSP_3032_NUC)) {
+                        IB_IP_IOCB_RSP_3032_CE)) { 
                        printk(KERN_ERR
                               "%s: Bad checksum for this %s packet, checksum = %x.\n",
                               __func__,
                               ((checksum & 
                                IB_IP_IOCB_RSP_3032_TCP) ? "TCP" :
                                "UDP"),checksum);
-               } else if (checksum & IB_IP_IOCB_RSP_3032_TCP) {
+               } else if ((checksum & IB_IP_IOCB_RSP_3032_TCP) ||
+                               (checksum & IB_IP_IOCB_RSP_3032_UDP &&
+                               !(checksum & IB_IP_IOCB_RSP_3032_NUC))) {
                        skb2->ip_summed = CHECKSUM_UNNECESSARY;
-               } 
+               }
        }
        skb2->dev = qdev->ndev;
        skb2->protocol = eth_type_trans(skb2, qdev->ndev);
@@ -1944,16 +1963,12 @@ static void ql_process_macip_rx_intr(struct ql3_adapter *qdev,
 static int ql_tx_rx_clean(struct ql3_adapter *qdev,
                          int *tx_cleaned, int *rx_cleaned, int work_to_do)
 {
-       struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers;
        struct net_rsp_iocb *net_rsp;
        struct net_device *ndev = qdev->ndev;
-       unsigned long hw_flags;
        int work_done = 0;
 
-       u32 rsp_producer_index = le32_to_cpu(*(qdev->prsp_producer_index));
-
        /* While there are entries in the completion queue. */
-       while ((rsp_producer_index !=
+       while ((le32_to_cpu(*(qdev->prsp_producer_index)) !=
                qdev->rsp_consumer_index) && (work_done < work_to_do)) {
 
                net_rsp = qdev->rsp_current;
@@ -2009,33 +2024,7 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev,
                work_done = *tx_cleaned + *rx_cleaned;
        }
 
-       if(work_done) {
-               spin_lock_irqsave(&qdev->hw_lock, hw_flags);
-
-               ql_update_lrg_bufq_prod_index(qdev);
-
-               if (qdev->small_buf_release_cnt >= 16) {
-                       while (qdev->small_buf_release_cnt >= 16) {
-                               qdev->small_buf_q_producer_index++;
-
-                               if (qdev->small_buf_q_producer_index ==
-                                   NUM_SBUFQ_ENTRIES)
-                                       qdev->small_buf_q_producer_index = 0;
-                               qdev->small_buf_release_cnt -= 8;
-                       }
-
-                       wmb();
-                       ql_write_common_reg(qdev,
-                                           &port_regs->CommonRegs.
-                                           rxSmallQProducerIndex,
-                                           qdev->small_buf_q_producer_index);
-
-               }
-
-               spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
-       }
-
-       return *tx_cleaned + *rx_cleaned;
+       return work_done;
 }
 
 static int ql_poll(struct net_device *ndev, int *budget)
@@ -2059,9 +2048,10 @@ quit_polling:
                netif_rx_complete(ndev);
 
                spin_lock_irqsave(&qdev->hw_lock, hw_flags);
-               ql_write_common_reg(qdev,
-                                   &port_regs->CommonRegs.rspQConsumerIndex,
-                                   qdev->rsp_consumer_index);
+               ql_update_small_bufq_prod_index(qdev);
+               ql_update_lrg_bufq_prod_index(qdev);
+               writel(qdev->rsp_consumer_index,
+                           &port_regs->CommonRegs.rspQConsumerIndex);
                spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
 
                ql_enable_interrupts(qdev);
@@ -2217,12 +2207,7 @@ static int ql_send_map(struct ql3_adapter *qdev,
        int seg_cnt, seg = 0;
        int frag_cnt = (int)skb_shinfo(skb)->nr_frags;
 
-       seg_cnt = tx_cb->seg_count = ql_get_seg_count(qdev,
-                                                     (skb_shinfo(skb)->nr_frags));
-       if(seg_cnt == -1) {
-               printk(KERN_ERR PFX"%s: invalid segment count!\n",__func__);
-               return NETDEV_TX_BUSY;
-       }
+       seg_cnt = tx_cb->seg_count;
        /*
         * Map the skb buffer first.
         */
@@ -2278,7 +2263,7 @@ static int ql_send_map(struct ql3_adapter *qdev,
                                pci_unmap_addr_set(&tx_cb->map[seg], mapaddr,
                                                   map);
                                pci_unmap_len_set(&tx_cb->map[seg], maplen,
-                                                 len);
+                                                 sizeof(struct oal));
                                oal_entry = (struct oal_entry *)oal;
                                oal++;
                                seg++;
@@ -2380,6 +2365,7 @@ static int ql3xxx_send(struct sk_buff *skb, struct net_device *ndev)
        }
        
        mac_iocb_ptr = tx_cb->queue_entry;
+       memset((void *)mac_iocb_ptr, 0, sizeof(struct ob_mac_iocb_req));
        mac_iocb_ptr->opcode = qdev->mac_ob_opcode;
        mac_iocb_ptr->flags = OB_MAC_IOCB_REQ_X;
        mac_iocb_ptr->flags |= qdev->mb_bit_mask;
@@ -3054,15 +3040,6 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
                        goto out;
                }
 
-               if (qdev->mac_index)
-                       ql_write_page0_reg(qdev,
-                                          &port_regs->mac1MaxFrameLengthReg,
-                                          qdev->max_frame_size);
-               else
-                       ql_write_page0_reg(qdev,
-                                          &port_regs->mac0MaxFrameLengthReg,
-                                          qdev->max_frame_size);
-
                value = qdev->nvram_data.tcpMaxWindowSize;
                ql_write_page0_reg(qdev, &port_regs->tcpMaxWindow, value);
 
@@ -3082,6 +3059,14 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
                ql_sem_unlock(qdev, QL_FLASH_SEM_MASK);
        }
 
+       if (qdev->mac_index)
+               ql_write_page0_reg(qdev,
+                                  &port_regs->mac1MaxFrameLengthReg,
+                                  qdev->max_frame_size);
+       else
+               ql_write_page0_reg(qdev,
+                                          &port_regs->mac0MaxFrameLengthReg,
+                                          qdev->max_frame_size);
 
        if(ql_sem_spinlock(qdev, QL_PHY_GIO_SEM_MASK,
                        (QL_RESOURCE_BITS_BASE_CODE | (qdev->mac_index) *
@@ -3152,7 +3137,8 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
        if (qdev->device_id == QL3032_DEVICE_ID) {
                value =
                    (QL3032_PORT_CONTROL_EF | QL3032_PORT_CONTROL_KIE |
-                    QL3032_PORT_CONTROL_EIv6 | QL3032_PORT_CONTROL_EIv4);
+                    QL3032_PORT_CONTROL_EIv6 | QL3032_PORT_CONTROL_EIv4 |
+                       QL3032_PORT_CONTROL_ET);
                ql_write_page0_reg(qdev, &port_regs->functionControl,
                                   ((value << 16) | value));
        } else {
index 34cd6580fd07cbfadd80230e8890c370c72fcfe8..0203f88f0544413eb52c6a30c5c70797435aff92 100755 (executable)
@@ -1014,8 +1014,7 @@ struct eeprom_data {
 
 /* Transmit and Receive Buffers */
 #define NUM_LBUFQ_ENTRIES      128
-#define JUMBO_NUM_LBUFQ_ENTRIES        \
-(NUM_LBUFQ_ENTRIES/(JUMBO_MTU_SIZE/NORMAL_MTU_SIZE))
+#define JUMBO_NUM_LBUFQ_ENTRIES 32
 #define NUM_SBUFQ_ENTRIES      64
 #define QL_SMALL_BUFFER_SIZE    32
 #define QL_ADDR_ELE_PER_BUFQ_ENTRY \
index c62e85d89f4173e78d0a4c9227463d865800f0a4..7bee45b42a2cd5cad395695d9b30b5e52824cc65 100644 (file)
@@ -336,13 +336,27 @@ static int __init lance_probe( struct net_device *dev)
 
        /* XXX - leak? */
        MEM = dvma_malloc_align(sizeof(struct lance_memory), 0x10000);
+       if (MEM == NULL) {
+#ifdef CONFIG_SUN3
+               iounmap((void __iomem *)ioaddr);
+#endif
+               printk(KERN_WARNING "SUN3 Lance couldn't allocate DVMA memory\n");
+               return 0;
+       }
 
        lp->iobase = (volatile unsigned short *)ioaddr;
        dev->base_addr = (unsigned long)ioaddr; /* informational only */
 
        REGA(CSR0) = CSR0_STOP;
 
-       request_irq(LANCE_IRQ, lance_interrupt, IRQF_DISABLED, "SUN3 Lance", dev);
+       if (request_irq(LANCE_IRQ, lance_interrupt, IRQF_DISABLED, "SUN3 Lance", dev) < 0) {
+#ifdef CONFIG_SUN3
+               iounmap((void __iomem *)ioaddr);
+#endif
+               dvma_free((void *)MEM);
+               printk(KERN_WARNING "SUN3 Lance unable to allocate IRQ\n");
+               return 0;
+       }
        dev->irq = (unsigned short)LANCE_IRQ;
 
 
index cae89258a64071df728c8f0f1878ad92348f593d..d1e89be965cd52a70af9b31deb77927e00edb064 100644 (file)
@@ -757,7 +757,7 @@ static void bcm43xx_phy_initb5(struct bcm43xx_private *bcm)
        if (radio->version == 0x2050)
                bcm43xx_phy_write(bcm, 0x0038, 0x0667);
 
-       if (phy->type == BCM43xx_PHYTYPE_G) {
+       if (phy->connected) {
                if (radio->version == 0x2050) {
                        bcm43xx_radio_write16(bcm, 0x007A,
                                              bcm43xx_radio_read16(bcm, 0x007A)
@@ -1192,7 +1192,7 @@ static void bcm43xx_phy_initg(struct bcm43xx_private *bcm)
                bcm43xx_phy_write(bcm, 0x0811, 0x0400);
                bcm43xx_phy_write(bcm, 0x0015, 0x00C0);
        }
-       if (phy->connected) {
+       if (phy->rev >= 2 && phy->connected) {
                tmp = bcm43xx_phy_read(bcm, 0x0400) & 0xFF;
                if (tmp < 6) {
                        bcm43xx_phy_write(bcm, 0x04C2, 0x1816);
index ee1e7a2afc08ee78c63b281c0b2ff50e1e0dcb17..4025dd0089d2dad6041bf096f75ff14acdd92b50 100644 (file)
@@ -458,7 +458,7 @@ static void bcm43xx_calc_nrssi_offset(struct bcm43xx_private *bcm)
                bcm43xx_phy_write(bcm, 0x005A, 0x0480);
                bcm43xx_phy_write(bcm, 0x0059, 0x0810);
                bcm43xx_phy_write(bcm, 0x0058, 0x000D);
-               if (phy->rev == 0) {
+               if (phy->analog == 0) {
                        bcm43xx_phy_write(bcm, 0x0003, 0x0122);
                } else {
                        bcm43xx_phy_write(bcm, 0x000A,
@@ -570,9 +570,9 @@ void bcm43xx_calc_nrssi_slope(struct bcm43xx_private *bcm)
                nrssi0 = (s16)bcm43xx_phy_read(bcm, 0x0027);
                bcm43xx_radio_write16(bcm, 0x007A,
                                      bcm43xx_radio_read16(bcm, 0x007A) & 0x007F);
-               if (phy->rev >= 2) {
+               if (phy->analog >= 2) {
                        bcm43xx_write16(bcm, 0x03E6, 0x0040);
-               } else if (phy->rev == 0) {
+               } else if (phy->analog == 0) {
                        bcm43xx_write16(bcm, 0x03E6, 0x0122);
                } else {
                        bcm43xx_write16(bcm, BCM43xx_MMIO_CHANNEL_EXT,
@@ -596,7 +596,7 @@ void bcm43xx_calc_nrssi_slope(struct bcm43xx_private *bcm)
                bcm43xx_phy_write(bcm, 0x0015, backup[5]);
                bcm43xx_phy_write(bcm, 0x002A, backup[6]);
                bcm43xx_synth_pu_workaround(bcm, radio->channel);
-               if (phy->rev != 0)
+               if (phy->analog != 0)
                        bcm43xx_write16(bcm, 0x03F4, backup[13]);
 
                bcm43xx_phy_write(bcm, 0x0020, backup[7]);
@@ -692,7 +692,7 @@ void bcm43xx_calc_nrssi_slope(struct bcm43xx_private *bcm)
 
                bcm43xx_radio_write16(bcm, 0x007A,
                                      bcm43xx_radio_read16(bcm, 0x007A) & 0x007F);
-               if (phy->rev >= 2) {
+               if (phy->analog >= 2) {
                        bcm43xx_phy_write(bcm, 0x0003,
                                          (bcm43xx_phy_read(bcm, 0x0003)
                                           & 0xFF9F) | 0x0040);
@@ -1579,7 +1579,7 @@ void bcm43xx_radio_set_tx_iq(struct bcm43xx_private *bcm)
        
        for (i = 0; i < 5; i++) {
                for (j = 0; j < 5; j++) {
-                       if (tmp == (data_high[i] << 4 | data_low[j])) {
+                       if (tmp == (data_high[i] | data_low[j])) {
                                bcm43xx_phy_write(bcm, 0x0069, (i - j) << 8 | 0x00C0);
                                return;
                        }
index 00e937e9240e5b9196de3a6faf08b925842595e6..e7fbac5299354e485c4a4d98774ba4fc0ae7424c 100644 (file)
@@ -70,11 +70,12 @@ void wake_up_buffer_waiter(void)
 int alloc_event_buffer(void)
 {
        int err = -ENOMEM;
+       unsigned long flags;
 
-       spin_lock(&oprofilefs_lock);
+       spin_lock_irqsave(&oprofilefs_lock, flags);
        buffer_size = fs_buffer_size;
        buffer_watershed = fs_buffer_watershed;
-       spin_unlock(&oprofilefs_lock);
+       spin_unlock_irqrestore(&oprofilefs_lock, flags);
  
        if (buffer_watershed >= buffer_size)
                return -EINVAL;
index 6e67b42ca46d49f008eeccfe821c51bd98f6d4b7..8543cb26cf34b8d8b861cb7cafd3388b5cf6a6f3 100644 (file)
@@ -65,6 +65,7 @@ ssize_t oprofilefs_ulong_to_user(unsigned long val, char __user * buf, size_t co
 int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, size_t count)
 {
        char tmpbuf[TMPBUFSIZE];
+       unsigned long flags;
 
        if (!count)
                return 0;
@@ -77,9 +78,9 @@ int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, siz
        if (copy_from_user(tmpbuf, buf, count))
                return -EFAULT;
 
-       spin_lock(&oprofilefs_lock);
+       spin_lock_irqsave(&oprofilefs_lock, flags);
        *val = simple_strtoul(tmpbuf, NULL, 0);
-       spin_unlock(&oprofilefs_lock);
+       spin_unlock_irqrestore(&oprofilefs_lock, flags);
        return 0;
 }
 
index 551bde5d943041c55f364f49cb4151aba30076ed..b693367d38cdbb3d907e14b1dd8275fed044ffe3 100644 (file)
@@ -372,7 +372,7 @@ int au1x00_pcmcia_socket_probe(struct device *dev, struct pcmcia_low_level *ops,
                skt->socket.resource_ops = &pccard_static_ops;
                skt->socket.ops = &au1x00_pcmcia_operations;
                skt->socket.owner = ops->owner;
-               skt->socket.dev.dev = dev;
+               skt->socket.dev.parent = dev;
 
                init_timer(&skt->poll_timer);
                skt->poll_timer.function = au1x00_pcmcia_poll_event;
index 8c81cec852982cf1a116991e42cd22ec07360d00..60446b88f7213c5f494dff47ae87296c4c23903a 100644 (file)
@@ -3091,6 +3091,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b)
             cmdp->u.raw64.direction  = 
                 gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN;
             memcpy(cmdp->u.raw64.cmd,scp->cmnd,16);
+            cmdp->u.raw64.sg_ranz    = 0;
         } else {
             cmdp->u.raw.reserved   = 0;
             cmdp->u.raw.mdisc_time = 0;
@@ -3107,6 +3108,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b)
             cmdp->u.raw.direction  = 
                 gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN;
             memcpy(cmdp->u.raw.cmd,scp->cmnd,12);
+            cmdp->u.raw.sg_ranz    = 0;
         }
 
         if (scp->use_sg) {
index 9d014e5a81c4ca438dce73dfde3d295acdbf166d..057fd7e0e379ae8a385d4f9e28c5ddf7c55a0c38 100644 (file)
@@ -1817,10 +1817,9 @@ static pci_ers_result_t lpfc_io_error_detected(struct pci_dev *pdev,
        struct lpfc_sli *psli = &phba->sli;
        struct lpfc_sli_ring  *pring;
 
-       if (state == pci_channel_io_perm_failure) {
-               lpfc_pci_remove_one(pdev);
+       if (state == pci_channel_io_perm_failure)
                return PCI_ERS_RESULT_DISCONNECT;
-       }
+
        pci_disable_device(pdev);
        /*
         * There may be I/Os dropped by the firmware.
index 2328128728be696986f8342afa9f0b8c2cfc3e0b..6657331eed9360b6323267261a9e7d080965a2e7 100644 (file)
@@ -189,8 +189,8 @@ static DECLARE_MUTEX(board_lock);
  * this is exported so that for example a USB or parport based adapter
  * driver could add devices (which it would learn about out-of-band).
  */
-struct spi_device *__init_or_module
-spi_new_device(struct spi_master *master, struct spi_board_info *chip)
+struct spi_device *spi_new_device(struct spi_master *master,
+                                 struct spi_board_info *chip)
 {
        struct spi_device       *proxy;
        struct device           *dev = master->cdev.dev;
@@ -352,8 +352,7 @@ static struct class spi_master_class = {
  * the master's methods before calling spi_register_master(); and (after errors
  * adding the device) calling spi_master_put() to prevent a memory leak.
  */
-struct spi_master * __init_or_module
-spi_alloc_master(struct device *dev, unsigned size)
+struct spi_master *spi_alloc_master(struct device *dev, unsigned size)
 {
        struct spi_master       *master;
 
@@ -392,8 +391,7 @@ EXPORT_SYMBOL_GPL(spi_alloc_master);
  * After a successful return, the caller is responsible for calling
  * spi_unregister_master().
  */
-int __init_or_module
-spi_register_master(struct spi_master *master)
+int spi_register_master(struct spi_master *master)
 {
        static atomic_t         dyn_bus_id = ATOMIC_INIT((1<<16) - 1);
        struct device           *dev = master->cdev.dev;
index 0b4ee0a5c83e809f07ca6a0a049e9521226782c0..e4598d6d49ddea9311b73d716c1f92d91118b6ac 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -136,7 +136,6 @@ static int aio_setup_ring(struct kioctx *ctx)
                                  0);
        if (IS_ERR((void *)info->mmap_base)) {
                up_write(&ctx->mm->mmap_sem);
-               printk("mmap err: %ld\n", -info->mmap_base);
                info->mmap_size = 0;
                aio_free_ring(ctx);
                return -EAGAIN;
index c81c958b3e1d00c4ad22909b43d1d084961aadd3..8b1c5d8bf4effc57a2d54e40e54bea5081f9f18d 100644 (file)
@@ -2553,11 +2553,15 @@ HANDLE_IOCTL(I2C_RDWR, do_i2c_rdwr_ioctl)
 HANDLE_IOCTL(I2C_SMBUS, do_i2c_smbus_ioctl)
 /* wireless */
 HANDLE_IOCTL(SIOCGIWRANGE, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCGIWPRIV, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCGIWSTATS, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCSIWSPY, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCGIWSPY, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCSIWTHRSPY, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCGIWTHRSPY, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCSIWMLME, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCGIWAPLIST, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCSIWSCAN, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCGIWSCAN, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCSIWESSID, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCGIWESSID, do_wireless_ioctl)
@@ -2565,6 +2569,11 @@ HANDLE_IOCTL(SIOCSIWNICKN, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCGIWNICKN, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCSIWENCODE, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCGIWENCODE, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCSIWGENIE, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCGIWGENIE, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCSIWENCODEEXT, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCGIWENCODEEXT, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCSIWPMKSA, do_wireless_ioctl)
 HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl)
 HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl)
 HANDLE_IOCTL(RTC_IRQP_READ32, rtc_ioctl)
index 6f677988c71d74c60edcda3002233ffba9d807ed..7e4bb0af24d7d48d70a61feae9e5930efbde3e59 100644 (file)
@@ -859,8 +859,8 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp,
 #define NFS3_ENTRY_BAGGAGE     (2 + 1 + 2 + 1)
 #define NFS3_ENTRYPLUS_BAGGAGE (1 + 21 + 1 + (NFS3_FHSIZE >> 2))
 static int
-encode_entry(struct readdir_cd *ccd, const char *name,
-            int namlen, off_t offset, ino_t ino, unsigned int d_type, int plus)
+encode_entry(struct readdir_cd *ccd, const char *name, int namlen,
+            loff_t offset, ino_t ino, unsigned int d_type, int plus)
 {
        struct nfsd3_readdirres *cd = container_of(ccd, struct nfsd3_readdirres,
                                                        common);
@@ -880,7 +880,7 @@ encode_entry(struct readdir_cd *ccd, const char *name,
                        *cd->offset1 = htonl(offset64 & 0xffffffff);
                        cd->offset1 = NULL;
                } else {
-                       xdr_encode_hyper(cd->offset, (u64) offset);
+                       xdr_encode_hyper(cd->offset, offset64);
                }
        }
 
index 832673b14587da06496a34b35e8a4046439bc502..673a53c014a3f4d3ad81c7a7bb9b22730b9b6bf9 100644 (file)
@@ -228,7 +228,7 @@ _posix_to_nfsv4_one(struct posix_acl *pacl, struct nfs4_acl *acl,
        struct posix_acl_summary pas;
        unsigned short deny;
        int eflag = ((flags & NFS4_ACL_TYPE_DEFAULT) ?
-                                       NFS4_INHERITANCE_FLAGS : 0);
+               NFS4_INHERITANCE_FLAGS | NFS4_ACE_INHERIT_ONLY_ACE : 0);
 
        BUG_ON(pacl->a_count < 3);
        summarize_posix_acl(pacl, &pas);
index 9e4067999209e4bd847f334ab121f1b2bd4deef5..af360705e551afc5f9bf9954db7a2790aebca6cc 100644 (file)
@@ -750,9 +750,8 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
                status = nfserr_clid_inuse;
                if (!cmp_creds(&conf->cl_cred, &rqstp->rq_cred)
                                || conf->cl_addr != sin->sin_addr.s_addr) {
-                       printk("NFSD: setclientid: string in use by client"
-                       "(clientid %08x/%08x)\n",
-                       conf->cl_clientid.cl_boot, conf->cl_clientid.cl_id);
+                       dprintk("NFSD: setclientid: string in use by client"
+                               "at %u.%u.%u.%u\n", NIPQUAD(conf->cl_addr));
                        goto out;
                }
        }
@@ -3261,7 +3260,6 @@ __nfs4_state_shutdown(void)
                unhash_delegation(dp);
        }
 
-       cancel_delayed_work(&laundromat_work);
        nfsd4_shutdown_recdir();
        nfs4_init = 0;
 }
index a6b3a8f878f0e2eb2aef668b7a3cec03c4402f5a..bce38e3f06cbcf346d83335db673985df88f85f0 100644 (file)
@@ -8,8 +8,9 @@ proc-y                  := nommu.o task_nommu.o
 proc-$(CONFIG_MMU)     := mmu.o task_mmu.o
 
 proc-y       += inode.o root.o base.o generic.o array.o \
-               proc_tty.o proc_misc.o proc_sysctl.o
+               proc_tty.o proc_misc.o
 
+proc-$(CONFIG_PROC_SYSCTL)     += proc_sysctl.o
 proc-$(CONFIG_PROC_KCORE)      += kcore.o
 proc-$(CONFIG_PROC_VMCORE)     += vmcore.o
 proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o
index 2fca6ebf4cc2d17ceb05ccb6cbe7f93ab3571a87..07f6556add0a9cf6e92494086abff1fd52e4379c 100644 (file)
@@ -576,76 +576,21 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
        if (this_len + offset > PAGE_CACHE_SIZE)
                this_len = PAGE_CACHE_SIZE - offset;
 
-       /*
-        * Reuse buf page, if SPLICE_F_MOVE is set and we are doing a full
-        * page.
-        */
-       if ((sd->flags & SPLICE_F_MOVE) && this_len == PAGE_CACHE_SIZE) {
-               /*
-                * If steal succeeds, buf->page is now pruned from the
-                * pagecache and we can reuse it. The page will also be
-                * locked on successful return.
-                */
-               if (buf->ops->steal(pipe, buf))
-                       goto find_page;
-
-               page = buf->page;
-               if (add_to_page_cache(page, mapping, index, GFP_KERNEL)) {
-                       unlock_page(page);
-                       goto find_page;
-               }
-
-               page_cache_get(page);
-
-               if (!(buf->flags & PIPE_BUF_FLAG_LRU))
-                       lru_cache_add(page);
-       } else {
 find_page:
-               page = find_lock_page(mapping, index);
-               if (!page) {
-                       ret = -ENOMEM;
-                       page = page_cache_alloc_cold(mapping);
-                       if (unlikely(!page))
-                               goto out_ret;
-
-                       /*
-                        * This will also lock the page
-                        */
-                       ret = add_to_page_cache_lru(page, mapping, index,
-                                                   GFP_KERNEL);
-                       if (unlikely(ret))
-                               goto out;
-               }
+       page = find_lock_page(mapping, index);
+       if (!page) {
+               ret = -ENOMEM;
+               page = page_cache_alloc_cold(mapping);
+               if (unlikely(!page))
+                       goto out_ret;
 
                /*
-                * We get here with the page locked. If the page is also
-                * uptodate, we don't need to do more. If it isn't, we
-                * may need to bring it in if we are not going to overwrite
-                * the full page.
+                * This will also lock the page
                 */
-               if (!PageUptodate(page)) {
-                       if (this_len < PAGE_CACHE_SIZE) {
-                               ret = mapping->a_ops->readpage(file, page);
-                               if (unlikely(ret))
-                                       goto out;
-
-                               lock_page(page);
-
-                               if (!PageUptodate(page)) {
-                                       /*
-                                        * Page got invalidated, repeat.
-                                        */
-                                       if (!page->mapping) {
-                                               unlock_page(page);
-                                               page_cache_release(page);
-                                               goto find_page;
-                                       }
-                                       ret = -EIO;
-                                       goto out;
-                               }
-                       } else
-                               SetPageUptodate(page);
-               }
+               ret = add_to_page_cache_lru(page, mapping, index,
+                                           GFP_KERNEL);
+               if (unlikely(ret))
+                       goto out;
        }
 
        ret = mapping->a_ops->prepare_write(file, page, offset, offset+this_len);
@@ -706,9 +651,9 @@ out_ret:
  * key here is the 'actor' worker passed in that actually moves the data
  * to the wanted destination. See pipe_to_file/pipe_to_sendpage above.
  */
-static ssize_t __splice_from_pipe(struct pipe_inode_info *pipe,
-                                 struct file *out, loff_t *ppos, size_t len,
-                                 unsigned int flags, splice_actor *actor)
+ssize_t __splice_from_pipe(struct pipe_inode_info *pipe,
+                          struct file *out, loff_t *ppos, size_t len,
+                          unsigned int flags, splice_actor *actor)
 {
        int ret, do_wakeup, err;
        struct splice_desc sd;
@@ -802,6 +747,7 @@ static ssize_t __splice_from_pipe(struct pipe_inode_info *pipe,
 
        return ret;
 }
+EXPORT_SYMBOL(__splice_from_pipe);
 
 ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out,
                         loff_t *ppos, size_t len, unsigned int flags,
index 12baf1d6343ff7be1c6155cff33f650658f666bc..2e6237693814e8d6d50e738b38b3ff36579cc80d 100644 (file)
@@ -144,7 +144,7 @@ struct ktermios {
 #define  B3000000 0010015
 #define  B3500000 0010016
 #define  B4000000 0010017
-#define CIBAUD   002003600000  /* input baud rate (not used) */
+#define CIBAUD   002003600000
 #define CMSPAR   010000000000          /* mark or space (stick) parity */
 #define CRTSCTS          020000000000          /* flow control */
 
index f35134c159dd103aec724d75d61be8f923fda357..53ca5643d9c7efb4011da663fc357a0aa7e6e317 100644 (file)
@@ -10,9 +10,9 @@
  *
  */
 
-#define HP680_BTN_IRQ          IRQ0_IRQ
-#define HP680_TS_IRQ           IRQ3_IRQ
-#define HP680_HD64461_IRQ      IRQ4_IRQ
+#define HP680_BTN_IRQ          32            /* IRQ0_IRQ */
+#define HP680_TS_IRQ           35            /* IRQ3_IRQ */
+#define HP680_HD64461_IRQ      36            /* IRQ4_IRQ */
 
 #define DAC_LCD_BRIGHTNESS     0
 #define DAC_SPEAKER_VOLUME     1
index b1e42e7f998b5639a41f57281a35d1d89c7c1ab6..4a6a19f4f8a47f291c92fd36ba36aeb8aa400c31 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <linux/irqflags.h>
+#include <linux/compiler.h>
 #include <asm/types.h>
 
 /*
index f0454516dd318d2b30bd86988f900dd72c66adab..b16222b428218206e2e04e1dad1a2cf99ec12610 100644 (file)
@@ -15,6 +15,7 @@
   PROVIDE (_unprotected_end = .);
 
   . = ALIGN(4096);
+  .note : { *(note.*) }
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
   __stop___ex_table = .;
index 84cfa8bbdc3698fc3a1fdb998d8c606e4d6e9ced..d2a96cbf4f0eeac7b9d01ae11a7553a3be4f0d92 100644 (file)
 /* 
  * On x86-64 make the 64bit structure have the same alignment as the
  * 32bit structure. This makes 32bit emulation easier.
+ *
+ * UML/x86_64 needs the same packing as x86_64 - UML + UML_X86 +
+ * 64_BIT adds up to UML/x86_64.
  */
 #ifdef __x86_64__
 #define EPOLL_PACKED __attribute__((packed))
 #else
+#if defined(CONFIG_UML) && defined(CONFIG_UML_X86) && defined(CONFIG_64BIT)
+#define EPOLL_PACKED __attribute__((packed))
+#else
 #define EPOLL_PACKED
 #endif
+#endif
 
 struct epoll_event {
        __u32 events;
index 636094c29b167e185168d10882fd2c497903d166..6da6772c19ff77254df762d50058574a663f822f 100644 (file)
@@ -92,19 +92,16 @@ extern struct ipc_namespace init_ipc_ns;
 
 #ifdef CONFIG_SYSVIPC
 #define INIT_IPC_NS(ns)                .ns             = &init_ipc_ns,
+extern int copy_ipcs(unsigned long flags, struct task_struct *tsk);
 #else
 #define INIT_IPC_NS(ns)
+static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk)
+{ return 0; }
 #endif
 
 #ifdef CONFIG_IPC_NS
 extern void free_ipc_ns(struct kref *kref);
-extern int copy_ipcs(unsigned long flags, struct task_struct *tsk);
 extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns);
-#else
-static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk)
-{
-       return 0;
-}
 #endif
 
 static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
index 2e19478e9e84f90e93a6445b53aed3ca78656fa5..8bcbc54e1b488213fceff419d0d364cc74b61c43 100644 (file)
@@ -99,4 +99,8 @@ extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *,
                                loff_t *, size_t, unsigned int,
                                splice_actor *);
 
+extern ssize_t __splice_from_pipe(struct pipe_inode_info *, struct file *,
+                                 loff_t *, size_t, unsigned int,
+                                 splice_actor *);
+
 #endif
index a4555fe3754cdb639775d5152307692d186a1151..e10267d402c5b982d46869d1c4f49345081b7f5c 100644 (file)
@@ -70,6 +70,8 @@ static inline int unshare_utsname(unsigned long unshare_flags,
 
 static inline int copy_utsname(int flags, struct task_struct *tsk)
 {
+       if (flags & CLONE_NEWUTS)
+               return -EINVAL;
        return 0;
 }
 static inline void put_uts_ns(struct uts_namespace *ns)
index 447c52beb69127c36df67e0a3b4027f8074d32f0..48759b2f57d7c795057ddec2642a3377b041d400 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file define a set of standard wireless extensions
  *
- * Version :   21      14.3.06
+ * Version :   22      16.3.07
  *
  * Authors :   Jean Tourrilhes - HPL - <jt@hpl.hp.com>
- * Copyright (c) 1997-2006 Jean Tourrilhes, All Rights Reserved.
+ * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.
  */
 
 #ifndef _LINUX_WIRELESS_H
@@ -85,7 +85,7 @@
  * (there is some stuff that will be added in the future...)
  * I just plan to increment with each new version.
  */
-#define WIRELESS_EXT   21
+#define WIRELESS_EXT   22
 
 /*
  * Changes :
  *     - Add IW_RETRY_SHORT/IW_RETRY_LONG retry modifiers
  *     - Power/Retry relative values no longer * 100000
  *     - Add explicit flag to tell stats are in 802.11k RCPI : IW_QUAL_RCPI
+ *
+ * V21 to V22
+ * ----------
+ *     - Prevent leaking of kernel space in stream on 64 bits.
  */
 
 /**************************** CONSTANTS ****************************/
@@ -1085,4 +1089,15 @@ struct iw_event
 #define IW_EV_POINT_LEN        (IW_EV_LCP_LEN + sizeof(struct iw_point) - \
                         IW_EV_POINT_OFF)
 
+/* Size of the Event prefix when packed in stream */
+#define IW_EV_LCP_PK_LEN       (4)
+/* Size of the various events when packed in stream */
+#define IW_EV_CHAR_PK_LEN      (IW_EV_LCP_PK_LEN + IFNAMSIZ)
+#define IW_EV_UINT_PK_LEN      (IW_EV_LCP_PK_LEN + sizeof(__u32))
+#define IW_EV_FREQ_PK_LEN      (IW_EV_LCP_PK_LEN + sizeof(struct iw_freq))
+#define IW_EV_PARAM_PK_LEN     (IW_EV_LCP_PK_LEN + sizeof(struct iw_param))
+#define IW_EV_ADDR_PK_LEN      (IW_EV_LCP_PK_LEN + sizeof(struct sockaddr))
+#define IW_EV_QUAL_PK_LEN      (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality))
+#define IW_EV_POINT_PK_LEN     (IW_EV_LCP_LEN + 4)
+
 #endif /* _LINUX_WIRELESS_H */
index 83fe2e3d1e25a43d1c3fefcab1255baf1194ea30..50e33b0e934984c543651bf4cb1fd8b3af550c87 100644 (file)
@@ -239,7 +239,8 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits);
 #define SAA7146_HPS_SYNC_PORT_B                0x01
 
 /* some memory sizes */
-#define SAA7146_CLIPPING_MEM   (14*PAGE_SIZE)
+/* max. 16 clipping rectangles */
+#define SAA7146_CLIPPING_MEM   (16 * 4 * sizeof(u32))
 
 /* some defines for the various clipping-modes */
 #define SAA7146_CLIPPING_RECT          0x4
index 10559e937d27b6815193dc385dfe938afd522815..8a830188354d072f9b7a1d86ed1e73fd2f842de4 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file define the new driver API for Wireless Extensions
  *
- * Version :   7       18.3.05
+ * Version :   8       16.3.07
  *
  * Authors :   Jean Tourrilhes - HPL - <jt@hpl.hp.com>
- * Copyright (c) 2001-2006 Jean Tourrilhes, All Rights Reserved.
+ * Copyright (c) 2001-2007 Jean Tourrilhes, All Rights Reserved.
  */
 
 #ifndef _IW_HANDLER_H
  * will be needed...
  * I just plan to increment with each new version.
  */
-#define IW_HANDLER_VERSION     7
+#define IW_HANDLER_VERSION     8
 
 /*
  * Changes :
  *     - Remove (struct iw_point *)->pointer from events and streams
  *     - Remove spy_offset from struct iw_handler_def
  *     - Add "check" version of event macros for ieee802.11 stack
+ *
+ * V7 to V8
+ * ----------
+ *     - Prevent leaking of kernel space in stream on 64 bits.
  */
 
 /**************************** CONSTANTS ****************************/
@@ -500,7 +504,11 @@ iwe_stream_add_event(char *        stream,         /* Stream of events */
        /* Check if it's possible */
        if(likely((stream + event_len) < ends)) {
                iwe->len = event_len;
-               memcpy(stream, (char *) iwe, event_len);
+               /* Beware of alignement issues on 64 bits */
+               memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN);
+               memcpy(stream + IW_EV_LCP_LEN,
+                      ((char *) iwe) + IW_EV_LCP_LEN,
+                      event_len - IW_EV_LCP_LEN);
                stream += event_len;
        }
        return stream;
@@ -521,10 +529,10 @@ iwe_stream_add_point(char *       stream,         /* Stream of events */
        /* Check if it's possible */
        if(likely((stream + event_len) < ends)) {
                iwe->len = event_len;
-               memcpy(stream, (char *) iwe, IW_EV_LCP_LEN);
+               memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN);
                memcpy(stream + IW_EV_LCP_LEN,
                       ((char *) iwe) + IW_EV_LCP_LEN + IW_EV_POINT_OFF,
-                      IW_EV_POINT_LEN - IW_EV_LCP_LEN);
+                      IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN);
                memcpy(stream + IW_EV_POINT_LEN, extra, iwe->u.data.length);
                stream += event_len;
        }
@@ -574,7 +582,11 @@ iwe_stream_check_add_event(char *  stream,         /* Stream of events */
        /* Check if it's possible, set error if not */
        if(likely((stream + event_len) < ends)) {
                iwe->len = event_len;
-               memcpy(stream, (char *) iwe, event_len);
+               /* Beware of alignement issues on 64 bits */
+               memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN);
+               memcpy(stream + IW_EV_LCP_LEN,
+                      ((char *) iwe) + IW_EV_LCP_LEN,
+                      event_len - IW_EV_LCP_LEN);
                stream += event_len;
        } else
                *perr = -E2BIG;
@@ -598,10 +610,10 @@ iwe_stream_check_add_point(char * stream,         /* Stream of events */
        /* Check if it's possible */
        if(likely((stream + event_len) < ends)) {
                iwe->len = event_len;
-               memcpy(stream, (char *) iwe, IW_EV_LCP_LEN);
+               memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN);
                memcpy(stream + IW_EV_LCP_LEN,
                       ((char *) iwe) + IW_EV_LCP_LEN + IW_EV_POINT_OFF,
-                      IW_EV_POINT_LEN - IW_EV_LCP_LEN);
+                      IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN);
                memcpy(stream + IW_EV_POINT_LEN, extra, iwe->u.data.length);
                stream += event_len;
        } else
index 08a647965b9e9c360ce0e182b53e294d347d2578..0b652387d169a6b6af1609071bfb3aa2e8a6b954 100644 (file)
@@ -144,6 +144,13 @@ void free_ipc_ns(struct kref *kref)
        shm_exit_ns(ns);
        kfree(ns);
 }
+#else
+int copy_ipcs(unsigned long flags, struct task_struct *tsk)
+{
+       if (flags & CLONE_NEWIPC)
+               return -EINVAL;
+       return 0;
+}
 #endif
 
 /**
index 6a7938a0d513c2695563a2801eaf6941d1b65128..067ba2c0532805f8e9e3e753eba456d6a7cbf1b9 100644 (file)
@@ -814,7 +814,12 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode)
 
        timer_stats_hrtimer_set_start_info(timer);
 
-       enqueue_hrtimer(timer, new_base, base == new_base);
+       /*
+        * Only allow reprogramming if the new base is on this CPU.
+        * (it might still be on another CPU if the timer was pending)
+        */
+       enqueue_hrtimer(timer, new_base,
+                       new_base->cpu_base == &__get_cpu_var(hrtimer_bases));
 
        unlock_hrtimer_base(timer, &flags);
 
index dee0ff40befd961bf4116472fe39b99cac65c83f..aec19b063e3fb1a9c08ad9fa35470831bfe01172 100644 (file)
@@ -58,7 +58,6 @@ static inline int platform_prepare(void)
 
 static void power_down(suspend_disk_method_t mode)
 {
-       disable_nonboot_cpus();
        switch(mode) {
        case PM_DISK_PLATFORM:
                if (pm_ops && pm_ops->enter) {
index bf211fee122279b98598692e8f076522e314ccfd..7cf6713b23252349dfab447b32336b85909f9c40 100644 (file)
@@ -401,10 +401,9 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
 
                case PMOPS_ENTER:
                        if (data->platform_suspend) {
-                               disable_nonboot_cpus();
                                kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
                                error = pm_ops->enter(PM_SUSPEND_DISK);
-                               enable_nonboot_cpus();
+                               error = 0;
                        }
                        break;
 
index eb12509e00bdd964fb2ed552aa8402a703f363ae..cb25649c6f505acaeb19cb28ec5c3464cf3027bf 100644 (file)
@@ -32,7 +32,7 @@ static u64 tick_length, tick_length_base;
 /* TIME_ERROR prevents overwriting the CMOS clock */
 static int time_state = TIME_OK;       /* clock synchronization status */
 int time_status = STA_UNSYNC;          /* clock status bits            */
-static long time_offset;               /* time adjustment (ns)         */
+static s64 time_offset;                /* time adjustment (ns)         */
 static long time_constant = 2;         /* pll time constant            */
 long time_maxerror = NTP_PHASE_LIMIT;  /* maximum error (us)           */
 long time_esterror = NTP_PHASE_LIMIT;  /* estimated error (us)         */
@@ -196,7 +196,7 @@ void __attribute__ ((weak)) notify_arch_cmos_timer(void)
  */
 int do_adjtimex(struct timex *txc)
 {
-       long ltemp, mtemp, save_adjust;
+       long mtemp, save_adjust, rem;
        s64 freq_adj, temp64;
        int result;
 
@@ -277,14 +277,14 @@ int do_adjtimex(struct timex *txc)
                    time_adjust = txc->offset;
                }
                else if (time_status & STA_PLL) {
-                   ltemp = txc->offset * NSEC_PER_USEC;
+                   time_offset = txc->offset * NSEC_PER_USEC;
 
                    /*
                     * Scale the phase adjustment and
                     * clamp to the operating range.
                     */
-                   time_offset = min(ltemp, MAXPHASE * NSEC_PER_USEC);
-                   time_offset = max(time_offset, -MAXPHASE * NSEC_PER_USEC);
+                   time_offset = min(time_offset, (s64)MAXPHASE * NSEC_PER_USEC);
+                   time_offset = max(time_offset, (s64)-MAXPHASE * NSEC_PER_USEC);
 
                    /*
                     * Select whether the frequency is to be controlled
@@ -297,11 +297,11 @@ int do_adjtimex(struct timex *txc)
                    mtemp = xtime.tv_sec - time_reftime;
                    time_reftime = xtime.tv_sec;
 
-                   freq_adj = (s64)time_offset * mtemp;
+                   freq_adj = time_offset * mtemp;
                    freq_adj = shift_right(freq_adj, time_constant * 2 +
                                           (SHIFT_PLL + 2) * 2 - SHIFT_NSEC);
                    if (mtemp >= MINSEC && (time_status & STA_FLL || mtemp > MAXSEC)) {
-                       temp64 = (s64)time_offset << (SHIFT_NSEC - SHIFT_FLL);
+                       temp64 = time_offset << (SHIFT_NSEC - SHIFT_FLL);
                        if (time_offset < 0) {
                            temp64 = -temp64;
                            do_div(temp64, mtemp);
@@ -314,8 +314,10 @@ int do_adjtimex(struct timex *txc)
                    freq_adj += time_freq;
                    freq_adj = min(freq_adj, (s64)MAXFREQ_NSEC);
                    time_freq = max(freq_adj, (s64)-MAXFREQ_NSEC);
-                   time_offset = (time_offset / NTP_INTERVAL_FREQ)
-                                       << SHIFT_UPDATE;
+                   time_offset = div_long_long_rem_signed(time_offset,
+                                                          NTP_INTERVAL_FREQ,
+                                                          &rem);
+                   time_offset <<= SHIFT_UPDATE;
                } /* STA_PLL */
            } /* txc->modes & ADJ_OFFSET */
            if (txc->modes & ADJ_TICK)
@@ -328,12 +330,12 @@ leave:    if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0)
                result = TIME_ERROR;
 
        if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT)
-           txc->offset    = save_adjust;
+               txc->offset = save_adjust;
        else
-           txc->offset    = shift_right(time_offset, SHIFT_UPDATE)
-                               NTP_INTERVAL_FREQ / 1000;
-       txc->freq          = (time_freq / NSEC_PER_USEC)
-                               << (SHIFT_USEC - SHIFT_NSEC);
+               txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) *
+                               NTP_INTERVAL_FREQ / 1000;
+       txc->freq          = (time_freq / NSEC_PER_USEC) <<
+                               (SHIFT_USEC - SHIFT_NSEC);
        txc->maxerror      = time_maxerror;
        txc->esterror      = time_esterror;
        txc->status        = time_status;
index 643efbe82402e2d8e1e530521e67e345896bdc26..ad401fc574400c50fbbf7ea80ff3e4454adfae7a 100644 (file)
@@ -204,7 +204,7 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig,
                /*
                 * is destination page below bounce pfn?
                 */
-               if (page_to_pfn(page) < q->bounce_pfn)
+               if (page_to_pfn(page) <= q->bounce_pfn)
                        continue;
 
                /*
index 6055074c4b81eb83ee2be5ea7cce4228185e825f..33ea8eac7fe00450d0a775a2e29918ec9260925f 100644 (file)
@@ -621,7 +621,8 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
                if (err < 0)
                        goto errout;
 
-               iw += IW_EV_POINT_OFF;
+               /* Payload is at an offset in buffer */
+               iw = iw_buf + IW_EV_POINT_OFF;
        }
 #endif /* CONFIG_NET_WIRELESS_RTNETLINK */
 
index 9936ab11e6e01e1158eb0b2c2e9ec1e148c0843a..b07fe270a5083524a4705f93486e3e94466dd7dc 100644 (file)
@@ -2,7 +2,7 @@
  * This file implement the Wireless Extensions APIs.
  *
  * Authors :   Jean Tourrilhes - HPL - <jt@hpl.hp.com>
- * Copyright (c) 1997-2006 Jean Tourrilhes, All Rights Reserved.
+ * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.
  *
  * (As all part of the Linux kernel, this file is GPL)
  */
@@ -76,6 +76,9 @@
  *     o Change length in ESSID and NICK to strlen() instead of strlen()+1
  *     o Make standard_ioctl_num and standard_event_num unsigned
  *     o Remove (struct net_device *)->get_wireless_stats()
+ *
+ * v10 - 16.3.07 - Jean II
+ *     o Prevent leaking of kernel space in stream on 64 bits.
  */
 
 /***************************** INCLUDES *****************************/
@@ -427,6 +430,21 @@ static const int event_type_size[] = {
        IW_EV_QUAL_LEN,                 /* IW_HEADER_TYPE_QUAL */
 };
 
+/* Size (in bytes) of various events, as packed */
+static const int event_type_pk_size[] = {
+       IW_EV_LCP_PK_LEN,               /* IW_HEADER_TYPE_NULL */
+       0,
+       IW_EV_CHAR_PK_LEN,              /* IW_HEADER_TYPE_CHAR */
+       0,
+       IW_EV_UINT_PK_LEN,              /* IW_HEADER_TYPE_UINT */
+       IW_EV_FREQ_PK_LEN,              /* IW_HEADER_TYPE_FREQ */
+       IW_EV_ADDR_PK_LEN,              /* IW_HEADER_TYPE_ADDR */
+       0,
+       IW_EV_POINT_PK_LEN,             /* Without variable payload */
+       IW_EV_PARAM_PK_LEN,             /* IW_HEADER_TYPE_PARAM */
+       IW_EV_QUAL_PK_LEN,              /* IW_HEADER_TYPE_QUAL */
+};
+
 /************************ COMMON SUBROUTINES ************************/
 /*
  * Stuff that may be used in various place or doesn't fit in one
@@ -1217,7 +1235,7 @@ static int rtnetlink_standard_get(struct net_device *     dev,
                memcpy(buffer + IW_EV_POINT_OFF, request, request_len);
                /* Use our own copy of wrqu */
                wrqu = (union iwreq_data *) (buffer + IW_EV_POINT_OFF
-                                            + IW_EV_LCP_LEN);
+                                            + IW_EV_LCP_PK_LEN);
 
                /* No extra arguments. Trivial to handle */
                ret = handler(dev, &info, wrqu, NULL);
@@ -1229,8 +1247,8 @@ static int rtnetlink_standard_get(struct net_device *     dev,
 
                /* Get a temp copy of wrqu (skip pointer) */
                memcpy(((char *) &wrqu_point) + IW_EV_POINT_OFF,
-                      ((char *) request) + IW_EV_LCP_LEN,
-                      IW_EV_POINT_LEN - IW_EV_LCP_LEN);
+                      ((char *) request) + IW_EV_LCP_PK_LEN,
+                      IW_EV_POINT_LEN - IW_EV_LCP_PK_LEN);
 
                /* Calculate space needed by arguments. Always allocate
                 * for max space. Easier, and won't last long... */
@@ -1240,7 +1258,7 @@ static int rtnetlink_standard_get(struct net_device *     dev,
                   (wrqu_point.data.length > descr->max_tokens))
                        extra_size = (wrqu_point.data.length
                                      * descr->token_size);
-               buffer_size = extra_size + IW_EV_POINT_LEN + IW_EV_POINT_OFF;
+               buffer_size = extra_size + IW_EV_POINT_PK_LEN + IW_EV_POINT_OFF;
 #ifdef WE_RTNETLINK_DEBUG
                printk(KERN_DEBUG "%s (WE.r) : Malloc %d bytes (%d bytes)\n",
                       dev->name, extra_size, buffer_size);
@@ -1254,15 +1272,15 @@ static int rtnetlink_standard_get(struct net_device *   dev,
 
                /* Put wrqu in the right place (just before extra).
                 * Leave space for IWE header and dummy pointer...
-                * Note that IW_EV_LCP_LEN==4 bytes, so it's still aligned...
+                * Note that IW_EV_LCP_PK_LEN==4 bytes, so it's still aligned.
                 */
-               memcpy(buffer + IW_EV_LCP_LEN + IW_EV_POINT_OFF,
+               memcpy(buffer + IW_EV_LCP_PK_LEN + IW_EV_POINT_OFF,
                       ((char *) &wrqu_point) + IW_EV_POINT_OFF,
-                      IW_EV_POINT_LEN - IW_EV_LCP_LEN);
-               wrqu = (union iwreq_data *) (buffer + IW_EV_LCP_LEN);
+                      IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN);
+               wrqu = (union iwreq_data *) (buffer + IW_EV_LCP_PK_LEN);
 
                /* Extra comes logically after that. Offset +12 bytes. */
-               extra = buffer + IW_EV_POINT_OFF + IW_EV_POINT_LEN;
+               extra = buffer + IW_EV_POINT_OFF + IW_EV_POINT_PK_LEN;
 
                /* Call the handler */
                ret = handler(dev, &info, wrqu, extra);
@@ -1270,11 +1288,11 @@ static int rtnetlink_standard_get(struct net_device *   dev,
                /* Calculate real returned length */
                extra_size = (wrqu->data.length * descr->token_size);
                /* Re-adjust reply size */
-               request->len = extra_size + IW_EV_POINT_LEN;
+               request->len = extra_size + IW_EV_POINT_PK_LEN;
 
                /* Put the iwe header where it should, i.e. scrap the
                 * dummy pointer. */
-               memcpy(buffer + IW_EV_POINT_OFF, request, IW_EV_LCP_LEN);
+               memcpy(buffer + IW_EV_POINT_OFF, request, IW_EV_LCP_PK_LEN);
 
 #ifdef WE_RTNETLINK_DEBUG
                printk(KERN_DEBUG "%s (WE.r) : Reply 0x%04X, hdr_len %d, tokens %d, extra_size %d, buffer_size %d\n", dev->name, cmd, hdr_len, wrqu->data.length, extra_size, buffer_size);
@@ -1331,10 +1349,10 @@ static inline int rtnetlink_standard_set(struct net_device *    dev,
 #endif /* WE_RTNETLINK_DEBUG */
 
        /* Extract fixed header from request. This is properly aligned. */
-       wrqu = &request->u;
+       wrqu = (union iwreq_data *) (((char *) request) + IW_EV_LCP_PK_LEN);
 
        /* Check if wrqu is complete */
-       hdr_len = event_type_size[descr->header_type];
+       hdr_len = event_type_pk_size[descr->header_type];
        if(request_len < hdr_len) {
 #ifdef WE_RTNETLINK_DEBUG
                printk(KERN_DEBUG
@@ -1359,7 +1377,7 @@ static inline int rtnetlink_standard_set(struct net_device *      dev,
 
                /* Put wrqu in the right place (skip pointer) */
                memcpy(((char *) &wrqu_point) + IW_EV_POINT_OFF,
-                      wrqu, IW_EV_POINT_LEN - IW_EV_LCP_LEN);
+                      wrqu, IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN);
                /* Don't forget about the event code... */
                wrqu = &wrqu_point;
 
@@ -1483,7 +1501,7 @@ static inline int rtnetlink_private_get(struct net_device *       dev,
                hdr_len = extra_size;
                extra_size = 0;
        } else {
-               hdr_len = IW_EV_POINT_LEN;
+               hdr_len = IW_EV_POINT_PK_LEN;
        }
 
        /* Check if wrqu is complete */
@@ -1514,7 +1532,7 @@ static inline int rtnetlink_private_get(struct net_device *       dev,
                memcpy(buffer + IW_EV_POINT_OFF, request, request_len);
                /* Use our own copy of wrqu */
                wrqu = (union iwreq_data *) (buffer + IW_EV_POINT_OFF
-                                            + IW_EV_LCP_LEN);
+                                            + IW_EV_LCP_PK_LEN);
 
                /* No extra arguments. Trivial to handle */
                ret = handler(dev, &info, wrqu, (char *) wrqu);
@@ -1523,7 +1541,7 @@ static inline int rtnetlink_private_get(struct net_device *       dev,
                char *  extra;
 
                /* Buffer for full reply */
-               buffer_size = extra_size + IW_EV_POINT_LEN + IW_EV_POINT_OFF;
+               buffer_size = extra_size + IW_EV_POINT_PK_LEN + IW_EV_POINT_OFF;
 
 #ifdef WE_RTNETLINK_DEBUG
                printk(KERN_DEBUG "%s (WE.r) : Malloc %d bytes (%d bytes)\n",
@@ -1538,15 +1556,15 @@ static inline int rtnetlink_private_get(struct net_device *     dev,
 
                /* Put wrqu in the right place (just before extra).
                 * Leave space for IWE header and dummy pointer...
-                * Note that IW_EV_LCP_LEN==4 bytes, so it's still aligned...
+                * Note that IW_EV_LCP_PK_LEN==4 bytes, so it's still aligned.
                 */
-               memcpy(buffer + IW_EV_LCP_LEN + IW_EV_POINT_OFF,
-                      ((char *) request) + IW_EV_LCP_LEN,
-                      IW_EV_POINT_LEN - IW_EV_LCP_LEN);
-               wrqu = (union iwreq_data *) (buffer + IW_EV_LCP_LEN);
+               memcpy(buffer + IW_EV_LCP_PK_LEN + IW_EV_POINT_OFF,
+                      ((char *) request) + IW_EV_LCP_PK_LEN,
+                      IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN);
+               wrqu = (union iwreq_data *) (buffer + IW_EV_LCP_PK_LEN);
 
                /* Extra comes logically after that. Offset +12 bytes. */
-               extra = buffer + IW_EV_POINT_OFF + IW_EV_POINT_LEN;
+               extra = buffer + IW_EV_POINT_OFF + IW_EV_POINT_PK_LEN;
 
                /* Call the handler */
                ret = handler(dev, &info, wrqu, extra);
@@ -1556,11 +1574,11 @@ static inline int rtnetlink_private_get(struct net_device *     dev,
                if (!(descr->get_args & IW_PRIV_SIZE_FIXED))
                        extra_size = adjust_priv_size(descr->get_args, wrqu);
                /* Re-adjust reply size */
-               request->len = extra_size + IW_EV_POINT_LEN;
+               request->len = extra_size + IW_EV_POINT_PK_LEN;
 
                /* Put the iwe header where it should, i.e. scrap the
                 * dummy pointer. */
-               memcpy(buffer + IW_EV_POINT_OFF, request, IW_EV_LCP_LEN);
+               memcpy(buffer + IW_EV_POINT_OFF, request, IW_EV_LCP_PK_LEN);
 
 #ifdef WE_RTNETLINK_DEBUG
                printk(KERN_DEBUG "%s (WE.r) : Reply 0x%04X, hdr_len %d, tokens %d, extra_size %d, buffer_size %d\n", dev->name, cmd, hdr_len, wrqu->data.length, extra_size, buffer_size);
@@ -1641,14 +1659,14 @@ static inline int rtnetlink_private_set(struct net_device *     dev,
        /* Does it fits in wrqu ? */
        if((descr->set_args & IW_PRIV_SIZE_FIXED) &&
           (extra_size <= IFNAMSIZ)) {
-               hdr_len = IW_EV_LCP_LEN + extra_size;
+               hdr_len = IW_EV_LCP_PK_LEN + extra_size;
                extra_size = 0;
        } else {
-               hdr_len = IW_EV_POINT_LEN;
+               hdr_len = IW_EV_POINT_PK_LEN;
        }
 
        /* Extract fixed header from request. This is properly aligned. */
-       wrqu = &request->u;
+       wrqu = (union iwreq_data *) (((char *) request) + IW_EV_LCP_PK_LEN);
 
        /* Check if wrqu is complete */
        if(request_len < hdr_len) {
@@ -1675,7 +1693,7 @@ static inline int rtnetlink_private_set(struct net_device *       dev,
 
                /* Put wrqu in the right place (skip pointer) */
                memcpy(((char *) &wrqu_point) + IW_EV_POINT_OFF,
-                      wrqu, IW_EV_POINT_LEN - IW_EV_LCP_LEN);
+                      wrqu, IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN);
 
                /* Does it fits within bounds ? */
                if(wrqu_point.data.length > (descr->set_args &
@@ -1738,7 +1756,7 @@ int wireless_rtnetlink_get(struct net_device *    dev,
        iw_handler              handler;
 
        /* Check length */
-       if(len < IW_EV_LCP_LEN) {
+       if(len < IW_EV_LCP_PK_LEN) {
                printk(KERN_DEBUG "%s (WE.r) : RtNetlink request too short (%d)\n",
                       dev->name, len);
                return -EINVAL;
@@ -1822,7 +1840,7 @@ int wireless_rtnetlink_set(struct net_device *    dev,
        iw_handler              handler;
 
        /* Check length */
-       if(len < IW_EV_LCP_LEN) {
+       if(len < IW_EV_LCP_PK_LEN) {
                printk(KERN_DEBUG "%s (WE.r) : RtNetlink request too short (%d)\n",
                       dev->name, len);
                return -EINVAL;
index cf28c53a389a24b49c82ccc21721139bcbf110e1..6607b7b14f34fde9a2324f28d90a8f2555cb5fcd 100644 (file)
@@ -575,7 +575,7 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname,
        if (get_user(len, optlen))
                return -EFAULT;
 
-       if (len < sizeof(int))
+       if (len < (int)sizeof(int))
                return -EINVAL;
 
        dp = dccp_sk(sk);
@@ -589,9 +589,11 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname,
                                               (__be32 __user *)optval, optlen);
        case DCCP_SOCKOPT_SEND_CSCOV:
                val = dp->dccps_pcslen;
+               len = sizeof(val);
                break;
        case DCCP_SOCKOPT_RECV_CSCOV:
                val = dp->dccps_pcrlen;
+               len = sizeof(val);
                break;
        case 128 ... 191:
                return ccid_hc_rx_getsockopt(dp->dccps_hc_rx_ccid, sk, optname,
index 1b616992d91637de002f87ab94843ce90301ba33..7552663aa125343fb70fe96a4cd981430fb41854 100644 (file)
@@ -342,6 +342,9 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
        }
 #endif
 
+       if (netif_running(dev) && netif_carrier_ok(dev))
+               ndev->if_flags |= IF_READY;
+
        ipv6_mc_init_dev(ndev);
        ndev->tstamp = jiffies;
 #ifdef CONFIG_SYSCTL
index ff2d6e5e282c2f9446aa02a9a832b2673812f69d..020767a204d4495f50cd2e47e5b9830b1b851e91 100644 (file)
@@ -17,7 +17,6 @@ obj-$(CONFIG_NET_ACT_SIMP)    += act_simple.o
 obj-$(CONFIG_NET_SCH_FIFO)     += sch_fifo.o
 obj-$(CONFIG_NET_SCH_CBQ)      += sch_cbq.o
 obj-$(CONFIG_NET_SCH_HTB)      += sch_htb.o
-obj-$(CONFIG_NET_SCH_HPFQ)     += sch_hpfq.o
 obj-$(CONFIG_NET_SCH_HFSC)     += sch_hfsc.o
 obj-$(CONFIG_NET_SCH_RED)      += sch_red.o
 obj-$(CONFIG_NET_SCH_GRED)     += sch_gred.o
index 396deb71480f5612250e25cc58cc29f7178c4b1c..407c6fb1ba14c501330816258a04440a46bd09a4 100644 (file)
@@ -1184,10 +1184,12 @@ hfsc_delete_class(struct Qdisc *sch, unsigned long arg)
 
        sch_tree_lock(sch);
 
-       list_del(&cl->hlist);
        list_del(&cl->siblings);
        hfsc_adjust_levels(cl->cl_parent);
+
        hfsc_purge_queue(sch, cl);
+       list_del(&cl->hlist);
+
        if (--cl->refcnt == 0)
                hfsc_destroy_class(sch, cl);
 
index 97cbb9aec946b56b2e0547206349ec615ec4a876..3c3294d01041743e721d53f0cd5f44be2b039865 100644 (file)
@@ -1380,15 +1380,15 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
 
        sch_tree_lock(sch);
 
-       /* delete from hash and active; remainder in destroy_class */
-       hlist_del_init(&cl->hlist);
-
        if (!cl->level) {
                qlen = cl->un.leaf.q->q.qlen;
                qdisc_reset(cl->un.leaf.q);
                qdisc_tree_decrease_qlen(cl->un.leaf.q, qlen);
        }
 
+       /* delete from hash and active; remainder in destroy_class */
+       hlist_del_init(&cl->hlist);
+
        if (cl->prio_activity)
                htb_deactivate(q, cl);