diff options
author | Don Skidmore <donald.c.skidmore@intel.com> | 2015-06-10 20:42:30 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-09-01 16:42:39 -0700 |
commit | b5529ef5be1f0a0089988ec51541aa9573e94476 (patch) | |
tree | 6e57dae13b33f4eaea1541397271a731f932c1fd /drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | |
parent | bd8069ace513dd2741bc7177eeebc9a392451db1 (diff) | |
download | lwn-b5529ef5be1f0a0089988ec51541aa9573e94476.tar.gz lwn-b5529ef5be1f0a0089988ec51541aa9573e94476.zip |
ixgbe: Assign set_phy_power dynamically where needed
There are various reasons why this method may or may not need to be
defined and some of these we don't know until runtime. So we will
set the value in get_invariants.
Signed-off-by: Donald C Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c index 032a5870abd1..4e758435ece8 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c @@ -54,6 +54,11 @@ enum ixgbe_media_type ixgbe_get_media_type_X540(struct ixgbe_hw *hw) s32 ixgbe_get_invariants_X540(struct ixgbe_hw *hw) { struct ixgbe_mac_info *mac = &hw->mac; + struct ixgbe_phy_info *phy = &hw->phy; + + /* set_phy_power was set by default to NULL */ + if (!ixgbe_mng_present(hw)) + phy->ops.set_phy_power = ixgbe_set_copper_phy_power; mac->mcft_size = IXGBE_X540_MC_TBL_SIZE; mac->vft_size = IXGBE_X540_VFT_TBL_SIZE; |