diff options
author | 2013-06-04 09:47:25 +0000 | |
---|---|---|
committer | 2013-06-04 09:47:25 +0000 | |
commit | b83d016dee6ec63a48da04ddec9626833c57fad9 (patch) | |
tree | 67b2274451644b887e2d92be461f621983f1b0c3 | |
parent | Substitute a couple of magic numbers with newly added PCIE (diff) | |
download | wireguard-openbsd-b83d016dee6ec63a48da04ddec9626833c57fad9.tar.xz wireguard-openbsd-b83d016dee6ec63a48da04ddec9626833c57fad9.zip |
A couple of style/comment fixes from FreeBSD, with input from
David Imhoff. No functional change.
-rw-r--r-- | sys/dev/pci/if_bge.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 90409cf9a5c..05bfaa4c5b1 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.332 2013/06/04 09:41:50 mikeb Exp $ */ +/* $OpenBSD: if_bge.c,v 1.333 2013/06/04 09:47:25 mikeb Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -2356,11 +2356,8 @@ bge_blockinit(struct bge_softc *sc) /* Turn on send data completion state machine */ val = BGE_SDCMODE_ENABLE; - if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5761) val |= BGE_SDCMODE_CDELAY; - - /* Turn on send data completion state machine */ CSR_WRITE_4(sc, BGE_SDC_MODE, val); /* Turn on send data initiator state machine */ @@ -3238,22 +3235,18 @@ bge_reset(struct bge_softc *sc) */ if (sc->bge_flags & BGE_PHY_FIBER_TBI && BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5704) { - u_int32_t serdescfg; - - serdescfg = CSR_READ_4(sc, BGE_SERDES_CFG); - serdescfg = (serdescfg & ~0xFFF) | 0x880; - CSR_WRITE_4(sc, BGE_SERDES_CFG, serdescfg); + val = CSR_READ_4(sc, BGE_SERDES_CFG); + val = (val & ~0xFFF) | 0x880; + CSR_WRITE_4(sc, BGE_SERDES_CFG, val); } if (sc->bge_flags & BGE_PCIE && !BGE_IS_5717_PLUS(sc) && sc->bge_chipid != BGE_CHIPID_BCM5750_A0 && BGE_ASICREV(sc->bge_chipid) != BGE_ASICREV_BCM5785) { - u_int32_t v; - - /* Enable PCI Express bug fix */ - v = CSR_READ_4(sc, 0x7c00); - CSR_WRITE_4(sc, 0x7c00, v | (1<<25)); + /* Enable Data FIFO protection. */ + val = CSR_READ_4(sc, 0x7c00); + CSR_WRITE_4(sc, 0x7c00, val | (1<<25)); } if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5720) |