Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sgimips/hpc Add interrupt counter for Seeq interrup...



details:   https://anonhg.NetBSD.org/src/rev/f4a7b6d28e42
branches:  trunk
changeset: 526368:f4a7b6d28e42
user:      rafal <rafal%NetBSD.org@localhost>
date:      Thu May 02 20:31:19 2002 +0000

description:
Add interrupt counter for Seeq interrupts; also, make sure to reset back to
"recieve only my frames & broadcasts" and clear the ALLMULTI flag if we have
no multicast addresses in our list.

diffstat:

 sys/arch/sgimips/hpc/if_sq.c |  10 +++++++++-
 sys/arch/sgimips/hpc/sqvar.h |   4 +++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diffs (57 lines):

diff -r 5e008ff95d91 -r f4a7b6d28e42 sys/arch/sgimips/hpc/if_sq.c
--- a/sys/arch/sgimips/hpc/if_sq.c      Thu May 02 20:26:49 2002 +0000
+++ b/sys/arch/sgimips/hpc/if_sq.c      Thu May 02 20:31:19 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sq.c,v 1.10 2002/03/13 13:12:27 simonb Exp $        */
+/*     $NetBSD: if_sq.c,v 1.11 2002/05/02 20:31:19 rafal Exp $ */
 
 /*
  * Copyright (c) 2001 Rafal K. Boni
@@ -258,6 +258,9 @@
                goto fail_6;
        }
 
+       evcnt_attach_dynamic(&sc->sq_intrcnt, EVCNT_TYPE_INTR, NULL,
+                                             self->dv_xname, "intr");
+
        if ((cpu_intr_establish(haa->ha_irq, IPL_NET, sq_intr, sc)) == NULL) {
                printf(": unable to establish interrupt!\n");
                goto fail_6;
@@ -438,7 +441,10 @@
        ETHER_FIRST_MULTI(step, ec, enm);
 
        if (enm == NULL) {
+               sc->sc_rxcmd &= ~RXCMD_REC_MASK;
                sc->sc_rxcmd |= RXCMD_REC_BROAD;
+
+               ifp->if_flags &= ~IFF_ALLMULTI;
                return;
        }
 
@@ -780,6 +786,8 @@
        if ((ifp->if_flags & IFF_RUNNING) == 0)
                return 0;
 
+       sc->sq_intrcnt.ev_count++;
+
        /* Always check for received packets */
        if (sq_rxintr(sc) != 0)
                handled++;
diff -r 5e008ff95d91 -r f4a7b6d28e42 sys/arch/sgimips/hpc/sqvar.h
--- a/sys/arch/sgimips/hpc/sqvar.h      Thu May 02 20:26:49 2002 +0000
+++ b/sys/arch/sgimips/hpc/sqvar.h      Thu May 02 20:31:19 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sqvar.h,v 1.3 2002/03/13 13:12:28 simonb Exp $ */
+/*     $NetBSD: sqvar.h,v 1.4 2002/05/02 20:31:19 rafal Exp $  */
 
 /*
  * Copyright (c) 2001 Rafal K. Boni
@@ -122,6 +122,8 @@
 
        u_int8_t                sc_rxcmd;       /* prototype rxcmd */
 
+       struct evcnt            sq_intrcnt;     /* count interrupts */
+
 #if NRND > 0
        rndsource_element_t     rnd_source;     /* random source */
 #endif



Home | Main Index | Thread Index | Old Index