diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-10-12 14:57:05 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-10-12 14:57:05 +0000 |
commit | fd006e56b5ba89efe12784797e9d0bb410946a36 (patch) | |
tree | 22e3a73fbb88295e64a53a6db5b44b48e1efc236 /sys/arch/sparc64 | |
parent | fe35000c410ecfdcf593661eb7dc8a01a4afef44 (diff) |
From NetBSD: convert printf's to debug only and remove a panic
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/pci_machdep.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/arch/sparc64/dev/pci_machdep.c b/sys/arch/sparc64/dev/pci_machdep.c index ffda332120d..e7883a956d0 100644 --- a/sys/arch/sparc64/dev/pci_machdep.c +++ b/sys/arch/sparc64/dev/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.5 2001/08/29 02:47:58 jason Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.6 2001/10/12 14:57:04 jason Exp $ */ /* $NetBSD: pci_machdep.c,v 1.22 2001/07/20 00:07:13 eeh Exp $ */ /* @@ -360,8 +360,8 @@ pci_conf_read(pc, tag, reg) PCITAG_OFFSET(tag) + reg); } #ifdef DEBUG - else printf("pci_conf_read: bogus pcitag %x\n", - (int)PCITAG_OFFSET(tag)); + else DPRINTF(SPDB_CONF, ("pci_conf_read: bogus pcitag %x\n", + (int)PCITAG_OFFSET(tag)); #endif DPRINTF(SPDB_CONF, (" returning %08x\n", (u_int)val)); @@ -385,9 +385,12 @@ pci_conf_write(pc, tag, reg, data) (long long)(sc->sc_configaddr + PCITAG_OFFSET(tag) + reg), (int)PCITAG_OFFSET(tag) + reg)); - if (PCITAG_NODE(tag) == -1) - panic("pci_conf_write: bad addr"); - + /* If we don't know it, just punt. */ + if (PCITAG_NODE(tag) == -1) { + DPRINTF(SPDB_CONF, ("pci_config_write: bad addr")); + return; + } + bus_space_write_4(sc->sc_configtag, sc->sc_configaddr, PCITAG_OFFSET(tag) + reg, data); } |