linux/drivers/net/ethernet/broadcom
Michael Chan 5bed8b0704 bnxt_en: Fix TX timeout when TX ring size is set to the smallest
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: c0c050c58d ("bnxt_en: New Broadcom ethernet driver.")
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadocm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-20 10:08:36 +01:00
..
bnx2x Networking fixes for 5.15-rc2, including fixes from bpf. 2021-09-16 13:05:42 -07:00
bnxt bnxt_en: Fix TX timeout when TX ring size is set to the smallest 2021-09-20 10:08:36 +01:00
genet ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
b44.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
b44.h
bcm63xx_enet.c bcm63xx_enet: delete a redundant assignment 2021-07-29 22:18:42 +01:00
bcm63xx_enet.h bcm63xx_enet: convert to build_skb 2021-01-07 12:39:53 -08:00
bcm4908_enet.c net: broadcom: bcm4908_enet: reset DMA rings sw indexes properly 2021-06-22 10:34:13 -07:00
bcm4908_enet.h net: broadcom: rename BCM4908 driver & update DT binding 2021-02-11 15:04:17 -08:00
bcmsysport.c ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
bcmsysport.h net: broadcom: share header defining UniMAC registers 2021-01-08 19:17:28 -08:00
bgmac-bcma-mdio.c
bgmac-bcma.c net: bgmac-bcma: handle deferred probe error due to mac-address 2021-09-19 13:14:05 +01:00
bgmac-platform.c net: ethernet: bgmac: Use devm_platform_ioremap_resource_byname 2021-06-07 14:07:22 -07:00
bgmac.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
bgmac.h net: broadcom: share header defining UniMAC registers 2021-01-08 19:17:28 -08:00
bnx2_fw.h
bnx2.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
bnx2.h
cnic_defs.h
cnic_if.h
cnic.c
cnic.h
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile net: broadcom: rename BCM4908 driver & update DT binding 2021-02-11 15:04:17 -08:00
sb1250-mac.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
tg3.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
tg3.h tg3: Read VPD with pci_vpd_alloc() 2021-08-20 15:49:00 -05:00
unimac.h net: broadcom: share header defining UniMAC registers 2021-01-08 19:17:28 -08:00