From 75804769a3b77feb9fb2ac9d789d958f6d1b7a4a Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Mon, 14 May 2012 10:14:45 +0000 Subject: 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, , ok jsg --- sys/dev/pci/if_em.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev') 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 @@ -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); -- cgit v1.2.3