Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae3cb8cb authored by Mark Rustad's avatar Mark Rustad Committed by David S. Miller
Browse files

ixgbe: Eliminate useless message and improve logic



Remove a useless log message and improve the logic for setting
a PHY address from the contents of the MNG_IF_SEL register.

Signed-off-by: default avatarMark Rustad <mark.d.rustad@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 792438e5
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -2394,19 +2394,13 @@ static void ixgbe_read_mng_if_sel_x550em(struct ixgbe_hw *hw)
	/* If X552 (X550EM_a) and MDIO is connected to external PHY, then set
	 * PHY address. This register field was has only been used for X552.
	 */
	if (!hw->phy.nw_mng_if_sel) {
		if (hw->mac.type == ixgbe_mac_x550em_a) {
			struct ixgbe_adapter *adapter = hw->back;

			e_warn(drv, "nw_mng_if_sel not set\n");
		}
		return;
	}

	if (hw->mac.type == ixgbe_mac_x550em_a &&
	    hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_MDIO_ACT) {
		hw->phy.mdio.prtad = (hw->phy.nw_mng_if_sel &
				      IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD) >>
				     IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT;
	}
}

/** ixgbe_init_phy_ops_X550em - PHY/SFP specific init
 *  @hw: pointer to hardware structure