diff options
author | dg <dg@FreeBSD.org> | 1996-09-29 10:20:45 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1996-09-29 10:20:45 +0000 |
commit | fbb6d9b1196f138f44e9a71d913293538a9b08c6 (patch) | |
tree | 9d86529a4770d4347d3b5a5bb2f7d2b384aab115 /sys/dev | |
parent | dd396da3765cd0ab85daa05836598c49952b2f56 (diff) | |
download | FreeBSD-src-fbb6d9b1196f138f44e9a71d913293538a9b08c6.zip FreeBSD-src-fbb6d9b1196f138f44e9a71d913293538a9b08c6.tar.gz |
Backed out one of my "performance optimizations" as it results in sometimes
not resuming the NIC as required for transmit. Thanks to Alan Cox
<alc@cs.rice.edu> for noticing this.
Added another performance optimization to compensate. :-)
Changed crscdt to 1...strange, but this seems to be needed for some reason
despite what the manual says.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 7d6d646..75bc852 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxp.c,v 1.18 1996/09/20 11:05:39 davidg Exp $ + * $Id: if_fxp.c,v 1.19 1996/09/22 11:48:54 davidg Exp $ */ /* @@ -418,7 +418,7 @@ fxp_start(ifp) struct fxp_csr *csr = sc->csr; struct fxp_cb_tx *txp; struct mbuf *m, *mb_head; - int segment; + int segment, first = 1; txloop: /* @@ -513,15 +513,19 @@ tbdinit: sc->tx_queued++; - if (csr->scb_cus == FXP_SCB_CUS_SUSPENDED) { + /* + * Only need to wait prior to the first resume command. + */ + if (first) { + first--; fxp_scb_wait(csr); - - /* - * Resume transmission. - */ - csr->scb_command = FXP_SCB_COMMAND_CU_RESUME; } + /* + * Resume transmission if suspended. + */ + csr->scb_command = FXP_SCB_COMMAND_CU_RESUME; + #if NBPFILTER > 0 /* * Pass packet to bpf if there is a listener. @@ -869,7 +873,7 @@ fxp_init(ifp) cbp->interfrm_spacing = 6; /* (96 bits of) interframe spacing */ cbp->promiscuous = prm; /* promiscuous mode */ cbp->bcast_disable = 0; /* (don't) disable broadcasts */ - cbp->crscdt = 0; /* (CRS only) */ + cbp->crscdt = 1; /* (CRS only) */ cbp->stripping = !prm; /* truncate rx packet to byte count */ cbp->padding = 1; /* (do) pad short tx packets */ cbp->rcv_crc_xfer = 0; /* (don't) xfer CRC to host */ |