* [PATCH] powerpc/eeh: Fix partial hotplug criterion
@ 2016-02-12 5:03 Gavin Shan
2016-02-24 14:35 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Gavin Shan @ 2016-02-12 5:03 UTC (permalink / raw)
To: linuxppc-dev; +Cc: mpe, Gavin Shan
During error recovery, the device could be removed as part of the
partial hotplug. The criterion used to come with partial hotplug
is: if the device driver provides error_detected(), slot_reset()
and resume() callbacks, it's immune from hotplug. Otherwise,
it's going to experience partial hotplug during EEH recovery. But
the criterion isn't correct enough: mlx4_core driver for Mellanox
adapters provides error_detected(), slot_reset() callbacks, but
resume() isn't there. Those Mellanox adapters won't be to involved
in the partial hotplug.
This fixes the criterion to a practical one: adpater with driver
that provides error_detected(), slot_reset() will be immune from
partial hotplug. resume() isn't mandatory.
Fixes: f2da4ccf ("powerpc/eeh: More relaxed hotplug criterion")
Cc: stable@vger.kernel.org #v4.4+
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
arch/powerpc/kernel/eeh_driver.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 301be31..650cfb3 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -418,8 +418,7 @@ static void *eeh_rmv_device(void *data, void *userdata)
eeh_pcid_put(dev);
if (driver->err_handler &&
driver->err_handler->error_detected &&
- driver->err_handler->slot_reset &&
- driver->err_handler->resume)
+ driver->err_handler->slot_reset)
return NULL;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/eeh: Fix partial hotplug criterion
2016-02-12 5:03 [PATCH] powerpc/eeh: Fix partial hotplug criterion Gavin Shan
@ 2016-02-24 14:35 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2016-02-24 14:35 UTC (permalink / raw)
To: Gavin Shan, linuxppc-dev; +Cc: Gavin Shan
On Fri, 2016-12-02 at 05:03:05 UTC, Gavin Shan wrote:
> During error recovery, the device could be removed as part of the
> partial hotplug. The criterion used to come with partial hotplug
> is: if the device driver provides error_detected(), slot_reset()
> and resume() callbacks, it's immune from hotplug. Otherwise,
> it's going to experience partial hotplug during EEH recovery. But
> the criterion isn't correct enough: mlx4_core driver for Mellanox
> adapters provides error_detected(), slot_reset() callbacks, but
> resume() isn't there. Those Mellanox adapters won't be to involved
> in the partial hotplug.
>
> This fixes the criterion to a practical one: adpater with driver
> that provides error_detected(), slot_reset() will be immune from
> partial hotplug. resume() isn't mandatory.
>
> Fixes: f2da4ccf ("powerpc/eeh: More relaxed hotplug criterion")
> Cc: stable@vger.kernel.org #v4.4+
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/f6bf0fa14cf848ae770e0b7842
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-24 14:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 5:03 [PATCH] powerpc/eeh: Fix partial hotplug criterion Gavin Shan
2016-02-24 14:35 ` Michael Ellerman
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).