1. 29 Oct, 2018 4 commits
    • Masahiro Yamada's avatar
      i2c: uniphier-f: fix race condition when IRQ is cleared · eaba6878
      Masahiro Yamada authored
      The current IRQ handler clears all the IRQ status bits when it bails
      out. This is dangerous because it might clear away the status bits
      that have just been set while processing the current handler. If this
      happens, the IRQ event for the latest transfer is lost forever.
      
      The IRQ status bits must be cleared *before* the next transfer is
      kicked.
      
      Fixes: 6a62974b ("i2c: uniphier_f: add UniPhier FIFO-builtin I2C driver")
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      eaba6878
    • Masahiro Yamada's avatar
      i2c: uniphier-f: fix occasional timeout error · 39226aaa
      Masahiro Yamada authored
      Currently, a timeout error could happen at a repeated START condition.
      
      For a (non-repeated) START condition, the controller starts sending
      data when the UNIPHIER_FI2C_CR_STA bit is set. However, for a repeated
      START condition, the hardware starts running when the slave address is
      written to the TX FIFO - the write to the UNIPHIER_FI2C_CR register is
      actually unneeded.
      
      Because the hardware is already running before the IRQ is enabled for
      a repeated START, the driver may miss the IRQ event. In most cases,
      this problem does not show up since modern CPUs are much faster than
      the I2C transfer. However, it is still possible that a context switch
      happens after the controller starts, but before the IRQ register is
      set up.
      
      To fix this,
      
       - Do not write UNIPHIER_FI2C_CR for repeated START conditions.
      
       - Enable IRQ *before* writing the slave address to the TX FIFO.
      
       - Disable IRQ for the current CPU while queuing up the TX FIFO;
         If the CPU is interrupted by some task, the interrupt handler
         might be invoked due to the empty TX FIFO before completing the
         setup.
      
      Fixes: 6a62974b ("i2c: uniphier_f: add UniPhier FIFO-builtin I2C driver")
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      39226aaa
    • Masahiro Yamada's avatar
      i2c: uniphier-f: make driver robust against concurrency · f1fdcbbd
      Masahiro Yamada authored
      This is unlikely to happen, but it is possible for a CPU to enter
      the interrupt handler just after wait_for_completion_timeout() has
      expired. If this happens, the hardware is accessed from multiple
      contexts concurrently.
      
      Disable the IRQ after wait_for_completion_timeout(), and do nothing
      from the handler when the IRQ is disabled.
      
      Fixes: 6a62974b ("i2c: uniphier_f: add UniPhier FIFO-builtin I2C driver")
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      f1fdcbbd
    • Wolfram Sang's avatar
  2. 11 Oct, 2018 4 commits
  3. 08 Oct, 2018 3 commits
  4. 07 Oct, 2018 7 commits
  5. 06 Oct, 2018 1 commit
    • Greg Kroah-Hartman's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · c1d84a1b
      Greg Kroah-Hartman authored
      Dave writes:
        "Networking fixes:
      
        1) Fix truncation of 32-bit right shift in bpf, from Jann Horn.
      
        2) Fix memory leak in wireless wext compat, from Stefan Seyfried.
      
        3) Use after free in cfg80211's reg_process_hint(), from Yu Zhao.
      
        4) Need to cancel pending work when unbinding in smsc75xx otherwise
           we oops, also from Yu Zhao.
      
        5) Don't allow enslaving a team device to itself, from Ido Schimmel.
      
        6) Fix backwards compat with older userspace for rtnetlink FDB dumps.
           From Mauricio Faria.
      
        7) Add validation of tc policy netlink attributes, from David Ahern.
      
        8) Fix RCU locking in rawv6_send_hdrinc(), from Wei Wang."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits)
        net: mvpp2: Extract the correct ethtype from the skb for tx csum offload
        ipv6: take rcu lock in rawv6_send_hdrinc()
        net: sched: Add policy validation for tc attributes
        rtnetlink: fix rtnl_fdb_dump() for ndmsg header
        yam: fix a missing-check bug
        net: bpfilter: Fix type cast and pointer warnings
        net: cxgb3_main: fix a missing-check bug
        bpf: 32-bit RSH verification must truncate input before the ALU op
        net: phy: phylink: fix SFP interface autodetection
        be2net: don't flip hw_features when VXLANs are added/deleted
        net/packet: fix packet drop as of virtio gso
        net: dsa: b53: Keep CPU port as tagged in all VLANs
        openvswitch: load NAT helper
        bnxt_en: get the reduced max_irqs by the ones used by RDMA
        bnxt_en: free hwrm resources, if driver probe fails.
        bnxt_en: Fix enables field in HWRM_QUEUE_COS2BW_CFG request
        bnxt_en: Fix VNIC reservations on the PF.
        team: Forbid enslaving team device to itself
        net/usb: cancel pending work when unbinding smsc75xx
        mlxsw: spectrum: Delete RIF when VLAN device is removed
        ...
      c1d84a1b
  6. 05 Oct, 2018 21 commits