diff options
author | silby <silby@FreeBSD.org> | 2002-08-05 13:24:06 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2002-08-05 13:24:06 +0000 |
commit | 739c46b18bafb75d3f2d8c4abd11ed4ae2375d79 (patch) | |
tree | 1cacb1edbfc93042ff8e1238801891c3d3c62bab | |
parent | a4b3e13b54a032524547d5a4343849f073eda22c (diff) | |
download | FreeBSD-src-739c46b18bafb75d3f2d8c4abd11ed4ae2375d79.zip FreeBSD-src-739c46b18bafb75d3f2d8c4abd11ed4ae2375d79.tar.gz |
Make sure to set the DMA transfer length register, plus one
small style fix.
Submitted by: Thomas Nystrom <thn@saeab.se>
-rw-r--r-- | sys/dev/vr/if_vr.c | 7 | ||||
-rw-r--r-- | sys/pci/if_vr.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 74a8d66..76326b7 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -1406,8 +1406,13 @@ 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]); + + /* Set DMA size */ + VR_CLRBIT(sc, VR_BCR0, VR_BCR0_DMA_LENGTH); + VR_SETBIT(sc, VR_BCR0, VR_BCR0_DMA_STORENFWD); - /* BCR0 and BCR1 can override the RXCFG and TXCFG registers, + /* + * BCR0 and BCR1 can override the RXCFG and TXCFG registers, * so we must set both. */ VR_CLRBIT(sc, VR_BCR0, VR_BCR0_RX_THRESH); diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index 74a8d66..76326b7 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -1406,8 +1406,13 @@ 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]); + + /* Set DMA size */ + VR_CLRBIT(sc, VR_BCR0, VR_BCR0_DMA_LENGTH); + VR_SETBIT(sc, VR_BCR0, VR_BCR0_DMA_STORENFWD); - /* BCR0 and BCR1 can override the RXCFG and TXCFG registers, + /* + * BCR0 and BCR1 can override the RXCFG and TXCFG registers, * so we must set both. */ VR_CLRBIT(sc, VR_BCR0, VR_BCR0_RX_THRESH); |