summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-05-14 10:14:45 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-05-14 10:14:45 +0000
commit75804769a3b77feb9fb2ac9d789d958f6d1b7a4a (patch)
treeb9a97647803bb05f1de62209fa6c2526eefb41b9 /sys/dev
parent30f45daf2267c919277347cee9e1d7955f732409 (diff)
trigger tx start routine when link goes up to prevent a lockup
situation when send queue is full and no rx interrupt happen. initial diff and tests by erik lax, <erik at halon.se>, ok jsg
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_em.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 35f9d414280..b3b2f4bc48b 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.262 2012/02/15 04:06:27 jsg Exp $ */
+/* $OpenBSD: if_em.c,v 1.263 2012/05/14 10:14:44 mikeb Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -877,9 +877,6 @@ em_intr(void *arg)
if (ifp->if_flags & IFF_RUNNING) {
em_rxeof(sc, -1);
em_txeof(sc);
- if (!IFQ_IS_EMPTY(&ifp->if_snd))
- em_start(ifp);
-
refill = 1;
}
@@ -897,6 +894,9 @@ em_intr(void *arg)
refill = 1;
}
+ if (ifp->if_flags & IFF_RUNNING && !IFQ_IS_EMPTY(&ifp->if_snd))
+ em_start(ifp);
+
if (refill && em_rxfill(sc)) {
/* Advance the Rx Queue #0 "Tail Pointer". */
E1000_WRITE_REG(&sc->hw, RDT, sc->last_rx_desc_filled);