summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-08-04 13:38:24 +0000
committerpeter <peter@FreeBSD.org>1999-08-04 13:38:24 +0000
commited41b168e64b29b5eb0a5ed2fe46198ee565a6ed (patch)
tree96464851e0f5e752e3c701ef6ee4475a4fb85108 /sys/amd64
parent272402a72fb5d2e5b3931d0146d43b3604f8e558 (diff)
downloadFreeBSD-src-ed41b168e64b29b5eb0a5ed2fe46198ee565a6ed.zip
FreeBSD-src-ed41b168e64b29b5eb0a5ed2fe46198ee565a6ed.tar.gz
Don't probe if pci_cfgopen() fails to find pci hardware, like we used to
to. This might have caused interesting things on non-PCI hardware if PCI was compiled in.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/pci/pci_bus.c9
-rw-r--r--sys/amd64/pci/pci_cfgreg.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c
index b3253ac..eb6cc27 100644
--- a/sys/amd64/pci/pci_bus.c
+++ b/sys/amd64/pci/pci_bus.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pcibus.c,v 1.42 1999/05/18 20:48:43 peter Exp $
+ * $Id: pcibus.c,v 1.43 1999/07/16 01:00:29 msmith Exp $
*
*/
@@ -364,7 +364,7 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
case 0x00011039:
s = "SiS 5591 host to AGP bridge";
break;
-
+
/* VLSI -- vendor 0x1004 */
case 0x00051004:
s = "VLSI 82C592 Host to PCI bridge";
@@ -409,10 +409,10 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
{
pcicfgregs probe;
+ if (pci_cfgopen() == 0)
+ return;
probe.hose = 0;
probe.bus = 0;
-
- pci_cfgopen();
for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) {
int pcifunchigh = 0;
for (probe.func = 0;
@@ -442,7 +442,6 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
}
}
}
-
}
static int
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c
index b3253ac..eb6cc27 100644
--- a/sys/amd64/pci/pci_cfgreg.c
+++ b/sys/amd64/pci/pci_cfgreg.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pcibus.c,v 1.42 1999/05/18 20:48:43 peter Exp $
+ * $Id: pcibus.c,v 1.43 1999/07/16 01:00:29 msmith Exp $
*
*/
@@ -364,7 +364,7 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
case 0x00011039:
s = "SiS 5591 host to AGP bridge";
break;
-
+
/* VLSI -- vendor 0x1004 */
case 0x00051004:
s = "VLSI 82C592 Host to PCI bridge";
@@ -409,10 +409,10 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
{
pcicfgregs probe;
+ if (pci_cfgopen() == 0)
+ return;
probe.hose = 0;
probe.bus = 0;
-
- pci_cfgopen();
for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) {
int pcifunchigh = 0;
for (probe.func = 0;
@@ -442,7 +442,6 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
}
}
}
-
}
static int
OpenPOWER on IntegriCloud