summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-03-09 09:33:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-03-09 09:33:05 +0000
commit2ee24866aabcf22dbcbf77400ba4e086d280586c (patch)
tree8951661ed1a7e3d9b3b24dafb4972f0556430bbe
parentbd6d9b4d35b41a143e2a5d90d10724707500130b (diff)
handle 128KB if_le chunks
-rw-r--r--sys/dev/ic/am7990.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c
index a14e780c117..d8e0df36fb5 100644
--- a/sys/dev/ic/am7990.c
+++ b/sys/dev/ic/am7990.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: am7990.c,v 1.10 1997/08/08 08:05:40 downsj Exp $ */
+/* $OpenBSD: am7990.c,v 1.11 1998/03/09 09:33:04 deraadt Exp $ */
/* $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $ */
/*-
@@ -156,6 +156,9 @@ am7990_config(sc)
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
+ if (sc->sc_memsize > 131072)
+ sc->sc_memsize = 131072;
+
switch (sc->sc_memsize) {
case 8192:
sc->sc_nrbuf = 4;
@@ -173,8 +176,12 @@ am7990_config(sc)
sc->sc_nrbuf = 32;
sc->sc_ntbuf = 8;
break;
+ case 131072:
+ sc->sc_nrbuf = 64;
+ sc->sc_ntbuf = 16;
+ break;
default:
- panic("am7990_config: weird memory size");
+ panic("am7990_config: weird memory size %d", sc->sc_memsize);
}
printf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr));