1. 09 May, 2016 2 commits
  2. 03 May, 2016 20 commits
  3. 01 May, 2016 2 commits
  4. 09 Apr, 2016 6 commits
    • Michael Thalmeier's avatar
      NFC: pn533: add I2C phy driver · dd7bedcd
      Michael Thalmeier authored
      This adds the I2C phy interface for the pn533 driver.
      This way the driver can be used to interact with I2C
      connected pn532 devices.
      Signed-off-by: default avatarMichael Thalmeier <michael.thalmeier@hale.at>
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      dd7bedcd
    • Michael Thalmeier's avatar
      NFC: pn533: Separate physical layer from the core implementation · 9815c7cf
      Michael Thalmeier authored
      The driver now has all core stuff isolated in one file, and all
      the hardware link specifics in another. Writing a pn533 driver
      on top of another hardware link is now just a matter of adding a
      new file for that new hardware specifics.
      
      The first user of this separation will be the i2c based pn532
      driver that reuses pn533 core implementation on top of an i2c
      layer.
      Signed-off-by: default avatarMichael Thalmeier <michael.thalmeier@hale.at>
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      9815c7cf
    • Michael Thalmeier's avatar
      NFC: pn533: Fix socket deadlock · 37f895d7
      Michael Thalmeier authored
      A deadlock can occur when the NFC raw socket is closed while
      the driver is processing a command.
      
      Following is the call graph of the affected situation:
      
      send data via raw_sock:
      -------------
      rawsock_tx_work
        sock_hold => socket refcnt++
        nfc_data_exchange => cb = rawsock_data_exchange_complete
      
          ops->im_transceive = pn533_transceive => arg->cb = db
                                     = rawsock_data_exchange_complete
      
            pn533_send_data_async => cb = pn533_data_exchange_complete
      
              __pn533_send_async => cmd->complete_cb = cb
                                    = pn533_data_exchange_complete
      
                if_ops->send_frame_async
      
      response:
      --------
      pn533_recv_response
        queue_work(priv->wq, &priv->cmd_complete_work)
      
      pn533_wq_cmd_complete
      
        pn533_send_async_complete
      
          cmd->complete_cb() = pn533_data_exchange_complete()
      
            arg->cb() = rawsock_data_exchange_complete()
      
              sock_put => socket refcnt-- => If the corresponding
                          socket gets closed in the meantime socket
                          will be destructed
      
                sk_free
      
                  __sk_free
      
                    sk->sk_destruct = rawsock_destruct
      
                      nfc_deactivate_target
      
                        ops->deactivate_target = pn533_deactivate_target
      
                          pn533_send_cmd_sync
      
                            pn533_send_cmd_async
      
                              __pn533_send_async
      
                                list_add_tail(&cmd->queue,&dev->cmd_queue)
                                        => add to command list because
                                           a command is currently
                                           processed
      
                              wait_for_completion
                                         => the workqueue thread waits
                                            here because it is the one
                                            processing the commands
                                               => deadlock
      
      To fix the deadlock pn533_deactivate_target is changed to
      issue the PN533_CMD_IN_RELEASE command in async mode. This
      way nothing blocks and the release command is executed after
      the current command.
      Signed-off-by: default avatarMichael Thalmeier <michael.thalmeier@hale.at>
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      37f895d7
    • Michael Thalmeier's avatar
      NFC: pn533: Send ATR_REQ only if NFC_PROTO_NFC_DEP bit is set · e997ebbe
      Michael Thalmeier authored
      Currently it is not possible to only poll for passive targets
      with the pn533 driver. To change this ATR_REQ is only sent when
      NFC_PROTO_NFC_DEP is explicitly requested in poll_protocols.
      As most implementations (e.g. neard) poll for all protocols
      that are reported to be supported by the adapter, this should
      not have much of an effect on current implementations.
      Signed-off-by: default avatarMichael Thalmeier <michael.thalmeier@hale.at>
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      e997ebbe
    • Eric Dumazet's avatar
      ipv6: fix inet6_lookup_listener() · 03c5b534
      Eric Dumazet authored
      A stupid refactoring bug in inet6_lookup_listener() needs to be fixed
      in order to get proper SO_REUSEPORT behavior.
      
      Fixes: 3b24d854 ("tcp/dccp: do not touch listener sk_refcnt under synflood")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarMaciej Żenczykowski <maze@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03c5b534
    • John Allen's avatar
      ibmvnic: Enable use of multiple tx/rx scrqs · 498cd8e4
      John Allen authored
      Enables the use of multiple transmit and receive scrqs allowing the ibmvnic
      driver to take advantage of multiqueue functionality. To achieve this, the
      driver must implement the process of negotiating the maximum number of
      queues allowed by the server. Initially, the driver will attempt to login
      with the maximum number of tx and rx queues supported by the server. If
      the server fails to allocate the requested number of scrqs, it will return
      partial success in the login response. In this case, we must reinitiate
      the login process from the request capabilities stage and attempt to login
      requesting fewer scrqs.
      Signed-off-by: default avatarJohn Allen <jallen@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      498cd8e4
  5. 08 Apr, 2016 10 commits
    • David S. Miller's avatar
      Merge branch 'dsa-voidify-ops' · e013b778
      David S. Miller authored
      Vivien Didelot says:
      
      ====================
      net: dsa: voidify STP setter and FDB/VLAN add ops
      
      Neither the DSA layer nor the bridge code (see br_set_state) really care
      about eventual errors from STP state setters, so make it void.
      
      The DSA layer separates the prepare and commit phases of switchdev in
      two different functions. Logical errors must not happen in commit
      routines, so make them void.
      
      Changes v1 -> v2:
        - rename port_stp_update to port_stp_state_set
        - don't change code flow of bcm_sf2_sw_br_set_stp_state
        - prefer netdev_err over netdev_warn
      ====================
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e013b778
    • Vivien Didelot's avatar
      net: dsa: make the VLAN add function return void · 4d5770b3
      Vivien Didelot authored
      The switchdev design implies that a software error should not happen in
      the commit phase since it must have been previously reported in the
      prepare phase. If an hardware error occurs during the commit phase,
      there is nothing switchdev can do about it.
      
      The DSA layer separates port_vlan_prepare and port_vlan_add for
      simplicity and convenience. If an hardware error occurs during the
      commit phase, there is no need to report it outside the driver itself.
      
      Make the DSA port_vlan_add routine return void for explicitness.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d5770b3
    • Vivien Didelot's avatar
      net: dsa: make the FDB add function return void · 8497aa61
      Vivien Didelot authored
      The switchdev design implies that a software error should not happen in
      the commit phase since it must have been previously reported in the
      prepare phase. If an hardware error occurs during the commit phase,
      there is nothing switchdev can do about it.
      
      The DSA layer separates port_fdb_prepare and port_fdb_add for simplicity
      and convenience. If an hardware error occurs during the commit phase,
      there is no need to report it outside the DSA driver itself.
      
      Make the DSA port_fdb_add routine return void for explicitness.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8497aa61
    • Vivien Didelot's avatar
      net: dsa: make the STP state function return void · 43c44a9f
      Vivien Didelot authored
      The DSA layer doesn't care about the return code of the port_stp_update
      routine, so make it void in the layer and the DSA drivers.
      
      Replace the useless dsa_slave_stp_update function with a
      dsa_slave_stp_state function used to reply to the switchdev
      SWITCHDEV_ATTR_ID_PORT_STP_STATE attribute.
      
      In the meantime, rename port_stp_update to port_stp_state_set to
      explicit the state change.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      43c44a9f
    • Vivien Didelot's avatar
      net: dsa: document missing functions · f453939c
      Vivien Didelot authored
      Add description for the missing port_vlan_prepare, port_fdb_prepare,
      port_fdb_dump functions in the DSA documentation.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f453939c
    • David S. Miller's avatar
      Merge tag 'mac80211-next-for-davem-2016-04-06' of... · 1089ac69
      David S. Miller authored
      Merge tag 'mac80211-next-for-davem-2016-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
      
      Johannes Berg says:
      
      ====================
      For the 4.7 cycle, we have a number of changes:
       * Bob's mesh mode rhashtable conversion, this includes
         the rhashtable API change for allocation flags
       * BSSID scan, connect() command reassoc support (Jouni)
       * fast (optimised data only) and support for RSS in mac80211 (myself)
       * various smaller changes
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1089ac69
    • Daniel Borkmann's avatar
      bpf, verifier: further improve search pruning · 07016151
      Daniel Borkmann authored
      The verifier needs to go through every path of the program in
      order to check that it terminates safely, which can be quite a
      lot of instructions that need to be processed f.e. in cases with
      more branchy programs. With search pruning from f1bca824 ("bpf:
      add search pruning optimization to verifier") the search space can
      already be reduced significantly when the verifier detects that
      a previously walked path with same register and stack contents
      terminated already (see verifier's states_equal()), so the search
      can skip walking those states.
      
      When working with larger programs of > ~2000 (out of max 4096)
      insns, we found that the current limit of 32k instructions is easily
      hit. For example, a case we ran into is that the search space cannot
      be pruned due to branches at the beginning of the program that make
      use of certain stack space slots (STACK_MISC), which are never used
      in the remaining program (STACK_INVALID). Therefore, the verifier
      needs to walk paths for the slots in STACK_INVALID state, but also
      all remaining paths with a stack structure, where the slots are in
      STACK_MISC, which can nearly double the search space needed. After
      various experiments, we find that a limit of 64k processed insns is
      a more reasonable choice when dealing with larger programs in practice.
      This still allows to reject extreme crafted cases that can have a
      much higher complexity (f.e. > ~300k) within the 4096 insns limit
      due to search pruning not being able to take effect.
      
      Furthermore, we found that a lot of states can be pruned after a
      call instruction, f.e. we were able to reduce the search state by
      ~35% in some cases with this heuristic, trade-off is to keep a bit
      more states in env->explored_states. Usually, call instructions
      have a number of preceding register assignments and/or stack stores,
      where search pruning has a better chance to suceed in states_equal()
      test. The current code marks the branch targets with STATE_LIST_MARK
      in case of conditional jumps, and the next (t + 1) instruction in
      case of unconditional jump so that f.e. a backjump will walk it. We
      also did experiments with using t + insns[t].off + 1 as a marker in
      the unconditionally jump case instead of t + 1 with the rationale
      that these two branches of execution that converge after the label
      might have more potential of pruning. We found that it was a bit
      better, but not necessarily significantly better than the current
      state, perhaps also due to clang not generating back jumps often.
      Hence, we left that as is for now.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07016151
    • Jiri Pirko's avatar
      devlink: share user_ptr pointer for both devlink and devlink_port · 1fc2257e
      Jiri Pirko authored
      Ptr to devlink structure can be easily obtained from
      devlink_port->devlink. So share user_ptr[0] pointer for both and leave
      user_ptr[1] free for other users.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1fc2257e
    • David S. Miller's avatar
      Merge branch 'mlxsw-next' · 67b5b21f
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      mlxsw: small driver update + one tiny devlink dependency
      
      Cosmetics, in preparation to sharedbuffer patchset.
      First patch is here to allow patch number two.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67b5b21f
    • Jiri Pirko's avatar
      mlxsw: reg: Fix SBPM register name · 9efc8f65
      Jiri Pirko authored
      Fix copy&paste error and state the name of SBPM register correctly.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9efc8f65