summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-03-31 22:19:58 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-03-31 22:19:58 +0000
commitb890e29f9dbd7fd7245606fda1d2e52fd8e1f365 (patch)
tree4c7bc3442b5d8b5d55a725471b02aab05b62aaa4
parent8929e7dc250da730a00b0e83ae7ab9e781a463d3 (diff)
bzero pci attach args
-rw-r--r--sys/arch/amd64/amd64/mainbus.c5
-rw-r--r--sys/arch/amd64/pci/pchb.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/arch/amd64/amd64/mainbus.c b/sys/arch/amd64/amd64/mainbus.c
index e5df82207ea..9d643bc9e94 100644
--- a/sys/arch/amd64/amd64/mainbus.c
+++ b/sys/arch/amd64/amd64/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.16 2009/01/13 13:53:50 kettenis Exp $ */
+/* $OpenBSD: mainbus.c,v 1.17 2009/03/31 22:19:57 kettenis Exp $ */
/* $NetBSD: mainbus.c,v 1.1 2003/04/26 18:39:29 fvdl Exp $ */
/*
@@ -196,14 +196,13 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
#if NPCI > 0
if (pci_mode != 0) {
+ bzero(&mba.mba_pba, sizeof(mba.mba_pba));
mba.mba_pba.pba_busname = "pci";
mba.mba_pba.pba_iot = X86_BUS_SPACE_IO;
mba.mba_pba.pba_memt = X86_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;
- mba.mba_pba.pba_pc = NULL;
config_found(self, &mba.mba_pba, mainbus_print);
}
#endif
diff --git a/sys/arch/amd64/pci/pchb.c b/sys/arch/amd64/pci/pchb.c
index d59508a7d46..6497bf843b1 100644
--- a/sys/arch/amd64/pci/pchb.c
+++ b/sys/arch/amd64/pci/pchb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pchb.c,v 1.27 2008/11/09 15:11:19 oga Exp $ */
+/* $OpenBSD: pchb.c,v 1.28 2009/03/31 22:19:57 kettenis Exp $ */
/* $NetBSD: pchb.c,v 1.1 2003/04/26 18:39:50 fvdl Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -275,13 +275,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);
}