/* Reads the management control register for the config done bit to be set.  */
static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw)
/* Reads the management control register for the config done bit to be set.  */
static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw)
{
	s32 timeout = PHY_CFG_TIMEOUT;
	while (timeout) {
		if (er32(EEMNGCTL) &
		    E1000_NVM_CFG_DONE_PORT_0)
			break;
		msleep(1);
		timeout--;
	}
	if (!timeout) {
		e_dbg("MNG configuration cycle has not completed.\n");
		return -E1000_ERR_RESET;
	}
	return 0;
}