aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2012-02-29 22:06:44 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2012-02-29 22:06:44 +0000
commit49329d282567029e025b113d252c6acd765057f0 (patch)
treea96781b5632edf3db6f858a3d626526e61cf4dad /sys/dev/pci
parentc7e41c8b505e8eb165ea5bfb795f6808a750f964 (diff)
Notes
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index e120dbc67a28b..584c9c3235530 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -878,10 +878,9 @@ pci_read_vpd(device_t pcib, pcicfgregs *cfg)
remain |= byte2 << 8;
if (remain > (0x7f*4 - vrs.off)) {
state = -1;
- printf(
- "pci%d:%d:%d:%d: invalid VPD data, remain %#x\n",
- cfg->domain, cfg->bus, cfg->slot,
- cfg->func, remain);
+ pci_printf(cfg,
+ "invalid VPD data, remain %#x\n",
+ remain);
}
name = byte & 0x7f;
} else {
@@ -953,10 +952,8 @@ pci_read_vpd(device_t pcib, pcicfgregs *cfg)
* if this happens, we can't trust the rest
* of the VPD.
*/
- printf(
- "pci%d:%d:%d:%d: bad keyword length: %d\n",
- cfg->domain, cfg->bus, cfg->slot,
- cfg->func, dflen);
+ pci_printf(cfg, "bad keyword length: %d\n",
+ dflen);
cksumvalid = 0;
state = -1;
break;
@@ -989,10 +986,8 @@ pci_read_vpd(device_t pcib, pcicfgregs *cfg)
cksumvalid = 1;
else {
if (bootverbose)
- printf(
- "pci%d:%d:%d:%d: bad VPD cksum, remain %hhu\n",
- cfg->domain, cfg->bus,
- cfg->slot, cfg->func,
+ pci_printf(cfg,
+ "bad VPD cksum, remain %hhu\n",
vrs.cksum);
cksumvalid = 0;
state = -1;
@@ -1070,9 +1065,7 @@ pci_read_vpd(device_t pcib, pcicfgregs *cfg)
break;
default:
- printf("pci%d:%d:%d:%d: invalid state: %d\n",
- cfg->domain, cfg->bus, cfg->slot, cfg->func,
- state);
+ pci_printf(cfg, "invalid state: %d\n", state);
state = -1;
break;
}
@@ -1089,8 +1082,7 @@ pci_read_vpd(device_t pcib, pcicfgregs *cfg)
}
if (state < -1) {
/* I/O error, clean up */
- printf("pci%d:%d:%d:%d: failed to read VPD data.\n",
- cfg->domain, cfg->bus, cfg->slot, cfg->func);
+ pci_printf(cfg, "failed to read VPD data.\n");
if (cfg->vpd.vpd_ident != NULL) {
free(cfg->vpd.vpd_ident, M_DEVBUF);
cfg->vpd.vpd_ident = NULL;