Date: Thu, 01 May 1997 23:11:02 -0600 From: "Justin T. Gibbs" <gibbs@plutotech.com> To: Richard Straka <straka@inficad.com> Cc: "Justin T. Gibbs" <gibbs@plutotech.com>, current@freebsd.org Subject: Re: ie driver fixes for EtherExpress 16 Message-ID: <199705020412.WAA29396@pluto.plutotech.com> In-Reply-To: Your message of "Thu, 01 May 1997 20:12:24 PDT." <Pine.BSI.3.95.970501194202.14582A-100000@user2.inficad.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>
>The following is a patch for if_ie.c which can be applied
>to the 2.2-970422-RELENG kernel to make it work with the
>EtherExpress 16 ethernet adapter. The patch does the
>following.
>
>1. Change the number of frame desciptors NFRAMES from 16
>to 8. This is consistent with the number of ether frame
>buffers NRXBUF (48) allocated. This solves the "descriptors
>out of sync" error while receiving.
The driver should really be changed so that this can be
configured dynamically at probe time. This would allow
you to take full advantage of the memory on the card.
This becomes important if you have multiple interfaces or
the box is busy.
>2. Commented out the at_shutdown call. This seems to be
>unnecessary. I have repeatedly rebooted between FreeBSD and
>DOS/Packet Driver and have not noticed any problems with
>the card settings. This solves the hang/panic at shutdown.
You can't boot Win95 after using FreeBSD without the shutdown
hook. The original contributor of that code hasn't been able
to reproduce this panic, so it would be nice if you could
put DDB in your kernel and determine what the cause is so
that the shutdown hook can remain but doesn't panic the system.
>3. Moved the interrupt acknowledge call to the top of the
>"event loop" in ieintr. This allows events to be recognized
>while current events are being processed. This solves the
>transmit problems.
This seems to be correct according to the ix driver. I
wish I had documentation on this though.
>4. Changed the initialization of the transmit buffers. Was
>hard coded for 2 buffers. Changed to initialize NTXBUF buffers.
>This would only be a problem if one wanted to increase NTXBUF
>from its current value of 2.
Watch your white space. You should be using tabs where appropriate
instead of spaces. Take a look at the style.9 man page for details.
(Not that much of if_ie.c conforms to style.9, but it is a good habit
to get into).
>5. Moved the block of code which take the adapter out of "loop
>back" mode to the very end of ieinit. This seems cleaner and
>may eliminate inadvertant packets sent during initialization.
>+
>+ /* take the ee16 out of loopback */
>+ {
>+ u_char bart_config;
>+
>+ if(ie->hard_type == IE_EE16) {
>+ bart_config = inb(PORT + IEE16_CONFIG);
>+ bart_config &= ~IEE16_BART_LOOPBACK;
This would look better as:
/* take the ee16 out of loopback */
if (ie->hard_type == IE_EE16) {
u_char bart_config;
bart_config = inb(PORT + IEE16_CONFIG);
bart_config &= ~IEE16_BART_LOOPBACK;
...
}
It seems strange to me to first start the receiver then take
the card out of loopback mode instead of the other way around.
--
Justin T. Gibbs
===========================================
FreeBSD: Turning PCs into workstations
===========================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705020412.WAA29396>
