Patch "net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY

to the 4.19-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-ll_temac-avoid-ndo_start_xmit-returning-netdev_t.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit bd9183a5d2b9a69f6b90cf581e54d177cc34be21
Author: Esben Haabendal <esben@xxxxxxxxxx>
Date:   Fri Jun 18 12:52:38 2021 +0200

    net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY
    
    [ Upstream commit f6396341194234e9b01cd7538bc2c6ac4501ab14 ]
    
    As documented in Documentation/networking/driver.rst, the ndo_start_xmit
    method must not return NETDEV_TX_BUSY under any normal circumstances, and
    as recommended, we simply stop the tx queue in advance, when there is a
    risk that the next xmit would cause a NETDEV_TX_BUSY return.
    
    Signed-off-by: Esben Haabendal <esben@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 2241f9897092..939de185bc6b 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -736,6 +736,11 @@ temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 	/* Kick off the transfer */
 	lp->dma_out(lp, TX_TAILDESC_PTR, tail_p); /* DMA start */
 
+	if (temac_check_tx_bd_space(lp, MAX_SKB_FRAGS + 1)) {
+		netdev_info(ndev, "%s -> netif_stop_queue\n", __func__);
+		netif_stop_queue(ndev);
+	}
+
 	return NETDEV_TX_OK;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux