mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
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.
This commit is contained in:
parent
36122d2d57
commit
78fb85bbf7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18553
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user