From 4baa9590894a23bfe2e4007d5b0bff019f70dfe9 Mon Sep 17 00:00:00 2001 From: Mandy Lavi Date: Thu, 12 Feb 2015 12:51:24 +0200 Subject: fmd: Base cascading decision on current reparsing option fm_manip.c - Base cascading decision on current reparsing option rather than the next one Change-Id: Ic24a9c4c441337548d8f5a1c6a09d5409276e37a Signed-off-by: Mandy Lavi Reviewed-on: http://git.am.freescale.net:8181/30768 Tested-by: Review Code-CDREVIEW Reviewed-by: Eyal Harari Reviewed-by: Nir Erez Reviewed-by: Honghua Yin Reviewed-on: http://git.am.freescale.net:8181/33215 diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_manip.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_manip.c index a21516b..ba81535 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_manip.c +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_manip.c @@ -1014,10 +1014,10 @@ static t_Error BuildHmct(t_FmPcdManip *p_Manip, } - /* If this node has a nextManip, and no parsing is required after it, the old table must be copied to the new table - the old table and should be freed */ - if (p_FmPcdManipParams->h_NextManip - && (MANIP_DONT_REPARSE(p_FmPcdManipParams->h_NextManip))) + /* If this node has a nextManip, and no parsing is required, the old table must be copied to the new table + the old table and should be freed */ + if (p_FmPcdManipParams->h_NextManip && + (MANIP_DONT_REPARSE(p_Manip))) { if (new) { @@ -1060,9 +1060,8 @@ static t_Error CreateManipActionNew(t_FmPcdManip *p_Manip, /* set Manip structure */ if (p_FmPcdManipParams->h_NextManip) { - if (MANIP_DONT_REPARSE(p_FmPcdManipParams->h_NextManip)) - nextSize = (uint32_t)(GetHmctSize(p_FmPcdManipParams->h_NextManip) - + GetDataSize(p_FmPcdManipParams->h_NextManip)); + if (p_FmPcdManipParams->u.hdr.dontParseAfterManip) + nextSize = (uint32_t)(GetHmctSize(p_FmPcdManipParams->h_NextManip) + GetDataSize(p_FmPcdManipParams->h_NextManip)); else p_Manip->cascadedNext = TRUE; } @@ -1106,8 +1105,9 @@ static t_Error CreateManipActionNew(t_FmPcdManip *p_Manip, ("MURAM allocation for HdrManip node shadow")); } - if (p_FmPcdManipParams->h_NextManip - && (MANIP_DONT_REPARSE(p_FmPcdManipParams->h_NextManip))) + + if (p_FmPcdManipParams->h_NextManip && + (MANIP_DONT_REPARSE(p_Manip))) { p_OldHmct = (uint8_t *)GetManipInfo(p_FmPcdManipParams->h_NextManip, e_MANIP_HMCT); @@ -1161,8 +1161,8 @@ static t_Error CreateManipActionNew(t_FmPcdManip *p_Manip, if (!p_Manip->dontParseAfterManip) tmpReg |= HMTD_CFG_PRS_AFTER_HM; /* create cascade */ - if (p_FmPcdManipParams->h_NextManip - && !MANIP_DONT_REPARSE(p_FmPcdManipParams->h_NextManip)) + if (p_FmPcdManipParams->h_NextManip && + !MANIP_DONT_REPARSE(p_Manip)) { /* indicate that there's another HM table descriptor */ tmpReg |= HMTD_CFG_NEXT_AD_EN; -- cgit v0.10.2