From 5b396aa2c05ae81de46a6ce45fe0f2960bc87721 Mon Sep 17 00:00:00 2001 From: cube Date: Mon, 24 Sep 2007 13:11:08 +0000 Subject: [PATCH] From OpenBSD, rev 1.72: 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. --- sys/dev/pci/if_nfe.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index 30d5fca5f71c..967782c13451 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_nfe.c,v 1.17 2007/09/01 07:32:30 dyoung Exp $ */ +/* $NetBSD: if_nfe.c,v 1.18 2007/09/24 13:11:08 cube Exp $ */ /* $OpenBSD: if_nfe.c,v 1.52 2006/03/02 09:04:00 jsg Exp $ */ /*- @@ -21,7 +21,7 @@ /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */ #include -__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.17 2007/09/01 07:32:30 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.18 2007/09/24 13:11:08 cube Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -1090,6 +1090,9 @@ nfe_start(struct ifnet *ifp) int old = sc->txq.queued; struct mbuf *m0; + if ((ifp->if_flags & (IFF_OACTIVE | IFF_RUNNING)) != IFF_RUNNING) + return; + for (;;) { IFQ_POLL(&ifp->if_snd, m0); if (m0 == NULL)