kernel: bump 4.19 to 4.19.101
[openwrt/openwrt.git] / target / linux / mediatek / patches-4.19 / 0002-eth-fix-dsa-support.patch
1 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
2 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
3 @@ -999,11 +999,6 @@ static int mtk_poll_rx(struct napi_struc
4 if (!(trxd.rxd2 & RX_DMA_DONE))
5 break;
6
7 - /* find out which mac the packet come from. values start at 1 */
8 -#if defined(CONFIG_NET_DSA)
9 - mac = (trxd.rxd4 >> 22) & 0x1;
10 - mac = (mac + 1) % 2;
11 -#else
12 mac = (trxd.rxd4 >> RX_DMA_FPORT_SHIFT) &
13 RX_DMA_FPORT_MASK;
14 /* From QDMA(5). This is a external interface case of HWNAT.
15 @@ -1017,7 +1012,7 @@ static int mtk_poll_rx(struct napi_struc
16 mac = 0;
17 else
18 mac--;
19 -#endif
20 +
21 if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
22 !eth->netdev[mac]))
23 goto release_desc;
24 @@ -2030,10 +2025,6 @@ static int mtk_hw_init(struct mtk_eth *e
25 /* Disable RX VLan Offloading */
26 mtk_w32(eth, 0, MTK_CDMP_EG_CTRL);
27
28 -#if defined(CONFIG_NET_DSA)
29 - mtk_w32(eth, 0x81000001, MTK_CDMP_IG_CTRL);
30 -#endif
31 -
32 mtk_w32(eth, 0x8f0f8f0f, MTK_PDMA_DELAY_INT);
33 mtk_w32(eth, 0x8f0f8f0f, MTK_QDMA_DELAY_INT);
34