750-v6.5-21-net-ethernet-mtk_eth_soc-fix-pse_port-configuration-.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. From 5a124b1fd3e6cb15a943f0cdfe96aa8f6d3d2f39 Mon Sep 17 00:00:00 2001
  2. From: Lorenzo Bianconi <[email protected]>
  3. Date: Sat, 9 Sep 2023 20:41:56 +0200
  4. Subject: [PATCH] net: ethernet: mtk_eth_soc: fix pse_port configuration for
  5. MT7988
  6. MT7988 SoC support 3 NICs. Fix pse_port configuration in
  7. mtk_flow_set_output_device routine if the traffic is offloaded to eth2.
  8. Rely on mtk_pse_port definitions.
  9. Fixes: 88efedf517e6 ("net: ethernet: mtk_eth_soc: enable nft hw flowtable_offload for MT7988 SoC")
  10. Signed-off-by: Lorenzo Bianconi <[email protected]>
  11. Signed-off-by: David S. Miller <[email protected]>
  12. ---
  13. drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 6 ++++--
  14. 1 file changed, 4 insertions(+), 2 deletions(-)
  15. --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
  16. +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
  17. @@ -214,9 +214,11 @@ mtk_flow_set_output_device(struct mtk_et
  18. dsa_port = mtk_flow_get_dsa_port(&dev);
  19. if (dev == eth->netdev[0])
  20. - pse_port = 1;
  21. + pse_port = PSE_GDM1_PORT;
  22. else if (dev == eth->netdev[1])
  23. - pse_port = 2;
  24. + pse_port = PSE_GDM2_PORT;
  25. + else if (dev == eth->netdev[2])
  26. + pse_port = PSE_GDM3_PORT;
  27. else
  28. return -EOPNOTSUPP;