1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
diff -urN a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c 2019-12-23 11:42:02.728620670 +0800
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c 2019-12-23 11:42:48.747289058 +0800
@@ -999,11 +999,6 @@
if (!(trxd.rxd2 & RX_DMA_DONE))
break;
- /* find out which mac the packet come from. values start at 1 */
-#if defined(CONFIG_NET_DSA)
- mac = (trxd.rxd4 >> 22) & 0x1;
- mac = (mac + 1) % 2;
-#else
mac = (trxd.rxd4 >> RX_DMA_FPORT_SHIFT) &
RX_DMA_FPORT_MASK;
/* From QDMA(5). This is a external interface case of HWNAT.
@@ -1017,7 +1012,7 @@
mac = 0;
else
mac--;
-#endif
+
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
!eth->netdev[mac]))
goto release_desc;
@@ -2030,10 +2025,6 @@
/* Disable RX VLan Offloading */
mtk_w32(eth, 0, MTK_CDMP_EG_CTRL);
-#if defined(CONFIG_NET_DSA)
- mtk_w32(eth, 0x81000001, MTK_CDMP_IG_CTRL);
-#endif
-
mtk_w32(eth, 0x8f0f8f0f, MTK_PDMA_DELAY_INT);
mtk_w32(eth, 0x8f0f8f0f, MTK_QDMA_DELAY_INT);
|