/* 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 relase the semaphore (if necessary).  */
s32 igb_phy_hw_reset(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 relase the semaphore (if necessary).  */
s32 igb_phy_hw_reset(struct e1000_hw *hw)
{
	struct e1000_phy_info *phy = &hw->phy;
	s32  ret_val;
	u32 ctrl;
	ret_val = igb_check_reset_block(hw);
	if (ret_val) {
		ret_val = 0;
		goto out;
	}
	ret_val = phy->ops.acquire(hw);
	if (ret_val)
		goto out;
	ctrl = rd32(E1000_CTRL);
	wr32(E1000_CTRL, ctrl | E1000_CTRL_PHY_RST);
	wrfl();
	udelay(phy->reset_delay_us);
	wr32(E1000_CTRL, ctrl);
	wrfl();
	udelay(150);
	phy->ops.release(hw);
	ret_val = phy->ops.get_cfg_done(hw);
out:
	return ret_val;
}