linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sam Bobroff <sbobroff@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 2/8] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag
Date: Wed, 20 Mar 2019 13:58:21 +1100	[thread overview]
Message-ID: <28b287eb3939b1941bd46b2ed9a6981a577568c4.1553050609.git.sbobroff@linux.ibm.com> (raw)
In-Reply-To: <cover.1553050609.git.sbobroff@linux.ibm.com>

The EEH_DEV_NO_HANDLER flag is used by the EEH system to prevent the
use of driver callbacks in drivers that have been bound part way
through the recovery process. This is necessary to prevent later stage
handlers from being called when the earlier stage handlers haven't,
which can be confusing for drivers.

However, the flag is set for all devices that are added after boot
time and only cleared at the end of the EEH recovery process. This
results in hot plugged devices erroneously having the flag set during
the first recovery after they are added (causing their driver's
handlers to be incorrectly ignored).

To remedy this, clear the flag at the beginning of recovery
processing. The flag is still cleared at the end of recovery
processing, although it is no longer really necessary.

Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
---
 arch/powerpc/kernel/eeh_driver.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 6f3ee30565dd..4c34b9901f15 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -819,6 +819,10 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
 		result = PCI_ERS_RESULT_DISCONNECT;
 	}
 
+	eeh_for_each_pe(pe, tmp_pe)
+		eeh_pe_for_each_dev(tmp_pe, edev, tmp)
+			edev->mode &= ~EEH_DEV_NO_HANDLER;
+
 	/* Walk the various device drivers attached to this slot through
 	 * a reset sequence, giving each an opportunity to do what it needs
 	 * to accomplish the reset.  Each child gets a report of the
-- 
2.19.0.2.gcad72f5712


  parent reply	other threads:[~2019-03-20  3:10 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20  2:58 [PATCH 0/8] Sam Bobroff
2019-03-20  2:58 ` [PATCH 1/8] powerpc/64: Adjust order in pcibios_init() Sam Bobroff
2019-03-20  6:03   ` Alexey Kardashevskiy
2019-03-20  2:58 ` Sam Bobroff [this message]
2019-03-20  6:02   ` [PATCH 2/8] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag Alexey Kardashevskiy
2019-04-08  6:50     ` Sam Bobroff
2019-03-20  2:58 ` [PATCH 3/8] powerpc/eeh: Convert PNV_PHB_FLAG_EEH to global flag Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-04-09  1:41     ` Sam Bobroff
2019-04-18  9:51   ` Oliver O'Halloran
2019-04-30  5:30     ` Sam Bobroff
2019-03-20  2:58 ` [PATCH 4/8] powerpc/eeh: Improve debug messages around device addition Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-03-20  2:58 ` [PATCH 5/8] powerpc/eeh: Add eeh_show_enabled() Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-03-20  6:24     ` Oliver
2019-04-09  3:30     ` Sam Bobroff
2019-04-18 10:01   ` Oliver O'Halloran
2019-04-30  5:44     ` Sam Bobroff
2019-03-20  2:58 ` [PATCH 6/8] powerpc/eeh: Initialize EEH address cache earlier Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-04-18 10:13   ` Oliver O'Halloran
2019-04-30  5:54     ` Sam Bobroff
2019-03-20  2:58 ` [PATCH 7/8] powerpc/eeh: EEH for pSeries hot plug Sam Bobroff
2019-03-20  6:02   ` Alexey Kardashevskiy
2019-03-20  2:58 ` [PATCH 8/8] powerpc/eeh: Remove eeh_probe_devices() and eeh_addr_cache_build() Sam Bobroff
2019-03-20  6:05   ` Alexey Kardashevskiy
2019-04-09  3:31     ` Sam Bobroff
2019-04-12  0:55 ` [PATCH 0/8] Tyrel Datwyler
2019-04-15  3:41   ` Sam Bobroff
2019-04-19 22:36     ` Tyrel Datwyler

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=28b287eb3939b1941bd46b2ed9a6981a577568c4.1553050609.git.sbobroff@linux.ibm.com \
    --to=sbobroff@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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).