diff options
author | jkh <jkh@FreeBSD.org> | 1995-04-10 21:25:06 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-04-10 21:25:06 +0000 |
commit | f1537076e2271c9abaf52c7f34869dafc5fa39f3 (patch) | |
tree | 93a9ef34b999f83f97100bd258606a7e26082bd8 /sys/dev/ep | |
parent | f84d3527ca65139c87653cf8316df71e330b45b7 (diff) | |
download | FreeBSD-src-f1537076e2271c9abaf52c7f34869dafc5fa39f3.zip FreeBSD-src-f1537076e2271c9abaf52c7f34869dafc5fa39f3.tar.gz |
Performance enhancements and a redesign of the transmitter code.
Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>
Diffstat (limited to 'sys/dev/ep')
-rw-r--r-- | sys/dev/ep/if_ep.c | 25 | ||||
-rw-r--r-- | sys/dev/ep/if_epreg.h | 2 |
2 files changed, 25 insertions, 2 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 5096b87..68db808 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -38,7 +38,7 @@ */ /* - * March 28 1995 + * $Id: if_ep.c,v 1.13 1995/04/10 07:54:34 root Exp root $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -619,6 +619,16 @@ epinit(unit) outw(BASE + EP_COMMAND, SET_RX_EARLY_THRESH | sc->rx_early_thresh); /* + * These clever computations look very interesting + * but the fixed threshold gives near no output errors + * and if it as low as 16 bytes it gives the max. throughput. + * We think that processor is anyway quicker than Ethernet + * (and this should be true for any 386 and higher) + */ + + outw(BASE + EP_COMMAND, SET_TX_START_THRESH | 16); + + /* * Store up a bunch of mbuf's for use later. (MAX_MBS). First we free up * any that we had in case we're being called from intr or somewhere * else. @@ -692,7 +702,15 @@ startagain: /* compute the Tx start threshold for this packet */ sc->tx_start_thresh = len = (((len * (64 - sc->tx_rate)) >> 6) & ~3) + 16; +#if 0 + /* + * The following string does something strange with the card and + * we get a lot of output errors due to it so it's commented out + * and we use fixed threshold (see above) + */ + outw(BASE + EP_COMMAND, SET_TX_START_THRESH | len); +#endif for (top = m; m != 0; m = m->m_next) if(ep_ftst(F_ACCESS_32_BITS)) { @@ -757,6 +775,9 @@ epintr(unit) register struct ep_softc *sc = &ep_softc[unit]; struct ifnet *ifp = &sc->arpcom.ac_if; struct mbuf *m; + int x; + + x=splbio(); outw(BASE + EP_COMMAND, SET_INTR_MASK); /* disable all Ints */ @@ -793,6 +814,7 @@ rescan: printf("ep%d: Status: %x\n", unit, status); #endif epinit(unit); + splx(x); return; } if (status & S_TX_COMPLETE) { @@ -846,6 +868,7 @@ rescan: /* re-enable Ints */ outw(BASE + EP_COMMAND, SET_INTR_MASK | S_5_INTS); + splx(x); } void diff --git a/sys/dev/ep/if_epreg.h b/sys/dev/ep/if_epreg.h index c91c7ac..a905caa 100644 --- a/sys/dev/ep/if_epreg.h +++ b/sys/dev/ep/if_epreg.h @@ -31,7 +31,7 @@ */ /* - * March 28 1995 + * $Id: if_epreg.h,v 1.8 1995/04/10 07:48:03 root Exp root $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select |