powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag
authorSam Bobroff <sbobroff@linux.ibm.com>
Fri, 16 Aug 2019 04:48:06 +0000 (14:48 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2019 16:59:11 +0000 (18:59 +0200)
commit169edc8a1b8be39274e35d56085808a273baedf3
treecf91d102bf623029ba570246bf13bcbd7435dfea
parent0b54040780ce2abd84879d15ae3ae8ff69c0eed2
powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag

[ Upstream commit aa06e3d60e245284d1e55497eb3108828092818d ]

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.

Also clear the flag during eeh_handle_special_event(), for the same
reasons.

Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/b8ca5629d27de74c957d4f4b250177d1b6fc4bbd.1565930772.git.sbobroff@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/eeh_driver.c