Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718036
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Sinan Kaya <okaya@codeaurora.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH V12 5/5] PCI: Warn periodically while waiting for device to become ready |
| Date | Wed, 23 Aug 2017 07:00:01 +0200 |
| Message-ID | <uhvVL-4pb-9@gated-at.bofh.it> (permalink) |
| References | <uhvVL-4pb-5@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1503464181; bh=JQM9CWR6QUnkPdTtXqrc+jSkfOz/XPcx6pydBYpfI+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=es1wXNh6B3SAnjzfIsc1VrHRI89mDavbiW383uBZ4Ye5rs+kgtgWi/J9LpTl5nQfo 0nP43w7fTaqAMv5hjl/LP1301f84xIaCqAcEg4kG+XeCJrcPXf+bTVhicTjrnJW8uN 1s+ubrlly6Sg9oJvQEuZnHqnS+Tz6QWDUm4fQNbM= |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1503464181; bh=JQM9CWR6QUnkPdTtXqrc+jSkfOz/XPcx6pydBYpfI+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=es1wXNh6B3SAnjzfIsc1VrHRI89mDavbiW383uBZ4Ye5rs+kgtgWi/J9LpTl5nQfo 0nP43w7fTaqAMv5hjl/LP1301f84xIaCqAcEg4kG+XeCJrcPXf+bTVhicTjrnJW8uN 1s+ubrlly6Sg9oJvQEuZnHqnS+Tz6QWDUm4fQNbM= |
| Dmarc-Filter | OpenDMARC Filter v1.3.2 smtp.codeaurora.org 82EAB60722 |
| Authentication-Results | pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org |
| Authentication-Results | pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 51 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya <okaya@codeaurora.org>, Bjorn Helgaas <bhelgaas@google.com>, linux-kernel@vger.kernel.org |
| X-Original-Date | Wed, 23 Aug 2017 00:56:11 -0400 |
| X-Original-Message-ID | <1503464171-6471-5-git-send-email-okaya@codeaurora.org> |
| X-Original-References | <1503464171-6471-1-git-send-email-okaya@codeaurora.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1718036 |
Show key headers only | View raw
Add a print statement in pci_bus_wait_crs() 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>
[bhelgaas: check for timeout first so we don't print "waiting, giving up",
always print time we've slept (not the actual timeout, print a "ready"
message if we've printed a "waiting" message]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/probe.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 93b89dd..4b30df7 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1841,11 +1841,16 @@ bool pci_bus_wait_crs(struct pci_bus *bus, int devfn, u32 l, int timeout)
*/
while ((l & 0xffff) == 0x0001) {
if (delay > timeout) {
- printk(KERN_WARNING "pci %04x:%02x:%02x.%d: not responding\n",
- pci_domain_nr(bus), bus->number, PCI_SLOT(devfn),
- PCI_FUNC(devfn));
+ pr_warn("pci %04x:%02x:%02x.%d: not ready after %dms; giving up\n",
+ pci_domain_nr(bus), bus->number,
+ PCI_SLOT(devfn), PCI_FUNC(devfn), delay - 1);
+
return false;
}
+ if (delay >= 1000)
+ pr_info("pci %04x:%02x:%02x.%d: not ready after %dms; waiting\n",
+ pci_domain_nr(bus), bus->number,
+ PCI_SLOT(devfn), PCI_FUNC(devfn), delay - 1);
msleep(delay);
delay *= 2;
@@ -1854,6 +1859,11 @@ bool pci_bus_wait_crs(struct pci_bus *bus, int devfn, u32 l, int timeout)
return false;
}
+ if (delay >= 1000)
+ pr_info("pci %04x:%02x:%02x.%d: ready after %dms\n",
+ pci_domain_nr(bus), bus->number,
+ PCI_SLOT(devfn), PCI_FUNC(devfn), delay - 1);
+
return true;
}
--
1.9.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH V12 5/5] PCI: Warn periodically while waiting for device to become ready Sinan Kaya <okaya@codeaurora.org> - 2017-08-23 07:00 +0200
csiph-web