From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sinan Kaya Subject: [PATCH V9 2/2] PCI: display not responding message while device is unreachable Date: Tue, 8 Aug 2017 20:57:25 -0400 Message-ID: <1502240245-11714-2-git-send-email-okaya@codeaurora.org> References: <1502240245-11714-1-git-send-email-okaya@codeaurora.org> Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:51130 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752455AbdHIA5d (ORCPT ); Tue, 8 Aug 2017 20:57:33 -0400 In-Reply-To: <1502240245-11714-1-git-send-email-okaya@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: linux-pci@vger.kernel.org, timur@codeaurora.org, alex.williamson@redhat.com Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Bjorn Helgaas , linux-kernel@vger.kernel.org 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 --- 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