Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/ibm4xx/dev In emac_txeob_intr():



details:   https://anonhg.NetBSD.org/src/rev/4958d4726233
branches:  trunk
changeset: 573189:4958d4726233
user:      simonb <simonb%NetBSD.org@localhost>
date:      Fri Jan 21 15:15:20 2005 +0000

description:
In emac_txeob_intr():
 - return 1 if we processed any completed tx packets.
 - try to get more packets going by calling emac_start().

diffstat:

 sys/arch/powerpc/ibm4xx/dev/if_emac.c |  22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diffs (71 lines):

diff -r 2508e93993b5 -r 4958d4726233 sys/arch/powerpc/ibm4xx/dev/if_emac.c
--- a/sys/arch/powerpc/ibm4xx/dev/if_emac.c     Fri Jan 21 15:10:16 2005 +0000
+++ b/sys/arch/powerpc/ibm4xx/dev/if_emac.c     Fri Jan 21 15:15:20 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_emac.c,v 1.19 2004/10/30 18:08:35 thorpej Exp $     */
+/*     $NetBSD: if_emac.c,v 1.20 2005/01/21 15:15:20 simonb Exp $      */
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.19 2004/10/30 18:08:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.20 2005/01/21 15:15:20 simonb Exp $");
 
 #include "bpfilter.h"
 
@@ -1163,14 +1163,17 @@
 static int
 emac_txeob_intr(void *arg)
 {
-#ifdef EMAC_EVENT_COUNTERS
        struct emac_softc *sc = arg;
-#endif
+       struct ifnet *ifp = &sc->sc_ethercom.ec_if;
+       int handled;
 
        EMAC_EVCNT_INCR(&sc->sc_ev_txintr);
-       emac_txreap(arg);
+       handled = emac_txreap(arg);
 
-       return (0);
+       /* try to get more packets going */
+       emac_start(ifp);
+
+       return (handled);
        
 }
 
@@ -1182,10 +1185,11 @@
 {
        struct ifnet *ifp = &sc->sc_ethercom.ec_if;
        struct emac_txsoft *txs;
-       int i;
+       int handled, i;
        u_int32_t txstat;
 
        EMAC_EVCNT_INCR(&sc->sc_ev_txreap);
+       handled = 0;
 
        /* Clear the interrupt */
        mtdcr(DCR_MAL0_TXEOBISR, mfdcr(DCR_MAL0_TXEOBISR));
@@ -1208,6 +1212,8 @@
                if (txstat & MAL_TX_READY)
                        break;
 
+               handled = 1;
+
                /*
                 * Check for errors and collisions.
                 */
@@ -1258,7 +1264,7 @@
        if (sc->sc_txsfree == EMAC_TXQUEUELEN)
                ifp->if_timer = 0;
 
-       return (0);
+       return (handled);
 }
 
 /*



Home | Main Index | Thread Index | Old Index