From: Rohan G Thomas Date: Fri, 31 Oct 2025 17:27:08 +0000 (+0800) Subject: net: stmmac: socfpga: Enable TBS support for Agilex5 X-Git-Tag: v6.19-rc1~170^2~226^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c00476d44804db3c16838299b87a11741cd0dbd;p=thirdparty%2Fkernel%2Flinux.git net: stmmac: socfpga: Enable TBS support for Agilex5 Agilex5 supports Time-Based Scheduling(TBS) for Tx queue 6 and Tx queue 7. This commit enables TBS support for these queues. Signed-off-by: Rohan G Thomas Link: https://patch.msgid.link/20251101-agilex5_ext-v2-2-a6b51b4dca4d@altera.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c index 5666b01723643..4f256f0ae05c1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c @@ -457,6 +457,19 @@ static void socfpga_agilex5_setup_plat_dat(struct socfpga_dwmac *dwmac) struct plat_stmmacenet_data *plat_dat = dwmac->plat_dat; plat_dat->core_type = DWMAC_CORE_XGMAC; + + /* Enable TBS */ + switch (plat_dat->tx_queues_to_use) { + case 8: + plat_dat->tx_queues_cfg[7].tbs_en = true; + fallthrough; + case 7: + plat_dat->tx_queues_cfg[6].tbs_en = true; + break; + default: + /* Tx Queues 0 - 5 doesn't support TBS on Agilex5 */ + break; + } } static int socfpga_dwmac_probe(struct platform_device *pdev)