src/dpdk/drivers/net/igc/base/igc_nvm.c
s32 igc_poll_eerd_eewr_done(struct igc_hw *hw, int ee_reg)
{
	u32 attempts = 100000;
	u32 i, reg = 0;

	DEBUGFUNC("igc_poll_eerd_eewr_done");

	for (i = 0; i < attempts; i++) {
		if (ee_reg == IGC_NVM_POLL_READ)
			reg = IGC_READ_REG(hw, IGC_EERD);
		else
			reg = IGC_READ_REG(hw, IGC_EEWR);

		if (reg & IGC_NVM_RW_REG_DONE)
			return IGC_SUCCESS;

		usec_delay(5);
	}

	return -IGC_ERR_NVM;
}
/**
 *  igc_poll_eerd_eewr_done - Poll for EEPROM read/write completion
 *  @hw: pointer to the HW structure
 *  @ee_reg: EEPROM flag for polling
 *
 *  Polls the EEPROM status bit for either read or write completion based
 *  upon the value of 'ee_reg'.
 **/
Poll for EEPROM read/write completion
@hw: pointer to the HW structure
@ee_reg: EEPROM flag for polling

Polls the EEPROM status bit for either read or write completion based
upon the value of 'ee_reg'.
Poll for EEPROM read / write completion @hw : pointer to the HW structure @ee_reg : EEPROM flag for polling Polls the EEPROM status bit for either read or write completion based upon the value of ' ee_reg ' .
s32 igc_poll_eerd_eewr_done(struct igc_hw *hw, int ee_reg)
{
	u32 attempts = 100000;
	u32 i, reg = 0;
	DEBUGFUNC("igc_poll_eerd_eewr_done");
	for (i = 0; i < attempts; i++) {
		if (ee_reg == IGC_NVM_POLL_READ)
			reg = IGC_READ_REG(hw, IGC_EERD);
		else
			reg = IGC_READ_REG(hw, IGC_EEWR);
		if (reg & IGC_NVM_RW_REG_DONE)
			return IGC_SUCCESS;
		usec_delay(5);
	}
	return -IGC_ERR_NVM;
}
s32 igc_poll_eerd_eewr_done ( struct igc_hw * hw , int ee_reg ) { u32 attempts = 100000 ; u32 i , reg = 0 ; DEBUGFUNC ( " " ) ; for ( i = 0 ; i < attempts ; i ++ ) { if ( ee_reg == IGC_NVM_POLL_READ ) reg = IGC_READ_REG ( hw , IGC_EERD ) ; else reg = IGC_READ_REG ( hw , IGC_EEWR ) ; if ( reg & IGC_NVM_RW_REG_DONE ) return IGC_SUCCESS ; usec_delay ( 5 ) ; } return - IGC_ERR_NVM ; }
igc_poll_eerd_eewr_done - Poll for EEPROM read/write completion
  @hw: pointer to the HW structure
  @ee_reg: EEPROM flag for polling
igc_poll_eerd_eewr_done - Poll for EEPROM read / write completion @hw : pointer to the HW structure @ee_reg : EEPROM flag for polling