Patch "bnxt_en: Restore PTP tx_avail count in case of skb_pad() error" has been added to the 6.6-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

    bnxt_en: Restore PTP tx_avail count in case of skb_pad() error

to the 6.6-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:
     bnxt_en-restore-ptp-tx_avail-count-in-case-of-skb_pa.patch
and it can be found in the queue-6.6 subdirectory.

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



commit e30159629d8b595216ee6ecbd2ef7460de43bfbb
Author: Pavan Chebbi <pavan.chebbi@xxxxxxxxxxxx>
Date:   Tue Jun 18 14:53:13 2024 -0700

    bnxt_en: Restore PTP tx_avail count in case of skb_pad() error
    
    [ Upstream commit 1e7962114c10957fe4d10a15eb714578a394e90b ]
    
    The current code only restores PTP tx_avail count when we get DMA
    mapping errors.  Fix it so that the PTP tx_avail count will be
    restored for both DMA mapping errors and skb_pad() errors.
    Otherwise PTP TX timestamp will not be available after a PTP
    packet hits the skb_pad() error.
    
    Fixes: 83bb623c968e ("bnxt_en: Transmit and retrieve packet timestamps")
    Reviewed-by: Andy Gospodarek <andrew.gospodarek@xxxxxxxxxxxx>
    Signed-off-by: Pavan Chebbi <pavan.chebbi@xxxxxxxxxxxx>
    Signed-off-by: Michael Chan <michael.chan@xxxxxxxxxxxx>
    Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240618215313.29631-4-michael.chan@xxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 724624737d095..58a7bb75506a3 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -656,9 +656,6 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	return NETDEV_TX_OK;
 
 tx_dma_error:
-	if (BNXT_TX_PTP_IS_SET(lflags))
-		atomic_inc(&bp->ptp_cfg->tx_avail);
-
 	last_frag = i;
 
 	/* start back at beginning and unmap skb */
@@ -680,6 +677,8 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
 tx_free:
 	dev_kfree_skb_any(skb);
 tx_kick_pending:
+	if (BNXT_TX_PTP_IS_SET(lflags))
+		atomic_inc(&bp->ptp_cfg->tx_avail);
 	if (txr->kick_pending)
 		bnxt_txr_db_kick(bp, txr, txr->tx_prod);
 	txr->tx_buf_ring[txr->tx_prod].skb = NULL;




[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