From: Wenzhuo Lu Date: Sun, 14 Feb 2016 08:55:00 +0000 (+0800) Subject: ixgbe/base: ignore manageability for PHY power on X-Git-Tag: spdx-start~7405 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2aeac71a5a511a19e1bf1d61f7d3fdadf6025f8c;p=dpdk.git ixgbe/base: ignore manageability for PHY power on Instead of not defining the callback for set_phy_power when manageability is enabled, put the check in the set_phy_power function so that only turning the power off is conditional on management, but not turning the PHY on. Signed-off-by: Wenzhuo Lu --- diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c index 512bc9b49b..bc4d88c7eb 100644 --- a/drivers/net/ixgbe/base/ixgbe_phy.c +++ b/drivers/net/ixgbe/base/ixgbe_phy.c @@ -2731,6 +2731,9 @@ s32 ixgbe_set_copper_phy_power(struct ixgbe_hw *hw, bool on) u32 status; u16 reg; + if (!on && ixgbe_mng_present(hw)) + return 0; + status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_VENDOR_SPECIFIC_1_CONTROL, IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, ®); diff --git a/drivers/net/ixgbe/base/ixgbe_x540.c b/drivers/net/ixgbe/base/ixgbe_x540.c index aae0a5148e..9ade1b5ecc 100644 --- a/drivers/net/ixgbe/base/ixgbe_x540.c +++ b/drivers/net/ixgbe/base/ixgbe_x540.c @@ -81,8 +81,7 @@ s32 ixgbe_init_ops_X540(struct ixgbe_hw *hw) /* PHY */ phy->ops.init = ixgbe_init_phy_ops_generic; phy->ops.reset = NULL; - if (!ixgbe_mng_present(hw)) - phy->ops.set_phy_power = ixgbe_set_copper_phy_power; + phy->ops.set_phy_power = ixgbe_set_copper_phy_power; /* MAC */ mac->ops.reset_hw = ixgbe_reset_hw_X540;