-/* $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 $ */
/*-
#include <net/bpfdesc.h>
#endif
+#define LEDEBUG 1
#include <dev/ic/am7990reg.h>
#include <dev/ic/am7990var.h>
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:
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);
}
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
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, "
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) {
bix = 0;
if (++sc->sc_no_td == sc->sc_ntbuf) {
+ printf("\nequal!\n");
ifp->if_flags |= IFF_OACTIVE;
break;
}