From 2ba5de1eb14c6e53a29e44df82cb2b5f0ed31546 Mon Sep 17 00:00:00 2001 From: thorpej Date: Thu, 28 Feb 2002 20:08:11 +0000 Subject: [PATCH] Change the default Rx FIFO drain threshold to 128 bytes; this reduces the likelihood of Rx FIFO overruns on machines with wimpy PCI busses, while still allowing the interface to burst with a reasonable size. --- sys/dev/pci/if_sip.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/dev/pci/if_sip.c b/sys/dev/pci/if_sip.c index bdf8336d6b22..ffa5fc88bf58 100644 --- a/sys/dev/pci/if_sip.c +++ b/sys/dev/pci/if_sip.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sip.c,v 1.46 2002/02/28 19:10:16 thorpej Exp $ */ +/* $NetBSD: if_sip.c,v 1.47 2002/02/28 20:08:11 thorpej Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.46 2002/02/28 19:10:16 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.47 2002/02/28 20:08:11 thorpej Exp $"); #include "bpfilter.h" @@ -907,19 +907,14 @@ SIP_DECL(attach)(struct device *parent, struct device *self, void *aux) sc->sc_tx_drain_thresh = 512 / 32; /* - * Initialize the Rx FIFO drain threshold. We want to start - * dumping the packet into memory very quickly, especially - * at Gigabot speeds (the value we use is very aggressive). + * Initialize the Rx FIFO drain threshold. + * * This is in units of 8 bytes. * * We should never set this value lower than 2; 14 bytes are * required to filter the packet. */ -#if 0 - sc->sc_rx_drain_thresh = 4; -#else - sc->sc_rx_drain_thresh = RXCFG_DRTH >> RXCFG_DRTH_SHIFT; -#endif + sc->sc_rx_drain_thresh = 128 / 8; #ifdef SIP_EVENT_COUNTERS /*