summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-03-31 21:57:58 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-03-31 21:57:58 +0000
commit643c207eee12a13fa8efdf9813bf1402785290ca (patch)
tree6df37c4c5f8e7e2d267018bcf78ac26fc3d2d7d7 /sys/arch
parentd1f46a5bae81083eb4d20a65b677c8159dadb2a2 (diff)
bzero pci attach args
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/mainbus.c4
-rw-r--r--sys/arch/i386/pci/pchb.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/sys/arch/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c
index 7e6eb30b9c4..6abffc03463 100644
--- a/sys/arch/i386/i386/mainbus.c
+++ b/sys/arch/i386/i386/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.43 2009/01/13 13:53:50 kettenis Exp $ */
+/* $OpenBSD: mainbus.c,v 1.44 2009/03/31 21:57:57 kettenis Exp $ */
/* $NetBSD: mainbus.c,v 1.21 1997/06/06 23:14:20 thorpej Exp $ */
/*
@@ -231,13 +231,13 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
*/
#if NPCI > 0
if (pci_mode_detect() != 0) {
+ bzero(&mba.mba_pba, sizeof(mba.mba_pba));
mba.mba_pba.pba_busname = "pci";
mba.mba_pba.pba_iot = I386_BUS_SPACE_IO;
mba.mba_pba.pba_memt = I386_BUS_SPACE_MEM;
mba.mba_pba.pba_dmat = &pci_bus_dma_tag;
mba.mba_pba.pba_domain = pci_ndomains++;
mba.mba_pba.pba_bus = 0;
- mba.mba_pba.pba_bridgetag = NULL;
config_found(self, &mba.mba_pba, mainbus_print);
}
#endif
diff --git a/sys/arch/i386/pci/pchb.c b/sys/arch/i386/pci/pchb.c
index 6908385e735..085dbc2ac8f 100644
--- a/sys/arch/i386/pci/pchb.c
+++ b/sys/arch/i386/pci/pchb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pchb.c,v 1.75 2008/11/09 15:11:19 oga Exp $ */
+/* $OpenBSD: pchb.c,v 1.76 2009/03/31 21:57:57 kettenis Exp $ */
/* $NetBSD: pchb.c,v 1.65 2007/08/15 02:26:13 markd Exp $ */
/*
@@ -211,7 +211,6 @@ pchbattach(struct device *parent, struct device *self, void *aux)
* Configure it.
*/
pbnum = bdnum;
- pba.pba_bridgetag = NULL;
doattach = 1;
break;
}
@@ -371,13 +370,13 @@ pchbattach(struct device *parent, struct device *self, void *aux)
if (doattach == 0)
return;
+ bzero(&pba, sizeof(pba));
pba.pba_busname = "pci";
pba.pba_iot = pa->pa_iot;
pba.pba_memt = pa->pa_memt;
pba.pba_dmat = pa->pa_dmat;
pba.pba_domain = pa->pa_domain;
pba.pba_bus = pbnum;
- pba.pba_bridgetag = NULL;
pba.pba_pc = pa->pa_pc;
config_found(self, &pba, pchb_print);
#endif /* __i386__ */
@@ -438,13 +437,13 @@ pchb_amd64ht_attach(struct device *self, struct pci_attach_args *pa, int i)
reg = AMD64HT_LDT0_BUS + i * 0x20;
bus = pci_conf_read(pa->pa_pc, pa->pa_tag, reg);
if (AMD64HT_LDT_SEC_BUS_NUM(bus) > 0) {
+ bzero(&pba, sizeof(pba));
pba.pba_busname = "pci";
pba.pba_iot = pa->pa_iot;
pba.pba_memt = pa->pa_memt;
pba.pba_dmat = pa->pa_dmat;
pba.pba_domain = pa->pa_domain;
pba.pba_bus = AMD64HT_LDT_SEC_BUS_NUM(bus);
- pba.pba_bridgetag = NULL;
pba.pba_pc = pa->pa_pc;
config_found(self, &pba, pchb_print);
}