This is a note to let you know that I've just added the patch titled net: axienet: Fix TX ring slot available check to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-axienet-fix-tx-ring-slot-available-check.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 996defd7f8b5dafc1d480b7585c7c62437f80c3c Mon Sep 17 00:00:00 2001 From: Robert Hancock <robert.hancock@xxxxxxxxxx> Date: Tue, 18 Jan 2022 15:41:29 -0600 Subject: net: axienet: Fix TX ring slot available check From: Robert Hancock <robert.hancock@xxxxxxxxxx> commit 996defd7f8b5dafc1d480b7585c7c62437f80c3c upstream. The check for whether a TX ring slot was available was incorrect, since a slot which had been loaded with transmit data but the device had not started transmitting would be treated as available, potentially causing non-transmitted slots to be overwritten. The control field in the descriptor should be checked, rather than the status field (which may only be updated when the device completes the entry). Fixes: 8a3b7a252dca9 ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Signed-off-by: Robert Hancock <robert.hancock@xxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -643,7 +643,6 @@ static int axienet_free_tx_chain(struct if (cur_p->skb && (status & XAXIDMA_BD_STS_COMPLETE_MASK)) dev_consume_skb_irq(cur_p->skb); - cur_p->cntrl = 0; cur_p->app0 = 0; cur_p->app1 = 0; cur_p->app2 = 0; @@ -651,6 +650,7 @@ static int axienet_free_tx_chain(struct cur_p->skb = NULL; /* ensure our transmit path and device don't prematurely see status cleared */ wmb(); + cur_p->cntrl = 0; cur_p->status = 0; if (sizep) @@ -713,7 +713,7 @@ static inline int axienet_check_tx_bd_sp /* Ensure we see all descriptor updates from device or TX IRQ path */ rmb(); cur_p = &lp->tx_bd_v[(lp->tx_bd_tail + num_frag) % lp->tx_bd_num]; - if (cur_p->status & XAXIDMA_BD_STS_ALL_MASK) + if (cur_p->cntrl) return NETDEV_TX_BUSY; return 0; } Patches currently in stable-queue which might be from robert.hancock@xxxxxxxxxx are queue-5.15/net-axienet-wait-for-phyrstcmplt-after-core-reset.patch queue-5.15/net-axienet-add-missing-memory-barriers.patch queue-5.15/clk-si5341-fix-clock-hw-provider-cleanup.patch queue-5.15/net-axienet-increase-default-tx-ring-size-to-128.patch queue-5.15/net-axienet-fix-tx-ring-slot-available-check.patch queue-5.15/net-axienet-fix-for-tx-busy-handling.patch queue-5.15/net-axienet-limit-minimum-tx-ring-size.patch queue-5.15/net-axienet-reset-core-on-initialization-prior-to-mdio-access.patch queue-5.15/net-axienet-fix-number-of-tx-ring-slots-for-available-check.patch queue-5.15/net-axienet-increase-reset-timeout.patch