increased buffer size.
authorsmurph <smurph@openbsd.org>
Fri, 10 Mar 2000 00:53:58 +0000 (00:53 +0000)
committersmurph <smurph@openbsd.org>
Fri, 10 Mar 2000 00:53:58 +0000 (00:53 +0000)
sys/dev/ic/am7990.c

index ab4ecd3..3ec636f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: am7990.c,v 1.16 1999/12/08 06:08:04 itojun Exp $      */
+/*     $OpenBSD: am7990.c,v 1.17 2000/03/10 00:53:58 smurph Exp $      */
 /*     $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $     */
 
 /*-
@@ -68,6 +68,7 @@
 #include <net/bpfdesc.h>
 #endif
 
+#define LEDEBUG 1
 #include <dev/ic/am7990reg.h>
 #include <dev/ic/am7990var.h>
 
@@ -157,8 +158,8 @@ am7990_config(sc)
        bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
 #endif
 
-       if (sc->sc_memsize > 131072)
-               sc->sc_memsize = 131072;
+       if (sc->sc_memsize > 262144)
+               sc->sc_memsize = 262144;
 
        switch (sc->sc_memsize) {
        case 8192:
@@ -181,6 +182,10 @@ am7990_config(sc)
                sc->sc_nrbuf = 64;
                sc->sc_ntbuf = 16;
                break;
+       case 262144:
+               sc->sc_nrbuf = 128;
+               sc->sc_ntbuf = 32;
+               break;
        default:
                panic("am7990_config: weird memory size %d", sc->sc_memsize);
        }
@@ -544,7 +549,7 @@ am7990_rint(sc)
                            sc->sc_dev.dv_xname);
                        ifp->if_ierrors++;
                } else {
-#ifdef LEDEBUG
+#ifdef LEDEBUG1
                        if (sc->sc_debug)
                                am7990_recv_print(sc, sc->sc_last_rd);
 #endif
@@ -557,7 +562,7 @@ am7990_rint(sc)
                rmd.rmd3 = 0;
                (*sc->sc_copytodesc)(sc, &rmd, rp, sizeof(rmd));
 
-#ifdef LEDEBUG
+#ifdef LEDEBUG1
                if (sc->sc_debug)
                        printf("sc->sc_last_rd = %x, rmd: "
                               "ladr %04x, hadr %02x, flags %02x, "
@@ -665,15 +670,17 @@ am7990_intr(arg)
 
        isr = (*sc->sc_rdcsr)(sc, LE_CSR0);
 #ifdef LEDEBUG
-       if (sc->sc_debug)
+       if (sc->sc_debug){
                printf("%s: am7990_intr entering with isr=%04x\n",
                    sc->sc_dev.dv_xname, isr);
+               printf(" isr: 0x%b\n", isr, LE_C0_BITS);
+       }
 #endif
        if ((isr & LE_C0_INTR) == 0)
                return (0);
 
        (*sc->sc_wrcsr)(sc, LE_CSR0,
-           isr & (LE_C0_INEA | LE_C0_BABL | LE_C0_MISS | LE_C0_MERR |
+           isr & (LE_C0_INEA | LE_C0_BABL | LE_C0_CERR | LE_C0_MISS | LE_C0_MERR |
                   LE_C0_RINT | LE_C0_TINT | LE_C0_IDON));
        if (isr & LE_C0_ERR) {
                if (isr & LE_C0_BABL) {
@@ -813,6 +820,7 @@ am7990_start(ifp)
                        bix = 0;
 
                if (++sc->sc_no_td == sc->sc_ntbuf) {
+                       printf("\nequal!\n");
                        ifp->if_flags |= IFF_OACTIVE;
                        break;
                }