aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bfe
diff options
context:
space:
mode:
authorMax Laier <mlaier@FreeBSD.org>2004-10-08 16:14:42 +0000
committerMax Laier <mlaier@FreeBSD.org>2004-10-08 16:14:42 +0000
commit22d0ab2ef8f105c1a4ce762c5df6ec17264c4e5b (patch)
treeed4084a8a1bf712a55ee3fbbfd4c4abc2d589c0d /sys/dev/bfe
parentbb2cd775ee98d0deb1c6db198cd78a37ff040e18 (diff)
Notes
Diffstat (limited to 'sys/dev/bfe')
-rw-r--r--sys/dev/bfe/if_bfe.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c
index ba69c541a6524..805cd2669e191 100644
--- a/sys/dev/bfe/if_bfe.c
+++ b/sys/dev/bfe/if_bfe.c
@@ -1357,7 +1357,7 @@ bfe_start(struct ifnet *ifp)
{
struct bfe_softc *sc;
struct mbuf *m_head = NULL;
- int idx;
+ int idx, queued = 0;
sc = ifp->if_softc;
idx = sc->bfe_tx_prod;
@@ -1393,6 +1393,8 @@ bfe_start(struct ifnet *ifp)
break;
}
+ queued++;
+
/*
* If there's a BPF listener, bounce a copy of this frame
* to him.
@@ -1400,15 +1402,18 @@ bfe_start(struct ifnet *ifp)
BPF_MTAP(ifp, m_head);
}
- sc->bfe_tx_prod = idx;
- /* Transmit - twice due to apparent hardware bug */
- CSR_WRITE_4(sc, BFE_DMATX_PTR, idx * sizeof(struct bfe_desc));
- CSR_WRITE_4(sc, BFE_DMATX_PTR, idx * sizeof(struct bfe_desc));
+ if (queued) {
+ sc->bfe_tx_prod = idx;
+ /* Transmit - twice due to apparent hardware bug */
+ CSR_WRITE_4(sc, BFE_DMATX_PTR, idx * sizeof(struct bfe_desc));
+ CSR_WRITE_4(sc, BFE_DMATX_PTR, idx * sizeof(struct bfe_desc));
+
+ /*
+ * Set a timeout in case the chip goes out to lunch.
+ */
+ ifp->if_timer = 5;
+ }
- /*
- * Set a timeout in case the chip goes out to lunch.
- */
- ifp->if_timer = 5;
BFE_UNLOCK(sc);
}