LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powernv/pci: Print an error when device enable is blocked
@ 2020-04-09  6:13 Oliver O'Halloran
  2020-04-09  6:20 ` Oliver O'Halloran
  2020-12-10 11:30 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Oliver O'Halloran @ 2020-04-09  6:13 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Oliver O'Halloran

If the platform decides to block enabling the device nothing is printed
currently. This can lead to some confusion since the dmesg output will
usually print an error with no context e.g.

	e1000e: probe of 0022:01:00.0 failed with error -22

This shouldn't be spammy since pci_enable_device() already prints a
messages when it succeeds.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 arch/powerpc/platforms/powernv/pci-ioda.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index cda0933..17fdf46 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -3296,8 +3296,10 @@ static bool pnv_pci_enable_device_hook(struct pci_dev *dev)
 		return true;
 
 	pdn = pci_get_pdn(dev);
-	if (!pdn || pdn->pe_number == IODA_INVALID_PE)
+	if (!pdn || pdn->pe_number == IODA_INVALID_PE) {
+		pci_err("pci_enable_device() blocked, no PE assigned.\n");
 		return false;
+	}
 
 	return true;
 }
-- 
2.9.5


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

end of thread, other threads:[~2020-12-10 14:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-09  6:13 [PATCH] powernv/pci: Print an error when device enable is blocked Oliver O'Halloran
2020-04-09  6:20 ` Oliver O'Halloran
2020-12-10 11:30 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox