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
This commit is contained in:
Gleb Smirnoff 2005-09-20 13:37:17 +00:00
parent d32484135d
commit aecb98c94d

View File

@ -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;
}