All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4][RFC] Disable e1000e power management if hardware error is detected
@ 2020-11-11  5:50 ` Chen Yu
  0 siblings, 0 replies; 10+ messages in thread
From: Chen Yu @ 2020-11-11  5:50 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: Neftin, Sasha, Len Brown, Rafael J. Wysocki, Brandt, Todd E,
	Zhang Rui, Tony Nguyen, Jesse Brandeburg, linux-kernel, Chen Yu

This is a trial patchset that aims to cope with an intermittently
triggered hardware error during system resume.

On some platforms the NIC's hardware error was detected during
resume from S3, causing the NIC to not fully initialize
and remain in unstable state afterwards. As a consequence
the system fails to suspend due to incorrect NIC status.

In theory if the NIC could not be initialized after resumed,
it should not do system/runtime suspend/resume afterwards.
There are two proposals to deal with this situation:

Either:
1. Each time before the NIC going to suspend, check the status
   of NIC by querying corresponding registers, bypass the suspend
   callback on this NIC if it's unstable.

Or:
2. During NIC resume, if the hardware error was detected, removes
   the NIC from power management list entirely.

Proposal 2 was chosen in this patch set because:
1. Proposal 1 requires that the driver queries the status
   of the NIC in e1000e driver. However there seems to be
   no specific registers for the e1000e to query the result
   of NIC initialization.
2. Proposal 1 just bypass the suspend process but the power management
   framework is still aware of this NIC, which might bring potential issue
   in race condition.
3. Approach 2 is a clean solution and it is platform independent
   that, not only e1000e, but also other drivers could leverage
   this generic mechanism in the future.

Comments appreciated.

Chen Yu (4):
  e1000e: save the return value of e1000e_reset()
  PM: sleep: export device_pm_remove() for driver use
  e1000e: Introduce workqueue to disable the power management
  e1000e: Disable the power management if hardware error detected during
    resume

 drivers/base/power/main.c                  |  1 +
 drivers/base/power/power.h                 |  8 -------
 drivers/net/ethernet/intel/e1000e/e1000.h  |  1 +
 drivers/net/ethernet/intel/e1000e/netdev.c | 27 ++++++++++++++++++----
 include/linux/pm.h                         | 12 ++++++++++
 5 files changed, 37 insertions(+), 12 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-11  5:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 4/4][RFC] e1000e: Disable the power management if hardware error detected during resume Chen Yu
2020-11-11  5:52   ` [Intel-wired-lan] " Chen Yu

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.