Commit 808e0d88 authored by Mario Limonciello's avatar Mario Limonciello Committed by Tony Nguyen
Browse files

e1000e: Only run S0ix flows if shutdown succeeded



If the shutdown failed, the part will be thawed and running
S0ix flows will put it into an undefined state.

Reported-by: default avatarAlexander Duyck <alexander.duyck@gmail.com>
Reviewed-by: default avatarAlexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: default avatarMario Limonciello <mario.limonciello@dell.com>
Tested-by: default avatarYijun Shen <Yijun.shen@dell.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 1f45dc22
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -6970,13 +6970,14 @@ static __maybe_unused int e1000e_pm_suspend(struct device *dev)
	e1000e_pm_freeze(dev);

	rc = __e1000_shutdown(pdev, false);
	if (rc)
	if (rc) {
		e1000e_pm_thaw(dev);

	} else {
		/* Introduce S0ix implementation */
		if (hw->mac.type >= e1000_pch_cnp &&
		    !e1000e_check_me(hw->adapter->pdev->device))
			e1000e_s0ix_entry_flow(adapter);
	}

	return rc;
}