]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Dec 2008 18:03:55 +0000 (10:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Dec 2008 18:03:55 +0000 (10:03 -0800)
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: Better than nothing implementation of PCI mmap to fix X.

99 files changed:
arch/arm/include/asm/bitops.h
arch/arm/include/asm/processor.h
arch/arm/mach-omap1/io.c
arch/arm/mm/alignment.c
arch/arm/plat-omap/include/mach/omapfb.h
arch/arm/plat-omap/sram.c
arch/arm/plat-orion/pcie.c
arch/mips/kernel/vpe.c
arch/powerpc/kernel/cpu_setup_44x.S
arch/powerpc/kernel/cputable.c
arch/um/drivers/mconsole_kern.c
arch/x86/kernel/amd_iommu.c
arch/x86/kernel/paravirt-spinlocks.c
block/bsg.c
block/scsi_ioctl.c
drivers/acpi/battery.c
drivers/ata/Kconfig
drivers/ata/ata_piix.c
drivers/ata/pata_hpt366.c
drivers/ata/pata_ninja32.c
drivers/ata/pata_sis.c
drivers/block/pktcdvd.c
drivers/char/serial167.c
drivers/firewire/fw-ohci.c
drivers/firewire/fw-transaction.c
drivers/firewire/fw-transaction.h
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/radeon/radeon_drv.h
drivers/gpu/drm/radeon/radeon_irq.c
drivers/ide/Kconfig
drivers/ide/ide-io.c
drivers/ide/pmac.c
drivers/ieee1394/nodemgr.c
drivers/isdn/hardware/avm/b1isa.c
drivers/isdn/hysdn/hysdn_net.c
drivers/message/i2o/i2o_block.c
drivers/message/i2o/iop.c
drivers/mtd/devices/m25p80.c
drivers/mtd/maps/physmap.c
drivers/mtd/nand/fsl_upm.c
drivers/mtd/nand/pasemi_nand.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/mtd/onenand/omap2.c
drivers/net/bnx2.c
drivers/net/bnx2.h
drivers/net/enc28j60.c
drivers/net/netx-eth.c
drivers/net/wireless/ipw2200.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-sta.c
drivers/net/wireless/zd1211rw/zd_mac.c
drivers/rtc/rtc-ds1672.c
drivers/rtc/rtc-max6900.c
drivers/rtc/rtc-twl4030.c
drivers/serial/mpc52xx_uart.c
drivers/serial/s3c2440.c
drivers/usb/serial/ftdi_sio.c
drivers/video/aty/radeon_accel.c
drivers/video/aty/radeon_base.c
drivers/video/aty/radeonfb.h
drivers/video/console/fbcon.c
drivers/video/mb862xx/mb862xxfb.c
drivers/video/omap/omapfb_main.c
fs/exportfs/expfs.c
fs/ext4/balloc.c
fs/fcntl.c
fs/inotify.c
fs/ioctl.c
fs/proc/base.c
fs/proc/task_mmu.c
include/asm-generic/atomic.h
include/asm-generic/audit_write.h
include/linux/audit.h
include/linux/blkdev.h
include/linux/can/core.h
include/linux/ftrace.h
kernel/audit.c
kernel/auditsc.c
kernel/fork.c
kernel/latencytop.c
kernel/relay.c
lib/percpu_counter.c
mm/backing-dev.c
mm/migrate.c
mm/page_cgroup.c
mm/slub.c
mm/swap.c
mm/vmalloc.c
net/atm/svc.c
net/can/af_can.c
net/can/bcm.c
net/ipv4/tcp_output.c
net/ipv4/tcp_vegas.c
net/mac80211/sta_info.c
net/netfilter/xt_socket.c
net/netlabel/netlabel_unlabeled.c
net/phonet/pn_netlink.c
net/xfrm/xfrm_policy.c

index 9a1db20e032a07eb744aba50c1c60a28d0a0b381..63a481fbbed43ed12ecc9802ffc729a06e8d23c6 100644 (file)
@@ -237,6 +237,7 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
 #if __LINUX_ARM_ARCH__ < 5
 
 #include <asm-generic/bitops/ffz.h>
+#include <asm-generic/bitops/__fls.h>
 #include <asm-generic/bitops/__ffs.h>
 #include <asm-generic/bitops/fls.h>
 #include <asm-generic/bitops/ffs.h>
@@ -277,16 +278,19 @@ static inline int constant_fls(int x)
  * the clz instruction for much better code efficiency.
  */
 
-#define __fls(x) \
-       ( __builtin_constant_p(x) ? constant_fls(x) : \
-         ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) )
-
-/* Implement fls() in C so that 64-bit args are suitably truncated */
 static inline int fls(int x)
 {
-       return __fls(x);
+       int ret;
+
+       if (__builtin_constant_p(x))
+              return constant_fls(x);
+
+       asm("clz\t%0, %1" : "=r" (ret) : "r" (x) : "cc");
+               ret = 32 - ret;
+       return ret;
 }
 
+#define __fls(x) (fls(x) - 1)
 #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
 #define __ffs(x) (ffs(x) - 1)
 #define ffz(x) __ffs( ~(x) )
index 517a4d6ffc74b791691a3a2f65099bb6352e5e64..6ff33790f47b16d91054c4907edb09616a21f5d8 100644 (file)
@@ -23,7 +23,7 @@
 #include <asm/types.h>
 
 #ifdef __KERNEL__
-#define STACK_TOP      ((current->personality == PER_LINUX_32BIT) ? \
+#define STACK_TOP      ((current->personality & ADDR_LIMIT_32BIT) ? \
                         TASK_SIZE : TASK_SIZE_26)
 #define STACK_TOP_MAX  TASK_SIZE
 #endif
index b3bd8ca85118babd632c353c20cfec92fa811108..4c3e582f3d3cc37e7d4db3338d62828f84e10d93 100644 (file)
@@ -128,7 +128,7 @@ void __init omap1_map_common_io(void)
  * Common low-level hardware init for omap1. This should only get called from
  * board specific init.
  */
-void __init omap1_init_common_hw()
+void __init omap1_init_common_hw(void)
 {
        /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
         * on a Posted Write in the TIPB Bridge".
index 133e65d166b315b0e54aba959846a162643bc927..2d5884ce0435fb436a57bee6d314284b9101e87e 100644 (file)
@@ -70,6 +70,10 @@ static unsigned long ai_dword;
 static unsigned long ai_multi;
 static int ai_usermode;
 
+#define UM_WARN                (1 << 0)
+#define UM_FIXUP       (1 << 1)
+#define UM_SIGNAL      (1 << 2)
+
 #ifdef CONFIG_PROC_FS
 static const char *usermode_action[] = {
        "ignored",
@@ -754,7 +758,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
  user:
        ai_user += 1;
 
-       if (ai_usermode & 1)
+       if (ai_usermode & UM_WARN)
                printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*lx "
                       "Address=0x%08lx FSR 0x%03x\n", current->comm,
                        task_pid_nr(current), instrptr,
@@ -762,10 +766,10 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
                        thumb_mode(regs) ? tinstr : instr,
                        addr, fsr);
 
-       if (ai_usermode & 2)
+       if (ai_usermode & UM_FIXUP)
                goto fixup;
 
-       if (ai_usermode & 4)
+       if (ai_usermode & UM_SIGNAL)
                force_sig(SIGBUS, current);
        else
                set_cr(cr_no_alignment);
@@ -796,6 +800,22 @@ static int __init alignment_init(void)
        res->write_proc = proc_alignment_write;
 #endif
 
+       /*
+        * ARMv6 and later CPUs can perform unaligned accesses for
+        * most single load and store instructions up to word size.
+        * LDM, STM, LDRD and STRD still need to be handled.
+        *
+        * Ignoring the alignment fault is not an option on these
+        * CPUs since we spin re-faulting the instruction without
+        * making any progress.
+        */
+       if (cpu_architecture() >= CPU_ARCH_ARMv6 && (cr_alignment & CR_U)) {
+               cr_alignment &= ~CR_A;
+               cr_no_alignment &= ~CR_A;
+               set_cr(cr_alignment);
+               ai_usermode = UM_FIXUP;
+       }
+
        hook_fault_code(1, do_alignment, SIGILL, "alignment exception");
        hook_fault_code(3, do_alignment, SIGILL, "alignment exception");
 
index ec67fb428607c55ba7d4e452db241cd048e7028c..7b74d1255e0b93c7531e607a77188a148bda980b 100644 (file)
@@ -353,8 +353,8 @@ struct omapfb_device {
        u32                     pseudo_palette[17];
 
        struct lcd_panel        *panel;                 /* LCD panel */
-       struct lcd_ctrl         *ctrl;                  /* LCD controller */
-       struct lcd_ctrl         *int_ctrl;              /* internal LCD ctrl */
+       const struct lcd_ctrl   *ctrl;                  /* LCD controller */
+       const struct lcd_ctrl   *int_ctrl;              /* internal LCD ctrl */
        struct lcd_ctrl_extif   *ext_if;                /* LCD ctrl external
                                                           interface */
        struct device           *dev;
index 9f9a921829c00686f5b8a658c89bef8e084558d0..dcd9d16da2e9f5f0df6e36484e09edaed84139e9 100644 (file)
@@ -255,7 +255,7 @@ void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl)
        if (!_omap_sram_reprogram_clock)
                omap_sram_error();
 
-       return _omap_sram_reprogram_clock(dpllctl, ckctl);
+       _omap_sram_reprogram_clock(dpllctl, ckctl);
 }
 
 int __init omap1_sram_init(void)
@@ -282,8 +282,8 @@ void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
        if (!_omap2_sram_ddr_init)
                omap_sram_error();
 
-       return _omap2_sram_ddr_init(slow_dll_ctrl, fast_dll_ctrl,
-                                   base_cs, force_unlock);
+       _omap2_sram_ddr_init(slow_dll_ctrl, fast_dll_ctrl,
+                            base_cs, force_unlock);
 }
 
 static void (*_omap2_sram_reprogram_sdrc)(u32 perf_level, u32 dll_val,
@@ -294,7 +294,7 @@ void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, u32 mem_type)
        if (!_omap2_sram_reprogram_sdrc)
                omap_sram_error();
 
-       return _omap2_sram_reprogram_sdrc(perf_level, dll_val, mem_type);
+       _omap2_sram_reprogram_sdrc(perf_level, dll_val, mem_type);
 }
 
 static u32 (*_omap2_set_prcm)(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass);
index 883902fead8928f9ff24cdfd781fa28b3013470c..d41d41d78ad98676dea41aeb6466fb1ebf2bb811 100644 (file)
@@ -35,7 +35,7 @@
 #define  PCIE_CONF_REG(r)              ((((r) & 0xf00) << 16) | ((r) & 0xfc))
 #define  PCIE_CONF_BUS(b)              (((b) & 0xff) << 16)
 #define  PCIE_CONF_DEV(d)              (((d) & 0x1f) << 11)
-#define  PCIE_CONF_FUNC(f)             (((f) & 0x3) << 8)
+#define  PCIE_CONF_FUNC(f)             (((f) & 0x7) << 8)
 #define PCIE_CONF_DATA_OFF     0x18fc
 #define PCIE_MASK_OFF          0x1910
 #define PCIE_CTRL_OFF          0x1a00
index 972b2d2b8401b6dd7bd4922690205c6b8f3a5cdf..a1b3da6bad5cb17c577712ac4bf83f439b5d7292 100644 (file)
@@ -1134,7 +1134,7 @@ static int vpe_release(struct inode *inode, struct file *filp)
 
        /* It's good to be able to run the SP and if it chokes have a look at
           the /dev/rt?. But if we reset the pointer to the shared struct we
-          loose what has happened. So perhaps if garbage is sent to the vpe
+          lose what has happened. So perhaps if garbage is sent to the vpe
           device, use it as a trigger for the reset. Hopefully a nice
           executable will be along shortly. */
        if (ret < 0)
index 31c18b52affb878031c69fda37421ff5e53c391f..10b4ab1008afe66914f4a5115868b4c2ef6cf038 100644 (file)
@@ -40,6 +40,7 @@ _GLOBAL(__setup_cpu_460gt)
        mtlr    r4
        blr
 
+_GLOBAL(__setup_cpu_440x5)
 _GLOBAL(__setup_cpu_440gx)
 _GLOBAL(__setup_cpu_440spe)
        b       __fixup_440A_mcheck
