linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/eeh: Add conditional check on notify_resume
@ 2018-02-15 18:49 Bryant G. Ly
  2018-02-15 23:21 ` Andrew Donnellan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bryant G. Ly @ 2018-02-15 18:49 UTC (permalink / raw)
  To: benh, paulus, mpe; +Cc: seroyer, jjalvare, aik, ruscur, linuxppc-dev

From: "Juan J. Alvarez" <jjalvare@linux.vnet.ibm.com>

EEH structure is not populated with function
notify resume when running on systems that do not support
it, i.e: BMC. Hence adding a conditional check for NULL for
systems that don't add function notify_resume.

Signed-off-by: Juan J. Alvarez <jjalvare@linux.vnet.ibm.com>
Reviewed-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
Tested-by: Carol L. Soto <clsoto@us.ibm.com>
---
 arch/powerpc/kernel/eeh_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index beea218..0c0b66f 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -384,7 +384,8 @@ static void *eeh_report_resume(void *data, void *userdata)
 	eeh_pcid_put(dev);
 	pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED);
 #ifdef CONFIG_PCI_IOV
-	eeh_ops->notify_resume(eeh_dev_to_pdn(edev));
+	if (eeh_ops->notify_resume && eeh_dev_to_pdn(edev))
+		eeh_ops->notify_resume(eeh_dev_to_pdn(edev));
 #endif
 	return NULL;
 }
-- 
2.7.2

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

end of thread, other threads:[~2018-02-21 13:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-15 18:49 [PATCH] powerpc/eeh: Add conditional check on notify_resume Bryant G. Ly
2018-02-15 23:21 ` Andrew Donnellan
2018-02-16 13:25 ` Mauro Rodrigues
2018-02-20 10:42 ` Michael Neuling
2018-02-21 13:43 ` 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).