Patch "amd-xgbe: handle the corner-case during tx completion" has been added to the 6.1-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

    amd-xgbe: handle the corner-case during tx completion

to the 6.1-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:
     amd-xgbe-handle-the-corner-case-during-tx-completion.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 0b0b5b980d6d529d5d7f2bbb18ef9d09e2788cc2
Author: Raju Rangoju <Raju.Rangoju@xxxxxxx>
Date:   Wed Nov 22 00:44:34 2023 +0530

    amd-xgbe: handle the corner-case during tx completion
    
    [ Upstream commit 7121205d5330c6a3cb3379348886d47c77b78d06 ]
    
    The existing implementation uses software logic to accumulate tx
    completions until the specified time (1ms) is met and then poll them.
    However, there exists a tiny gap which leads to a race between
    resetting and checking the tx_activate flag. Due to this the tx
    completions are not reported to upper layer and tx queue timeout
    kicks-in restarting the device.
    
    To address this, introduce a tx cleanup mechanism as part of the
    periodic maintenance process.
    
    Fixes: c5aa9e3b8156 ("amd-xgbe: Initial AMD 10GbE platform driver")
    Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx>
    Signed-off-by: Raju Rangoju <Raju.Rangoju@xxxxxxx>
    Reviewed-by: Wojciech Drewek <wojciech.drewek@xxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 614c0278419bc..6b73648b37793 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -682,10 +682,24 @@ static void xgbe_service(struct work_struct *work)
 static void xgbe_service_timer(struct timer_list *t)
 {
 	struct xgbe_prv_data *pdata = from_timer(pdata, t, service_timer);
+	struct xgbe_channel *channel;
+	unsigned int i;
 
 	queue_work(pdata->dev_workqueue, &pdata->service_work);
 
 	mod_timer(&pdata->service_timer, jiffies + HZ);
+
+	if (!pdata->tx_usecs)
+		return;
+
+	for (i = 0; i < pdata->channel_count; i++) {
+		channel = pdata->channel[i];
+		if (!channel->tx_ring || channel->tx_timer_active)
+			break;
+		channel->tx_timer_active = 1;
+		mod_timer(&channel->tx_timer,
+			  jiffies + usecs_to_jiffies(pdata->tx_usecs));
+	}
 }
 
 static void xgbe_init_timers(struct xgbe_prv_data *pdata)



[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