diff options
author | Don Skidmore <donald.c.skidmore@intel.com> | 2015-06-10 20:05:02 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-09-01 16:40:19 -0700 |
commit | bd8069ace513dd2741bc7177eeebc9a392451db1 (patch) | |
tree | 6319608afaa5f81a33b8e90fa39d48f729ca50fd /drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | |
parent | 92faef85613d6d56803ad6130f6daf4a803deddc (diff) | |
download | op-kernel-dev-bd8069ace513dd2741bc7177eeebc9a392451db1.zip op-kernel-dev-bd8069ace513dd2741bc7177eeebc9a392451db1.tar.gz |
ixgbe: add new function to check for management presence
This patch adds a support function that will indicate for the
existence of management FW.
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_common.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 4c1c267..3f56a80 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -3905,3 +3905,18 @@ void ixgbe_enable_rx_generic(struct ixgbe_hw *hw) } } } + +/** ixgbe_mng_present - returns true when management capability is present + * @hw: pointer to hardware structure + **/ +bool ixgbe_mng_present(struct ixgbe_hw *hw) +{ + u32 fwsm; + + if (hw->mac.type < ixgbe_mac_82599EB) + return false; + + fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM(hw)); + fwsm &= IXGBE_FWSM_MODE_MASK; + return fwsm == IXGBE_FWSM_FW_MODE_PT; +} |