From a4466f3a10abb90004efbd1ff2f0052335a7aee2 Mon Sep 17 00:00:00 2001 From: Mandy Lavi Date: Thu, 23 Apr 2015 00:19:14 +0900 Subject: fmd: clear parser start offset for all cases Change-Id: I408df80410abae8d39ed73299b4e5df2e76cc8ad Signed-off-by: Mandy Lavi Reviewed-on: http://git.am.freescale.net:8181/35430 Reviewed-by: Liron Himi Reviewed-by: Honghua Yin Tested-by: Honghua Yin diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c index 6462b1e..56f9f80 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c @@ -1603,6 +1603,8 @@ static t_Error SetPcd(t_FmPort *p_FmPort, t_FmPortPcdParams *p_PcdParams) (PRS_HDR_SW_PRS_EN | OFFLOAD_SW_PATCH_IPv6_LABEL)); } + WRITE_UINT32(*p_BmiPrsStartOffset, 0); + p_FmPort->privateInfo = 0; } @@ -1672,13 +1674,13 @@ static t_Error DeletePcd(t_FmPort *p_FmPort) RETURN_ERROR(MAJOR, E_INVALID_OPERATION, ("port has to be detached previousely")); + WRITE_UINT32(*p_BmiPrsStartOffset, 0); + /* "cut" PCD out of the port's flow - go to BMI */ /* WRITE_UINT32(*p_BmiNia, (p_FmPort->savedBmiNia & BMI_RFNE_FDCS_MASK) | (NIA_ENG_BMI | NIA_BMI_AC_ENQ_FRAME)); */ if (p_FmPort->pcdEngines & FM_PCD_PRS) { - WRITE_UINT32(*p_BmiPrsStartOffset, 0); - /* stop parser */ WRITE_UINT32(p_FmPort->p_FmPortPrsRegs->pcac, PRS_CAC_STOP); /* wait for parser to be in idle state */ -- cgit v0.10.2