summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/stmicro
diff options
context:
space:
mode:
authorAbhishek Chauhan <quic_abchauha@quicinc.com>2024-02-09 02:11:45 +0300
committerDavid S. Miller <davem@davemloft.net>2024-02-12 13:25:41 +0300
commit0918c1dcd55cfe3b8f9844731dc68eee948c9f92 (patch)
tree53d2ba82b653a340c486dbea3e8bfe5d816112e6 /drivers/net/ethernet/stmicro
parentf7ab791d7f737087dc84f12040a86c581c849147 (diff)
downloadlinux-0918c1dcd55cfe3b8f9844731dc68eee948c9f92.tar.xz
net: stmmac: dwmac-qcom-ethqos: Enable TBS on all queues but 0
TSO and TBS cannot co-exist. TBS requires special descriptor to be allocated at bootup. Initialising Tx queues at probe to support TSO and TBS can help in allocating those resources at bootup. TX queues with TBS can support etf qdisc hw offload. This is similar to the patch raised by NXP commit 3b12ec8f618e ("net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings") Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 31631e3f89d0..2691a250a5a7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -728,7 +728,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
struct stmmac_resources stmmac_res;
struct device *dev = &pdev->dev;
struct qcom_ethqos *ethqos;
- int ret;
+ int ret, i;
ret = stmmac_get_platform_resources(pdev, &stmmac_res);
if (ret)
@@ -822,6 +822,10 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
plat_dat->serdes_powerdown = qcom_ethqos_serdes_powerdown;
}
+ /* Enable TSO on queue0 and enable TBS on rest of the queues */
+ for (i = 1; i < plat_dat->tx_queues_to_use; i++)
+ plat_dat->tx_queues_cfg[i].tbs_en = 1;
+
return devm_stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
}