Unverified Commit 43ba7c70 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12126 ice: Add netif_device_attach/detach into PF reset flow

parents 13954865 8d1c584c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -455,6 +455,7 @@ static void ice_pf_dis_all_vsi(struct ice_pf *pf, bool locked)
static void
ice_prepare_for_reset(struct ice_pf *pf)
{
	struct ice_vsi *vsi = ice_get_main_vsi(pf);
	struct ice_hw *hw = &pf->hw;
	unsigned int i;

@@ -470,6 +471,9 @@ ice_prepare_for_reset(struct ice_pf *pf)
	ice_for_each_vf(pf, i)
		ice_set_vf_state_qs_dis(&pf->vf[i]);

	if (vsi && vsi->netdev)
		netif_device_detach(vsi->netdev);

	/* clear SW filtering DB */
	ice_clear_hw_tbls(hw);
	/* disable the VSIs and their queues that are not already DOWN */
@@ -6019,6 +6023,7 @@ static void ice_update_pf_netdev_link(struct ice_pf *pf)
 */
static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
{
	struct ice_vsi *vsi = ice_get_main_vsi(pf);
	struct device *dev = ice_pf_to_dev(pf);
	struct ice_hw *hw = &pf->hw;
	enum ice_status ret;
@@ -6127,6 +6132,9 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
		ice_rebuild_arfs(pf);
	}

	if (vsi && vsi->netdev)
		netif_device_attach(vsi->netdev);

	ice_update_pf_netdev_link(pf);

	/* tell the firmware we are up */