summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_vr.c
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2002-07-31 19:58:36 +0000
committersilby <silby@FreeBSD.org>2002-07-31 19:58:36 +0000
commit317a440c3154f6777e5eb38a709962ed926e62b6 (patch)
treede085ebb23cda7df55fa5be50a3eb08bbe4d6e38 /sys/pci/if_vr.c
parent8959d1076ac4d87b7a1d420795bbde47b1787321 (diff)
downloadFreeBSD-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/pci/if_vr.c')
-rw-r--r--sys/pci/if_vr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c
index 1f4a07e..74a8d66 100644
--- a/sys/pci/if_vr.c
+++ b/sys/pci/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);
OpenPOWER on IntegriCloud