1. 15 6月, 2013 6 次提交
  2. 13 6月, 2013 7 次提交
    • S
      i2c: bfin-twi: Read and write the FIFO in loop · 8419c8de
      Sonic Zhang 提交于
      TWI transfer interrupts may be lost when system is heavily handling other
      interrupts, while current transfer handler depends on each accurate interrupt
      and misses some data in this case. Because there are 2 2-byte FIFOs in blackfin
      TWI controller, the occurrence of the data loss can be reduced by reading till
      the RX FIFO is empty and writing till the TX FIFO is full.
      Reported-by: NBob Maris <mail@maris-ee.eu>
      Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      8419c8de
    • L
      i2c: core: make it possible to match a pure device tree driver · c80f5284
      Linus Walleij 提交于
      This tries to address an issue found when writing an MFD driver
      for the Nomadik STw481x PMICs: as the platform is using device
      tree exclusively I want to specify the driver matching like
      this:
      
      static const struct of_device_id stw481x_match[] = {
      	{ .compatible = "st,stw4810", },
      	{ .compatible = "st,stw4811", },
      	{},
      };
      
      static struct i2c_driver stw481x_driver = {
      	.driver = {
      		.name	= "stw481x",
      		.of_match_table = stw481x_match,
      	},
      	.probe		= stw481x_probe,
      	.remove		= stw481x_remove,
      };
      
      However that turns out not to be possible: the I2C probe code
      is written so that the probe() call is always passed a match
      from i2c_match_id() using non-devicetree matches.
      
      This is probably why most devices using device tree for I2C
      clients currently will pass no .of_match_table *at all* but
      instead just use .id_table from struct i2c_driver to match
      the device. As you realize that means that the whole idea with
      compatible strings is discarded, and that is why we find strange
      device tree I2C device compatible strings like "product" instead
      of "vendor,product" as you could expect.
      
      Let's figure out how to fix this before the mess spreads. This
      patch will allow probeing devices with only an of_match_table
      as per above, and will pass NULL as the second argument to the
      probe() function. If the driver wants to deduce secondary info
      from the struct of_device_id .data field, it has to call
      of_match_device() on its own match table in the probe function
      device tree probe path.
      
      If drivers define both an .of_match_table *AND* a i2c_driver
      .id_table, the .of_match_table will take precedence, just
      as is done in the i2c_device_match() function in i2c-core.c.
      
      I2C devices probed from device tree should subsequently be
      fixed to handle the case where of_match_table() is
      used (I think none of them do that today), and platforms should
      fix their device trees to use compatible strings for I2C devices
      instead of setting the name to Linux device driver names as is
      done in multiple cases today.
      
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      c80f5284
    • J
      i2c: use platform_{get,set}_drvdata() · c2c64954
      Jingoo Han 提交于
      Use the wrapper functions for getting and setting the driver data using
      platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
      so we can directly pass a struct platform_device.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      c2c64954
    • W
      drivers/i2c/busses: don't check resource with devm_ioremap_resource · 3cc2d009
      Wolfram Sang 提交于
      devm_ioremap_resource does sanity checks on the given resource. No need to
      duplicate this in the driver.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      3cc2d009
    • M
      i2c: designware: prevent signals from aborting I2C transfers · e42dba56
      Mika Westerberg 提交于
      If a process receives signal while it is waiting for I2C transfer to
      complete, an error is returned to the caller and the transfer is aborted.
      This can cause the driver to fail subsequent transfers. Also according to
      commit d295a86e (i2c: mv64xxx: work around signals causing I2C
      transactions to be aborted) I2C drivers aren't supposed to abort
      transactions on signals.
      
      To prevent this switch to use wait_for_completion_timeout() instead of
      wait_for_completion_interruptible_timeout() in the designware I2C driver.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NChristian Ruppert <christian.ruppert@abilis.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      e42dba56
    • F
      i2c: mxs: Let device core handle pinctrl · dfda7d8f
      Fabio Estevam 提交于
      Since commit ab78029e (drivers/pinctrl: grab default handles from device core),
      we can rely on device core for handling pinctrl.
      
      So remove devm_pinctrl_get_select_default() from the driver.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      dfda7d8f
    • F
      i2c: imx: Let device core handle pinctrl · 76b1f723
      Fabio Estevam 提交于
      Since commit ab78029e (drivers/pinctrl: grab default handles from device core),
      we can rely on device core for handling pinctrl.
      
      So remove devm_pinctrl_get_select_default() from the driver.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      76b1f723
  3. 06 6月, 2013 9 次提交
  4. 03 6月, 2013 4 次提交
  5. 02 6月, 2013 3 次提交
    • L
      Linux 3.10-rc4 · d683b96b
      Linus Torvalds 提交于
      d683b96b
    • S
      sata_rcar: fix interrupt handling · 52a2a108
      Sergei Shtylyov 提交于
      The driver's interrupt handling code is too picky in deciding whether it should
      handle an interrupt or not which causes completely unneeded spurious interrupts.
      Thus make sata_rcar_{ata|serr}_interrupt() *void*; add ATA status register read
      to sata_rcar_ata_interrupt() to clear an unexpected ATA interrupt -- it doesn't
      get cleared by writing to the SATAINTSTAT register in the interrupt mode we use.
      
      Also, in sata_rcar_ata_interrupt() we should check SATAINTSTAT register only for
      enabled interrupts and we should clear  only those interrupts  that we have read
      as active first time around, because else we have  a  race and risk clearing  an
      interrupt that  can  occur between read  and write of the  SATAINTSTAT  register
      and never registering it...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      52a2a108
    • L
      Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · cc863973
      Linus Torvalds 提交于
      Pull parisc fixes from Helge Deller:
       "This patcheset includes fixes for:
      
         - the PCI/LBA which brings back the stifb graphics framebuffer
           console
         - possible memory overflows in parisc kernel init code
         - parport support on older GSC machines
         - avoids that users by mistake enable PARPORT_PC_SUPERIO on parisc
         - MAINTAINERS file list updates for parisc."
      
      * 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: parport0: fix this legacy no-device port driver!
        parport_pc: disable PARPORT_PC_SUPERIO on parisc architecture
        parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources (v2)
        parisc/PCI: Set type for LBA bus_num resource
        MAINTAINERS: update parisc architecture file list
        parisc: kernel: using strlcpy() instead of strcpy()
        parisc: rename "CONFIG_PA7100" to "CONFIG_PA7000"
        parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50
        parisc: memory overflow, 'name' length is too short for using
      cc863973
  6. 01 6月, 2013 11 次提交
    • H
      parisc: parport0: fix this legacy no-device port driver! · 4edb3869
      Helge Deller 提交于
      Fix the above kernel error from parport_announce_port() on 32bit GSC
      machines (e.g. B160L). The parport driver requires now a pointer to the
      device struct.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      4edb3869
    • H
      parport_pc: disable PARPORT_PC_SUPERIO on parisc architecture · c218c713
      Helge Deller 提交于
      If enabled, CONFIG_PARPORT_PC_SUPERIO scans on PC-like hardware for
      various super-io chips by accessing i/o ports in a range which will
      crash any parisc hardware at once.
      
      In addition, parisc has it's own incompatible superio chip
      (CONFIG_SUPERIO), so if we disable PARPORT_PC_SUPERIO completely for
      parisc we can avoid that people by accident enable the parport_pc
      superio option too.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      c218c713
    • H
      parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources (v2) · b204a4d2
      Helge Deller 提交于
      commit dc7dce28
      Author: Bjorn Helgaas <bhelgaas@google.com>
      Date:   Fri Oct 28 16:27:27 2011 -0600
         parisc/PCI: lba: convert to pci_create_root_bus() for correct root bus
                          resources
      
        Supply root bus resources to pci_create_root_bus() so they're correct
        immediately.  This fixes the problem of "early" and "header" quirks seeing
        incorrect root bus resources.
      
      added tests for elmmio_space.start while it should use
      elmmio_space.flags.  This for example led to incorrect resource
      assignments and a non-working stifb framebuffer on most parisc machines.
      
      LBA 10:1: PCI host bridge to bus 0000:01
      pci_bus 0000:01: root bus resource [io  0x12000-0x13fff] (bus address [0x2000-0x3fff])
      pci_bus 0000:01: root bus resource [mem 0xfffffffffa000000-0xfffffffffbffffff] (bus address [0xfa000000-0xfbffffff])
      pci_bus 0000:01: root bus resource [mem 0xfffffffff4800000-0xfffffffff4ffffff] (bus address [0xf4800000-0xf4ffffff])
      pci_bus 0000:01: root bus resource [??? 0x00000001 flags 0x0]
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      b204a4d2
    • B
      parisc/PCI: Set type for LBA bus_num resource · b47d4934
      Bjorn Helgaas 提交于
      The non-PAT resource probing code failed to set the type of the LBA bus_num
      resource (30aa80da "parisc/PCI: register busn_res for root buses" did
      the corresponding thing for the PAT case).
      
      This causes incorrect resource assignments and a non-working stifb
      framebuffer on most parisc machines.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      b47d4934
    • H
      MAINTAINERS: update parisc architecture file list · 2b6bac9e
      Helge Deller 提交于
      Signed-off-by: NHelge Deller <deller@gmx.de>
      2b6bac9e
    • C
      parisc: kernel: using strlcpy() instead of strcpy() · ea99b1ad
      Chen Gang 提交于
      'boot_args' is an input args, and 'boot_command_line' has a fix length.
      So use strlcpy() instead of strcpy() to avoid memory overflow.
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      Acked-by: NKyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      ea99b1ad
    • P
      parisc: rename "CONFIG_PA7100" to "CONFIG_PA7000" · 76603902
      Paul Bolle 提交于
      There's a Makefile line setting cflags for CONFIG_PA7100. But that
      Kconfig macro doesn't exist. There is a Kconfig symbol PA7000, which
      covers both PA7000 and PA7100 processors. So let's use the corresponding
      Kconfig macro.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      76603902
    • H
      parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50 · ae249b5f
      Helge Deller 提交于
      With CONFIG_DISCONTIGMEM=y and multiple physical memory areas,
      cat /proc/kpageflags triggers this kernel bug:
      
      kernel BUG at arch/parisc/include/asm/mmzone.h:50!
      CPU: 2 PID: 7848 Comm: cat Tainted: G      D W 3.10.0-rc3-64bit #44
       IAOQ[0]: kpageflags_read0x128/0x238
       IAOQ[1]: kpageflags_read0x12c/0x238
       RP(r2): proc_reg_read0xbc/0x130
      Backtrace:
       [<00000000402ca2d4>] proc_reg_read0xbc/0x130
       [<0000000040235bcc>] vfs_read0xc4/0x1d0
       [<0000000040235f0c>] SyS_read0x94/0xf0
       [<0000000040105fc0>] syscall_exit0x0/0x14
      
      kpageflags_read() walks through the whole memory, even if some memory
      areas are physically not available. So, we should better not BUG on an
      unavailable pfn in pfn_to_nid() but just return the expected value -1 or
      0.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      ae249b5f
    • C
      parisc: memory overflow, 'name' length is too short for using · 3f108de9
      Chen Gang 提交于
      'path.bc[i]' can be asigned by PCI_SLOT() which can '> 10', so sizeof(6
      * "%u:" + "%u" + '\0') may be 21.
      
      Since 'name' length is 20, it may be memory overflow.
      
      And 'path.bc[i]' is 'unsigned char' for printing, we can be sure the
      max length of 'name' must be less than 28.
      
      So simplify thinking, we can use 28 instead of 20 directly, and do not
      think of whether 'patchc.bc[i]' can '> 100'.
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      3f108de9
    • L
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · aa3ae6de
      Linus Torvalds 提交于
      Pull powerpc fixes from Ben Herrenschmidt:
       "Here are a few more fixes for powerpc 3.10.  It's a bit more than I
        would have liked this late in the game but I suppose that's what
        happens with a brand new chip generation coming out.
      
        A few regression fixes, some last minute fixes for new P8 features
        such as transactional memory,...
      
        There's also one powerpc KVM patch that I requested that adds two
        missing functions to our in-kernel interrupt controller support which
        is itself a new 3.10 feature.  These are defined by the base
        hypervisor specification.  We didn't implement them originally because
        Linux doesn't use them but they are simple and I'm not comfortable
        having a half-implemented interface in 3.10 and having to deal with
        versionning etc...  later when something starts needing those calls.
        They cannot be emulated in qemu when using in-kernel interrupt
        controller (not enough shared state).
      
        Just added a last minute patch to fix a typo introducing a breakage in
        our cputable for Power7+ processors, sorry about that, but the
        regression it fixes just hurt me :-)"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/cputable: Fix typo on P7+ cputable entry
        powerpc/perf: Add missing SIER support
        powerpc/perf: Revert to original NO_SIPR logic
        powerpc/pci: Remove the unused variables in pci_process_bridge_OF_ranges
        powerpc/pci: Remove the stale comments of pci_process_bridge_OF_ranges
        powerpc/pseries: Always enable CONFIG_HOTPLUG_CPU on PSERIES SMP
        powerpc/kvm/book3s: Add support for H_IPOLL and H_XIRR_X in XICS emulation
        powerpc/32bit:Store temporary result in r0 instead of r8
        powerpc/mm: Always invalidate tlb on hpte invalidate and update
        powerpc/pseries: Improve stream generation comments in copypage/user
        powerpc/pseries: Kill all prefetch streams on context switch
        powerpc/cputable: Fix oprofile_cpu_type on power8
        powerpc/mpic: Fix irq distribution problem when MPIC_SINGLE_DEST_CPU
        powerpc/tm: Fix userspace stack corruption on signal delivery for active transactions
        powerpc/tm: Move TM abort cause codes to uapi
        powerpc/tm: Abort on emulation and alignment faults
        powerpc/tm: Update cause codes documentation
        powerpc/tm: Make room for hypervisor in abort cause codes
      aa3ae6de
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 008bd2de
      Linus Torvalds 提交于
      Pull scsi target fixes from Nicholas Bellinger:
       "The highlights include:
      
         - Re-instate sess->wait_list in target_wait_for_sess_cmds() for
           active I/O shutdown handling in fabrics using se_cmd->cmd_kref
         - Make ib_srpt call target_sess_cmd_list_set_waiting() during session
           shutdown
         - Fix FILEIO off-by-one READ_CAPACITY bug for !S_ISBLK export
         - Fix iscsi-target login error heap buffer overflow (Kees)
         - Fix iscsi-target active I/O shutdown handling regression in
           v3.10-rc1
      
        A big thanks to Kees Cook for fixing a long standing login error
        buffer overflow bug.
      
        All patches are CC'ed to stable with the exception of the v3.10-rc1
        specific regression + other minor target cleanup."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        iscsi-target: Fix iscsit_free_cmd() se_cmd->cmd_kref shutdown handling
        target: Propigate up ->cmd_kref put return via transport_generic_free_cmd
        iscsi-target: fix heap buffer overflow on error
        target/file: Fix off-by-one READ_CAPACITY bug for !S_ISBLK export
        ib_srpt: Call target_sess_cmd_list_set_waiting during shutdown_session
        target: Re-instate sess_wait_list for target_wait_for_sess_cmds
        target: Remove unused wait_for_tasks bit in target_wait_for_sess_cmds
      008bd2de