On Wed, Jun 12, 2024 at 03:59:58PM +0100, Anatoly Burakov wrote: > From: Ian Stokes <ian.sto...@intel.com> > > Update en_link in curr_user_phy_cfg.caps on successful execution of > set_link_restart_an operation. > > Signed-off-by: Siddaraju DH <siddaraju...@intel.com> > Signed-off-by: Ian Stokes <ian.sto...@intel.com> > --- > drivers/net/ice/base/ice_common.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ice/base/ice_common.c > b/drivers/net/ice/base/ice_common.c > index 2eb3084dac..1d666b7708 100644 > --- a/drivers/net/ice/base/ice_common.c > +++ b/drivers/net/ice/base/ice_common.c > @@ -3966,6 +3966,7 @@ int > ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, > struct ice_sq_cd *cd) > { > + enum ice_status status = ICE_ERR_AQ_ERROR;
Here is the first re-introduction of ice_status, AFAIK. Is it feasible to avoid re-introducing and then later re-doing the conversion of it to int? > struct ice_aqc_restart_an *cmd; > struct ice_aq_desc desc; > > @@ -3980,7 +3981,16 @@ ice_aq_set_link_restart_an(struct ice_port_info *pi, > bool ena_link, > else > cmd->cmd_flags &= ~ICE_AQC_RESTART_AN_LINK_ENABLE; > > - return ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); > + status = ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); > + if (status) > + return status; > + > + if (ena_link) > + pi->phy.curr_user_phy_cfg.caps |= ICE_AQC_PHY_EN_LINK; > + else > + pi->phy.curr_user_phy_cfg.caps &= ~ICE_AQC_PHY_EN_LINK; > + > + return ICE_SUCCESS; > } > > /** > -- > 2.43.0 >