Date: Mon, 12 Jun 2000 11:16:18 -0700 (PDT) From: wpaul@FreeBSD.ORG (Bill Paul) To: asmodai@FreeBSD.org Cc: gibbs@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: kern/19106: Corruption of xl driver's TX chain during startup Message-ID: <20000612181618.87A1037B9F8@hub.freebsd.org> In-Reply-To: <200006111123.EAA20756@freefall.freebsd.org> from "asmodai@FreeBSD.org" at "Jun 11, 2000 04:23:45 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Hm. In most drivers, I bzero() the softc struct at the start of foo_attach() just to make sure there isn't any garbage lying around. For some reason, I'm not doing this in if_xl. It could be a coincidence that this has never bitten anyone before. Anyway, try the following patch: *** if_xl.c.orig Mon Jun 12 11:07:12 2000 --- if_xl.c Mon Jun 12 11:06:47 2000 *************** *** 1185,1190 **** --- 1185,1191 ---- sc = device_get_softc(dev); unit = device_get_unit(dev); + bzero(sc, sizeof(struct xl_softc)); /* * If this is a 3c905B, we have to check one extra thing. If this fixes the problem, then the memory allocated for the softc still has crap in it and I'm a doofus for not remembering to clear it. If the problem persists, something else is corrupting the softc space between xl_attach() and xl_init(), though offhand I don't know what that could be. -Bill 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?20000612181618.87A1037B9F8>