src/dpdk/drivers/net/bnx2x/bnx2x.c
static uint8_t bnx2x_wait_sp_comp(struct bnx2x_softc *sc, uint32_t mask)
{
	uint32_t tmp;
	int tout = 5000;	/* wait for 5 secs tops */

	while (tout--) {
		mb();
		if (!(atomic_load_acq_int(&sc->sp_state) & mask))
			return TRUE;

		DELAY(1000);
	}

	mb();

	tmp = atomic_load_acq_int(&sc->sp_state);
	if (tmp & mask) {
		PMD_DRV_LOG(INFO, sc, "Filtering completion timed out: "
			    "sp_state 0x%x, mask 0x%x", tmp, mask);
		return FALSE;
	}

	return FALSE;
}
/* wait for the outstanding SP commands */
wait for the outstanding SP commands
wait for the outstanding SP commands
static uint8_t bnx2x_wait_sp_comp(struct bnx2x_softc *sc, uint32_t mask)
{
	uint32_t tmp;
	int tout = 5000;	
	while (tout--) {
		mb();
		if (!(atomic_load_acq_int(&sc->sp_state) & mask))
			return TRUE;
		DELAY(1000);
	}
	mb();
	tmp = atomic_load_acq_int(&sc->sp_state);
	if (tmp & mask) {
		PMD_DRV_LOG(INFO, sc, "Filtering completion timed out: "
			    "sp_state 0x%x, mask 0x%x", tmp, mask);
		return FALSE;
	}
	return FALSE;
}
static uint8_t bnx2x_wait_sp_comp ( struct bnx2x_softc * sc , uint32_t mask ) { uint32_t tmp ; int tout = 5000 ; while ( tout -- ) { mb ( ) ; if ( ! ( atomic_load_acq_int ( & sc -> sp_state ) & mask ) ) return TRUE ; DELAY ( 1000 ) ; } mb ( ) ; tmp = atomic_load_acq_int ( & sc -> sp_state ) ; if ( tmp & mask ) { PMD_DRV_LOG ( INFO , sc , " " " " , tmp , mask ) ; return FALSE ; } return FALSE ; }
wait for the outstanding SP commands
wait for the outstanding SP commands
/* wait for 5 secs tops */