All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Yu <yu.c.chen@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: "Neftin, Sasha" <sasha.neftin@intel.com>,
	Len Brown <len.brown@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Brandt, Todd E" <todd.e.brandt@intel.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	linux-kernel@vger.kernel.org, Chen Yu <yu.c.chen@intel.com>
Subject: [PATCH 4/4][RFC] e1000e: Disable the power management if hardware error detected during resume
Date: Wed, 11 Nov 2020 13:52:07 +0800	[thread overview]
Message-ID: <7eb46aa2f49f6c7a2ff0d6cc65ad4195781ae960.1605073208.git.yu.c.chen@intel.com> (raw)
In-Reply-To: <cover.1605073208.git.yu.c.chen@intel.com>

If the hardware error is detected during resume, the NIC might
be in a unstable status and blocks the subsequent suspend afterwards.
A broken device is not expected to impact the system wide suspend, and
this patch disable the power management support of this NIC. So that
the borken NIC will not be considered during suspend/resume, thus not
to prevent the system from suspend/resume.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205015
Reported-by: "Brandt, Todd E" <todd.e.brandt@intel.com>
Reported-by: Len Brown <len.brown@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 45e0b1901440..08bc544e879a 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6959,7 +6959,8 @@ static int __e1000_resume(struct pci_dev *pdev)
 		ew32(WUS, ~0);
 	}
 
-	e1000e_reset(adapter);
+	if (_e1000e_reset(adapter))
+		schedule_work(&adapter->pm_remove_task);
 
 	e1000_init_manageability_pt(adapter);
 
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Chen Yu <yu.c.chen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH 4/4][RFC] e1000e: Disable the power management if hardware error detected during resume
Date: Wed, 11 Nov 2020 13:52:07 +0800	[thread overview]
Message-ID: <7eb46aa2f49f6c7a2ff0d6cc65ad4195781ae960.1605073208.git.yu.c.chen@intel.com> (raw)
In-Reply-To: <cover.1605073208.git.yu.c.chen@intel.com>

If the hardware error is detected during resume, the NIC might
be in a unstable status and blocks the subsequent suspend afterwards.
A broken device is not expected to impact the system wide suspend, and
this patch disable the power management support of this NIC. So that
the borken NIC will not be considered during suspend/resume, thus not
to prevent the system from suspend/resume.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205015
Reported-by: "Brandt, Todd E" <todd.e.brandt@intel.com>
Reported-by: Len Brown <len.brown@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 45e0b1901440..08bc544e879a 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6959,7 +6959,8 @@ static int __e1000_resume(struct pci_dev *pdev)
 		ew32(WUS, ~0);
 	}
 
-	e1000e_reset(adapter);
+	if (_e1000e_reset(adapter))
+		schedule_work(&adapter->pm_remove_task);
 
 	e1000_init_manageability_pt(adapter);
 
-- 
2.17.1


  parent reply	other threads:[~2020-11-11  5:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  5:50 [PATCH 0/4][RFC] Disable e1000e power management if hardware error is detected Chen Yu
2020-11-11  5:50 ` [Intel-wired-lan] " Chen Yu
2020-11-11  5:51 ` [PATCH 1/4][RFC] e1000e: save the return value of e1000e_reset() Chen Yu
2020-11-11  5:51   ` [Intel-wired-lan] " Chen Yu
2020-11-11  5:51 ` [PATCH 2/4][RFC] PM: sleep: export device_pm_remove() for driver use Chen Yu
2020-11-11  5:51   ` [Intel-wired-lan] " Chen Yu
2020-11-11  5:51 ` [PATCH 3/4][RFC] e1000e: Introduce workqueue to disable the power management Chen Yu
2020-11-11  5:51   ` [Intel-wired-lan] " Chen Yu
2020-11-11  5:52 ` Chen Yu [this message]
2020-11-11  5:52   ` [Intel-wired-lan] [PATCH 4/4][RFC] e1000e: Disable the power management if hardware error detected during resume Chen Yu

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=7eb46aa2f49f6c7a2ff0d6cc65ad4195781ae960.1605073208.git.yu.c.chen@intel.com \
    --to=yu.c.chen@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=sasha.neftin@intel.com \
    --cc=todd.e.brandt@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.