diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2008-07-29 00:18:26 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2008-07-29 00:18:26 +0000 |
commit | 9121a3658d3938bb1d81f6cd5a018f7bbd709065 (patch) | |
tree | 0ec0e962b73f9b244a22064542d3f5ae3f66dde3 /sys/dev/pci | |
parent | 4f029e315b4f539e9eccc92fc5afd2d3949d61e8 (diff) |
- fix FIFO overruns on PCI-E chipsets by setting the DMA size
RX/TX configuration registers to 128 instead of 512 bytes.
- add a few more MAC/RF id strings for the dmesg.
- check for PCI-E instead of single chip variants in a few places.
ok deraadt@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_ath_pci.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/pci/if_ath_pci.c b/sys/dev/pci/if_ath_pci.c index 7c9a50976ad..b0097b3e4e6 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.16 2008/06/14 02:28:14 jsing Exp $ */ +/* $OpenBSD: if_ath_pci.c,v 1.17 2008/07/29 00:18:25 reyk Exp $ */ /* $NetBSD: if_ath_pci.c,v 1.7 2004/06/30 05:58:17 mycroft Exp $ */ /*- @@ -142,14 +142,19 @@ ath_pci_attach(struct device *parent, struct device *self, void *aux) printf(": bad PCI register type %d\n", (int)mem_type); goto fail; } - if (mem_type == PCI_MAPREG_MEM_TYPE_64BIT) - sc->sc_64bit = 1; if (pci_mapreg_map(pa, ATH_BAR0, mem_type, 0, &sc->sc_st, &sc->sc_sh, NULL, &sc->sc_ss, 0)) { printf(": cannot map register space\n"); goto fail; } + /* + * PCI Express check. + */ + if (pci_get_capability(pc, pa->pa_tag, PCI_CAP_PCIEXPRESS, + NULL, NULL) != 0) + sc->sc_pcie = 1; + sc->sc_invalid = 1; /* |