From 793e1b469de28e62091b91715532f4bc97ed5fa5 Mon Sep 17 00:00:00 2001 From: dfr Date: Sun, 13 Feb 2000 09:49:05 +0000 Subject: Fix an uninitialised variable which affected probing on some machines. Approved by: jkh Reviewed by: gallatin --- sys/amd64/pci/pci_bus.c | 1 + sys/amd64/pci/pci_cfgreg.c | 1 + sys/i386/isa/pcibus.c | 1 + sys/i386/pci/pci_bus.c | 1 + sys/i386/pci/pci_cfgreg.c | 1 + sys/i386/pci/pci_pir.c | 1 + 6 files changed, 6 insertions(+) (limited to 'sys') diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c index eaad794..fd34ad8 100644 --- a/sys/amd64/pci/pci_bus.c +++ b/sys/amd64/pci/pci_bus.c @@ -443,6 +443,7 @@ nexus_pcib_identify(driver_t *driver, device_t parent) probe.hose = 0; probe.bus = 0; for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) { + probe.func = 0; hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1); if (hdrtype & PCIM_MFDEV) pcifunchigh = 7; diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c index eaad794..fd34ad8 100644 --- a/sys/amd64/pci/pci_cfgreg.c +++ b/sys/amd64/pci/pci_cfgreg.c @@ -443,6 +443,7 @@ nexus_pcib_identify(driver_t *driver, device_t parent) probe.hose = 0; probe.bus = 0; for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) { + probe.func = 0; hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1); if (hdrtype & PCIM_MFDEV) pcifunchigh = 7; diff --git a/sys/i386/isa/pcibus.c b/sys/i386/isa/pcibus.c index eaad794..fd34ad8 100644 --- a/sys/i386/isa/pcibus.c +++ b/sys/i386/isa/pcibus.c @@ -443,6 +443,7 @@ nexus_pcib_identify(driver_t *driver, device_t parent) probe.hose = 0; probe.bus = 0; for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) { + probe.func = 0; hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1); if (hdrtype & PCIM_MFDEV) pcifunchigh = 7; diff --git a/sys/i386/pci/pci_bus.c b/sys/i386/pci/pci_bus.c index eaad794..fd34ad8 100644 --- a/sys/i386/pci/pci_bus.c +++ b/sys/i386/pci/pci_bus.c @@ -443,6 +443,7 @@ nexus_pcib_identify(driver_t *driver, device_t parent) probe.hose = 0; probe.bus = 0; for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) { + probe.func = 0; hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1); if (hdrtype & PCIM_MFDEV) pcifunchigh = 7; diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c index eaad794..fd34ad8 100644 --- a/sys/i386/pci/pci_cfgreg.c +++ b/sys/i386/pci/pci_cfgreg.c @@ -443,6 +443,7 @@ nexus_pcib_identify(driver_t *driver, device_t parent) probe.hose = 0; probe.bus = 0; for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) { + probe.func = 0; hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1); if (hdrtype & PCIM_MFDEV) pcifunchigh = 7; diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c index eaad794..fd34ad8 100644 --- a/sys/i386/pci/pci_pir.c +++ b/sys/i386/pci/pci_pir.c @@ -443,6 +443,7 @@ nexus_pcib_identify(driver_t *driver, device_t parent) probe.hose = 0; probe.bus = 0; for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) { + probe.func = 0; hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1); if (hdrtype & PCIM_MFDEV) pcifunchigh = 7; -- cgit v1.1