diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2013-06-04 09:36:21 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2013-06-04 09:36:21 +0000 |
commit | 548b74093a4d281ac029a5eae9f84a07109fad55 (patch) | |
tree | 321cbc382d41184de7ab8cf634eb83295225e9cf /sys/dev/pci | |
parent | 69e48ec5376fcd34d65e70202f66b4292cb1d49d (diff) |
Substitute a couple of magic numbers with newly added PCIE
DCTL flag defines. No binary change.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_bge.c | 10 |
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); } |