diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-24 04:24:37 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-24 04:24:37 +0000 |
commit | 9e230f0d02a97c0ea607c9b8ca40742c43de9ba5 (patch) | |
tree | 7ee4324b185edcc5c353dfd07dce42f4432bb2e2 /sys | |
parent | bc4e57d7da104517213d33ff2667a9df6067cc7e (diff) |
When releasing the tx buffers, walk through all of them, don't abort when
we find a descriptor with mb_head == NULL. It happens sometimes that we have
NOPs in the tx chains and normal buffers after the NOP.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/fxp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index a5e5da82d18..3848d746cf1 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.14 2001/05/24 03:32:51 art Exp $ */ +/* $OpenBSD: fxp.c,v 1.15 2001/05/24 04:24:36 art Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -995,10 +995,11 @@ fxp_stop(sc, drain) /* * Release any xmit buffers. */ - for (txp = sc->cbl_first; txp != NULL && txp->mb_head != NULL; - txp = txp->next) { - m_freem(txp->mb_head); - txp->mb_head = NULL; + txp = sc->cbl_base; + for (i = 0; i < FXP_NTXCB; i++) { + if (txp[i].mb_head != NULL) + m_freem(txp[i].mb_head); + txp[i].mb_head = NULL; } sc->tx_queued = 0; |