Openwrt/target/linux/mediatek/patches-4.19/0002-eth-fix-dsa-support.patch
Koen Vandeputte 20b5a4ca01 kernel: bump 4.19 to 4.19.101
Refreshed all patches.

Fixes:
- CVE-2019-14896
- CVE-2019-14897

Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch
- 950-0202-staging-bcm2835-camera-fix-module-autoloading.patch
- 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-02-04 18:10:13 +01:00

35 lines
1.0 KiB
Diff

--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -999,11 +999,6 @@ static int mtk_poll_rx(struct napi_struc
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 @@ static int mtk_poll_rx(struct napi_struc
mac = 0;
else
mac--;
-#endif
+
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
!eth->netdev[mac]))
goto release_desc;
@@ -2030,10 +2025,6 @@ static int mtk_hw_init(struct mtk_eth *e
/* 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);