1. 29 3月, 2017 3 次提交
    • T
      qed: Move to new load request scheme · 5d24bcf1
      Tomer Tayar 提交于
      Management firmware is used as an arbiter between the various PFs
      in regard to loading - it causes the various PFs to load/unload
      sequentially and informs each of its appropriate rule in the init.
      
      But the existing flow is too weak to handle some scenarios where
      PFs aren't properly cleaned prior to loading.
      The significant scenarios falling under this criteria:
        a. Preboot drivers in some environment can't properly unload.
        b. Unexpected driver replacement [kdump, PDA].
      
      Modern management firmware supports a more intricate loading flow,
      where the driver has the ability to overcome previous limitations.
      This moves qed into using this newer scheme.
      
      Notice new scheme is backward compatible, so new drivers would
      still be able to load properly on top of older management firmwares
      and vice versa.
      Signed-off-by: NTomer Tayar <Tomer.Tayar@cavium.com>
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d24bcf1
    • M
      qed: hw_init() to receive parameter-struct · c0c2d0b4
      Mintz, Yuval 提交于
      We'll soon need additional information, so start by changing
      the infrastructure to receive the initializing variables
      via a parameter struct.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0c2d0b4
    • T
      qed: Correct HW stop flow · 1226337a
      Tomer Tayar 提交于
      Management firmware is used as arbiter between different PFs
      which are loading/unloading, but in order to use the synchronization
      it offers the contending configurations need to be applied either
      between their LOAD_REQ <-> LOAD_DONE or UNLOAD_REQ <-> UNLOAD_DONE
      management firmware commands.
      
      Existing HW stop flow utilizes 2 different functions: qed_hw_stop() and
      qed_hw_reset() which don't abide this requirement; Most of the closure
      is doing outside the scope of the unload request.
      
      This patch removes qed_hw_reset() and places the relevant stop
      functionality underneath the management firmware protection.
      Signed-off-by: NTomer Tayar <Tomer.Tayar@cavium.com>
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1226337a
  2. 24 3月, 2017 6 次提交
  3. 22 3月, 2017 9 次提交
  4. 15 3月, 2017 8 次提交
  5. 14 3月, 2017 1 次提交
  6. 10 3月, 2017 1 次提交
  7. 27 2月, 2017 2 次提交
    • M
      qed: Don't use attention PTT for configuring BW · 6f437d43
      Mintz, Yuval 提交于
      Commit 653d2ffd6405 ("qed*: Fix link indication race") introduced another
      race - one of the inner functions called from the link-change flow is
      explicitly using the slowpath context dedicated PTT instead of gaining
      that PTT from the caller. Since this flow can now be called from
      a different context as well, we're in risk of the PTT breaking.
      
      Fixes: 653d2ffd6405 ("qed*: Fix link indication race")
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f437d43
    • M
      qed: Fix race with multiple VFs · fd3c615a
      Mintz, Yuval 提交于
      A PF syncronizes all IOV activity relating to its VFs
      by using a single workqueue handling the work.
      The workqueue would reach a bitmask of pending VF events
      and act upon each in turn.
      
      Problem is that the indication of a VF message [which sets
      the 'vf event' bit for that VF] arrives and is set in
      the slowpath attention context, which isn't syncronized with
      the processing of the events.
      When multiple VFs are present, it's possible that PF would
      lose the indication of one of the VF's pending evens, leading
      that VF to later timeout.
      
      Instead of adding locks/barriers, simply move from a bitmask
      into a per-VF indication inside that VF entry in the PF database.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd3c615a
  8. 21 2月, 2017 7 次提交
  9. 20 2月, 2017 1 次提交
  10. 16 2月, 2017 1 次提交
  11. 21 1月, 2017 1 次提交
    • A
      qed: avoid possible stack overflow in qed_ll2_acquire_connection · 0629a330
      Arnd Bergmann 提交于
      struct qed_ll2_info is rather large, so putting it on the stack
      can cause an overflow, as this warning tries to tell us:
      
      drivers/net/ethernet/qlogic/qed/qed_ll2.c: In function 'qed_ll2_start':
      drivers/net/ethernet/qlogic/qed/qed_ll2.c:2159:1: error: the frame size of 1056 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
      
      qed_ll2_start_ooo() already uses a dynamic allocation for the structure
      to work around that problem, and we could do the same in qed_ll2_start()
      as well as qed_roce_ll2_start(), but since the structure is only
      used to pass a couple of initialization values here, it seems nicer
      to replace it with a different structure.
      
      Lacking any idea for better naming, I'm adding 'struct qed_ll2_conn',
      which now contains all the initialization data, and this now simply
      gets copied into struct qed_ll2_info rather than assigning all members
      one by one.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0629a330