layerscape: add patches-5.4
[openwrt/staging/wigyori.git] / target / linux / layerscape / patches-5.4 / 701-net-0303-staging-fsl_ppfe-eth-disable-CRC-removal.patch
diff --git a/target/linux/layerscape/patches-5.4/701-net-0303-staging-fsl_ppfe-eth-disable-CRC-removal.patch b/target/linux/layerscape/patches-5.4/701-net-0303-staging-fsl_ppfe-eth-disable-CRC-removal.patch
new file mode 100644 (file)
index 0000000..c17f8a8
--- /dev/null
@@ -0,0 +1,28 @@
+From 26ddfc3e40c52ca9cb78c6ae4b4608f94d2e8cb5 Mon Sep 17 00:00:00 2001
+From: Calvin Johnson <calvin.johnson@nxp.com>
+Date: Wed, 20 Jun 2018 10:23:32 +0530
+Subject: [PATCH] staging: fsl_ppfe/eth: disable CRC removal
+
+Disable CRC removal from the packet, so that packets are forwarded
+as is to Linux.
+CRC configuration in MAC will be reflected in the packet received
+to Linux.
+
+Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
+---
+ drivers/staging/fsl_ppfe/pfe_hal.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/fsl_ppfe/pfe_hal.c
++++ b/drivers/staging/fsl_ppfe/pfe_hal.c
+@@ -869,8 +869,8 @@ void gemac_set_mode(void *base, int mode
+       /*Remove loopbank*/
+       val &= ~EMAC_RCNTRL_LOOP;
+-      /*Enable flow control and MII mode*/
+-      val |= (EMAC_RCNTRL_FCE | EMAC_RCNTRL_MII_MODE);
++      /* Enable flow control and MII mode and terminate received CRC */
++      val |= (EMAC_RCNTRL_FCE | EMAC_RCNTRL_MII_MODE | EMAC_RCNTRL_CRC_FWD);
+       writel(val, base + EMAC_RCNTRL_REG);
+ }