Commit 5755143d authored by Dave Ertman's avatar Dave Ertman Committed by Jeff Kirsher

ice: Check for actual link state of port after reset

We are currently replaying the link state of a port after a reset, but
it is possible that the link state of a port can change during the reset
process. So check for the current link state of a port during the rebuild
process of a reset.
Signed-off-by: default avatarDave Ertman <david.m.ertman@intel.com>
Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 334cb062
...@@ -1740,8 +1740,7 @@ ice_aq_set_phy_cfg(struct ice_hw *hw, u8 lport, ...@@ -1740,8 +1740,7 @@ ice_aq_set_phy_cfg(struct ice_hw *hw, u8 lport,
* ice_update_link_info - update status of the HW network link * ice_update_link_info - update status of the HW network link
* @pi: port info structure of the interested logical port * @pi: port info structure of the interested logical port
*/ */
static enum ice_status enum ice_status ice_update_link_info(struct ice_port_info *pi)
ice_update_link_info(struct ice_port_info *pi)
{ {
struct ice_aqc_get_phy_caps_data *pcaps; struct ice_aqc_get_phy_caps_data *pcaps;
struct ice_phy_info *phy_info; struct ice_phy_info *phy_info;
......
...@@ -21,6 +21,7 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq, ...@@ -21,6 +21,7 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,
struct ice_rq_event_info *e, u16 *pending); struct ice_rq_event_info *e, u16 *pending);
enum ice_status enum ice_status
ice_get_link_status(struct ice_port_info *pi, bool *link_up); ice_get_link_status(struct ice_port_info *pi, bool *link_up);
enum ice_status ice_update_link_info(struct ice_port_info *pi);
enum ice_status enum ice_status
ice_acquire_res(struct ice_hw *hw, enum ice_aq_res_ids res, ice_acquire_res(struct ice_hw *hw, enum ice_aq_res_ids res,
enum ice_aq_res_access_type access, u32 timeout); enum ice_aq_res_access_type access, u32 timeout);
......
...@@ -3219,6 +3219,10 @@ static void ice_rebuild(struct ice_pf *pf) ...@@ -3219,6 +3219,10 @@ static void ice_rebuild(struct ice_pf *pf)
goto err_vsi_rebuild; goto err_vsi_rebuild;
} }
err = ice_update_link_info(hw->port_info);
if (err)
dev_err(&pf->pdev->dev, "Get link status error %d\n", err);
/* Replay all VSIs Configuration, including filters after reset */ /* Replay all VSIs Configuration, including filters after reset */
if (ice_vsi_replay_all(pf)) { if (ice_vsi_replay_all(pf)) {
dev_err(&pf->pdev->dev, dev_err(&pf->pdev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment