diff options
author | silby <silby@FreeBSD.org> | 2002-07-31 19:58:36 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2002-07-31 19:58:36 +0000 |
commit | 317a440c3154f6777e5eb38a709962ed926e62b6 (patch) | |
tree | de085ebb23cda7df55fa5be50a3eb08bbe4d6e38 /sys/dev/vr/if_vr.c | |
parent | 8959d1076ac4d87b7a1d420795bbde47b1787321 (diff) | |
download | FreeBSD-src-317a440c3154f6777e5eb38a709962ed926e62b6.zip FreeBSD-src-317a440c3154f6777e5eb38a709962ed926e62b6.tar.gz |
Make sure to set both sets of registers which control the RX and TX buffer
sizes. Previously, the end result was at the mercy of the card's default
setting. This change will reduce the number of buffer underruns for
some users.
PR: kern/37929
Submitted by: Thomas Nystrom <thn@saeab.se>
MFC after: 7 days
Diffstat (limited to 'sys/dev/vr/if_vr.c')
-rw-r--r-- | sys/dev/vr/if_vr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 1f4a07e..74a8d66 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -1407,6 +1407,15 @@ static void vr_init(xsc) for (i = 0; i < ETHER_ADDR_LEN; i++) CSR_WRITE_1(sc, VR_PAR0 + i, sc->arpcom.ac_enaddr[i]); + /* BCR0 and BCR1 can override the RXCFG and TXCFG registers, + * so we must set both. + */ + VR_CLRBIT(sc, VR_BCR0, VR_BCR0_RX_THRESH); + VR_SETBIT(sc, VR_BCR0, VR_BCR0_RXTHRESHSTORENFWD); + + VR_CLRBIT(sc, VR_BCR1, VR_BCR1_TX_THRESH); + VR_SETBIT(sc, VR_BCR1, VR_BCR1_TXTHRESHSTORENFWD); + VR_CLRBIT(sc, VR_RXCFG, VR_RXCFG_RX_THRESH); VR_SETBIT(sc, VR_RXCFG, VR_RXTHRESH_STORENFWD); |