1. 17 11月, 2021 1 次提交
  2. 15 11月, 2021 3 次提交
  3. 03 11月, 2021 1 次提交
  4. 30 10月, 2021 1 次提交
  5. 29 10月, 2021 18 次提交
  6. 15 10月, 2021 1 次提交
  7. 10 10月, 2021 1 次提交
  8. 05 10月, 2021 1 次提交
  9. 02 10月, 2021 2 次提交
  10. 27 9月, 2021 1 次提交
  11. 25 9月, 2021 1 次提交
  12. 24 9月, 2021 2 次提交
  13. 22 9月, 2021 1 次提交
  14. 20 9月, 2021 1 次提交
    • M
      bnxt_en: Fix TX timeout when TX ring size is set to the smallest · 5bed8b07
      Michael Chan 提交于
      The smallest TX ring size we support must fit a TX SKB with MAX_SKB_FRAGS
      + 1.  Because the first TX BD for a packet is always a long TX BD, we
      need an extra TX BD to fit this packet.  Define BNXT_MIN_TX_DESC_CNT with
      this value to make this more clear.  The current code uses a minimum
      that is off by 1.  Fix it using this constant.
      
      The tx_wake_thresh to determine when to wake up the TX queue is half the
      ring size but we must have at least BNXT_MIN_TX_DESC_CNT for the next
      packet which may have maximum fragments.  So the comparison of the
      available TX BDs with tx_wake_thresh should be >= instead of > in the
      current code.  Otherwise, at the smallest ring size, we will never wake
      up the TX queue and will cause TX timeout.
      
      Fixes: c0c050c5 ("bnxt_en: New Broadcom ethernet driver.")
      Reviewed-by: NPavan Chebbi <pavan.chebbi@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadocm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5bed8b07
  15. 16 9月, 2021 1 次提交
  16. 13 9月, 2021 3 次提交
    • M
      bnxt_en: Clean up completion ring page arrays completely · 985941e1
      Michael Chan 提交于
      We recently changed the completion ring page arrays to be dynamically
      allocated to better support the expanded range of ring depths.  The
      cleanup path for this was not quite complete.  It might cause the
      shutdown path to crash if we need to abort before the completion ring
      arrays have been allocated and initialized.
      
      Fix it by initializing the ring_mem->pg_arr to NULL after freeing the
      completion ring page array.  Add a check in bnxt_free_ring() to skip
      referencing the rmem->pg_arr if it is NULL.
      
      Fixes: 03c74487 ("bnxt_en: Don't use static arrays for completion ring pages")
      Reviewed-by: NAndy Gospodarek <gospo@broadcom.com>
      Reviewed-by: NEdwin Peer <edwin.peer@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      985941e1
    • E
      bnxt_en: make bnxt_free_skbs() safe to call after bnxt_free_mem() · 1affc01f
      Edwin Peer 提交于
      The call to bnxt_free_mem(..., false) in the bnxt_half_open_nic() error
      path will deallocate ring descriptor memory via bnxt_free_?x_rings(),
      but because irq_re_init is false, the ring info itself is not freed.
      
      To simplify error paths, deallocation functions have generally been
      written to be safe when called on unallocated memory. It should always
      be safe to call dev_close(), which calls bnxt_free_skbs() a second time,
      even in this semi- allocated ring state.
      
      Calling bnxt_free_skbs() a second time with the rings already freed will
      cause NULL pointer dereference.  Fix it by checking the rings are valid
      before proceeding in bnxt_free_tx_skbs() and
      bnxt_free_one_rx_ring_skbs().
      
      Fixes: 975bc99a ("bnxt_en: Refactor bnxt_free_rx_skbs().")
      Signed-off-by: NEdwin Peer <edwin.peer@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1affc01f
    • M
      bnxt_en: Fix error recovery regression · eca4cf12
      Michael Chan 提交于
      The recent patch has introduced a regression by not reading the reset
      count in the ERROR_RECOVERY async event handler.  We may have just
      gone through a reset and the reset count has just incremented.  If
      we don't update the reset count in the ERROR_RECOVERY event handler,
      the health check timer will see that the reset count has changed and
      will initiate an unintended reset.
      
      Restore the unconditional update of the reset count in
      bnxt_async_event_process() if error recovery watchdog is enabled.
      Also, update the reset count at the end of the reset sequence to
      make it even more robust.
      
      Fixes: 1b2b9183 ("bnxt_en: Fix possible unintended driver initiated error recovery")
      Reviewed-by: NEdwin Peer <edwin.peer@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eca4cf12
  17. 06 9月, 2021 1 次提交
    • M
      bnxt_en: Fix possible unintended driver initiated error recovery · 1b2b9183
      Michael Chan 提交于
      If error recovery is already enabled, bnxt_timer() will periodically
      check the heartbeat register and the reset counter.  If we get an
      error recovery async. notification from the firmware (e.g. change in
      primary/secondary role), we will immediately read and update the
      heartbeat register and the reset counter.  If the timer for the next
      health check expires soon after this, we may read the heartbeat register
      again in quick succession and find that it hasn't changed.  This will
      trigger error recovery unintentionally.
      
      The likelihood is small because we also reset fw_health->tmr_counter
      which will reset the interval for the next health check.  But the
      update is not protected and bnxt_timer() can miss the update and
      perform the health check without waiting for the full interval.
      
      Fix it by only reading the heartbeat register and reset counter in
      bnxt_async_event_process() if error recovery is trasitioning to the
      enabled state.  Also add proper memory barriers so that when enabling
      for the first time, bnxt_timer() will see the tmr_counter interval and
      perform the health check after the full interval has elapsed.
      
      Fixes: 7e914027 ("bnxt_en: Enable health monitoring.")
      Reviewed-by: NEdwin Peer <edwin.peer@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b2b9183