/* Verify the reset block is not blocking us from resetting. Acquire semaphore (if necessary) and read/set/write the device control reset bit in the PHY. Wait the appropriate delay time for the device to reset and release the semaphore (if necessary).  */
s32 e1000e_phy_hw_reset_generic(struct e1000_hw *hw)
/* Verify the reset block is not blocking us from resetting. Acquire semaphore (if necessary) and read/set/write the device control reset bit in the PHY. Wait the appropriate delay time for the device to reset and release the semaphore (if necessary).  */
s32 e1000e_phy_hw_reset_generic(struct e1000_hw *hw)
{
	struct e1000_phy_info *phy = &hw->phy;
	s32 ret_val;
	u32 ctrl;
	ret_val = e1000_check_reset_block(hw);
	if (ret_val)
		return 0;
	ret_val = phy->ops.acquire(hw);
	if (ret_val)
		return ret_val;
	ctrl = er32(CTRL);
	ew32(CTRL, ctrl | E1000_CTRL_PHY_RST);
	e1e_flush();
	udelay(phy->reset_delay_us);
	ew32(CTRL, ctrl);
	e1e_flush();
	udelay(150);
	phy->ops.release(hw);
	return e1000_get_phy_cfg_done(hw);
}