]> git.itanic.dy.fi Git - linux-stable/commitdiff
igc: Fix hicredit calculation
authorRodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
Fri, 8 Dec 2023 14:58:16 +0000 (15:58 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 3 Jan 2024 19:19:47 +0000 (11:19 -0800)
According to the Intel Software Manual for I225, Section 7.5.2.7,
hicredit should be multiplied by the constant link-rate value, 0x7736.

Currently, the old constant link-rate value, 0x7735, from the boards
supported on igb are being used, most likely due to a copy'n'paste, as
the rest of the logic is the same for both drivers.

Update hicredit accordingly.

Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_tsn.c

index a9c08321aca901c20f1178088f4764413a40d2ea..22cefb1eeedfa71651442d9da319778fa3b2101c 100644 (file)
@@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter)
                        wr32(IGC_TQAVCC(i), tqavcc);
 
                        wr32(IGC_TQAVHC(i),
-                            0x80000000 + ring->hicredit * 0x7735);
+                            0x80000000 + ring->hicredit * 0x7736);
                } else {
                        /* Disable any CBS for the queue */
                        txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);