From 4a57b7304d1200e4e653f3e2b5f4cd61654cd191 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 21/22] 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> [ Srinidhi Rao : Ported this patch to photon linux from qoriq-components linux 'linux-4.14-nxp' (https://source.codeaurora.org/external/qoriq/qoriq-components/linux) ] Signed-off-by: srinidhira0 <srinidhir@vmware.com> --- drivers/staging/fsl_ppfe/pfe_hal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fsl_ppfe/pfe_hal.c b/drivers/staging/fsl_ppfe/pfe_hal.c index cfd02ccc313a..ec7764648c0c 100644 --- 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); } -- 2.14.2