Subject: de driver lossage, machines hanging
To: None <port-i386@NetBSD.ORG, port-alpha@NetBSD.ORG>
From: Charles M. Hannum <mycroft@mit.edu>
List: current-users
Date: 04/02/1998 08:50:36
Those of you with `de' cards may be interested to know that I've
tracked down a bug that caused machines to `hang' after receiving a
certain number of bad ethernet packets. Attached is a diff, which
will be in tonight's update.
(This driver is *way* over-engineered. *sigh*)
Index: if_de.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_de.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -c -2 -r1.65 -r1.66
*** if_de.c 1998/03/29 22:36:43 1.65
--- if_de.c 1998/04/02 13:49:32 1.66
***************
*** 1,3 ****
! /* $NetBSD: if_de.c,v 1.65 1998/03/29 22:36:43 mycroft Exp $ */
/*-
--- 1,3 ----
! /* $NetBSD: if_de.c,v 1.66 1998/04/02 13:49:32 mycroft Exp $ */
/*-
***************
*** 3509,3512 ****
--- 3509,3521 ----
#endif
}
+
+ #if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NORX)
+ map = M_GETCTX(me, bus_dmamap_t);
+ bus_dmamap_unload(sc->tulip_dmatag, map);
+ sc->tulip_rxmaps[sc->tulip_rxmaps_free++] = map;
+ #if defined(DIAGNOSTIC)
+ M_SETCTX(me, NULL);
+ #endif
+ #endif /* TULIP_BUS_DMA */
}
next: