Patch "igc: Set Qbv start_time and end_time to end_time if not being configured in GCL" has been added to the 6.0-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

    igc: Set Qbv start_time and end_time to end_time if not being configured in GCL

to the 6.0-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:
     igc-set-qbv-start_time-and-end_time-to-end_time-if-n.patch
and it can be found in the queue-6.0 subdirectory.

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



commit 6ba58a46e777a1d89f6b8c237600048a1181974b
Author: Tan Tee Min <tee.min.tan@xxxxxxxxxxxxxxx>
Date:   Fri Dec 9 12:15:22 2022 +0800

    igc: Set Qbv start_time and end_time to end_time if not being configured in GCL
    
    [ Upstream commit 72abeedd83982c1bc6023f631e412db78374d9b4 ]
    
    The default setting of end_time minus start_time is whole 1 second.
    Thus, if it's not being configured in any GCL entry then it will be
    staying at original 1 second.
    
    This patch is changing the start_time and end_time to be end_time as
    if setting zero will be having weird HW behavior where the gate will
    not be fully closed.
    
    Fixes: ec50a9d437f0 ("igc: Add support for taprio offloading")
    Signed-off-by: Tan Tee Min <tee.min.tan@xxxxxxxxxxxxxxx>
    Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@xxxxxxxxx>
    Tested-by: Naama Meir <naamax.meir@xxxxxxxxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 207b4b5b2e5f..76f015196fbf 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -5999,6 +5999,7 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
 	bool queue_configured[IGC_MAX_TX_QUEUES] = { };
 	u32 start_time = 0, end_time = 0;
 	size_t n;
+	int i;
 
 	adapter->qbv_enable = qopt->enable;
 
@@ -6019,7 +6020,6 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
 
 	for (n = 0; n < qopt->num_entries; n++) {
 		struct tc_taprio_sched_entry *e = &qopt->entries[n];
-		int i;
 
 		end_time += e->interval;
 
@@ -6058,6 +6058,18 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
 		start_time += e->interval;
 	}
 
+	/* Check whether a queue gets configured.
+	 * If not, set the start and end time to be end time.
+	 */
+	for (i = 0; i < adapter->num_tx_queues; i++) {
+		if (!queue_configured[i]) {
+			struct igc_ring *ring = adapter->tx_ring[i];
+
+			ring->start_time = end_time;
+			ring->end_time = end_time;
+		}
+	}
+
 	return 0;
 }
 



[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