1. 04 6月, 2019 1 次提交
  2. 05 5月, 2019 3 次提交
  3. 17 4月, 2019 2 次提交
  4. 24 3月, 2019 2 次提交
  5. 10 3月, 2019 1 次提交
    • M
      bnxt_en: Drop oversize TX packets to prevent errors. · 1713c8e1
      Michael Chan 提交于
      [ Upstream commit 2b3c6885386020b1b9d92d45e8349637e27d1f66 ]
      
      There have been reports of oversize UDP packets being sent to the
      driver to be transmitted, causing error conditions.  The issue is
      likely caused by the dst of the SKB switching between 'lo' with
      64K MTU and the hardware device with a smaller MTU.  Patches are
      being proposed by Mahesh Bandewar <maheshb@google.com> to fix the
      issue.
      
      In the meantime, add a quick length check in the driver to prevent
      the error.  The driver uses the TX packet size as index to look up an
      array to setup the TX BD.  The array is large enough to support all MTU
      sizes supported by the driver.  The oversize TX packet causes the
      driver to index beyond the array and put garbage values into the
      TX BD.  Add a simple check to prevent this.
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1713c8e1
  6. 13 2月, 2019 1 次提交
    • M
      bnxt_en: Disable MSIX before re-reserving NQs/CMPL rings. · 4cd197bf
      Michael Chan 提交于
      [ Upstream commit 36d65be9a88052cdfc8524eb591baf0e6c878408 ]
      
      When bringing up a device, the code checks to see if the number of
      MSIX has changed.  pci_disable_msix() should be called first before
      changing the number of reserved NQs/CMPL rings.  This ensures that
      the MSIX vectors associated with the NQs/CMPL rings are still
      properly mapped when pci_disable_msix() masks the vectors.
      
      This patch will prevent errors when RDMA support is added for the new
      57500 chips.  When the RDMA driver shuts down, the number of NQs is
      decreased and we must use the new sequence to prevent MSIX errors.
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      4cd197bf
  7. 13 12月, 2018 1 次提交
  8. 05 10月, 2018 4 次提交
  9. 27 9月, 2018 1 次提交
    • M
      bnxt_en: Fix TX timeout during netpoll. · 73f21c65
      Michael Chan 提交于
      The current netpoll implementation in the bnxt_en driver has problems
      that may miss TX completion events.  bnxt_poll_work() in effect is
      only handling at most 1 TX packet before exiting.  In addition,
      there may be in flight TX completions that ->poll() may miss even
      after we fix bnxt_poll_work() to handle all visible TX completions.
      netpoll may not call ->poll() again and HW may not generate IRQ
      because the driver does not ARM the IRQ when the budget (0 for netpoll)
      is reached.
      
      We fix it by handling all TX completions and to always ARM the IRQ
      when we exit ->poll() with 0 budget.
      
      Also, the logic to ACK the completion ring in case it is almost filled
      with TX completions need to be adjusted to take care of the 0 budget
      case, as discussed with Eric Dumazet <edumazet@google.com>
      Reported-by: NSong Liu <songliubraving@fb.com>
      Reviewed-by: NSong Liu <songliubraving@fb.com>
      Tested-by: NSong Liu <songliubraving@fb.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      73f21c65
  10. 24 9月, 2018 1 次提交
    • E
      bnxt: remove ndo_poll_controller · 58e0e22b
      Eric Dumazet 提交于
      As diagnosed by Song Liu, ndo_poll_controller() can
      be very dangerous on loaded hosts, since the cpu
      calling ndo_poll_controller() might steal all NAPI
      contexts (for all RX/TX queues of the NIC). This capture
      can last for unlimited amount of time, since one
      cpu is generally not able to drain all the queues under load.
      
      bnxt uses NAPI for TX completions, so we better let core
      networking stack call the napi->poll() to avoid the capture.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Michael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58e0e22b
  11. 21 9月, 2018 1 次提交
  12. 19 9月, 2018 1 次提交
  13. 17 9月, 2018 1 次提交
  14. 04 9月, 2018 3 次提交
  15. 22 8月, 2018 1 次提交
  16. 14 8月, 2018 2 次提交
    • A
      bnxt_en: take coredump_record structure off stack · 1bbf3aed
      Arnd Bergmann 提交于
      The bnxt_coredump_record structure is very long, causing a warning
      about possible stack overflow on 32-bit architectures:
      
      drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c: In function 'bnxt_get_coredump':
      drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2989:1: error: the frame size of 1188 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
      
      I could not see any reason to operate on an on-stack copy of the
      structure before copying it back into the caller-provided buffer, which
      also simplifies the code here.
      
      Fixes: 6c5657d0 ("bnxt_en: Add support for ethtool get dump.")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1bbf3aed
    • A
      bnxt_en: avoid string overflow for record->system_name · 3d46eee5
      Arnd Bergmann 提交于
      The utsname()->nodename string may be 64 bytes long, and it gets
      copied without the trailing nul byte into the shorter record->system_name,
      as gcc now warns:
      
      In file included from include/linux/bitmap.h:9,
                       from include/linux/ethtool.h:16,
                       from drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:13:
      In function 'strncpy',
          inlined from 'bnxt_fill_coredump_record' at drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2863:2:
      include/linux/string.h:254:9: error: '__builtin_strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
      
      Using strlcpy() at least avoids overflowing the destination buffer
      and adds proper nul-termination. It may still truncate long names
      though, which probably can't be solved here.
      
      Fixes: 6c5657d0 ("bnxt_en: Add support for ethtool get dump.")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d46eee5
  17. 11 8月, 2018 1 次提交
  18. 08 8月, 2018 1 次提交
  19. 06 8月, 2018 12 次提交