summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-09-20 13:37:17 +0000
committerglebius <glebius@FreeBSD.org>2005-09-20 13:37:17 +0000
commitb167d0deb256033faa88cc97a11c9a80e5420b50 (patch)
treee759570c07f3b60489b16f3655679b57f9949fcb /sys/dev
parent26e32540faec71a26a4cc2da804430983342358d (diff)
downloadFreeBSD-src-b167d0deb256033faa88cc97a11c9a80e5420b50.zip
FreeBSD-src-b167d0deb256033faa88cc97a11c9a80e5420b50.tar.gz
Check IFF_DRV_RUNNING and presense of packets in queue before calling
em_start_locked(). This fixes panic on shutdown with active traffic passing through router. Sponsored by: Rambler
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/em/if_em.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 3fa1180..9d1a745 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -644,7 +644,9 @@ em_start(struct ifnet *ifp)
struct adapter *adapter = ifp->if_softc;
EM_LOCK(adapter);
- em_start_locked(ifp);
+ if (ifp->if_drv_flags & IFF_DRV_RUNNING &&
+ !IFQ_DRV_IS_EMPTY(&ifp->if_snd))
+ em_start_locked(ifp);
EM_UNLOCK(adapter);
return;
}
OpenPOWER on IntegriCloud