1. 10 6月, 2015 3 次提交
    • C
      i2c: at91: update documentation for DT bindings · 0ba82c95
      Cyrille Pitchen 提交于
      add a new value "atmel,sama5d2-i2c" for the "compatible" property.
      add a new optional property "atmel,fifo-size" to enable FIFO support when
      available.
      add missing optional properties "dmas" and "dma-names".
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      0ba82c95
    • C
      i2c: at91: use BIT() macro to define register bits · e84cf8f0
      Cyrille Pitchen 提交于
      This patch just fixes typo before applying later patches which will use
      register bits with index above 16.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      e84cf8f0
    • C
      i2c: at91: fix a race condition when using the DMA controller · 93563a6a
      Cyrille Pitchen 提交于
      For TX transactions, the TXCOMP bit in the Status Register is cleared
      when the first data is written into the Transmit Holding Register.
      
      In the lines from at91_do_twi_transfer():
      at91_twi_write_data_dma(dev);
      at91_twi_write(dev, AT91_TWI_IER, AT91_TWI_TXCOMP);
      
      the TXCOMP interrupt may be enabled before the DMA controller has
      actually started to write into the THR. In such a case, the TXCOMP bit
      is still set into the Status Register so the interrupt is triggered
      immediately. The driver understands that a transaction completion has
      occurred but this transaction hasn't started yet. Hence the TXCOMP
      interrupt is no longer enabled by at91_do_twi_transfer() but instead
      by at91_twi_write_data_dma_callback().
      
      Also, the TXCOMP bit in the Status Register in not a clear on read flag
      but a snapshot of the transmission state at the time the Status
      Register is read.
      When a NACK error is dectected by the I2C controller, the TXCOMP, NACK
      and TXRDY bits are set together to 1 in the SR. If enabled, the TXCOMP
      interrupt is triggered at the same time. Also setting the TXRDY to 1
      triggers the DMA controller to write the next data into the THR. Such
      a write resets the TXCOMP bit to 0 in the SR. So depending on when the
      interrupt handler reads the SR, it may fail to detect the NACK error
      if it relies on the TXCOMP bit. The NACK bit and its interrupt should
      be used instead.
      
      For RX transactions, the TXCOMP bit in the Status Register is cleared
      when the START bit is set into the Control Register. However to unify
      the management of the TXCOMP bit when the DMA controller is used, the
      TXCOMP interrupt is now enabled by the DMA callbacks for both TX and
      RX transfers.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Cc: stable@vger.kernel.org #3.10 and later
      Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      93563a6a
  2. 03 6月, 2015 2 次提交
  3. 02 6月, 2015 2 次提交
  4. 01 6月, 2015 10 次提交
  5. 13 5月, 2015 3 次提交
  6. 12 5月, 2015 4 次提交
    • P
      i2c: omap: Add calls for pinctrl state select · 096ea30c
      Pascal Huerst 提交于
      This adds calls to pinctrl subsystem in order to switch pin states
      on suspend/resume if you provide a "sleep" state in DT.
      
      If no "sleep" state is provided in the DT, these calls turn
      to NOPs, so we don't need error checking here.
      Signed-off-by: NPascal Huerst <pascal.huerst@gmail.com>
      Reviewed-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      096ea30c
    • G
      i2c: Allow compile test of GPIO consumers if !GPIOLIB · 7e5cd69a
      Geert Uytterhoeven 提交于
      The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
      not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
      functionality only, can still be compiled if GPIOLIB is not enabled.
      
      Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
      appropriate.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      7e5cd69a
    • S
      i2c: xiic: Fix kerneldoc warnings · bea6ff02
      Shubhrajyoti Datta 提交于
      info(drivers/i2c/busses/i2c-xiic.c:55): Scanning doc for struct xiic_i2c
      Warning(drivers/i2c/busses/i2c-xiic.c:79): No description found for parameter 'endianness'
      Signed-off-by: NShubhrajyoti Datta <shubhraj@xilinx.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      bea6ff02
    • D
      i2c: rk3x: Increase wait timeout to 1 second · 4489750f
      Doug Anderson 提交于
      Although unlikely, it is remotely possible for an i2c command to need
      more than 200ms complete. Unlike smbus, i2c devices can clock stretch
      for an unspecified amount of time. The longest time I've seen
      specified for a device is 144ms (bq27541 battery gas), but one could
      imagine a device taking a bit slower. 1 second "ought to be enough for
      anyone."
      
      The above is not the only justifcation for going above 200ms for a
      timeout, though.  It turns out that if you've got a large number of
      printks going out to a serial console, interrupts on a CPU can be
      disabled for hundreds of milliseconds. That's not a great situation to
      be in to start with (maybe we should put a cap in vprintk_emit()) but
      it's pretty annoying to start seeing unexplained i2c timeouts.
      
      Note that to understand why we can timeout when printk has interrupts
      disabled, you need to understand that on current Linux ARM kernels
      interrupts are routed to a single CPU in a multicore system. Thus,
      you can get:
      
      1. CPU1 is running rk3x_i2c_xfer()
      2. CPU0 calls vprintk_emit(), which disables all IRQs on CPU0.
      3. I2C interrupt is ready but is set to only run on CPU0, where IRQs
         are disabled.
      4. CPU1 timeout expires. I2C interrupt is still ready, but CPU0 is
         still sitting in the same vprintk_emit()
      5. CPU1 sees that no interrupt happened in 200ms, so timeout.
      
      A normal system shouldn't see i2c timeouts anyway, so increasing the
      timeout should help people debugging without hurting other people
      excessively.
      Signed-off-by: NDoug Anderson <dianders@chromium.org>
      Tested-by: NCaesar Wang <wxt@rock-chips.com>
      Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      4489750f
  7. 04 5月, 2015 8 次提交
  8. 03 5月, 2015 3 次提交
    • J
      ext4: fix growing of tiny filesystems · 2c869b26
      Jan Kara 提交于
      The estimate of necessary transaction credits in ext4_flex_group_add()
      is too pessimistic. It reserves credit for sb, resize inode, and resize
      inode dindirect block for each group added in a flex group although they
      are always the same block and thus it is enough to account them only
      once. Also the number of modified GDT block is overestimated since we
      fit EXT4_DESC_PER_BLOCK(sb) descriptors in one block.
      
      Make the estimation more precise. That reduces number of requested
      credits enough that we can grow 20 MB filesystem (which has 1 MB
      journal, 79 reserved GDT blocks, and flex group size 16 by default).
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Reviewed-by: NEric Sandeen <sandeen@redhat.com>
      2c869b26
    • D
      ext4: move check under lock scope to close a race. · 280227a7
      Davide Italiano 提交于
      fallocate() checks that the file is extent-based and returns
      EOPNOTSUPP in case is not. Other tasks can convert from and to
      indirect and extent so it's safe to check only after grabbing
      the inode mutex.
      Signed-off-by: NDavide Italiano <dccitaliano@gmail.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      280227a7
    • L
      ext4: fix data corruption caused by unwritten and delayed extents · d2dc317d
      Lukas Czerner 提交于
      Currently it is possible to lose whole file system block worth of data
      when we hit the specific interaction with unwritten and delayed extents
      in status extent tree.
      
      The problem is that when we insert delayed extent into extent status
      tree the only way to get rid of it is when we write out delayed buffer.
      However there is a limitation in the extent status tree implementation
      so that when inserting unwritten extent should there be even a single
      delayed block the whole unwritten extent would be marked as delayed.
      
      At this point, there is no way to get rid of the delayed extents,
      because there are no delayed buffers to write out. So when a we write
      into said unwritten extent we will convert it to written, but it still
      remains delayed.
      
      When we try to write into that block later ext4_da_map_blocks() will set
      the buffer new and delayed and map it to invalid block which causes
      the rest of the block to be zeroed loosing already written data.
      
      For now we can fix this by simply not allowing to set delayed status on
      written extent in the extent status tree. Also add WARN_ON() to make
      sure that we notice if this happens in the future.
      
      This problem can be easily reproduced by running the following xfs_io.
      
      xfs_io -f -c "pwrite -S 0xaa 4096 2048" \
                -c "falloc 0 131072" \
                -c "pwrite -S 0xbb 65536 2048" \
                -c "fsync" /mnt/test/fff
      
      echo 3 > /proc/sys/vm/drop_caches
      xfs_io -c "pwrite -S 0xdd 67584 2048" /mnt/test/fff
      
      This can be theoretically also reproduced by at random by running fsx,
      but it's not very reliable, though on machines with bigger page size
      (like ppc) this can be seen more often (especially xfstest generic/127)
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      d2dc317d
  9. 02 5月, 2015 5 次提交
    • C
      ext4 crypto: remove duplicated encryption mode definitions · 9402bdca
      Chanho Park 提交于
      This patch removes duplicated encryption modes which were already in
      ext4.h. They were duplicated from commit 3edc18d8 and commit f542fb.
      
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Michael Halcrow <mhalcrow@google.com>
      Cc: Andreas Dilger <adilger.kernel@dilger.ca>
      Signed-off-by: NChanho Park <chanho61.park@samsung.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      9402bdca
    • H
      ext4 crypto: do not select from EXT4_FS_ENCRYPTION · fb63e548
      Herbert Xu 提交于
      This patch adds a tristate EXT4_ENCRYPTION to do the selections
      for EXT4_FS_ENCRYPTION because selecting from a bool causes all
      the selected options to be built-in, even if EXT4 itself is a
      module.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      fb63e548
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 6c3c1eb3
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Receive packet length needs to be adjust by 2 on RX to accomodate
          the two padding bytes in altera_tse driver.  From Vlastimil Setka.
      
       2) If rx frame is dropped due to out of memory in macb driver, we leave
          the receive ring descriptors in an undefined state.  From Punnaiah
          Choudary Kalluri
      
       3) Some netlink subsystems erroneously signal NLM_F_MULTI.  That is
          only for dumps.  Fix from Nicolas Dichtel.
      
       4) Fix mis-use of raw rt->rt_pmtu value in ipv4, one must always go via
          the ipv4_mtu() helper.  From Herbert Xu.
      
       5) Fix null deref in bridge netfilter, and miscalculated lengths in
          jump/goto nf_tables verdicts.  From Florian Westphal.
      
       6) Unhash ping sockets properly.
      
       7) Software implementation of BPF divide did 64/32 rather than 64/64
          bit divide.  The JITs got it right.  Fix from Alexei Starovoitov.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (30 commits)
        ipv4: Missing sk_nulls_node_init() in ping_unhash().
        net: fec: Fix RGMII-ID mode
        net/mlx4_en: Schedule napi when RX buffers allocation fails
        netxen_nic: use spin_[un]lock_bh around tx_clean_lock
        net/mlx4_core: Fix unaligned accesses
        mlx4_en: Use correct loop cursor in error path.
        cxgb4: Fix MC1 memory offset calculation
        bnx2x: Delay during kdump load
        net: Fix Kernel Panic in bonding driver debugfs file: rlb_hash_table
        net: dsa: Fix scope of eeprom-length property
        net: macb: Fix race condition in driver when Rx frame is dropped
        hv_netvsc: Fix a bug in netvsc_start_xmit()
        altera_tse: Correct rx packet length
        mlx4: Fix tx ring affinity_mask creation
        tipc: fix problem with parallel link synchronization mechanism
        tipc: remove wrong use of NLM_F_MULTI
        bridge/nl: remove wrong use of NLM_F_MULTI
        bridge/mdb: remove wrong use of NLM_F_MULTI
        net: sched: act_connmark: don't zap skb->nfct
        trivial: net: systemport: bcmsysport.h: fix 0x0x prefix
        ...
      6c3c1eb3
    • S
      virtio: fix typo in vring_need_event() doc comment · e412d3a3
      Stefan Hajnoczi 提交于
      Here the "other side" refers to the guest or host.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e412d3a3
    • R
      virtio: pass baton to Michael Tsirkin · feda5f93
      Rusty Russell 提交于
      With my job change kernel work will be "own time"; I'm keeping lguest
      and modules (and the virtio standards work), but virtio kernel has to
      go.
      
      This makes it clear that Michael is in charge.  He's good, but having
      me watch over his shoulder won't help.
      
      Good luck Michael!
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      feda5f93