781-net-ethernet-mtk_eth_soc-fix-mask-of-RX_DMA_GET_SPOR.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 8743af8a77dd909970462ca578358128cce5d027 Mon Sep 17 00:00:00 2001
  2. From: Daniel Golle <[email protected]>
  3. Date: Tue, 27 Sep 2022 15:39:39 +0100
  4. Subject: [PATCH] net: ethernet: mtk_eth_soc: fix mask of
  5. RX_DMA_GET_SPORT{,_V2}
  6. To: [email protected],
  7. [email protected],
  8. Lorenzo Bianconi <[email protected]>
  9. Cc: Sujuan Chen <[email protected]>,
  10. Bo Jiao <[email protected]>,
  11. Felix Fietkau <[email protected]>,
  12. John Crispin <[email protected]>,
  13. Sean Wang <[email protected]>,
  14. Mark Lee <[email protected]>,
  15. David S. Miller <[email protected]>,
  16. Eric Dumazet <[email protected]>,
  17. Jakub Kicinski <[email protected]>,
  18. Paolo Abeni <[email protected]>,
  19. Matthias Brugger <[email protected]>,
  20. Chen Minqiang <[email protected]>
  21. The bitmasks applied in RX_DMA_GET_SPORT and RX_DMA_GET_SPORT_V2 macros
  22. were swapped. Fix that.
  23. Reported-by: Chen Minqiang <[email protected]>
  24. Fixes: 160d3a9b192985 ("net: ethernet: mtk_eth_soc: introduce MTK_NETSYS_V2 support")
  25. Acked-by: Lorenzo Bianconi <[email protected]>
  26. Signed-off-by: Daniel Golle <[email protected]>
  27. ---
  28. drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++--
  29. 1 file changed, 2 insertions(+), 2 deletions(-)
  30. --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
  31. +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
  32. @@ -315,8 +315,8 @@
  33. #define MTK_RXD5_PPE_CPU_REASON GENMASK(22, 18)
  34. #define MTK_RXD5_SRC_PORT GENMASK(29, 26)
  35. -#define RX_DMA_GET_SPORT(x) (((x) >> 19) & 0xf)
  36. -#define RX_DMA_GET_SPORT_V2(x) (((x) >> 26) & 0x7)
  37. +#define RX_DMA_GET_SPORT(x) (((x) >> 19) & 0x7)
  38. +#define RX_DMA_GET_SPORT_V2(x) (((x) >> 26) & 0xf)
  39. /* PDMA V2 descriptor rxd3 */
  40. #define RX_DMA_VTAG_V2 BIT(0)