bnxt_en: Prevent TX timeout with a very small TX ring
authorMichael Chan <michael.chan@broadcom.com>
Tue, 12 Dec 2023 00:51:13 +0000 (16:51 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Dec 2023 00:05:57 +0000 (16:05 -0800)
commitf12f551b5b966ec58bfba9daa15f3cb99a92c1f9
tree12538f174e88c1723b79ff260bdadd1d27a74d2b
parent18fe0a383cca78cfb183f83f947e75bebc7b3a20
bnxt_en: Prevent TX timeout with a very small TX ring

If xmit_more condition is true, the driver may set the
TX_BD_FLAGS_NO_CMPL flag.  If after this packet, the TX ring can no
longer hold a packet with maximum fragments, we will stop the TX
queue.  When this happens, we must clear the TX_BD_FLAGS_NO_CMPL flag
on the last packet or there will be no completion and cause TX
timeout.

Fixes: c1056a59aee1 ("bnxt_en: Optimize xmit_more TX path")
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Hongguang Gao <hongguang.gao@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20231212005122.2401-5-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c