/** * igb_write_phy_reg_82580 - Write 82580 MDI control register * @hw: pointer to the HW structure * @offset: register offset to write to * @data: data to write to register at offset * * Writes data to MDI control register in the PHY at offset. **/ static s32 igb_write_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 data) { u32 mdicnfg = 0; s32 ret_val; ret_val = hw->phy.ops.acquire(hw); if (ret_val) goto out; /* * We config the phy address in MDICNFG register now. Same bits * as before. The values in MDIC can be written but will be * ignored. This allows us to call the old function after * configuring the PHY address in the new register */ mdicnfg = (hw->phy.addr << E1000_MDIC_PHY_SHIFT); wr32(E1000_MDICNFG, mdicnfg); ret_val = igb_write_phy_reg_mdic(hw, offset, data); hw->phy.ops.release(hw); out: return ret_val; }
static s32 igb_write_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 data) { s32 ret_val; ret_val = hw->phy.ops.acquire(hw); if (ret_val) goto out; ret_val = igb_write_phy_reg_mdic(hw, offset, data); hw->phy.ops.release(hw); out: return ret_val; }