Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706982

[PATCH V9 2/2] PCI: display not responding message while device is unreachable

From Sinan Kaya <okaya@codeaurora.org>
Newsgroups linux.kernel
Subject [PATCH V9 2/2] PCI: display not responding message while device is unreachable
Date 2017-08-09 03:00 +0200
Message-ID <ucnvQ-7US-11@gated-at.bofh.it> (permalink)
References <ucnvQ-7US-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Adding a print statement into pci_bus_read_dev_vendor_id() so that
user observes the progress of device polling instead of silently
waiting for timeout to be reached.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
 drivers/pci/probe.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index c31310d..6e4a846 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1851,9 +1851,15 @@ bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l,
 		delay *= 2;
 		if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, l))
 			return false;
+
+		if (delay > 1000)
+			pr_info("pci %04x:%02x:%02x.%d: not responding\n",
+				pci_domain_nr(bus), bus->number,
+				PCI_SLOT(devfn), PCI_FUNC(devfn));
+
 		/* Card hasn't responded in 60 seconds?  Must be stuck. */
 		if (delay > crs_timeout) {
-			printk(KERN_WARNING "pci %04x:%02x:%02x.%d: not responding\n",
+			pr_warn("pci %04x:%02x:%02x.%d: not responding timeout reached\n",
 			       pci_domain_nr(bus), bus->number, PCI_SLOT(devfn),
 			       PCI_FUNC(devfn));
 			return false;
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V9 1/2] PCI: handle CRS returned by device after FLR Sinan Kaya <okaya@codeaurora.org> - 2017-08-09 03:00 +0200
  [PATCH V9 2/2] PCI: display not responding message while device is unreachable Sinan Kaya <okaya@codeaurora.org> - 2017-08-09 03:00 +0200
  Re: [PATCH V9 1/2] PCI: handle CRS returned by device after FLR Bjorn Helgaas <helgaas@kernel.org> - 2017-08-11 00:00 +0200
    Re: [PATCH V9 1/2] PCI: handle CRS returned by device after FLR Sinan Kaya <okaya@codeaurora.org> - 2017-08-11 00:40 +0200
      Re: [PATCH V9 1/2] PCI: handle CRS returned by device after FLR Sinan Kaya <okaya@codeaurora.org> - 2017-08-11 19:00 +0200
  Re: [PATCH V9 1/2] PCI: handle CRS returned by device after FLR Bjorn Helgaas <helgaas@kernel.org> - 2017-08-11 00:00 +0200
    Re: [PATCH V9 1/2] PCI: handle CRS returned by device after FLR Sinan Kaya <okaya@codeaurora.org> - 2017-08-11 05:10 +0200

csiph-web