summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2013-06-04 09:36:20 +0000
committermikeb <mikeb@openbsd.org>2013-06-04 09:36:20 +0000
commit8b30c96fe6e6866c1eea2ec86ad1eab4c02b205f (patch)
tree67468b3aaece6889ea3735130d9a17b91e461d48
parentrestore code commented out while debugging. From pedro (diff)
downloadwireguard-openbsd-8b30c96fe6e6866c1eea2ec86ad1eab4c02b205f.tar.xz
wireguard-openbsd-8b30c96fe6e6866c1eea2ec86ad1eab4c02b205f.zip
Substitute a couple of magic numbers with newly added PCIE
DCTL flag defines. No binary change.
-rw-r--r--sys/dev/pci/if_bge.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 2fecaab1c8f..5f72295fd2b 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.330 2013/05/31 14:27:20 mikeb Exp $ */
+/* $OpenBSD: if_bge.c,v 1.331 2013/06/04 09:36:20 mikeb Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -3156,12 +3156,12 @@ bge_reset(struct bge_softc *sc)
devctl = pci_conf_read(pa->pa_pc, pa->pa_tag, sc->bge_expcap +
PCI_PCIE_DCSR);
/* Clear enable no snoop and disable relaxed ordering. */
- devctl &= ~(0x10 | 0x800);
+ devctl &= ~(PCI_PCIE_DCSR_ERO | PCI_PCIE_DCSR_ENS);
/* Set PCI Express max payload size. */
- devctl &= ~0x7000;
- devctl |= sc->bge_expmrq;
+ devctl = (devctl & ~PCI_PCIE_DCSR_MPS) | sc->bge_expmrq;
/* Clear error status. */
- devctl |= 0xf0000;
+ devctl |= PCI_PCIE_DCSR_CED | PCI_PCIE_DCSR_NED |
+ PCI_PCIE_DCSR_FED | PCI_PCIE_DCSR_URD;
pci_conf_write(pa->pa_pc, pa->pa_tag, sc->bge_expcap +
PCI_PCIE_DCSR, devctl);
}