mediatek: Add support for Xiaomi Redmi Router AX6S
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0303-staging-fsl_ppfe-eth-disable-CRC-removal.patch
1 From 26ddfc3e40c52ca9cb78c6ae4b4608f94d2e8cb5 Mon Sep 17 00:00:00 2001
2 From: Calvin Johnson <calvin.johnson@nxp.com>
3 Date: Wed, 20 Jun 2018 10:23:32 +0530
4 Subject: [PATCH] staging: fsl_ppfe/eth: disable CRC removal
5
6 Disable CRC removal from the packet, so that packets are forwarded
7 as is to Linux.
8 CRC configuration in MAC will be reflected in the packet received
9 to Linux.
10
11 Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
12 ---
13 drivers/staging/fsl_ppfe/pfe_hal.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16 --- a/drivers/staging/fsl_ppfe/pfe_hal.c
17 +++ b/drivers/staging/fsl_ppfe/pfe_hal.c
18 @@ -869,8 +869,8 @@ void gemac_set_mode(void *base, int mode
19 /*Remove loopbank*/
20 val &= ~EMAC_RCNTRL_LOOP;
21
22 - /*Enable flow control and MII mode*/
23 - val |= (EMAC_RCNTRL_FCE | EMAC_RCNTRL_MII_MODE);
24 + /* Enable flow control and MII mode and terminate received CRC */
25 + val |= (EMAC_RCNTRL_FCE | EMAC_RCNTRL_MII_MODE | EMAC_RCNTRL_CRC_FWD);
26
27 writel(val, base + EMAC_RCNTRL_REG);
28 }