1. 29 10月, 2021 1 次提交
  2. 10 10月, 2021 1 次提交
  3. 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
  4. 30 8月, 2021 2 次提交
  5. 28 8月, 2021 1 次提交
    • J
      bnxt: count packets discarded because of netpoll · 40bedf7c
      Jakub Kicinski 提交于
      bnxt may discard packets if Rx completions are consumed
      in an attempt to let netpoll make progress. It should be
      extremely rare in practice but nonetheless such events
      should be counted.
      
      Since completion ring memory is allocated dynamically use
      a similar scheme to what is done for HW stats to save them.
      
      Report the stats in rx_dropped and per-netdev ethtool
      counter. Chances that users care which ring dropped are
      very low.
      
      v3: only save the stat to rx_dropped on reset,
      rx_total_netpoll_discards will now only show drops since
      last reset, similar to other "total_discard" counters.
      Reviewed-by: NMichael Chan <michael.chan@broadcom.com>
      Reviewed-by: NEdwin Peer <edwin.peer@broadcom.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      40bedf7c
  6. 24 8月, 2021 1 次提交
  7. 23 8月, 2021 1 次提交
    • C
      net: broadcom: switch from 'pci_' to 'dma_' API · df70303d
      Christophe JAILLET 提交于
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below.
      
      It has been compile tested.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df70303d
  8. 03 8月, 2021 1 次提交
    • M
      bnxt_en: Increase maximum RX ring size if jumbo ring is not used · c1129b51
      Michael Chan 提交于
      The current maximum RX ring size is defined assuming the RX jumbo ring
      (aka aggregation ring) is used.  The RX jumbo ring is automicatically used
      when the MTU exceeds a threshold or when rx-gro-hw/lro is enabled.  The RX
      jumbo ring is automatically sized up to 4 times the size of the RX ring
      size.
      
      The BNXT_MAX_RX_DESC_CNT constant is the upper limit on the size of the
      RX ring whether or not the RX jumbo ring is used.  Obviously, the
      maximum amount of RX buffer space is significantly less when the RX jumbo
      ring is not used.
      
      To increase flexibility for the user who does not use the RX jumbo ring,
      we now define a bigger maximum RX ring size when the RX jumbo ring is not
      used.  The maximum RX ring size is now up to 8K when the RX jumbo ring
      is not used.  The maximum completion ring size also needs to be scaled
      up to accomodate the larger maximum RX ring size.
      
      Note that when the RX jumbo ring is re-enabled, the RX ring size will
      automatically drop if it exceeds the maximum.
      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>
      c1129b51
  9. 29 6月, 2021 1 次提交
  10. 26 4月, 2021 1 次提交
  11. 20 4月, 2021 1 次提交
  12. 17 4月, 2021 1 次提交
  13. 16 4月, 2021 1 次提交
  14. 13 1月, 2021 1 次提交
  15. 15 12月, 2020 5 次提交
  16. 20 11月, 2020 1 次提交
    • J
      devlink: move request_firmware out of driver · b44cfd4f
      Jacob Keller 提交于
      All drivers which implement the devlink flash update support, with the
      exception of netdevsim, use either request_firmware or
      request_firmware_direct to locate the firmware file. Rather than having
      each driver do this separately as part of its .flash_update
      implementation, perform the request_firmware within net/core/devlink.c
      
      Replace the file_name parameter in the struct devlink_flash_update_params
      with a pointer to the fw object.
      
      Use request_firmware rather than request_firmware_direct. Although most
      Linux distributions today do not have the fallback mechanism
      implemented, only about half the drivers used the _direct request, as
      compared to the generic request_firmware. In the event that
      a distribution does support the fallback mechanism, the devlink flash
      update ought to be able to use it to provide the firmware contents. For
      distributions which do not support the fallback userspace mechanism,
      there should be essentially no difference between request_firmware and
      request_firmware_direct.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Acked-by: NShannon Nelson <snelson@pensando.io>
      Acked-by: NVasundhara Volam <vasundhara-v.volam@broadcom.com>
      Reviewed-by: NJiri Pirko <jiri@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      b44cfd4f
  17. 17 11月, 2020 2 次提交
  18. 13 10月, 2020 2 次提交
  19. 05 10月, 2020 1 次提交
  20. 28 9月, 2020 7 次提交
  21. 21 9月, 2020 2 次提交
  22. 16 9月, 2020 1 次提交
  23. 26 8月, 2020 3 次提交
  24. 24 8月, 2020 1 次提交