summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_nfe.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2007-09-12 00:42:05 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2007-09-12 00:42:05 +0000
commit056ba8db1525fb48fda4d90115f1b9bbc79788d6 (patch)
treea1331579c99cebcfdca08ae782d08b88df5ee97d /sys/dev/pci/if_nfe.c
parent5279663cb57b6885a68b717bda1acc300cbdafd0 (diff)
In nfe_start() do a fast return if IFF_OACTIVE is set, in
this case we need a Tx interrupt to clean up the DMA ring before if_start can be properly called. Diff based on a comment by & ok claudio@
Diffstat (limited to 'sys/dev/pci/if_nfe.c')
-rw-r--r--sys/dev/pci/if_nfe.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index d7555071272..4caf81c2a20 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.71 2007/09/07 19:05:05 damien Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.72 2007/09/12 00:42:04 jsg Exp $ */
/*-
* Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -999,6 +999,9 @@ nfe_start(struct ifnet *ifp)
int old = sc->txq.cur;
struct mbuf *m0;
+ if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
+ return;
+
for (;;) {
IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)