Date: Wed, 22 Apr 1998 09:08:13 -0500 (CDT) From: Jim Lowe <james@miller.cs.uwm.edu> To: freebsd-bugs@FreeBSD.ORG Cc: jwd@unx.sas.com Subject: PCI attach of if_ed.c & if_lnc.c Message-ID: <199804221408.JAA07541@miller.cs.uwm.edu>
next in thread | raw e-mail | index | archive | help
I was having some trouble with attaching PCI versions of the Lance ethernet driver (it is crashing my system). I looked at the code and in if_lnc.c and there seems to be a problem. A similar problem exists in the if_ed.c driver. In the ed_attach_NE2000_pci and the lnc_attach_ne2100_pci routines there is some code which reads: if_lnc.c: struct lnc_softc *sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT); if (sc) bzero(sc, sizeof *sc); [...] if_ed.c: struct ed_softc *sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT); [...] bzero(sc, sizeof *sc); Shouldn't these routines be allocating and clearing the softc structure and not a pointer to the softc structure as below? if_lnc.c: struct lnc_softc *sc = malloc(sizeof sc, M_DEVBUF, M_NOWAIT); if (sc) bzero(sc, sizeof sc); [...] if_ed.c: struct ed_softc *sc = malloc(sizeof sc, M_DEVBUF, M_NOWAIT); [...] bzero(sc, sizeof sc); Thanks for taking the time to look into this. -Jim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804221408.JAA07541>