index b1eb834bc0fcd00ba563ca8d60287d912a9fdc80..7e8719504f39d65bf50e822289c602470f569713 100644 (file)
@@ -39,6 +39,7 @@ extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
@@ -1500,6 +1501,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440x5,
+               .machine_check          = machine_check_440A,
                .platform               = "ppc440",
        },
        { /* 460EX */
index 19d579d74d27f18ae67bb1b5c9adcf93f963a288..8f44ebb0dec82286e85838369d8fdfd9de929ae6 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/utsname.h>
+#include <linux/socket.h>
+#include <linux/un.h>
 #include <linux/workqueue.h>
 #include <linux/mutex.h>
 #include <asm/uaccess.h>
@@ -785,7 +787,7 @@ static int __init mconsole_init(void)
        /* long to avoid size mismatch warnings from gcc */
        long sock;
        int err;
-       char file[256];
+       char file[UNIX_PATH_MAX];
 
        if (umid_file_name("mconsole", file, sizeof(file)))
                return -1;
index 5662e226b0c922c1d2622e9173687bd6285b3e52..a7b6dec6fc3f4afc72f57651b1523156d415431b 100644 (file)
@@ -344,7 +344,7 @@ static int iommu_map(struct protection_domain *dom,
        u64 __pte, *pte, *page;
 
        bus_addr  = PAGE_ALIGN(bus_addr);
-       phys_addr = PAGE_ALIGN(bus_addr);
+       phys_addr = PAGE_ALIGN(phys_addr);
 
        /* only support 512GB address spaces for now */
        if (bus_addr > IOMMU_MAP_SIZE_L3 || !(prot & IOMMU_PROT_MASK))
@@ -600,7 +600,7 @@ static void dma_ops_free_pagetable(struct dma_ops_domain *dma_dom)
                        continue;
 
                p2 = IOMMU_PTE_PAGE(p1[i]);
-               for (j = 0; j < 512; ++i) {
+               for (j = 0; j < 512; ++j) {
                        if (!IOMMU_PTE_PRESENT(p2[j]))
                                continue;
                        p3 = IOMMU_PTE_PAGE(p2[j]);
@@ -910,7 +910,7 @@ static void dma_ops_domain_unmap(struct amd_iommu *iommu,
        if (address >= dom->aperture_size)
                return;
 
-       WARN_ON(address & 0xfffULL || address > dom->aperture_size);
+       WARN_ON(address & ~PAGE_MASK || address >= dom->aperture_size);
 
        pte  = dom->pte_pages[IOMMU_PTE_L1_INDEX(address)];
        pte += IOMMU_PTE_L0_INDEX(address);
@@ -922,8 +922,8 @@ static void dma_ops_domain_unmap(struct amd_iommu *iommu,
 
 /*
  * This function contains common code for mapping of a physically
- * contiguous memory region into DMA address space. It is uses by all
- * mapping functions provided by this IOMMU driver.
+ * contiguous memory region into DMA address space. It is used by all
+ * mapping functions provided with this IOMMU driver.
  * Must be called with the domain lock held.
  */
 static dma_addr_t __map_single(struct device *dev,
@@ -983,7 +983,8 @@ static void __unmap_single(struct amd_iommu *iommu,
        dma_addr_t i, start;
        unsigned int pages;
 
-       if ((dma_addr == 0) || (dma_addr + size > dma_dom->aperture_size))
+       if ((dma_addr == bad_dma_address) ||
+           (dma_addr + size > dma_dom->aperture_size))
                return;
 
        pages = iommu_num_pages(dma_addr, size, PAGE_SIZE);
index 0e9f1982b1dd1aca8c60025f3ff691b311ee8390..95777b0faa7388f9c236bb093fae1a4934bb91c0 100644 (file)
@@ -7,7 +7,8 @@
 
 #include <asm/paravirt.h>
 
-static void default_spin_lock_flags(struct raw_spinlock *lock, unsigned long flags)
+static inline void
+default_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
 {
        __raw_spin_lock(lock);
 }
index e8bd2475682ab4c2d29f8f205e57b62427b7cfe2..e73e50daf3d0a36df8977cad29b550e3139fbef0 100644 (file)
@@ -202,6 +202,8 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
                rq->timeout = q->sg_timeout;
        if (!rq->timeout)
                rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
+       if (rq->timeout < BLK_MIN_SG_TIMEOUT)
+               rq->timeout = BLK_MIN_SG_TIMEOUT;
 
        return 0;
 }
index 5963cf91a3a0c4f67dc709f9a6b98fdd87235f53..d0bb92cbefb9d698fc4756ec9041aeb2f5794005 100644 (file)
@@ -208,6 +208,8 @@ static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq,
                rq->timeout = q->sg_timeout;
        if (!rq->timeout)
                rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
+       if (rq->timeout < BLK_MIN_SG_TIMEOUT)
+               rq->timeout = BLK_MIN_SG_TIMEOUT;
 
        return 0;
 }
index 4fb3c12ac1d89394765b3f16e97cf82a14083134..1423b0c0cd2eecc6e3c7b2f5c78746cee5fac4eb 100644 (file)
@@ -173,19 +173,7 @@ static int acpi_battery_get_property(struct power_supply *psy,
                val->intval = battery->voltage_now * 1000;
                break;
        case POWER_SUPPLY_PROP_CURRENT_NOW:
-               val->intval = battery->current_now;
-               if (battery->power_unit) {
-                       val->intval *= 1000;
-               } else {
-                       /*
-                        * If power units are mW, convert to mA by dividing by
-                        * current voltage.
-                        */
-                       if (battery->voltage_now)
-                               val->intval /= battery->voltage_now;
-                       else
-                               val->intval = -1;
-               }
+               val->intval = battery->current_now * 1000;
                break;
        case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
        case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN:
index 78fbec8ceda0452c83b715e1d86bc593be8eb3cf..421b7c71e72db447a7c3b09abe183908399ac34a 100644 (file)
@@ -153,7 +153,7 @@ config SATA_PROMISE
          If unsure, say N.
 
 config SATA_SX4
-       tristate "Promise SATA SX4 support"
+       tristate "Promise SATA SX4 support (Experimental)"
        depends on PCI && EXPERIMENTAL
        help
          This option enables support for Promise Serial ATA SX4.
@@ -219,8 +219,8 @@ config PATA_ACPI
          otherwise unsupported hardware.
 
 config PATA_ALI
-       tristate "ALi PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "ALi PATA support"
+       depends on PCI
        help
          This option enables support for the ALi ATA interfaces
          found on the many ALi chipsets.
@@ -263,7 +263,7 @@ config PATA_ATIIXP
          If unsure, say N.
 
 config PATA_CMD640_PCI
-       tristate "CMD640 PCI PATA support (Very Experimental)"
+       tristate "CMD640 PCI PATA support (Experimental)"
        depends on PCI && EXPERIMENTAL
        help
          This option enables support for the CMD640 PCI IDE
@@ -291,8 +291,8 @@ config PATA_CS5520
          If unsure, say N.
 
 config PATA_CS5530
-       tristate "CS5530 PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "CS5530 PATA support"
+       depends on PCI
        help
          This option enables support for the Cyrix/NatSemi/AMD CS5530
          companion chip used with the MediaGX/Geode processor family.
@@ -309,8 +309,8 @@ config PATA_CS5535
          If unsure, say N.
 
 config PATA_CS5536
-       tristate "CS5536 PATA support (Experimental)"
-       depends on PCI && X86 && !X86_64 && EXPERIMENTAL
+       tristate "CS5536 PATA support"
+       depends on PCI && X86 && !X86_64
        help
          This option enables support for the AMD CS5536
          companion chip used with the Geode LX processor family.
@@ -363,7 +363,7 @@ config PATA_HPT37X
          If unsure, say N.
 
 config PATA_HPT3X2N
-       tristate "HPT 372N/302N PATA support (Very Experimental)"
+       tristate "HPT 372N/302N PATA support (Experimental)"
        depends on PCI && EXPERIMENTAL
        help
          This option enables support for the N variant HPT PATA
@@ -389,8 +389,8 @@ config PATA_HPT3X3_DMA
          problems with DMA on this chipset.
 
 config PATA_ISAPNP
-       tristate "ISA Plug and Play PATA support (Experimental)"
-       depends on EXPERIMENTAL && ISAPNP
+       tristate "ISA Plug and Play PATA support"
+       depends on ISAPNP
        help
          This option enables support for ISA plug & play ATA
          controllers such as those found on old soundcards.
@@ -498,8 +498,8 @@ config PATA_NINJA32
          If unsure, say N.
 
 config PATA_NS87410
-       tristate "Nat Semi NS87410 PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "Nat Semi NS87410 PATA support"
+       depends on PCI
        help
          This option enables support for the National Semiconductor
          NS87410 PCI-IDE controller.
@@ -507,8 +507,8 @@ config PATA_NS87410
          If unsure, say N.
 
 config PATA_NS87415
-       tristate "Nat Semi NS87415 PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "Nat Semi NS87415 PATA support"
+       depends on PCI
        help
          This option enables support for the National Semiconductor
          NS87415 PCI-IDE controller.
@@ -544,8 +544,8 @@ config PATA_PCMCIA
          If unsure, say N.
 
 config PATA_PDC_OLD
-       tristate "Older Promise PATA controller support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "Older Promise PATA controller support"
+       depends on PCI
        help
          This option enables support for the Promise 20246, 20262, 20263,
          20265 and 20267 adapters.
@@ -559,7 +559,7 @@ config PATA_QDI
          Support for QDI 6500 and 6580 PATA controllers on VESA local bus.
 
 config PATA_RADISYS
-       tristate "RADISYS 82600 PATA support (Very Experimental)"
+       tristate "RADISYS 82600 PATA support (Experimental)"
        depends on PCI && EXPERIMENTAL
        help
          This option enables support for the RADISYS 82600
@@ -586,8 +586,8 @@ config PATA_RZ1000
          If unsure, say N.
 
 config PATA_SC1200
-       tristate "SC1200 PATA support (Very Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "SC1200 PATA support"
+       depends on PCI
        help
          This option enables support for the NatSemi/AMD SC1200 SoC
          companion chip used with the Geode processor family.
@@ -620,8 +620,8 @@ config PATA_SIL680
          If unsure, say N.
 
 config PATA_SIS
-       tristate "SiS PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "SiS PATA support"
+       depends on PCI
        help
          This option enables support for SiS PATA controllers
 
index d6d97d8f3fa4b6cab0d3df24d872577eeaa72952..c11936e13dd3ccd39952b35b242e42dd5e0d1078 100644 (file)
@@ -1072,7 +1072,14 @@ static int piix_broken_suspend(void)
         * matching is necessary because dmi_system_id.matches is
         * limited to four entries.
         */
-       if (!strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
+       if (dmi_get_system_info(DMI_SYS_VENDOR) &&
+           dmi_get_system_info(DMI_PRODUCT_NAME) &&
+           dmi_get_system_info(DMI_PRODUCT_VERSION) &&
+           dmi_get_system_info(DMI_PRODUCT_SERIAL) &&
+           dmi_get_system_info(DMI_BOARD_VENDOR) &&
+           dmi_get_system_info(DMI_BOARD_NAME) &&
+           dmi_get_system_info(DMI_BOARD_VERSION) &&
+           !strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
            !strcmp(dmi_get_system_info(DMI_PRODUCT_NAME), "000000") &&
            !strcmp(dmi_get_system_info(DMI_PRODUCT_VERSION), "000000") &&
            !strcmp(dmi_get_system_info(DMI_PRODUCT_SERIAL), "000000") &&
index f2b83eabc7c7cd2bb59ba198df4f5c85b7b20355..a098ba8eaab6141ed52ec9e90666cbe0b8081cc3 100644 (file)
@@ -382,10 +382,10 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
        /* PCI clocking determines the ATA timing values to use */
        /* info_hpt366 is safe against re-entry so we can scribble on it */
        switch((reg1 & 0x700) >> 8) {
-               case 5:
+               case 9:
                        hpriv = &hpt366_40;
                        break;
-               case 9:
+               case 5:
                        hpriv = &hpt366_25;
                        break;
                default:
index 4e466eae8b462e31d82f7404d25f43a3b9cfd5cb..4dd9a3b031e4dc4fc932cea32b9cd6fc6b42d063 100644 (file)
@@ -44,7 +44,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_ninja32"
-#define DRV_VERSION "0.1.1"
+#define DRV_VERSION "0.1.3"
 
 
 /**
@@ -130,7 +130,8 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
                return rc;
        pci_set_master(dev);
 
-       /* Set up the register mappings */
+       /* Set up the register mappings. We use the I/O mapping as only the
+          older chips also have MMIO on BAR 1 */
        base = host->iomap[0];
        if (!base)
                return -ENOMEM;
@@ -167,8 +168,12 @@ static int ninja32_reinit_one(struct pci_dev *pdev)
 #endif
 
 static const struct pci_device_id ninja32[] = {
+       { 0x10FC, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0x1145, 0x8008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0x1145, 0xf008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0x1145, 0xf02C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { },
 };
 
index d34236611752d8c8c3cddc2ca868cee655051c26..e4be55e047f61c3608bb9a0ae02027555475eb2c 100644 (file)
@@ -56,7 +56,6 @@ static const struct sis_laptop sis_laptop[] = {
        { 0x5513, 0x1043, 0x1107 },     /* ASUS A6K */
        { 0x5513, 0x1734, 0x105F },     /* FSC Amilo A1630 */
        { 0x5513, 0x1071, 0x8640 },     /* EasyNote K5305 */
-       { 0x5513, 0x1039, 0x5513 },     /* Targa Visionary 1000 */
        /* end marker */
        { 0, }
 };
index edda7b6b077b290695460e9e2ee92a0476fc197a..dc7a8c352da2e7c5b44a3d9a4e7a02bfd029d0c2 100644 (file)
@@ -302,7 +302,7 @@ static struct kobj_type kobj_pkt_type_wqueue = {
 static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
 {
        if (class_pktcdvd) {
-               pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, NULL,
+               pd->dev = device_create(class_pktcdvd, NULL, MKDEV(0, 0), NULL,
                                        "%s", pd->name);
                if (IS_ERR(pd->dev))
                        pd->dev = NULL;
index 3b23270eaa65385f56a2cef7652aeb2ccea77055..a8f15e6be594237f150b1b3e92ad1b9a7d468ae1 100644 (file)
@@ -418,7 +418,7 @@ static irqreturn_t cd2401_rxerr_interrupt(int irq, void *dev_id)
                                                             TTY_OVERRUN);
                                        /*
                                           If the flip buffer itself is
-                                          overflowing, we still loose
+                                          overflowing, we still lose
                                           the next incoming character.
                                         */
                                        if (tty_buffer_request_room(tty, 1) !=
index 46610b090415544306a292a02a4d62f63033d901..ab9c01e462ef64a197c72250fed471b361477f02 100644 (file)
@@ -974,6 +974,7 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet)
                        packet->ack = RCODE_SEND_ERROR;
                        return -1;
                }
+               packet->payload_bus = payload_bus;
 
                d[2].req_count    = cpu_to_le16(packet->payload_length);
                d[2].data_address = cpu_to_le32(payload_bus);
@@ -1025,7 +1026,6 @@ static int handle_at_packet(struct context *context,
        struct driver_data *driver_data;
        struct fw_packet *packet;
        struct fw_ohci *ohci = context->ohci;
-       dma_addr_t payload_bus;
        int evt;
 
        if (last->transfer_status == 0)
@@ -1038,9 +1038,8 @@ static int handle_at_packet(struct context *context,
                /* This packet was cancelled, just continue. */
                return 1;
 
-       payload_bus = le32_to_cpu(last->data_address);
-       if (payload_bus != 0)
-               dma_unmap_single(ohci->card.device, payload_bus,
+       if (packet->payload_bus)
+               dma_unmap_single(ohci->card.device, packet->payload_bus,
                                 packet->payload_length, DMA_TO_DEVICE);
 
        evt = le16_to_cpu(last->transfer_status) & 0x1f;
@@ -1697,6 +1696,10 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
        if (packet->ack != 0)
                goto out;
 
+       if (packet->payload_bus)
+               dma_unmap_single(ohci->card.device, packet->payload_bus,
+                                packet->payload_length, DMA_TO_DEVICE);
+
        log_ar_at_event('T', packet->speed, packet->header, 0x20);
        driver_data->packet = NULL;
        packet->ack = RCODE_CANCELLED;
index 022ac4fabb6740d3fec872142e9d65d1bc001a96..2884f876397b872085925353997276e24e6c4a83 100644 (file)
@@ -207,6 +207,7 @@ fw_fill_request(struct fw_packet *packet, int tcode, int tlabel,
        packet->speed = speed;
        packet->generation = generation;
        packet->ack = 0;
+       packet->payload_bus = 0;
 }
 
 /**
@@ -581,6 +582,8 @@ fw_fill_response(struct fw_packet *response, u32 *request_header,
                BUG();
                return;
        }
+
+       response->payload_bus = 0;
 }
 EXPORT_SYMBOL(fw_fill_response);
 
index aed7dbb17cdaebb47a695a8b88a019ccf610d614..839466f0a795c57fe2df325a3b1d8e3a8813d1dd 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/list.h>
 #include <linux/spinlock_types.h>
 #include <linux/timer.h>
+#include <linux/types.h>
 #include <linux/workqueue.h>
 
 #define TCODE_IS_READ_REQUEST(tcode)   (((tcode) & ~1) == 4)
@@ -153,6 +154,7 @@ struct fw_packet {
        size_t header_length;
        void *payload;
        size_t payload_length;
+       dma_addr_t payload_bus;
        u32 timestamp;
 
        /*
index ba89b42f790abb693a0b355e9ee918f0f1339c81..553dd4bc307547cc1ac4928209c7f8b3423ce8a3 100644 (file)
@@ -847,9 +847,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
         * and the registers being closely associated.
         *
         * According to chipset errata, on the 965GM, MSI interrupts may
-        * be lost or delayed
+        * be lost or delayed, but we use them anyways to avoid
+        * stuck interrupts on some machines.
         */
-       if (!IS_I945G(dev) && !IS_I945GM(dev) && !IS_I965GM(dev))
+       if (!IS_I945G(dev) && !IS_I945GM(dev))
                pci_enable_msi(dev->pdev);
 
        intel_opregion_init(dev);
index 3fde82be014f3a4b2e4046826b076d7540e17afc..ad672d8548289b8e7a934123d2ff4878f272b6e0 100644 (file)
@@ -1104,6 +1104,8 @@ i915_gem_evict_everything(struct drm_device *dev)
                if (ret != 0)
                        break;
        }
+       if (ret == -ENOMEM)
+               return 0;
        return ret;
 }
 
index 7a183789be978d97d3e317b141c5119ff2dfe9c6..3bbb871b25d5102a2b6d832702cc55bc338a70ea 100644 (file)
@@ -299,7 +299,6 @@ typedef struct drm_radeon_private {
        atomic_t swi_emitted;
        int vblank_crtc;
        uint32_t irq_enable_reg;
-       int irq_enabled;
        uint32_t r500_disp_irq_reg;
 
        struct radeon_surface surfaces[RADEON_MAX_SURFACES];
index 97c0599fdb1e2c49898c14c0ba097101978f8dc2..99be11418ac2dcecf8b3718ca5e8ba82478dc0b1 100644 (file)
@@ -44,7 +44,8 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state)
        else
                dev_priv->irq_enable_reg &= ~mask;
 
-       RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
+       if (!dev->irq_enabled)
+               RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
 }
 
 static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
@@ -56,7 +57,8 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
        else
                dev_priv->r500_disp_irq_reg &= ~mask;
 
-       RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
+       if (!dev->irq_enabled)
+               RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
 }
 
 int radeon_enable_vblank(struct drm_device *dev, int crtc)
@@ -355,8 +357,6 @@ void radeon_driver_irq_uninstall(struct drm_device * dev)
        if (!dev_priv)
                return;
 
-       dev_priv->irq_enabled = 0;
-
        if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS690)
                RADEON_WRITE(R500_DxMODE_INT_MASK, 0);
        /* Disable *all* interrupts */
index 6d7401772a8f6d7530a89331a16cace5528b4623..e6857e01d1bad372da0c62480753adbd1266d1f4 100644 (file)
@@ -669,10 +669,12 @@ config BLK_DEV_CELLEB
 
 endif
 
+# TODO: BLK_DEV_IDEDMA_PCI -> BLK_DEV_IDEDMA_SFF
 config BLK_DEV_IDE_PMAC
        tristate "PowerMac on-board IDE support"
        depends on PPC_PMAC && IDE=y
        select IDE_TIMINGS
+       select BLK_DEV_IDEDMA_PCI
        help
          This driver provides support for the on-board IDE controller on
          most of the recent Apple Power Macintoshes and PowerBooks.
@@ -689,16 +691,6 @@ config BLK_DEV_IDE_PMAC_ATA100FIRST
          CD-ROM on hda. This option changes this to more natural hda for
          hard disk and hdc for CD-ROM.
 
-config BLK_DEV_IDEDMA_PMAC
-       bool "PowerMac IDE DMA support"
-       depends on BLK_DEV_IDE_PMAC
-       select BLK_DEV_IDEDMA_PCI
-       help
-         This option allows the driver for the on-board IDE controller on
-         Power Macintoshes and PowerBooks to use DMA (direct memory access)
-         to transfer data to and from memory.  Saying Y is safe and improves
-         performance.
-
 config BLK_DEV_IDE_AU1XXX
        bool "IDE for AMD Alchemy Au1200"
        depends on SOC_AU1200
@@ -912,7 +904,7 @@ config BLK_DEV_UMC8672
 endif
 
 config BLK_DEV_IDEDMA
-       def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \
+       def_bool BLK_DEV_IDEDMA_SFF || \
                 BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
 
 endif # IDE
index 7d275b2af3eb74a0c4db266fd4d9c7540f061793..cc35d6dbd41026d02cdc1ab5a32085cc8c63e0db 100644 (file)
@@ -208,8 +208,10 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
                 */
                if (drive->hwif->dma_ops == NULL)
                        break;
-               if (drive->dev_flags & IDE_DFLAG_USING_DMA)
-                       ide_set_dma(drive);
+               /*
+                * TODO: respect IDE_DFLAG_USING_DMA
+                */
+               ide_set_dma(drive);
                break;
        }
 
index 2e19d6298536f2fb94d3e0a8a1b5fd08877f3734..7c481bb56fab90427001c4ac5f46a0fc367ac449 100644 (file)
@@ -66,7 +66,6 @@ typedef struct pmac_ide_hwif {
        struct macio_dev                *mdev;
        u32                             timings[4];
        volatile u32 __iomem *          *kauai_fcr;
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
        /* Those fields are duplicating what is in hwif. We currently
         * can't use the hwif ones because of some assumptions that are
         * beeing done by the generic code about the kind of dma controller
@@ -74,8 +73,6 @@ typedef struct pmac_ide_hwif {
         */
        volatile struct dbdma_regs __iomem *    dma_regs;
        struct dbdma_cmd*               dma_table_cpu;
-#endif
-       
 } pmac_ide_hwif_t;
 
 enum {
@@ -222,8 +219,6 @@ static const char* model_name[] = {
 #define KAUAI_FCR_UATA_RESET_N         0x00000002
 #define KAUAI_FCR_UATA_ENABLE          0x00000001
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
-
 /* Rounded Multiword DMA timings
  * 
  * I gave up finding a generic formula for all controller
@@ -413,8 +408,6 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq);
 static void pmac_ide_selectproc(ide_drive_t *drive);
 static void pmac_ide_kauai_selectproc(ide_drive_t *drive);
 
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
-
 #define PMAC_IDE_REG(x) \
        ((void __iomem *)((drive)->hwif->io_ports.data_addr + (x)))
 
@@ -584,8 +577,6 @@ pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
        pmac_ide_do_update_timings(drive);
 }
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
-
 /*
  * Calculate KeyLargo ATA/66 UDMA timings
  */
@@ -786,7 +777,6 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
                drive->name, speed & 0xf,  *timings);
 #endif 
 }
-#endif /* #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC */
 
 static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed)
 {
@@ -804,7 +794,6 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed)
        tl[0] = *timings;
        tl[1] = *timings2;
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
        if (speed >= XFER_UDMA_0) {
                if (pmif->kind == controller_kl_ata4)
                        ret = set_timings_udma_ata4(&tl[0], speed);
@@ -817,7 +806,7 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed)
                        ret = -1;
        } else
                set_timings_mdma(drive, pmif->kind, &tl[0], &tl[1], speed);
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
+
        if (ret)
                return;
 
@@ -1008,9 +997,7 @@ static const struct ide_port_info pmac_port_info = {
        .chipset                = ide_pmac,
        .tp_ops                 = &pmac_tp_ops,
        .port_ops               = &pmac_ide_port_ops,
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
        .dma_ops                = &pmac_dma_ops,
-#endif
        .host_flags             = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA |
                                  IDE_HFLAG_POST_SET_MODE |
                                  IDE_HFLAG_MMIO |
@@ -1182,7 +1169,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
        pmif->regbase = regbase;
        pmif->irq = irq;
        pmif->kauai_fcr = NULL;
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
+
        if (macio_resource_count(mdev) >= 2) {
                if (macio_request_resource(mdev, 1, "ide-pmac (dma)"))
                        printk(KERN_WARNING "ide-pmac: can't request DMA "
@@ -1192,7 +1179,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
                        pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000);
        } else
                pmif->dma_regs = NULL;
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
+
        dev_set_drvdata(&mdev->ofdev.dev, pmif);
 
        memset(&hw, 0, sizeof(hw));
@@ -1300,9 +1287,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
 
        base = ioremap(rbase, rlen);
        pmif->regbase = (unsigned long) base + 0x2000;
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
        pmif->dma_regs = base + 0x1000;
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
        pmif->kauai_fcr = base;
        pmif->irq = pdev->irq;
 
@@ -1434,8 +1419,6 @@ out:
        return error;
 }
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
-
 /*
  * pmac_ide_build_dmatable builds the DBDMA command list
  * for a transfer and sets the DBDMA channel to point to it.
@@ -1723,13 +1706,6 @@ static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif,
 
        return 0;
 }
-#else
-static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif,
-                                      const struct ide_port_info *d)
-{
-       return -EOPNOTSUPP;
-}
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
 
 module_init(pmac_ide_probe);
 
index 9e39f73282ee6dd439e76647af5ab5c4755e711a..d333ae22459c9d697c9d71ba7dd462f2af2f51d6 100644 (file)
@@ -1685,6 +1685,7 @@ static int nodemgr_host_thread(void *data)
                g = get_hpsb_generation(host);
                for (i = 0; i < 4 ; i++) {
                        msleep_interruptible(63);
+                       try_to_freeze();
                        if (kthread_should_stop())
                                goto exit;
 
@@ -1725,6 +1726,7 @@ static int nodemgr_host_thread(void *data)
                /* Sleep 3 seconds */
                for (i = 3000/200; i; i--) {
                        msleep_interruptible(200);
+                       try_to_freeze();
                        if (kthread_should_stop())
                                goto exit;
 
index 1e288eeb5e2a5679908ca0f9cbf79793b91e18b8..6461a32bc838af31dceb5ea4073c17c5f3c79e41 100644 (file)
@@ -233,10 +233,8 @@ static void __exit b1isa_exit(void)
        int i;
 
        for (i = 0; i < MAX_CARDS; i++) {
-               if (!io[i])
-                       break;
-
-               b1isa_remove(&isa_dev[i]);
+               if (isa_dev[i].resource[0].start)
+                       b1isa_remove(&isa_dev[i]);
        }
        unregister_capi_driver(&capi_driver_b1isa);
 }
index cfa8fa5e44ab5d1352eff43b3cc5407624ca80e1..3f2a0a20c19b040538ba23fcce7d3d346d2e0f89 100644 (file)
@@ -83,12 +83,12 @@ net_open(struct net_device *dev)
 
        /* Fill in the MAC-level header (if not already set) */
        if (!card->mac_addr[0]) {
-               for (i = 0; i < ETH_ALEN - sizeof(unsigned long); i++)
+               for (i = 0; i < ETH_ALEN; i++)
                        dev->dev_addr[i] = 0xfc;
                if ((in_dev = dev->ip_ptr) != NULL) {
                        struct in_ifaddr *ifa = in_dev->ifa_list;
                        if (ifa != NULL)
-                               memcpy(dev->dev_addr + (ETH_ALEN - sizeof(unsigned long)), &ifa->ifa_local, sizeof(unsigned long));
+                               memcpy(dev->dev_addr + (ETH_ALEN - sizeof(ifa->ifa_local)), &ifa->ifa_local, sizeof(ifa->ifa_local));
                }
        } else
                memcpy(dev->dev_addr, card->mac_addr, ETH_ALEN);
index 84bdc2ee69e6bc1239775e27ef263cab8ef89805..a443e136dc41591136aecc1ec9e863ce43b2e35e 100644 (file)
@@ -354,7 +354,7 @@ static inline void i2o_block_sglist_free(struct i2o_block_request *ireq)
  *     @req: the request to prepare
  *
  *     Allocate the necessary i2o_block_request struct and connect it to
- *     the request. This is needed that we not loose the SG list later on.
+ *     the request. This is needed that we not lose the SG list later on.
  *
  *     Returns BLKPREP_OK on success or BLKPREP_DEFER on failure.
  */
index be2b5926d26c14b34bcbb40fd4db664f50618495..6e53a30bfd38a7809f8bbcb2ce9b0f3966f35413 100644 (file)
@@ -49,7 +49,6 @@ static int i2o_hrt_get(struct i2o_controller *c);
 /**
  *     i2o_msg_get_wait - obtain an I2O message from the IOP
  *     @c: I2O controller
- *     @msg: pointer to a I2O message pointer
  *     @wait: how long to wait until timeout
  *
  *     This function waits up to wait seconds for a message slot to be
index 76a76751da3660ce63123844d97eca891d2cbab2..6659b2275c0c6a5ce150906c25ac1d106700065a 100644 (file)
@@ -37,9 +37,9 @@
 #define        OPCODE_NORM_READ        0x03    /* Read data bytes (low frequency) */
 #define        OPCODE_FAST_READ        0x0b    /* Read data bytes (high frequency) */
 #define        OPCODE_PP               0x02    /* Page program (up to 256 bytes) */
-#define        OPCODE_BE_4K            0x20    /* Erase 4KiB block */
+#define        OPCODE_BE_4K            0x20    /* Erase 4KiB block */
 #define        OPCODE_BE_32K           0x52    /* Erase 32KiB block */
-#define        OPCODE_BE               0xc7    /* Erase whole flash block */
+#define        OPCODE_CHIP_ERASE       0xc7    /* Erase whole flash chip */
 #define        OPCODE_SE               0xd8    /* Sector erase (usually 64KiB) */
 #define        OPCODE_RDID             0x9f    /* Read JEDEC ID */
 
@@ -167,7 +167,7 @@ static int wait_till_ready(struct m25p *flash)
  *
  * Returns 0 if successful, non-zero otherwise.
  */
-static int erase_block(struct m25p *flash)
+static int erase_chip(struct m25p *flash)
 {
        DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB\n",
                        flash->spi->dev.bus_id, __func__,
@@ -181,7 +181,7 @@ static int erase_block(struct m25p *flash)
        write_enable(flash);
 
        /* Set up command buffer. */
-       flash->command[0] = OPCODE_BE;
+       flash->command[0] = OPCODE_CHIP_ERASE;
 
        spi_write(flash->spi, flash->command, 1);
 
@@ -250,15 +250,18 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr)
 
        mutex_lock(&flash->lock);
 
-       /* REVISIT in some cases we could speed up erasing large regions
-        * by using OPCODE_SE instead of OPCODE_BE_4K
-        */
-
-       /* now erase those sectors */
-       if (len == flash->mtd.size && erase_block(flash)) {
+       /* whole-chip erase? */
+       if (len == flash->mtd.size && erase_chip(flash)) {
                instr->state = MTD_ERASE_FAILED;
                mutex_unlock(&flash->lock);
                return -EIO;
+
+       /* REVISIT in some cases we could speed up erasing large regions
+        * by using OPCODE_SE instead of OPCODE_BE_4K.  We may have set up
+        * to use "small sector erase", but that's not always optimal.
+        */
+
+       /* "sector"-at-a-time erase */
        } else {
                while (len) {
                        if (erase_sector(flash, addr)) {
@@ -574,10 +577,11 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
        for (tmp = 0, info = m25p_data;
                        tmp < ARRAY_SIZE(m25p_data);
                        tmp++, info++) {
-               if (info->jedec_id == jedec)
-                       if (ext_jedec != 0 && info->ext_id != ext_jedec)
+               if (info->jedec_id == jedec) {
+                       if (info->ext_id != 0 && info->ext_id != ext_jedec)
                                continue;
                        return info;
+               }
        }
        dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec);
        return NULL;
index 42d844f8f6bfef79bdfef42ed48b33368ac4ecd0..dfbf3f270cea9441a7261b69ca3c9f8aa9c87770 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mtd/concat.h>
-#include <asm/io.h>
+#include <linux/io.h>
 
 #define MAX_RESOURCES          4
 
@@ -27,7 +27,6 @@ struct physmap_flash_info {
        struct mtd_info         *mtd[MAX_RESOURCES];
        struct mtd_info         *cmtd;
        struct map_info         map[MAX_RESOURCES];
-       struct resource         *res;
 #ifdef CONFIG_MTD_PARTITIONS
        int                     nr_parts;
        struct mtd_partition    *parts;
@@ -70,16 +69,7 @@ static int physmap_flash_remove(struct platform_device *dev)
 #endif
                        map_destroy(info->mtd[i]);
                }
-
-               if (info->map[i].virt != NULL)
-                       iounmap(info->map[i].virt);
-       }
-
-       if (info->res != NULL) {
-               release_resource(info->res);
-               kfree(info->res);
        }
-
        return 0;
 }
 
@@ -101,7 +91,8 @@ static int physmap_flash_probe(struct platform_device *dev)
        if (physmap_data == NULL)
                return -ENODEV;
 
-       info = kzalloc(sizeof(struct physmap_flash_info), GFP_KERNEL);
+       info = devm_kzalloc(&dev->dev, sizeof(struct physmap_flash_info),
+                           GFP_KERNEL);
        if (info == NULL) {
                err = -ENOMEM;
                goto err_out;
@@ -114,10 +105,10 @@ static int physmap_flash_probe(struct platform_device *dev)
                       (unsigned long long)(dev->resource[i].end - dev->resource[i].start + 1),
                       (unsigned long long)dev->resource[i].start);
 
-               info->res = request_mem_region(dev->resource[i].start,
-                                              dev->resource[i].end - dev->resource[i].start + 1,
-                                              dev->dev.bus_id);
-               if (info->res == NULL) {
+               if (!devm_request_mem_region(&dev->dev,
+                       dev->resource[i].start,
+                       dev->resource[i].end - dev->resource[i].start + 1,
+                       dev->dev.bus_id)) {
                        dev_err(&dev->dev, "Could not reserve memory region\n");
                        err = -ENOMEM;
                        goto err_out;
@@ -129,7 +120,8 @@ static int physmap_flash_probe(struct platform_device *dev)
                info->map[i].bankwidth = physmap_data->width;
                info->map[i].set_vpp = physmap_data->set_vpp;
 
-               info->map[i].virt = ioremap(info->map[i].phys, info->map[i].size);
+               info->map[i].virt = devm_ioremap(&dev->dev, info->map[i].phys,
+                                                info->map[i].size);
                if (info->map[i].virt == NULL) {
                        dev_err(&dev->dev, "Failed to ioremap flash region\n");
                        err = EIO;
index 024e3fffd4bb49b6176af4701c07e344120a3fc2..a83192f80eba5176b6bbad4649bd5996159b086a 100644 (file)
@@ -163,9 +163,11 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
        ret = parse_mtd_partitions(&fun->mtd, part_types, &fun->parts, 0);
 
 #ifdef CONFIG_MTD_OF_PARTS
-       if (ret == 0)
-               ret = of_mtd_parse_partitions(fun->dev, &fun->mtd,
-                                             flash_np, &fun->parts);
+       if (ret == 0) {
+               ret = of_mtd_parse_partitions(fun->dev, flash_np, &fun->parts);
+               if (ret < 0)
+                       goto err;
+       }
 #endif
        if (ret > 0)
                ret = add_mtd_partitions(&fun->mtd, fun->parts, ret);
index 75c899039023051e9b0f8dda595d734ff9aebdc0..9bd6c9ac844396553cbbfcf026860ff4420bce25 100644 (file)
@@ -141,6 +141,7 @@ static int __devinit pasemi_nand_probe(struct of_device *ofdev,
        }
 
        lpcctl = pci_resource_start(pdev, 0);
+       pci_dev_put(pdev);
 
        if (!request_region(lpcctl, 4, driver_name)) {
                err = -EBUSY;
index c0fa9c9edf089c1a039ded475fb13740cfa52d1f..15f0a26730aea38e4c65708aac43473a8da02122 100644 (file)
@@ -269,6 +269,7 @@ static struct pxa3xx_nand_timing stm2GbX16_timing = {
 
 static struct pxa3xx_nand_flash stm2GbX16 = {
        .timing = &stm2GbX16_timing,
+       .cmdset = &largepage_cmdset,
        .page_per_block = 64,
        .page_size = 2048,
        .flash_width = 16,
index e39b21d3e168e5bb3cabf1a076193bca3f33bcab..a7e4d985f5ef553892a4fba5890647324f1c156c 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach/flash.h>
-#include <asm/arch/gpmc.h>
-#include <asm/arch/onenand.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/pm.h>
+#include <mach/gpmc.h>
+#include <mach/onenand.h>
+#include <mach/gpio.h>
+#include <mach/pm.h>
 
-#include <linux/dma-mapping.h>
-#include <asm/dma-mapping.h>
-#include <asm/arch/dma.h>
+#include <mach/dma.h>
 
-#include <asm/arch/board.h>
+#include <mach/board.h>
 
 #define DRIVER_NAME "omap2-onenand"
 
index d07e3f1489510642c0cde8b41b96875fdc115c92..a1a3d0e5d2b4ac6c30637ca3f8a308a7d56c5d3a 100644 (file)
@@ -3144,6 +3144,28 @@ bnx2_has_work(struct bnx2_napi *bnapi)
        return 0;
 }
 
+static void
+bnx2_chk_missed_msi(struct bnx2 *bp)
+{
+       struct bnx2_napi *bnapi = &bp->bnx2_napi[0];
+       u32 msi_ctrl;
+
+       if (bnx2_has_work(bnapi)) {
+               msi_ctrl = REG_RD(bp, BNX2_PCICFG_MSI_CONTROL);
+               if (!(msi_ctrl & BNX2_PCICFG_MSI_CONTROL_ENABLE))
+                       return;
+
+               if (bnapi->last_status_idx == bp->idle_chk_status_idx) {
+                       REG_WR(bp, BNX2_PCICFG_MSI_CONTROL, msi_ctrl &
+                              ~BNX2_PCICFG_MSI_CONTROL_ENABLE);
+                       REG_WR(bp, BNX2_PCICFG_MSI_CONTROL, msi_ctrl);
+                       bnx2_msi(bp->irq_tbl[0].vector, bnapi);
+               }
+       }
+
+       bp->idle_chk_status_idx = bnapi->last_status_idx;
+}
+
 static void bnx2_poll_link(struct bnx2 *bp, struct bnx2_napi *bnapi)
 {
        struct status_block *sblk = bnapi->status_blk.msi;
@@ -3218,14 +3240,15 @@ static int bnx2_poll(struct napi_struct *napi, int budget)
 
                work_done = bnx2_poll_work(bp, bnapi, work_done, budget);
 
-               if (unlikely(work_done >= budget))
-                       break;
-
                /* bnapi->last_status_idx is used below to tell the hw how
                 * much work has been processed, so we must read it before
                 * checking for more work.
                 */
                bnapi->last_status_idx = sblk->status_idx;
+
+               if (unlikely(work_done >= budget))
+                       break;
+
                rmb();
                if (likely(!bnx2_has_work(bnapi))) {
                        netif_rx_complete(bp->dev, napi);
@@ -4570,6 +4593,8 @@ bnx2_init_chip(struct bnx2 *bp)
        for (i = 0; i < BNX2_MAX_MSIX_VEC; i++)
                bp->bnx2_napi[i].last_status_idx = 0;
 
+       bp->idle_chk_status_idx = 0xffff;
+
        bp->rx_mode = BNX2_EMAC_RX_MODE_SORT_MODE;
 
        /* Set up how to generate a link change interrupt. */
@@ -5718,6 +5743,10 @@ bnx2_timer(unsigned long data)
        if (atomic_read(&bp->intr_sem) != 0)
                goto bnx2_restart_timer;
 
+       if ((bp->flags & (BNX2_FLAG_USING_MSI | BNX2_FLAG_ONE_SHOT_MSI)) ==
+            BNX2_FLAG_USING_MSI)
+               bnx2_chk_missed_msi(bp);
+
        bnx2_send_heart_beat(bp);
 
        bp->stats_blk->stat_FwRxDrop =
index 617d953401607e884873cf41a32fdf6dd73c1024..0b032c3c7b611c17cee29b12a62809839a1dae2b 100644 (file)
@@ -378,6 +378,9 @@ struct l2_fhdr {
  *  pci_config_l definition
  *  offset: 0000
  */
+#define BNX2_PCICFG_MSI_CONTROL                                0x00000058
+#define BNX2_PCICFG_MSI_CONTROL_ENABLE                  (1L<<16)
+
 #define BNX2_PCICFG_MISC_CONFIG                                0x00000068
 #define BNX2_PCICFG_MISC_CONFIG_TARGET_BYTE_SWAP        (1L<<2)
 #define BNX2_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP     (1L<<3)
@@ -6863,6 +6866,9 @@ struct bnx2 {
 
        u8                      num_tx_rings;
        u8                      num_rx_rings;
+
+       u32                     idle_chk_status_idx;
+
 };
 
 #define REG_RD(bp, offset)                                     \
index e1b441effbbec15b81de2fe4b2d36992ac993724..c414554ac3217f22845b8e71901117bc5fffaaad 100644 (file)
@@ -568,6 +568,17 @@ static u16 erxrdpt_workaround(u16 next_packet_ptr, u16 start, u16 end)
        return erxrdpt;
 }
 
+/*
+ * Calculate wrap around when reading beyond the end of the RX buffer
+ */
+static u16 rx_packet_start(u16 ptr)
+{
+       if (ptr + RSV_SIZE > RXEND_INIT)
+               return (ptr + RSV_SIZE) - (RXEND_INIT - RXSTART_INIT + 1);
+       else
+               return ptr + RSV_SIZE;
+}
+
 static void nolock_rxfifo_init(struct enc28j60_net *priv, u16 start, u16 end)
 {
        u16 erxrdpt;
@@ -938,8 +949,9 @@ static void enc28j60_hw_rx(struct net_device *ndev)
                        skb->dev = ndev;
                        skb_reserve(skb, NET_IP_ALIGN);
                        /* copy the packet from the receive buffer */
-                       enc28j60_mem_read(priv, priv->next_pk_ptr + sizeof(rsv),
-                                       len, skb_put(skb, len));
+                       enc28j60_mem_read(priv,
+                               rx_packet_start(priv->next_pk_ptr),
+                               len, skb_put(skb, len));
                        if (netif_msg_pktdata(priv))
                                dump_packet(__func__, skb->len, skb->data);
                        skb->protocol = eth_type_trans(skb, ndev);
index b9bed82e1d214089f5b4e6682a965e11c781d6e5..b289a0a2b94563ea37b910c05deef15b6b61d0b6 100644 (file)
@@ -401,6 +401,8 @@ static int netx_eth_drv_probe(struct platform_device *pdev)
        priv->xmac_base = priv->xc->xmac_base;
        priv->sram_base = priv->xc->sram_base;
 
+       spin_lock_init(&priv->lock);
+
        ret = pfifo_request(PFIFO_MASK(priv->id));
        if (ret) {
                printk("unable to request PFIFO\n");
index dcce3542d5a771d9eb24753d8d464854bb4e6639..7a9f901d4ff6dee5cf15ae78d0f9bb763344bdd7 100644 (file)
@@ -3897,6 +3897,7 @@ static int ipw_disassociate(void *data)
        if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING)))
                return 0;
        ipw_send_disassociate(data, 0);
+       netif_carrier_off(priv->net_dev);
        return 1;
 }
 
@@ -10190,6 +10191,9 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
        u16 remaining_bytes;
        int fc;
 
+       if (!(priv->status & STATUS_ASSOCIATED))
+               goto drop;
+
        hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
        switch (priv->ieee->iw_mode) {
        case IW_MODE_ADHOC:
index 4c312c55f90cf49838af8954e0e891a0893af99c..01a84585133834a45c603a0c55763b7864441181 100644 (file)
@@ -290,6 +290,9 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
        priv->num_stations = 0;
        memset(priv->stations, 0, sizeof(priv->stations));
 
+       /* clean ucode key table bit map */
+       priv->ucode_key_table = 0;
+
        spin_unlock_irqrestore(&priv->sta_lock, flags);
 }
 EXPORT_SYMBOL(iwl_clear_stations_table);
index 61797f3f8d5c9a475b85d7fb980fe6a16dbb804a..26f7084d3011b7f8f514a4e23090ddfce33ca62c 100644 (file)
@@ -475,7 +475,7 @@ static int iwl_get_free_ucode_key_index(struct iwl_priv *priv)
                if (!test_and_set_bit(i, &priv->ucode_key_table))
                        return i;
 
-       return -1;
+       return WEP_INVALID_OFFSET;
 }
 
 int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty)
@@ -620,6 +620,9 @@ static int iwl_set_wep_dynamic_key_info(struct iwl_priv *priv,
        /* else, we are overriding an existing key => no need to allocated room
         * in uCode. */
 
+       WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
+               "no space for new kew");
+
        priv->stations[sta_id].sta.key.key_flags = key_flags;
        priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
        priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
@@ -637,6 +640,7 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
 {
        unsigned long flags;
        __le16 key_flags = 0;
+       int ret;
 
        key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK);
        key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
@@ -664,14 +668,18 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
        /* else, we are overriding an existing key => no need to allocated room
         * in uCode. */
 
+       WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
+               "no space for new kew");
+
        priv->stations[sta_id].sta.key.key_flags = key_flags;
        priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
        priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
 
+       ret = iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
+
        spin_unlock_irqrestore(&priv->sta_lock, flags);
 
-       IWL_DEBUG_INFO("hwcrypto: modify ucode station key info\n");
-       return iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
+       return ret;
 }
 
 static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
@@ -696,6 +704,9 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
        /* else, we are overriding an existing key => no need to allocated room
         * in uCode. */
 
+       WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
+               "no space for new kew");
+
        /* This copy is acutally not needed: we get the key with each TX */
        memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16);
 
@@ -734,6 +745,13 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
                return 0;
        }
 
+       if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
+               IWL_WARNING("Removing wrong key %d 0x%x\n",
+                           keyconf->keyidx, key_flags);
+               spin_unlock_irqrestore(&priv->sta_lock, flags);
+               return 0;
+       }
+
        if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset,
                &priv->ucode_key_table))
                IWL_ERROR("index %d not used in uCode key table.\n",
index fe1867b25ff7fb522e57927dfa6180f5f0f177bb..cac732f4047f524b3b575a1e86dbee1d7fd68644 100644 (file)
@@ -615,7 +615,7 @@ static int filter_ack(struct ieee80211_hw *hw, struct ieee80211_hdr *rx_hdr,
                struct ieee80211_hdr *tx_hdr;
 
                tx_hdr = (struct ieee80211_hdr *)skb->data;
-               if (likely(!compare_ether_addr(tx_hdr->addr2, rx_hdr->addr1)))
+               if (likely(!memcmp(tx_hdr->addr2, rx_hdr->addr1, ETH_ALEN)))
                {
                        __skb_unlink(skb, q);
                        tx_status(hw, skb, IEEE80211_TX_STAT_ACK, stats->signal, 1);
index 341d7a5b45a28c3ecab9de39f9c0e515e5ac4331..4e91419e8911c50bcfbc18aa1d536e88c41178c0 100644 (file)
@@ -209,12 +209,18 @@ static int ds1672_probe(struct i2c_client *client,
        return err;
 }
 
+static struct i2c_device_id ds1672_id[] = {
+       { "ds1672", 0 },
+       { }
+};
+
 static struct i2c_driver ds1672_driver = {
        .driver = {
                   .name = "rtc-ds1672",
                   },
        .probe = &ds1672_probe,
        .remove = &ds1672_remove,
+       .id_table = ds1672_id,
 };
 
 static int __init ds1672_init(void)
index 80782798763fa2528993ed652b0cf337e9d79008..a4f6665ab3c56760bbf72f63e05649d69dda3a03 100644 (file)
@@ -247,12 +247,18 @@ max6900_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return 0;
 }
 
+static struct i2c_device_id max6900_id[] = {
+       { "max6900", 0 },
+       { }
+};
+
 static struct i2c_driver max6900_driver = {
        .driver = {
                   .name = "rtc-max6900",
                   },
        .probe = max6900_probe,
        .remove = max6900_remove,
+       .id_table = max6900_id,
 };
 
 static int __init max6900_init(void)
index abe87a4d266520d67976ac7f7620cbdfe07446c2..01d8da9afdc8506f0469a3b8a8c6284b98a235fe 100644 (file)
@@ -337,7 +337,7 @@ static int twl4030_rtc_ioctl(struct device *dev, unsigned int cmd,
 }
 
 #else
-#define        omap_rtc_ioctl  NULL
+#define        twl4030_rtc_ioctl       NULL
 #endif
 
 static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc)
index 6117d3db0b668980618991a2f66f578410f6e1a7..28c00c3d58f58273af3e1ab9bacd6f2df9e401c8 100644 (file)
@@ -591,8 +591,8 @@ mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
        /* Update the per-port timeout */
        uart_update_timeout(port, new->c_cflag, baud);
 
-       /* Do our best to flush TX & RX, so we don't loose anything */
-       /* But we don't wait indefinitly ! */
+       /* Do our best to flush TX & RX, so we don't lose anything */
+       /* But we don't wait indefinitely ! */
        j = 5000000;    /* Maximum wait */
        /* FIXME Can't receive chars since set_termios might be called at early
         * boot for the console, all stuff is not yet ready to receive at that
index 317d239ab74043cf10ada65e9329d4da0d3e87fe..29cbb0afef8e735276fe3fb39d6b2da5519ae6b2 100644 (file)
@@ -177,5 +177,5 @@ module_exit(s3c2440_serial_exit);
 
 MODULE_DESCRIPTION("Samsung S3C2440,S3C2442 SoC Serial port driver");
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
-MODULE_LICENSE("GPLi v2");
+MODULE_LICENSE("GPL v2");
 MODULE_ALIAS("platform:s3c2440-uart");
index 51d7bdea2869ae147953fd10bbd7c3984c360aee..aad1359a3eb18719c30dff180f70482b131ae886 100644 (file)
@@ -1498,7 +1498,7 @@ static int ftdi_open(struct tty_struct *tty,
                        priv->interface, buf, 0, WDR_TIMEOUT);
 
        /* Termios defaults are set by usb_serial_init. We don't change
-          port->tty->termios - this would loose speed settings, etc.
+          port->tty->termios - this would lose speed settings, etc.
           This is same behaviour as serial.c/rs_open() - Kuba */
 
        /* ftdi_set_termios  will send usb control messages */
index a547e5d4c8bfee248e1722a285237aee93b49cf1..8da5e5ab8547edcc955e1c22658aa096ac0f8bc3 100644 (file)
@@ -256,7 +256,8 @@ void radeonfb_imageblit(struct fb_info *info, const struct fb_image *image)
                return;
 
        /* We only do 1 bpp color expansion for now */
-       if (info->flags & FBINFO_HWACCEL_DISABLED || image->depth != 1)
+       if (!accel_cexp ||
+           (info->flags & FBINFO_HWACCEL_DISABLED) || image->depth != 1)
                goto fallback;
 
        /* Fallback if running out of the screen. We may do clipping
index b3ffe8205d2b738b7b567fa80820d2f71c662c25..d5b27f9d374d0f23f72dd18c67be2e2e8d22c579 100644 (file)
@@ -282,6 +282,8 @@ static int backlight = 1;
 static int backlight = 0;
 #endif
 
+int accel_cexp = 0;
+
 /*
  * prototypes
  */
@@ -2520,6 +2522,8 @@ static int __init radeonfb_setup (char *options)
                } else if (!strncmp(this_opt, "ignore_devlist", 14)) {
                        ignore_devlist = 1;
 #endif
+               } else if (!strncmp(this_opt, "accel_cexp", 12)) {
+                       accel_cexp = 1;
                } else
                        mode_option = this_opt;
        }
@@ -2567,6 +2571,8 @@ module_param(monitor_layout, charp, 0);
 MODULE_PARM_DESC(monitor_layout, "Specify monitor mapping (like XFree86)");
 module_param(force_measure_pll, bool, 0);
 MODULE_PARM_DESC(force_measure_pll, "Force measurement of PLL (debug)");
+module_param(accel_cexp, bool, 0);
+MODULE_PARM_DESC(accel_cexp, "Use acceleration engine for color expansion");
 #ifdef CONFIG_MTRR
 module_param(nomtrr, bool, 0);
 MODULE_PARM_DESC(nomtrr, "bool: disable use of MTRR registers");
index ea0b5b47acaf437027b0a5b153dd6cc4c5d5e1b3..974ca6d865405a7140fa67244bcfab0bcf13d7c0 100644 (file)
@@ -638,4 +638,6 @@ static inline void radeonfb_bl_init(struct radeonfb_info *rinfo) {}
 static inline void radeonfb_bl_exit(struct radeonfb_info *rinfo) {}
 #endif
 
+extern int accel_cexp;
+
 #endif /* __RADEONFB_H__ */
index 67ff370d80afed55b52a256b0fbff13e8f6a2dc4..0b2adefe9e3d55f3b20e3e668a8d5e7969058948 100644 (file)
@@ -3531,12 +3531,18 @@ static void fbcon_exit(void)
        softback_buf = 0UL;
 
        for (i = 0; i < FB_MAX; i++) {
+               int pending;
+
                mapped = 0;
                info = registered_fb[i];
 
                if (info == NULL)
                        continue;
 
+               pending = cancel_work_sync(&info->queue);
+               DPRINTK("fbcon: %s pending work\n", (pending ? "canceled" :
+                       "no"));
+
                for (j = first_fb_vc; j <= last_fb_vc; j++) {
                        if (con2fb_map[j] == i)
                                mapped = 1;
index 38718d95fbb9ad3091ba7652e72f1377235bb19a..fb64234a3825a2a9d1ee7f24e52e7cd75b969713 100644 (file)
@@ -927,9 +927,9 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev,
        }
 
        dev_dbg(dev, "fb phys 0x%llx 0x%lx\n",
-               (u64)par->fb_base_phys, (ulong)par->mapped_vram);
+               (unsigned long long)par->fb_base_phys, (ulong)par->mapped_vram);
        dev_dbg(dev, "mmio phys 0x%llx 0x%lx\n",
-               (u64)par->mmio_base_phys, (ulong)par->mmio_len);
+               (unsigned long long)par->mmio_base_phys, (ulong)par->mmio_len);
 
        if (mb862xx_pci_gdc_init(par))
                goto io_unmap;
index 5a5e407dc45f713cc9252f11efcf1ae2b113f2a3..1a49519dafa483b864c992dfb1f92b2f8e02505f 100644 (file)
@@ -392,7 +392,7 @@ static void set_fb_fix(struct fb_info *fbi)
        int bpp;
 
        rg = &plane->fbdev->mem_desc.region[plane->idx];
-       fbi->screen_base        = (char __iomem *)rg->vaddr;
+       fbi->screen_base        = rg->vaddr;
        fix->smem_start         = rg->paddr;
        fix->smem_len           = rg->size;
 
index 80246bad1b7fe513a7da15f4d6ac057cad3d7e54..890e018288171e90d9991b47e7077dfbaf9c7cf8 100644 (file)
@@ -367,6 +367,8 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
         * Try to get any dentry for the given file handle from the filesystem.
         */
        result = nop->fh_to_dentry(mnt->mnt_sb, fid, fh_len, fileid_type);
+       if (!result)
+               result = ERR_PTR(-ESTALE);
        if (IS_ERR(result))
                return result;
 
@@ -420,6 +422,8 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
 
                target_dir = nop->fh_to_parent(mnt->mnt_sb, fid,
                                fh_len, fileid_type);
+               if (!target_dir)
+                       goto err_result;
                err = PTR_ERR(target_dir);
                if (IS_ERR(target_dir))
                        goto err_result;
index d2003cdc36aa687ab998a8c558144ddcc23ae6bb..db35cfdb3c8b6e25424a78af0aaaa69579cc2a07 100644 (file)
@@ -609,8 +609,8 @@ int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
 
        if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
                                                EXT4_FREEBLOCKS_WATERMARK) {
-               free_blocks  = percpu_counter_sum(fbc);
-               dirty_blocks = percpu_counter_sum(dbc);
+               free_blocks  = percpu_counter_sum_positive(fbc);
+               dirty_blocks = percpu_counter_sum_positive(dbc);
                if (dirty_blocks < 0) {
                        printk(KERN_CRIT "Dirty block accounting "
                                        "went wrong %lld\n",
index ac4f7db9f13452790e4d41daa8e6fc9633506259..549daf8005fb5da252252d7e5bf0e73185250169 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/signal.h>
 #include <linux/rcupdate.h>
 #include <linux/pid_namespace.h>
+#include <linux/smp_lock.h>
 
 #include <asm/poll.h>
 #include <asm/siginfo.h>
@@ -175,6 +176,11 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
        if (error)
                return error;
 
+       /*
+        * We still need a lock here for now to keep multiple FASYNC calls
+        * from racing with each other.
+        */
+       lock_kernel();
        if ((arg ^ filp->f_flags) & FASYNC) {
                if (filp->f_op && filp->f_op->fasync) {
                        error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
@@ -185,6 +191,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
 
        filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
  out:
+       unlock_kernel();
        return error;
 }
 
index 7bbed1b89825f8b37f4fa753201290d0002bf618..dae3f28f30d4779ee69cc8780d8424818b0fbfa4 100644 (file)
@@ -428,11 +428,13 @@ void inotify_unmount_inodes(struct list_head *list)
                watches = &inode->inotify_watches;
                list_for_each_entry_safe(watch, next_w, watches, i_list) {
                        struct inotify_handle *ih= watch->ih;
+                       get_inotify_watch(watch);
                        mutex_lock(&ih->mutex);
                        ih->in_ops->handle_event(watch, watch->wd, IN_UNMOUNT, 0,
                                                 NULL, NULL);
                        inotify_remove_watch_locked(ih, watch);
                        mutex_unlock(&ih->mutex);
+                       put_inotify_watch(watch);
                }
                mutex_unlock(&inode->inotify_mutex);
                iput(inode);            
index d152856c371be4906b7effec1f3c42842a4cee2d..43e8b2c0664b1b3d302a6d46e3fa40185edb5ae7 100644 (file)
@@ -400,11 +400,9 @@ static int ioctl_fioasync(unsigned int fd, struct file *filp,
 
        /* Did FASYNC state change ? */
        if ((flag ^ filp->f_flags) & FASYNC) {
-               if (filp->f_op && filp->f_op->fasync) {
-                       lock_kernel();
+               if (filp->f_op && filp->f_op->fasync)
                        error = filp->f_op->fasync(fd, filp, on);
-                       unlock_kernel();
-               } else
+               else
                        error = -ENOTTY;
        }
        if (error)
@@ -440,11 +438,17 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
                break;
 
        case FIONBIO:
+               /* BKL needed to avoid races tweaking f_flags */
+               lock_kernel();
                error = ioctl_fionbio(filp, argp);
+               unlock_kernel();
                break;
 
        case FIOASYNC:
+               /* BKL needed to avoid races tweaking f_flags */
+               lock_kernel();
                error = ioctl_fioasync(fd, filp, argp);
+               unlock_kernel();
                break;
 
        case FIOQSIZE:
index 486cf3fe7139949a0911e0e33f9cb99a06bfb8fb..d4677603c88920b45e14af3d91b71894b2c5b7b2 100644 (file)
@@ -371,7 +371,7 @@ static int lstats_show_proc(struct seq_file *m, void *v)
                                task->latency_record[i].time,
                                task->latency_record[i].max);
                        for (q = 0; q < LT_BACKTRACEDEPTH; q++) {
-                               char sym[KSYM_NAME_LEN];
+                               char sym[KSYM_SYMBOL_LEN];
                                char *c;
                                if (!task->latency_record[i].backtrace[q])
                                        break;
index b770c095e45c62f86e78da2f9d1524085f9d45fd..3a8bdd7f5756e37d430f15b2b5b76fb672c9b965 100644 (file)
@@ -557,9 +557,9 @@ static u64 swap_pte_to_pagemap_entry(pte_t pte)
        return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT);
 }
 
-static unsigned long pte_to_pagemap_entry(pte_t pte)
+static u64 pte_to_pagemap_entry(pte_t pte)
 {
-       unsigned long pme = 0;
+       u64 pme = 0;
        if (is_swap_pte(pte))
                pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte))
                        | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP;
index 4ec0a296bdec8413394dbecedbf779bb19bfcf4b..7abdaa91ccd3738ea7e8633f16c78f3031ce15bf 100644 (file)
@@ -251,7 +251,7 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
 #define atomic_long_cmpxchg(l, old, new) \
        (atomic_cmpxchg((atomic_t *)(l), (old), (new)))
 #define atomic_long_xchg(v, new) \
-       (atomic_xchg((atomic_t *)(l), (new)))
+       (atomic_xchg((atomic_t *)(v), (new)))
 
 #endif  /*  BITS_PER_LONG == 64  */
 
index f10d367fb2a5b1f31f4741ddaf58f06a61968f61..c5f1c2c920e26c033761d640a81256b0b13c13eb 100644 (file)
@@ -1,6 +1,8 @@
 #include <asm-generic/audit_dir_write.h>
 __NR_acct,
+#ifdef __NR_swapon
 __NR_swapon,
+#endif
 __NR_quotactl,
 __NR_truncate,
 #ifdef __NR_truncate64
index 6272a395d43c0b73a6ef4fd5d0a19062d6154a38..8f0672d13eb1bf8bbddba0d30c6ecdfd30c94ddf 100644 (file)
@@ -391,6 +391,7 @@ extern int audit_classify_arch(int arch);
 #ifdef CONFIG_AUDITSYSCALL
 /* These are defined in auditsc.c */
                                /* Public API */
+extern void audit_finish_fork(struct task_struct *child);
 extern int  audit_alloc(struct task_struct *task);
 extern void audit_free(struct task_struct *task);
 extern void audit_syscall_entry(int arch,
@@ -434,7 +435,7 @@ static inline void audit_ptrace(struct task_struct *t)
 
                                /* Private API (for audit.c only) */
 extern unsigned int audit_serial(void);
-extern void auditsc_get_stamp(struct audit_context *ctx,
+extern int auditsc_get_stamp(struct audit_context *ctx,
                              struct timespec *t, unsigned int *serial);
 extern int  audit_set_loginuid(struct task_struct *task, uid_t loginuid);
 #define audit_get_loginuid(t) ((t)->loginuid)
@@ -504,6 +505,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
 extern int audit_n_rules;
 extern int audit_signals;
 #else
+#define audit_finish_fork(t)
 #define audit_alloc(t) ({ 0; })
 #define audit_free(t) do { ; } while (0)
 #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
@@ -516,7 +518,7 @@ extern int audit_signals;
 #define audit_inode(n,d) do { ; } while (0)
 #define audit_inode_child(d,i,p) do { ; } while (0)
 #define audit_core_dumps(i) do { ; } while (0)
-#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
+#define auditsc_get_stamp(c,t,s) (0)
 #define audit_get_loginuid(t) (-1)
 #define audit_get_sessionid(t) (-1)
 #define audit_log_task_context(b) do { ; } while (0)
index 6dcd30d806cd8539917fea7c0ae216160de0425d..031a315c0509e5aa9eaa73c080b7e76a44dc95a0 100644 (file)
@@ -662,6 +662,7 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn;
  * default timeout for SG_IO if none specified
  */
 #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ)
+#define BLK_MIN_SG_TIMEOUT     (7 * HZ)
 
 #ifdef CONFIG_BOUNCE
 extern int init_emergency_isa_pool(void);
index e9ca210ffa5b6cf9fd9c0c5f577bbca752fc04d1..f50785ad478147f8b4a80ba017dc1deba70d6368 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
 
-#define CAN_VERSION "20071116"
+#define CAN_VERSION "20081130"
 
 /* increment this number each time you change some user-space interface */
 #define CAN_ABI_VERSION "8"
index 703eb53cfa2b2a1512b7ce97d9c1da218ad9ac0f..9c5bc6be2b091274b37b14046f03ebf3db70c194 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/ktime.h>
 #include <linux/init.h>
 #include <linux/types.h>
+#include <linux/module.h>
 #include <linux/kallsyms.h>
 
 #ifdef CONFIG_FUNCTION_TRACER
@@ -231,7 +232,7 @@ ftrace_init_module(unsigned long *start, unsigned long *end) { }
 
 struct boot_trace {
        pid_t                   caller;
-       char                    func[KSYM_NAME_LEN];
+       char                    func[KSYM_SYMBOL_LEN];
        int                     result;
        unsigned long long      duration;               /* usecs */
        ktime_t                 calltime;
index 4414e93d875018b89b6363e2821093c38600d776..ce6d8ea3131e78136b3b50803c424c0fffbeb20a 100644 (file)
 
 #include "audit.h"
 
-/* No auditing will take place until audit_initialized != 0.
+/* No auditing will take place until audit_initialized == AUDIT_INITIALIZED.
  * (Initialization happens after skb_init is called.) */
+#define AUDIT_DISABLED         -1
+#define AUDIT_UNINITIALIZED    0
+#define AUDIT_INITIALIZED      1
 static int     audit_initialized;
 
 #define AUDIT_OFF      0
@@ -965,6 +968,9 @@ static int __init audit_init(void)
 {
        int i;
 
+       if (audit_initialized == AUDIT_DISABLED)
+               return 0;
+
        printk(KERN_INFO "audit: initializing netlink socket (%s)\n",
               audit_default ? "enabled" : "disabled");
        audit_sock = netlink_kernel_create(&init_net, NETLINK_AUDIT, 0,
@@ -976,7 +982,7 @@ static int __init audit_init(void)
 
        skb_queue_head_init(&audit_skb_queue);
        skb_queue_head_init(&audit_skb_hold_queue);
-       audit_initialized = 1;
+       audit_initialized = AUDIT_INITIALIZED;
        audit_enabled = audit_default;
        audit_ever_enabled |= !!audit_default;
 
@@ -999,13 +1005,21 @@ __initcall(audit_init);
 static int __init audit_enable(char *str)
 {
        audit_default = !!simple_strtol(str, NULL, 0);
-       printk(KERN_INFO "audit: %s%s\n",
-              audit_default ? "enabled" : "disabled",
-              audit_initialized ? "" : " (after initialization)");
-       if (audit_initialized) {
+       if (!audit_default)
+               audit_initialized = AUDIT_DISABLED;
+
+       printk(KERN_INFO "audit: %s", audit_default ? "enabled" : "disabled");
+
+       if (audit_initialized == AUDIT_INITIALIZED) {
                audit_enabled = audit_default;
                audit_ever_enabled |= !!audit_default;
+       } else if (audit_initialized == AUDIT_UNINITIALIZED) {
+               printk(" (after initialization)");
+       } else {
+               printk(" (until reboot)");
        }
+       printk("\n");
+
        return 1;
 }
 
@@ -1107,9 +1121,7 @@ unsigned int audit_serial(void)
 static inline void audit_get_stamp(struct audit_context *ctx,
                                   struct timespec *t, unsigned int *serial)
 {
-       if (ctx)
-               auditsc_get_stamp(ctx, t, serial);
-       else {
+       if (!ctx || !auditsc_get_stamp(ctx, t, serial)) {
                *t = CURRENT_TIME;
                *serial = audit_serial();
        }
@@ -1146,7 +1158,7 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
        int reserve;
        unsigned long timeout_start = jiffies;
 
-       if (!audit_initialized)
+       if (audit_initialized != AUDIT_INITIALIZED)
                return NULL;
 
        if (unlikely(audit_filter_type(type)))
index cf5bc2f5f9c3e527ac2ea72ec019d156be72ecb6..2a3f0afc4d2ac191835c39988506dfd84d1e4737 100644 (file)
@@ -1459,7 +1459,6 @@ void audit_free(struct task_struct *tsk)
 
 /**
  * audit_syscall_entry - fill in an audit record at syscall entry
- * @tsk: task being audited
  * @arch: architecture type
  * @major: major syscall type (function)
  * @a1: additional syscall register 1
@@ -1548,9 +1547,25 @@ void audit_syscall_entry(int arch, int major,
        context->ppid       = 0;
 }
 
+void audit_finish_fork(struct task_struct *child)
+{
+       struct audit_context *ctx = current->audit_context;
+       struct audit_context *p = child->audit_context;
+       if (!p || !ctx || !ctx->auditable)
+               return;
+       p->arch = ctx->arch;
+       p->major = ctx->major;
+       memcpy(p->argv, ctx->argv, sizeof(ctx->argv));
+       p->ctime = ctx->ctime;
+       p->dummy = ctx->dummy;
+       p->auditable = ctx->auditable;
+       p->in_syscall = ctx->in_syscall;
+       p->filterkey = kstrdup(ctx->filterkey, GFP_KERNEL);
+       p->ppid = current->pid;
+}
+
 /**
  * audit_syscall_exit - deallocate audit context after a system call
- * @tsk: task being audited
  * @valid: success/failure flag
  * @return_code: syscall return value
  *
@@ -1942,15 +1957,18 @@ EXPORT_SYMBOL_GPL(__audit_inode_child);
  *
  * Also sets the context as auditable.
  */
-void auditsc_get_stamp(struct audit_context *ctx,
+int auditsc_get_stamp(struct audit_context *ctx,
                       struct timespec *t, unsigned int *serial)
 {
+       if (!ctx->in_syscall)
+               return 0;
        if (!ctx->serial)
                ctx->serial = audit_serial();
        t->tv_sec  = ctx->ctime.tv_sec;
        t->tv_nsec = ctx->ctime.tv_nsec;
        *serial    = ctx->serial;
        ctx->auditable = 1;
+       return 1;
 }
 
 /* global counter which is incremented every time something logs in */
index 2a372a0e206fa2de99dbfdd594f86f6eb927bf40..8d6a7dd9282b8308f041d20b18dab139b85c18b3 100644 (file)
@@ -1398,6 +1398,7 @@ long do_fork(unsigned long clone_flags,
                        init_completion(&vfork);
                }
 
+               audit_finish_fork(p);
                tracehook_report_clone(trace, regs, clone_flags, nr, p);
 
                /*
index 5e7b45c569233536ef23dadfafd90e40d20b7f62..449db466bdbc280f1509dad905a72a6a1407d9cb 100644 (file)
@@ -191,7 +191,7 @@ static int lstats_show(struct seq_file *m, void *v)
                                latency_record[i].time,
                                latency_record[i].max);
                        for (q = 0; q < LT_BACKTRACEDEPTH; q++) {
-                               char sym[KSYM_NAME_LEN];
+                               char sym[KSYM_SYMBOL_LEN];
                                char *c;
                                if (!latency_record[i].backtrace[q])
                                        break;
index 32b0befdcb6a6cba585cb555d9db4a87246d9468..09ac2008f77b419a5c169e41f3ddcbab6aa90746 100644 (file)
@@ -1317,12 +1317,9 @@ static ssize_t relay_file_splice_read(struct file *in,
                if (ret < 0)
                        break;
                else if (!ret) {
-                       if (spliced)
-                               break;
-                       if (flags & SPLICE_F_NONBLOCK) {
+                       if (flags & SPLICE_F_NONBLOCK)
                                ret = -EAGAIN;
-                               break;
-                       }
+                       break;
                }
 
                *ppos += ret;
index a8663890a88c2e358f21b8cdc6f23a8ebb9d77e5..b255b939bc1b85bd4fc385df4e1322e9472b2b26 100644 (file)
@@ -62,10 +62,7 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc)
        for_each_online_cpu(cpu) {
                s32 *pcount = per_cpu_ptr(fbc->counters, cpu);
                ret += *pcount;
-               *pcount = 0;
        }
-       fbc->count = ret;
-
        spin_unlock(&fbc->lock);
        return ret;
 }
@@ -104,13 +101,13 @@ void percpu_counter_destroy(struct percpu_counter *fbc)
        if (!fbc->counters)
                return;
 
-       free_percpu(fbc->counters);
-       fbc->counters = NULL;
 #ifdef CONFIG_HOTPLUG_CPU
        mutex_lock(&percpu_counters_lock);
        list_del(&fbc->list);
        mutex_unlock(&percpu_counters_lock);
 #endif
+       free_percpu(fbc->counters);
+       fbc->counters = NULL;
 }
 EXPORT_SYMBOL(percpu_counter_destroy);
 
index 2a56124dbc28effcbda0a48c2268d1b7f763ee91..801c08b046e6cc0f1a12740dc74fed16ff018fe6 100644 (file)
@@ -176,7 +176,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
        int ret = 0;
        struct device *dev;
 
-       if (WARN_ON(bdi->dev))
+       if (bdi->dev)   /* The driver needs to use separate queues per device */
                goto exit;
 
        va_start(args, fmt);
index 1e0d6b237f4418c2f8b8ca50e88d85a787adc0a7..d8f07667fc8045e6690ab74a6e58806c7093ed7c 100644 (file)
@@ -987,25 +987,18 @@ out:
 /*
  * Determine the nodes of an array of pages and store it in an array of status.
  */
-static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
-                        const void __user * __user *pages,
-                        int __user *status)
+static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages,
+                               const void __user **pages, int *status)
 {
        unsigned long i;
-       int err;
 
        down_read(&mm->mmap_sem);
 
        for (i = 0; i < nr_pages; i++) {
-               const void __user *p;
-               unsigned long addr;
+               unsigned long addr = (unsigned long)(*pages);
                struct vm_area_struct *vma;
                struct page *page;
-
-               err = -EFAULT;
-               if (get_user(p, pages+i))
-                       goto out;
-               addr = (unsigned long) p;
+               int err;
 
                vma = find_vma(mm, addr);
                if (!vma)
@@ -1024,12 +1017,52 @@ static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
 
                err = page_to_nid(page);
 set_status:
-               put_user(err, status+i);
+               *status = err;
+
+               pages++;
+               status++;
+       }
+
+       up_read(&mm->mmap_sem);
+}
+
+/*
+ * Determine the nodes of a user array of pages and store it in
+ * a user array of status.
+ */
+static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
+                        const void __user * __user *pages,
+                        int __user *status)
+{
+#define DO_PAGES_STAT_CHUNK_NR 16
+       const void __user *chunk_pages[DO_PAGES_STAT_CHUNK_NR];
+       int chunk_status[DO_PAGES_STAT_CHUNK_NR];
+       unsigned long i, chunk_nr = DO_PAGES_STAT_CHUNK_NR;
+       int err;
+
+       for (i = 0; i < nr_pages; i += chunk_nr) {
+               if (chunk_nr + i > nr_pages)
+                       chunk_nr = nr_pages - i;
+
+               err = copy_from_user(chunk_pages, &pages[i],
+                                    chunk_nr * sizeof(*chunk_pages));
+               if (err) {
+                       err = -EFAULT;
+                       goto out;
+               }
+
+               do_pages_stat_array(mm, chunk_nr, chunk_pages, chunk_status);
+
+               err = copy_to_user(&status[i], chunk_status,
+                                  chunk_nr * sizeof(*chunk_status));
+               if (err) {
+                       err = -EFAULT;
+                       goto out;
+               }
        }
        err = 0;
 
 out:
-       up_read(&mm->mmap_sem);
        return err;
 }
 
index 0b3cbf090a674a1424cb1d7cc9e4cd4f3bfa4c02..ab27ff75051958fb992417ddcf675a296b96176e 100644 (file)
@@ -49,6 +49,9 @@ static int __init alloc_node_page_cgroup(int nid)
        start_pfn = NODE_DATA(nid)->node_start_pfn;
        nr_pages = NODE_DATA(nid)->node_spanned_pages;
 
+       if (!nr_pages)
+               return 0;
+
        table_size = sizeof(struct page_cgroup) * nr_pages;
 
        base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),
index 749588a50a5ac2764eb49cf944d8bf784eedfb5f..a2cd47d89e0aa1f159d8e9e6ed2dcee32969068f 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3597,7 +3597,7 @@ static int list_locations(struct kmem_cache *s, char *buf,
        for (i = 0; i < t.count; i++) {
                struct location *l = &t.loc[i];
 
-               if (len > PAGE_SIZE - 100)
+               if (len > PAGE_SIZE - KSYM_SYMBOL_LEN - 100)
                        break;
                len += sprintf(buf + len, "%7ld ", l->count);
 
index 2881987603ebd880fa6410553c2bef83b7a99d50..b135ec90cdeb92673e2e97389f7cf9afc3ae80c9 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -299,7 +299,6 @@ void lru_add_drain(void)
        put_cpu();
 }
 
-#if defined(CONFIG_NUMA) || defined(CONFIG_UNEVICTABLE_LRU)
 static void lru_add_drain_per_cpu(struct work_struct *dummy)
 {
        lru_add_drain();
@@ -313,18 +312,6 @@ int lru_add_drain_all(void)
        return schedule_on_each_cpu(lru_add_drain_per_cpu);
 }
 
-#else
-
-/*
- * Returns 0 for success
- */
-int lru_add_drain_all(void)
-{
-       lru_add_drain();
-       return 0;
-}
-#endif
-
 /*
  * Batched page_cache_release().  Decrement the reference count on all the
  * passed pages.  If it fell to zero then remove the page from the LRU and
index f3f6e0758562283ac51fc4267a4d87fed600e917..1ddb77ba3995c2d8f486baf32c1409b3daf8093f 100644 (file)
@@ -1717,7 +1717,7 @@ static int s_show(struct seq_file *m, void *p)
                v->addr, v->addr + v->size, v->size);
 
        if (v->caller) {
-               char buff[2 * KSYM_NAME_LEN];
+               char buff[KSYM_SYMBOL_LEN];
 
                seq_putc(m, ' ');
                sprint_symbol(buff, (unsigned long)v->caller);
index de1e4f2f3a43ea983f9a4eef973618772b69cc82..8fb54dc870b393d61373e308dfa8bec722d591a5 100644 (file)
@@ -293,7 +293,10 @@ static int svc_listen(struct socket *sock,int backlog)
                error = -EINVAL;
                goto out;
        }
-       vcc_insert_socket(sk);
+       if (test_bit(ATM_VF_LISTEN, &vcc->flags)) {
+               error = -EADDRINUSE;
+               goto out;
+        }
        set_bit(ATM_VF_WAITING, &vcc->flags);
        prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE);
        sigd_enq(vcc,as_listen,NULL,NULL,&vcc->local);
@@ -307,6 +310,7 @@ static int svc_listen(struct socket *sock,int backlog)
                goto out;
        }
        set_bit(ATM_VF_LISTEN,&vcc->flags);
+       vcc_insert_socket(sk);
        sk->sk_max_ack_backlog = backlog > 0 ? backlog : ATM_BACKLOG_DEFAULT;
        error = -sk->sk_err;
 out:
index 7d4d2b3c137ef6b84598d9bebd50b1a69dfaf707..3dadb338addd3ab36212333281ab377362a7e56f 100644 (file)
@@ -319,23 +319,52 @@ static struct dev_rcv_lists *find_dev_rcv_lists(struct net_device *dev)
        return n ? d : NULL;
 }
 
+/**
+ * find_rcv_list - determine optimal filterlist inside device filter struct
+ * @can_id: pointer to CAN identifier of a given can_filter
+ * @mask: pointer to CAN mask of a given can_filter
+ * @d: pointer to the device filter struct
+ *
+ * Description:
+ *  Returns the optimal filterlist to reduce the filter handling in the
+ *  receive path. This function is called by service functions that need
+ *  to register or unregister a can_filter in the filter lists.
+ *
+ *  A filter matches in general, when
+ *
+ *          <received_can_id> & mask == can_id & mask
+ *
+ *  so every bit set in the mask (even CAN_EFF_FLAG, CAN_RTR_FLAG) describe
+ *  relevant bits for the filter.
+ *
+ *  The filter can be inverted (CAN_INV_FILTER bit set in can_id) or it can
+ *  filter for error frames (CAN_ERR_FLAG bit set in mask). For error frames
+ *  there is a special filterlist and a special rx path filter handling.
+ *
+ * Return:
+ *  Pointer to optimal filterlist for the given can_id/mask pair.
+ *  Constistency checked mask.
+ *  Reduced can_id to have a preprocessed filter compare value.
+ */
 static struct hlist_head *find_rcv_list(canid_t *can_id, canid_t *mask,
                                        struct dev_rcv_lists *d)
 {
        canid_t inv = *can_id & CAN_INV_FILTER; /* save flag before masking */
 
-       /* filter error frames */
+       /* filter for error frames in extra filterlist */
        if (*mask & CAN_ERR_FLAG) {
-               /* clear CAN_ERR_FLAG in list entry */
+               /* clear CAN_ERR_FLAG in filter entry */
                *mask &= CAN_ERR_MASK;
                return &d->rx[RX_ERR];
        }
 
-       /* ensure valid values in can_mask */
-       if (*mask & CAN_EFF_FLAG)
-               *mask &= (CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG);
-       else
-               *mask &= (CAN_SFF_MASK | CAN_RTR_FLAG);
+       /* with cleared CAN_ERR_FLAG we have a simple mask/value filterpair */
+
+#define CAN_EFF_RTR_FLAGS (CAN_EFF_FLAG | CAN_RTR_FLAG)
+
+       /* ensure valid values in can_mask for 'SFF only' frame filtering */
+       if ((*mask & CAN_EFF_FLAG) && !(*can_id & CAN_EFF_FLAG))
+               *mask &= (CAN_SFF_MASK | CAN_EFF_RTR_FLAGS);
 
        /* reduce condition testing at receive time */
        *can_id &= *mask;
@@ -348,15 +377,19 @@ static struct hlist_head *find_rcv_list(canid_t *can_id, canid_t *mask,
        if (!(*mask))
                return &d->rx[RX_ALL];
 
-       /* use extra filterset for the subscription of exactly *ONE* can_id */
-       if (*can_id & CAN_EFF_FLAG) {
-               if (*mask == (CAN_EFF_MASK | CAN_EFF_FLAG)) {
-                       /* RFC: a use-case for hash-tables in the future? */
-                       return &d->rx[RX_EFF];
+       /* extra filterlists for the subscription of a single non-RTR can_id */
+       if (((*mask & CAN_EFF_RTR_FLAGS) == CAN_EFF_RTR_FLAGS)
+           && !(*can_id & CAN_RTR_FLAG)) {
+
+               if (*can_id & CAN_EFF_FLAG) {
+                       if (*mask == (CAN_EFF_MASK | CAN_EFF_RTR_FLAGS)) {
+                               /* RFC: a future use-case for hash-tables? */
+                               return &d->rx[RX_EFF];
+                       }
+               } else {
+                       if (*mask == (CAN_SFF_MASK | CAN_EFF_RTR_FLAGS))
+                               return &d->rx_sff[*can_id];
                }
-       } else {
-               if (*mask == CAN_SFF_MASK)
-                       return &d->rx_sff[*can_id];
        }
 
        /* default: filter via can_id/can_mask */
@@ -589,7 +622,10 @@ static int can_rcv_filter(struct dev_rcv_lists *d, struct sk_buff *skb)
                }
        }
 
-       /* check CAN_ID specific entries */
+       /* check filterlists for single non-RTR can_ids */
+       if (can_id & CAN_RTR_FLAG)
+               return matches;
+
        if (can_id & CAN_EFF_FLAG) {
                hlist_for_each_entry_rcu(r, n, &d->rx[RX_EFF], list) {
                        if (r->can_id == can_id) {
index d0dd382001e210c052e2fcb1ca6ae304d72b46a1..da0d426c0ce473f53450c65690a7bfe4a3e79f42 100644 (file)
 #define BCM_CAN_DLC_MASK 0x0F /* clean private flags in can_dlc by masking */
 
 /* get best masking value for can_rx_register() for a given single can_id */
-#define REGMASK(id) ((id & CAN_RTR_FLAG) | ((id & CAN_EFF_FLAG) ? \
-                       (CAN_EFF_MASK | CAN_EFF_FLAG) : CAN_SFF_MASK))
+#define REGMASK(id) ((id & CAN_EFF_FLAG) ? \
+                    (CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG) : \
+                    (CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG))
 
-#define CAN_BCM_VERSION "20080415"
+#define CAN_BCM_VERSION CAN_VERSION
 static __initdata const char banner[] = KERN_INFO
        "can: broadcast manager protocol (rev " CAN_BCM_VERSION ")\n";
 
index 85b07eba1879e8ef8a88c70a394a1b8b22193462..fe3b4bdfd2516d6cfd5297354b7046bf4c97d8e3 100644 (file)
@@ -722,8 +722,7 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb)
 static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb,
                                 unsigned int mss_now)
 {
-       if (skb->len <= mss_now || !sk_can_gso(sk) ||
-           tcp_urg_mode(tcp_sk(sk))) {
+       if (skb->len <= mss_now || !sk_can_gso(sk)) {
                /* Avoid the costly divide in the normal
                 * non-TSO case.
                 */
@@ -1029,10 +1028,6 @@ unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu)
 
 /* Compute the current effective MSS, taking SACKs and IP options,
  * and even PMTU discovery events into account.
- *
- * LARGESEND note: !tcp_urg_mode is overkill, only frames up to snd_up
- * cannot be large. However, taking into account rare use of URG, this
- * is not a big flaw.
  */
 unsigned int tcp_current_mss(struct sock *sk, int large_allowed)
 {
@@ -1047,7 +1042,7 @@ unsigned int tcp_current_mss(struct sock *sk, int large_allowed)
 
        mss_now = tp->mss_cache;
 
-       if (large_allowed && sk_can_gso(sk) && !tcp_urg_mode(tp))
+       if (large_allowed && sk_can_gso(sk))
                doing_tso = 1;
 
        if (dst) {
@@ -1164,9 +1159,7 @@ static int tcp_init_tso_segs(struct sock *sk, struct sk_buff *skb,
 {
        int tso_segs = tcp_skb_pcount(skb);
 
-       if (!tso_segs ||
-           (tso_segs > 1 && (tcp_skb_mss(skb) != mss_now ||
-                             tcp_urg_mode(tcp_sk(sk))))) {
+       if (!tso_segs || (tso_segs > 1 && tcp_skb_mss(skb) != mss_now)) {
                tcp_set_skb_tso_segs(sk, skb, mss_now);
                tso_segs = tcp_skb_pcount(skb);
        }
@@ -1519,6 +1512,10 @@ static int tcp_mtu_probe(struct sock *sk)
  * send_head.  This happens as incoming acks open up the remote
  * window for us.
  *
+ * LARGESEND note: !tcp_urg_mode is overkill, only frames between
+ * snd_up-64k-mss .. snd_up cannot be large. However, taking into
+ * account rare use of URG, this is not a big flaw.
+ *
  * Returns 1, if no segments are in flight and we have queued segments, but
  * cannot send anything now because of SWS or another problem.
  */
@@ -1570,7 +1567,7 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle)
                }
 
                limit = mss_now;
-               if (tso_segs > 1)
+               if (tso_segs > 1 && !tcp_urg_mode(tp))
                        limit = tcp_mss_split_point(sk, skb, mss_now,
                                                    cwnd_quota);
 
@@ -1619,6 +1616,7 @@ void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
  */
 void tcp_push_one(struct sock *sk, unsigned int mss_now)
 {
+       struct tcp_sock *tp = tcp_sk(sk);
        struct sk_buff *skb = tcp_send_head(sk);
        unsigned int tso_segs, cwnd_quota;
 
@@ -1633,7 +1631,7 @@ void tcp_push_one(struct sock *sk, unsigned int mss_now)
                BUG_ON(!tso_segs);
 
                limit = mss_now;
-               if (tso_segs > 1)
+               if (tso_segs > 1 && !tcp_urg_mode(tp))
                        limit = tcp_mss_split_point(sk, skb, mss_now,
                                                    cwnd_quota);
 
index 14504dada1166d57f36f3f603c5fbe5fbd0bfc95..7cd22262de3af3fa0f2917eefaea885c068855ac 100644 (file)
@@ -326,6 +326,8 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                                tp->snd_cwnd = 2;
                        else if (tp->snd_cwnd > tp->snd_cwnd_clamp)
                                tp->snd_cwnd = tp->snd_cwnd_clamp;
+
+                       tp->snd_ssthresh = tcp_current_ssthresh(sk);
                }
 
                /* Wipe the slate clean for the next RTT. */
index 7fef8ea1f5ecf53eaf5b1596479ef1d8a834b348..d254446b85b59d76bf3d940fce4364270a2d5bb0 100644 (file)
@@ -99,7 +99,7 @@ struct sta_info *sta_info_get(struct ieee80211_local *local, const u8 *addr)
 
        sta = rcu_dereference(local->sta_hash[STA_HASH(addr)]);
        while (sta) {
-               if (compare_ether_addr(sta->sta.addr, addr) == 0)
+               if (memcmp(sta->sta.addr, addr, ETH_ALEN) == 0)
                        break;
                sta = rcu_dereference(sta->hnext);
        }
index 02a8fed210820879d5b6026041626c7816cc5612..1acc089be7e94b6e8570d9529895402d3e5a75df 100644 (file)
@@ -141,7 +141,7 @@ socket_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        sk = nf_tproxy_get_sock_v4(dev_net(skb->dev), protocol,
                                   saddr, daddr, sport, dport, par->in, false);
        if (sk != NULL) {
-               bool wildcard = (inet_sk(sk)->rcv_saddr == 0);
+               bool wildcard = (sk->sk_state != TCP_TIME_WAIT && inet_sk(sk)->rcv_saddr == 0);
 
                nf_tproxy_put_sock(sk);
                if (wildcard)
index e8a5c32b0f106042c82790c2e1c924837bfe0b64..90c8506a0aac913afd2ad4d62d0d234039fc9315 100644 (file)
@@ -574,9 +574,10 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
        list_entry = netlbl_af4list_remove(addr->s_addr, mask->s_addr,
                                           &iface->addr4_list);
        spin_unlock(&netlbl_unlhsh_lock);
-       if (list_entry == NULL)
+       if (list_entry != NULL)
+               entry = netlbl_unlhsh_addr4_entry(list_entry);
+       else
                ret_val = -ENOENT;
-       entry = netlbl_unlhsh_addr4_entry(list_entry);
 
        audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
                                              audit_info);
@@ -634,9 +635,10 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
        spin_lock(&netlbl_unlhsh_lock);
        list_entry = netlbl_af6list_remove(addr, mask, &iface->addr6_list);
        spin_unlock(&netlbl_unlhsh_lock);
-       if (list_entry == NULL)
+       if (list_entry != NULL)
+               entry = netlbl_unlhsh_addr6_entry(list_entry);
+       else
                ret_val = -ENOENT;
-       entry = netlbl_unlhsh_addr6_entry(list_entry);
 
        audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
                                              audit_info);
index b1770d66bc8d68fc3c9ede8fd2408f813994dd93..242fe8f8c322d5fb048d737a46d36b99797f47aa 100644 (file)
@@ -123,6 +123,7 @@ nla_put_failure:
 
 static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
 {
+       struct net *net = sock_net(skb->sk);
        struct phonet_device *pnd;
        int dev_idx = 0, dev_start_idx = cb->args[0];
        int addr_idx = 0, addr_start_idx = cb->args[1];
@@ -131,6 +132,8 @@ static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
        list_for_each_entry(pnd, &pndevs.list, list) {
                u8 addr;
 
+               if (!net_eq(dev_net(pnd->netdev), net))
+                       continue;
                if (dev_idx > dev_start_idx)
                        addr_start_idx = 0;
                if (dev_idx++ < dev_start_idx)
index 058f04f54b9024857eb418321d6842bd448c744a..fb216c9adf86722bc81079fd25f4ed4b908e642c 100644 (file)
@@ -817,6 +817,7 @@ int xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info)
                                continue;
                        hlist_del(&pol->bydst);
                        hlist_del(&pol->byidx);
+                       list_del(&pol->walk.all);
                        write_unlock_bh(&xfrm_policy_lock);
 
                        xfrm_audit_policy_delete(pol, 1, audit_info->loginuid,