summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-02-05 09:14:29 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-02-05 09:14:29 +0000
commit220e3d4ae32675950e930cc108d308328113c537 (patch)
treee2ac70b31df8a16ab66df748818cc57c1f40f3a6
parent91918ff993621184603f3f6c8cf78b0b9fdb6ac2 (diff)
fix nfe_txeof().
with these changes, the connection seems to work just fine. with help from jsg@
-rw-r--r--sys/dev/pci/if_nfe.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index 7bf9db47340..48c7063d7fa 100644
--- a/sys/dev/pci/if_nfe.c
+++ b/sys/dev/pci/if_nfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfe.c,v 1.13 2006/02/04 21:48:34 damien Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.14 2006/02/05 09:14:28 damien Exp $ */
/*-
* Copyright (c) 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -703,8 +703,7 @@ nfe_txeof(struct nfe_softc *sc)
struct nfe_tx_data *data;
uint16_t flags;
-/* XXX: should limit # iterations to NFE_TX_RING_COUNT */
- for (;;) {
+ while (txq->next != txq->cur) {
data = &sc->txq.data[sc->txq.next];
if (sc->sc_flags & NFE_40BIT_ADDR) {
@@ -719,7 +718,7 @@ nfe_txeof(struct nfe_softc *sc)
flags = letoh16(desc32->flags);
}
- if (!(flags & NFE_TX_VALID))
+ if (flags & NFE_TX_VALID)
break;
if ((sc->sc_flags & (NFE_JUMBO_SUP | NFE_40BIT_ADDR)) == 0) {