diff options
author | Dave Ertman <david.m.ertman@intel.com> | 2019-09-03 01:31:05 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-09-05 08:13:41 -0700 |
commit | ea300f41bb49605ccbc64f354e6708bb385ac1c6 (patch) | |
tree | 399c9ceb5966781583faeffe3e4d7b2383123506 /drivers/net/ethernet/intel/ice/ice_ethtool.c | |
parent | 201beeb71595dbc4c989ab5f4247334a32652642 (diff) | |
download | linux-ea300f41bb49605ccbc64f354e6708bb385ac1c6.tar.gz linux-ea300f41bb49605ccbc64f354e6708bb385ac1c6.tar.bz2 linux-ea300f41bb49605ccbc64f354e6708bb385ac1c6.zip |
ice: Allow for delayed LLDP MIB change registration
Add an additional boolean parameter to the ice_init_dcb
function. This boolean controls if the LLDP MIB change
events are registered for. Also, add a new function
defined ice_cfg_lldp_mib_change. The additional function
is necessary to be able to register for LLDP MIB change
events after calling ice_init_dcb. The net effect of these
two changes is to allow a delayed registration for MIB change
events so that the driver is not accepting events before it
is ready for them.
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@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_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_ethtool.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index ae9921b7de7b..d5db1426d484 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -1206,8 +1206,8 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags) enum ice_status status; /* Disable FW LLDP engine */ - status = ice_aq_cfg_lldp_mib_change(&pf->hw, false, - NULL); + status = ice_cfg_lldp_mib_change(&pf->hw, false); + /* If unregistering for LLDP events fails, this is * not an error state, as there shouldn't be any * events to respond to. @@ -1273,6 +1273,12 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags) * The FW LLDP engine will now be consuming them. */ ice_cfg_sw_lldp(vsi, false, false); + + /* Register for MIB change events */ + status = ice_cfg_lldp_mib_change(&pf->hw, true); + if (status) + dev_dbg(&pf->pdev->dev, + "Fail to enable MIB change events\n"); } } clear_bit(ICE_FLAG_ETHTOOL_CTXT, pf->flags); |