From 643982232860887fed493144957ea5794b6557d1 Mon Sep 17 00:00:00 2001 From: Dave Jiang Date: Tue, 22 Aug 2023 09:05:02 -0700 Subject: [PATCH] ntb: Check tx descriptors outstanding instead of head/tail for tx queue Use existing function ntb_transport_tx_free_entry() instead of open coding the check to see if there are outstanding tx descriptors. Reviewed-by: Logan Gunthorpe Signed-off-by: Dave Jiang Signed-off-by: Jon Mason --- drivers/ntb/ntb_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c index 9532108..f9e7847 100644 --- a/drivers/ntb/ntb_transport.c +++ b/drivers/ntb/ntb_transport.c @@ -1901,7 +1901,7 @@ err: static int ntb_process_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry) { - if (qp->tx_index == qp->remote_rx_info->entry) { + if (!ntb_transport_tx_free_entry(qp)) { qp->tx_ring_full++; return -EAGAIN; } -- 2.7.4