aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-08-11 14:55:14 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-11 15:02:19 +1100
commit4295424a6ecfebc683106cf9d2c68007f10620d7 (patch)
tree2ed3c8cefba22b68916cbeaa61e79406d7deccf5
parent121814d718272ee7ed743aad9d919c8365aeb6dd (diff)
downloadskiboot-4295424a6ecfebc683106cf9d2c68007f10620d7.zip
skiboot-4295424a6ecfebc683106cf9d2c68007f10620d7.tar.gz
skiboot-4295424a6ecfebc683106cf9d2c68007f10620d7.tar.bz2
core/pci: Print CRS retry times
It's useful to know the CRS retry times before the PCI device is detected successfully. In PCI hot add case, it usually indicates time consumed for the adapter's firmware to be partially ready (responsive PCI config space). Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--core/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pci.c b/core/pci.c
index c9b5e16..30307c9 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -140,7 +140,7 @@ static struct pci_device *pci_scan_one(struct phb *phb, struct pci_device *paren
uint16_t capreg;
bool had_crs = false;
- for (retries = 40; retries; retries--) {
+ for (retries = 0; retries < 40; retries++) {
rc = pci_cfg_read32(phb, bdfn, 0, &vdid);
if (rc)
return NULL;
@@ -156,7 +156,7 @@ static struct pci_device *pci_scan_one(struct phb *phb, struct pci_device *paren
return NULL;
}
if (had_crs)
- PCIDBG(phb, bdfn, "Probe success after CRS\n");
+ PCIDBG(phb, bdfn, "Probe success after %d CRS\n", retries);
/* Perform a dummy write to the device in order for it to
* capture it's own bus number, so any subsequent error