src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_disable_sec_rx_path(struct txgbe_hw *hw)
{
#define TXGBE_MAX_SECRX_POLL 4000

	int i;
	u32 secrxreg;

	DEBUGFUNC("txgbe_disable_sec_rx_path");

	secrxreg = rd32(hw, TXGBE_SECRXCTL);
	secrxreg |= TXGBE_SECRXCTL_XDSA;
	wr32(hw, TXGBE_SECRXCTL, secrxreg);
	for (i = 0; i < TXGBE_MAX_SECRX_POLL; i++) {
		secrxreg = rd32(hw, TXGBE_SECRXSTAT);
		if (!(secrxreg & TXGBE_SECRXSTAT_RDY))
			/* Use interrupt-safe sleep just in case */
			usec_delay(10);
		else
			break;
	}

	/* For informational purposes only */
	if (i >= TXGBE_MAX_SECRX_POLL)
		DEBUGOUT("Rx unit being enabled before security "
			 "path fully disabled.  Continuing with init.\n");

	return 0;
}
/**
 *  txgbe_disable_sec_rx_path - Stops the receive data path
 *  @hw: pointer to hardware structure
 *
 *  Stops the receive data path and waits for the HW to internally empty
 *  the Rx security block
 **/
Stops the receive data path
@hw: pointer to hardware structure

Stops the receive data path and waits for the HW to internally empty
the Rx security block
Stops the receive data path @hw : pointer to hardware structure Stops the receive data path and waits for the HW to internally empty the Rx security block
s32 txgbe_disable_sec_rx_path(struct txgbe_hw *hw)
{
#define TXGBE_MAX_SECRX_POLL 4000
	int i;
	u32 secrxreg;
	DEBUGFUNC("txgbe_disable_sec_rx_path");
	secrxreg = rd32(hw, TXGBE_SECRXCTL);
	secrxreg |= TXGBE_SECRXCTL_XDSA;
	wr32(hw, TXGBE_SECRXCTL, secrxreg);
	for (i = 0; i < TXGBE_MAX_SECRX_POLL; i++) {
		secrxreg = rd32(hw, TXGBE_SECRXSTAT);
		if (!(secrxreg & TXGBE_SECRXSTAT_RDY))
			usec_delay(10);
		else
			break;
	}
	if (i >= TXGBE_MAX_SECRX_POLL)
		DEBUGOUT("Rx unit being enabled before security "
			 "path fully disabled.  Continuing with init.\n");
	return 0;
}
s32 txgbe_disable_sec_rx_path ( struct txgbe_hw * hw ) { #define TXGBE_MAX_SECRX_POLL  4000 int i ; u32 secrxreg ; DEBUGFUNC ( " " ) ; secrxreg = rd32 ( hw , TXGBE_SECRXCTL ) ; secrxreg |= TXGBE_SECRXCTL_XDSA ; wr32 ( hw , TXGBE_SECRXCTL , secrxreg ) ; for ( i = 0 ; i < TXGBE_MAX_SECRX_POLL ; i ++ ) { secrxreg = rd32 ( hw , TXGBE_SECRXSTAT ) ; if ( ! ( secrxreg & TXGBE_SECRXSTAT_RDY ) ) usec_delay ( 10 ) ; else break ; } if ( i >= TXGBE_MAX_SECRX_POLL ) DEBUGOUT ( " " " \n " ) ; return 0 ; }
txgbe_disable_sec_rx_path - Stops the receive data path
  @hw: pointer to hardware structure
txgbe_disable_sec_rx_path - Stops the receive data path @hw : pointer to hardware structure
/* Use interrupt-safe sleep just in case */ /* For informational purposes only */