diff options
author | dg <dg@FreeBSD.org> | 1997-09-30 10:50:45 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1997-09-30 10:50:45 +0000 |
commit | d1cdbc3c8145a674f6e9d9aec61ff23fef7d4a93 (patch) | |
tree | efcc69e88d13255a96d92c25dba87fccb7ff30d8 /sys/dev | |
parent | 3a0f2a6fe6c88e462291fd22955e50b5618553a1 (diff) | |
download | FreeBSD-src-d1cdbc3c8145a674f6e9d9aec61ff23fef7d4a93.zip FreeBSD-src-d1cdbc3c8145a674f6e9d9aec61ff23fef7d4a93.tar.gz |
Two changes which should make the system less suseptible to receiver
overruns (not that it was a problem, but it could be):
1) Doubled the number of receive buffers in the DMA chain to 64.
2) Do packet receive processing before transmit in the interrupt routine.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 80fefb0..9f791ae3 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxp.c,v 1.40 1997/09/21 22:02:08 gibbs Exp $ + * $Id: if_fxp.c,v 1.41 1997/09/29 11:27:42 davidg Exp $ */ /* @@ -247,7 +247,7 @@ static int tx_threshold = 64; * Number of receive frame area buffers. These are large so chose * wisely. */ -#define FXP_NRFABUFS 32 +#define FXP_NRFABUFS 64 /* * Maximum number of seconds that the receiver can be idle before we @@ -923,33 +923,6 @@ fxp_intr(arg) CSR_WRITE_1(sc, FXP_CSR_SCB_STATACK, statack); /* - * Free any finished transmit mbuf chains. - */ - if (statack & FXP_SCB_STATACK_CNA) { - struct fxp_cb_tx *txp; - - for (txp = sc->cbl_first; sc->tx_queued && - (txp->cb_status & FXP_CB_STATUS_C) != 0; - txp = txp->next) { - if (txp->mb_head != NULL) { - m_freem(txp->mb_head); - txp->mb_head = NULL; - } - sc->tx_queued--; - } - sc->cbl_first = txp; - if (sc->tx_queued == 0) { - ifp->if_timer = 0; - if (sc->need_mcsetup) - fxp_mc_setup(sc); - } - /* - * Try to start more packets transmitting. - */ - if (ifp->if_snd.ifq_head != NULL) - fxp_start(ifp); - } - /* * Process receiver interrupts. If a no-resource (RNR) * condition exists, get whatever packets we can and * re-start the receiver. @@ -1025,6 +998,33 @@ rcvloop: FXP_SCB_COMMAND_RU_START); } } + /* + * Free any finished transmit mbuf chains. + */ + if (statack & FXP_SCB_STATACK_CNA) { + struct fxp_cb_tx *txp; + + for (txp = sc->cbl_first; sc->tx_queued && + (txp->cb_status & FXP_CB_STATUS_C) != 0; + txp = txp->next) { + if (txp->mb_head != NULL) { + m_freem(txp->mb_head); + txp->mb_head = NULL; + } + sc->tx_queued--; + } + sc->cbl_first = txp; + if (sc->tx_queued == 0) { + ifp->if_timer = 0; + if (sc->need_mcsetup) + fxp_mc_setup(sc); + } + /* + * Try to start more packets transmitting. + */ + if (ifp->if_snd.ifq_head != NULL) + fxp_start(ifp); + } } #if defined(__NetBSD__) return (claimed); |