linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@dell.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	intel-wired-lan@lists.osuosl.org,
	David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, Netdev <netdev@vger.kernel.org>,
	Alexander Duyck <alexander.duyck@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Sasha Netfin <sasha.neftin@intel.com>,
	Aaron Brown <aaron.f.brown@intel.com>,
	Stefan Assmann <sassmann@redhat.com>,
	darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com,
	anthony.wong@canonical.com, Hans de Goede <hdegoede@redhat.com>,
	Mario Limonciello <mario.limonciello@dell.com>
Subject: [PATCH 1/4] e1000e: Only run S0ix flows if shutdown succeeded
Date: Mon, 14 Dec 2020 09:34:47 -0600	[thread overview]
Message-ID: <20201214153450.874339-2-mario.limonciello@dell.com> (raw)
In-Reply-To: <20201214153450.874339-1-mario.limonciello@dell.com>

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

Reported-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 128ab6898070..6588f5d4a2be 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -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);
-
-	/* Introduce S0ix implementation */
-	if (hw->mac.type >= e1000_pch_cnp &&
-	    !e1000e_check_me(hw->adapter->pdev->device))
-		e1000e_s0ix_entry_flow(adapter);
+	} 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;
 }
-- 
2.25.1


  reply	other threads:[~2020-12-14 15:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 15:34 [PATCH v4 0/4] Improve s0ix flows for systems i219LM Mario Limonciello
2020-12-14 15:34 ` Mario Limonciello [this message]
2020-12-14 15:34 ` [PATCH 2/4] e1000e: bump up timeout to wait when ME un-configure ULP mode Mario Limonciello
2020-12-14 15:34 ` [PATCH 3/4] Revert "e1000e: disable s0ix entry and exit flows for ME systems" Mario Limonciello
2020-12-14 15:34 ` [PATCH 4/4] e1000e: Export S0ix flags to ethtool Mario Limonciello
2020-12-14 18:30   ` Hans de Goede
2020-12-14 16:39 ` [PATCH v4 0/4] Improve s0ix flows for systems i219LM Alexander Duyck
2020-12-14 18:24 ` Hans de Goede
     [not found]   ` <PS2PR03MB37505A15D3C9B7505D679D7BBDC70@PS2PR03MB3750.apcprd03.prod.outlook.com>
2020-12-14 18:40     ` Fw: [External] " Mark Pearson
2020-12-15 13:23       ` Neftin, Sasha
2020-12-15 17:20         ` Limonciello, Mario
2020-12-15 18:36           ` Neftin, Sasha
2020-12-14 19:36   ` Limonciello, Mario
2020-12-15 12:26     ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201214153450.874339-2-mario.limonciello@dell.com \
    --to=mario.limonciello@dell.com \
    --cc=Perry.Yuan@dell.com \
    --cc=Yijun.Shen@dell.com \
    --cc=aaron.f.brown@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=anthony.wong@canonical.com \
    --cc=darcari@redhat.com \
    --cc=davem@davemloft.net \
    --cc=hdegoede@redhat.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sasha.neftin@intel.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).