summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c')
-rw-r--r--drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c66
1 files changed, 0 insertions, 66 deletions
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 379406e..d706ed3 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
@@ -5430,72 +5430,6 @@ t_Error FM_PORT_PcdKgUnbindSchemes(t_Handle h_FmPort,
return err;
}
-t_Error FM_PORT_PcdPrsModifyStartOffset(t_Handle h_FmPort,
- t_FmPcdPrsStart *p_FmPcdPrsStart)
-{
- t_FmPort *p_FmPort = (t_FmPort*)h_FmPort;
- volatile uint32_t *p_BmiPrsStartOffset = NULL;
- volatile uint32_t *p_BmiNia = NULL;
- uint32_t tmpReg;
- uint8_t hdrNum;
-
- SANITY_CHECK_RETURN_ERROR(p_FmPort, E_INVALID_HANDLE);
- SANITY_CHECK_RETURN_ERROR(!p_FmPort->p_FmPortDriverParam, E_INVALID_STATE);
- SANITY_CHECK_RETURN_ERROR(p_FmPort->pcdEngines & FM_PCD_PRS,
- E_INVALID_STATE);
-
- switch (p_FmPort->portType)
- {
- case (e_FM_PORT_TYPE_RX_10G):
- case (e_FM_PORT_TYPE_RX):
- p_BmiPrsStartOffset =
- &p_FmPort->p_FmPortBmiRegs->rxPortBmiRegs.fmbm_rpso;
- p_BmiNia = &p_FmPort->p_FmPortBmiRegs->rxPortBmiRegs.fmbm_rfne;
- tmpReg = GET_UINT32(*p_BmiNia) & BMI_RFNE_FDCS_MASK;
- break;
- case (e_FM_PORT_TYPE_OH_OFFLINE_PARSING):
- p_BmiPrsStartOffset =
- &p_FmPort->p_FmPortBmiRegs->ohPortBmiRegs.fmbm_opso;
- p_BmiNia = &p_FmPort->p_FmPortBmiRegs->ohPortBmiRegs.fmbm_ofne;
- tmpReg = 0;
- break;
- default:
- RETURN_ERROR( MAJOR, E_INVALID_OPERATION,
- ("available for Rx and offline parsing ports only"));
- }
-
- /* check that current NIA is BMI to BMI */
- if ((GET_UINT32(*p_BmiNia) & ~BMI_RFNE_FDCS_MASK)
- != GET_NIA_BMI_AC_ENQ_FRAME(p_FmPort->h_FmPcd))
- RETURN_ERROR( MAJOR, E_INVALID_OPERATION,
- ("may be called only for ports in BMI-to-BMI state."));
-
- if (!TRY_LOCK(p_FmPort->h_Spinlock, &p_FmPort->lock))
- {
- DBG(TRACE, ("FM Port Try Lock - BUSY"));
- return ERROR_CODE(E_BUSY);
- }
-
- /* set the first header */
- hdrNum = GetPrsHdrNum(p_FmPcdPrsStart->firstPrsHdr);
- if ((hdrNum == ILLEGAL_HDR_NUM) || (hdrNum == NO_HDR_NUM))
- {
- RELEASE_LOCK(p_FmPort->lock);
- RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Unsupported header."));
- }
-
- WRITE_UINT32(*p_BmiNia,
- (uint32_t)(NIA_ENG_PRS | (uint32_t)hdrNum | tmpReg));
-
- /* set start parsing offset */
- WRITE_UINT32(
- *p_BmiPrsStartOffset,
- (uint32_t)(p_FmPcdPrsStart->parsingOffset + p_FmPort->internalBufferOffset));
- RELEASE_LOCK(p_FmPort->lock);
-
- return E_OK;
-}
-
t_Error FM_PORT_AddCongestionGrps(t_Handle h_FmPort,
t_FmPortCongestionGrps *p_CongestionGrps)
{