diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2013-06-10 13:38:48 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2013-06-10 13:38:48 +0000 |
commit | a776807e67580157005a6f2eaf80be1be67b5903 (patch) | |
tree | 152f40be1e410b2257033188dbceb6c15f9a17f6 /sys/dev/pci/if_bge.c | |
parent | 617cc6e8899c02e6f0a04026efcf28786da967c7 (diff) |
A couple of changes from Masanobu SAITOH <msaitoh@netbsd.org>:
- fixup the Random Backoff Register value masking;
- keep the GPIO settings when modifying the Misc Local Control
register value.
Tested by Rob Sessink on 5719, David Imhoff on 5719, 5720, 5721,
me on 5719 and 5715; ok dlg
Diffstat (limited to 'sys/dev/pci/if_bge.c')
-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 33b1acabf58..3d396ccb4f0 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.334 2013/06/06 00:05:30 dlg Exp $ */ +/* $OpenBSD: if_bge.c,v 1.335 2013/06/10 13:38:47 mikeb Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -2119,9 +2119,9 @@ bge_blockinit(struct bge_softc *sc) /* Set random backoff seed for TX */ CSR_WRITE_4(sc, BGE_TX_RANDOM_BACKOFF, - sc->arpcom.ac_enaddr[0] + sc->arpcom.ac_enaddr[1] + - sc->arpcom.ac_enaddr[2] + sc->arpcom.ac_enaddr[3] + - sc->arpcom.ac_enaddr[4] + sc->arpcom.ac_enaddr[5] + + (sc->arpcom.ac_enaddr[0] + sc->arpcom.ac_enaddr[1] + + sc->arpcom.ac_enaddr[2] + sc->arpcom.ac_enaddr[3] + + sc->arpcom.ac_enaddr[4] + sc->arpcom.ac_enaddr[5]) & BGE_TX_BACKOFF_SEED_MASK); /* Set inter-packet gap */ @@ -2239,7 +2239,7 @@ bge_blockinit(struct bge_softc *sc) DELAY(40); /* Set misc. local control, enable interrupts on attentions */ - CSR_WRITE_4(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN); + BGE_SETBIT(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN); #ifdef notdef /* Assert GPIO pins for PHY reset */ |