/* Polls the status bit (bit 1) of the EERD to determine when the read is done.  */
static s32 ixgbe_poll_eeprom_eerd_done(struct ixgbe_hw *hw)
/* Polls the status bit (bit 1) of the EERD to determine when the read is done.  */
static s32 ixgbe_poll_eeprom_eerd_done(struct ixgbe_hw *hw)
{
	u32 i;
	u32 reg;
	s32 status = IXGBE_ERR_EEPROM;
	for (i = 0; i < IXGBE_EERD_ATTEMPTS; i++) {
		reg = IXGBE_READ_REG(hw, IXGBE_EERD);
		if (reg & IXGBE_EEPROM_READ_REG_DONE) {
			status = 0;
			break;
		}
		udelay(5);
	}
	return status;
}