diff options
author | Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> | 2019-02-28 15:24:31 -0800 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-04-18 08:38:48 -0700 |
commit | 3a257a1404f8bf751a258ab92262dcb2cce39eef (patch) | |
tree | 6fcc3fd7510c7a3440721f26988684c88945d724 /drivers/net/ethernet/intel/ice/ice_dcb.c | |
parent | b832c2f63108a6c38b25c4bbc1d2aef582260970 (diff) | |
download | linux-3a257a1404f8bf751a258ab92262dcb2cce39eef.tar.gz linux-3a257a1404f8bf751a258ab92262dcb2cce39eef.tar.bz2 linux-3a257a1404f8bf751a258ab92262dcb2cce39eef.zip |
ice: Add code to control FW LLDP and DCBX
This patch adds code to start or stop LLDP and DCBX in firmware through
use of ethtool private flags.
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_dcb.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_dcb.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_dcb.c b/drivers/net/ethernet/intel/ice/ice_dcb.c index 0df244cf684d..8bbf48e04a1c 100644 --- a/drivers/net/ethernet/intel/ice/ice_dcb.c +++ b/drivers/net/ethernet/intel/ice/ice_dcb.c @@ -60,7 +60,7 @@ ice_aq_get_lldp_mib(struct ice_hw *hw, u8 bridge_type, u8 mib_type, void *buf, * Enable or Disable posting of an event on ARQ when LLDP MIB * associated with the interface changes (0x0A01) */ -static enum ice_status +enum ice_status ice_aq_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_update, struct ice_sq_cd *cd) { @@ -78,6 +78,32 @@ ice_aq_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_update, } /** + * ice_aq_stop_lldp + * @hw: pointer to the HW struct + * @shutdown_lldp_agent: True if LLDP Agent needs to be Shutdown + * False if LLDP Agent needs to be Stopped + * @cd: pointer to command details structure or NULL + * + * Stop or Shutdown the embedded LLDP Agent (0x0A05) + */ +enum ice_status +ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent, + struct ice_sq_cd *cd) +{ + struct ice_aqc_lldp_stop *cmd; + struct ice_aq_desc desc; + + cmd = &desc.params.lldp_stop; + + ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_lldp_stop); + + if (shutdown_lldp_agent) + cmd->command |= ICE_AQ_LLDP_AGENT_SHUTDOWN; + + return ice_aq_send_cmd(hw, &desc, NULL, 0, cd); +} + +/** * ice_aq_start_lldp * @hw: pointer to the HW struct * @cd: pointer to command details structure or NULL |