diff options
author | chuck <chuck@cvs.openbsd.org> | 1996-07-16 22:08:18 +0000 |
---|---|---|
committer | chuck <chuck@cvs.openbsd.org> | 1996-07-16 22:08:18 +0000 |
commit | 4a257cd6be3fe9cd597ed0149bf0ae006c70a69d (patch) | |
tree | e7c6a63554e20407b1002b2ece0e68853d00eb63 /sys/dev/ic/midwayvar.h | |
parent | aca438ad8d6096c67bea167d63632ef7547c2dc8 (diff) |
midway fixes + new stuff:
- alpha changes from cgd
- merged multiple DRQ/DTQ ADD macros into a single DRQ and a single DTQ
macro with a uniform interface to make the code simpler and easier to read.
- en_start: only update atm_flags if EN_MBUF_OPT is enabled (which it
should be)
- for alburst: make sure we don't DMA more bytes than we need (on both
tx and rx). if the alburst is larger than we need, drop to
MIDDMA_WORD mode.
- major change: enable the use of byte and 2 byte DMA on the trasmit side.
this allows us to DMA from non-word sized/aligned mbufs directly.
[the old code would always call en_mfix which would copy (or move) the
data in order to ensure proper alignment... it turns out TCP gives
us non-word sized/aligned mbufs when it is retransmitting, so we needed
to handle this case more efficiently.] the following functions
were changed to make this work:
- en_dqneed: add an arg to let us know if we are transmitting or not.
if we are TX, then we must take into account byte DMAs when
estimating the number of DTQs we will need for a buffer
- en_start: only mfix mbufs if DMA is disabled
- en_txdma: only set launch.nodma if we have en_mfix'd the mbuf chain
also, we may need a DTQ to flush the chip's internal byte buffer
- en_txlaunch: only attempt a copy if we have the proper alignment.
add byte dma code for the front and end of the buffer.
make sure the internal dma buffer is flushed out.
- en_dump: keep track of how many times we have to use byte sized DMA
midwayreg:
- add byte/2byte DMA defines
midwayvar:
- add new stat counter to monitor less-than-word lengthed DMA
Diffstat (limited to 'sys/dev/ic/midwayvar.h')
-rw-r--r-- | sys/dev/ic/midwayvar.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ic/midwayvar.h b/sys/dev/ic/midwayvar.h index c44f34eb836..28661608b6c 100644 --- a/sys/dev/ic/midwayvar.h +++ b/sys/dev/ic/midwayvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: midwayvar.h,v 1.7 1996/07/11 22:47:07 chuck Exp $ */ +/* $OpenBSD: midwayvar.h,v 1.8 1996/07/16 22:08:16 chuck Exp $ */ /* * @@ -164,6 +164,9 @@ struct en_softc { u_int32_t ttrash; /* # of RBD's with T bit set */ u_int32_t mfix; /* # of times we had to call mfix */ u_int32_t mfixfail; /* # of times mfix failed */ + u_int32_t headbyte; /* # of times we used BYTE DMA at front */ + u_int32_t tailbyte; /* # of times we used BYTE DMA at end */ + u_int32_t tailflush; /* # of times we had to FLUSH out DMA bytes */ u_int32_t txmbovr; /* # of times we dropped due to mbsize */ u_int32_t dmaovr; /* tx dma overflow count */ u_int32_t txoutspace; /* out of space in xmit buffer */ |