ionic: Check stop no restart
authorBrett Creeley <brett.creeley@amd.com>
Thu, 29 Feb 2024 19:39:29 +0000 (11:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Mar 2024 09:38:13 +0000 (09:38 +0000)
commit138506ab249b7ac7856cb7a5a536a4b61a7a4ae1
tree70a3b2563bb7d40ea4f643550c7cdee0d3cb0ffb
parentbc581273fead93ccc918b8c9a5b8a9f60b1ee836
ionic: Check stop no restart

If there is a lot of transmit traffic the driver can get into a
situation that the device is starved due to the doorbell never
being rung. This can happen if xmit_more is set constantly
and __netdev_tx_sent_queue() keeps returning false. Fix this
by checking if the queue needs to be stopped right before
calling __netdev_tx_sent_queue(). Use MAX_SKB_FRAGS + 1 as the
stop condition because that's the maximum number of frags
supported for non-TSO transmit.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_txrx.c