diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-09-08 18:45:29 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-09-08 18:45:29 +0000 |
commit | 9ab7791b40bc527265d1181f1f454b65e6a4c2fa (patch) | |
tree | 828f76b85915f2d5de9ed334711a9cb6789db717 /sys | |
parent | f7bf3c4ef2b9b8279869df32ebc5145aa810b325 (diff) |
save the pcitag
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_ath_pci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/if_ath_pci.c b/sys/dev/pci/if_ath_pci.c index a717bdb8299..46671cbcac5 100644 --- a/sys/dev/pci/if_ath_pci.c +++ b/sys/dev/pci/if_ath_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ath_pci.c,v 1.9 2005/09/08 17:43:26 reyk Exp $ */ +/* $OpenBSD: if_ath_pci.c,v 1.10 2005/09/08 18:45:28 reyk Exp $ */ /* $NetBSD: if_ath_pci.c,v 1.7 2004/06/30 05:58:17 mycroft Exp $ */ /*- @@ -81,7 +81,10 @@ struct ath_pci_softc { struct ath_softc sc_sc; + pci_chipset_tag_t sc_pc; + pcitag_t sc_pcitag; + void *sc_ih; /* interrupt handler */ }; @@ -125,6 +128,7 @@ ath_pci_attach(struct device *parent, struct device *self, void *aux) pcireg_t res; struct pci_attach_args *pa = aux; pci_chipset_tag_t pc = pa->pa_pc; + pcitag_t pt = pa->pa_tag; bus_space_tag_t iot; bus_space_handle_t ioh; pci_intr_handle_t ih; @@ -132,8 +136,9 @@ ath_pci_attach(struct device *parent, struct device *self, void *aux) const char *intrstr = NULL; psc->sc_pc = pc; + psc->sc_pcitag = pt; - res = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); + res = pci_conf_read(pc, pt, PCI_COMMAND_STATUS_REG); if ((res & PCI_COMMAND_MEM_ENABLE) == 0) { printf(": couldn't enable memory mapping\n"); goto bad; |