aboutsummaryrefslogtreecommitdiff
path: root/sys/pci
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1999-05-05 17:10:49 +0000
committerBill Paul <wpaul@FreeBSD.org>1999-05-05 17:10:49 +0000
commit724ee56a9309bd847c47189c88aa0c0dee5795b2 (patch)
tree99d0a80233873b9e658bde82791119d7f98ea95d /sys/pci
parent871cf3db01438021b2b57b20060390a51e866b64 (diff)
Notes
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_xl.c16
-rw-r--r--sys/pci/if_xlreg.h3
2 files changed, 14 insertions, 5 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index b76634735689..f5e95e97e714 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_xl.c,v 1.99 1999/05/04 20:29:58 wpaul Exp $
+ * $Id: if_xl.c,v 1.36 1999/05/05 17:05:06 wpaul Exp $
*/
/*
@@ -159,7 +159,7 @@
#if !defined(lint)
static const char rcsid[] =
- "$Id: if_xl.c,v 1.99 1999/05/04 20:29:58 wpaul Exp $";
+ "$Id: if_xl.c,v 1.36 1999/05/05 17:05:06 wpaul Exp $";
#endif
/*
@@ -2113,8 +2113,15 @@ static void xl_txeoc(sc)
* first generation 3c90X chips.
*/
CSR_WRITE_1(sc, XL_TX_FREETHRESH, XL_PACKET_SIZE >> 8);
+ if (txstat & XL_TXSTATUS_UNDERRUN &&
+ sc->xl_tx_thresh < XL_PACKET_SIZE) {
+ sc->xl_tx_thresh += XL_MIN_FRAMELEN;
+ printf("xl%d: tx underrun, increasing tx start"
+ " threshold to %d bytes\n", sc->xl_unit,
+ sc->xl_tx_thresh);
+ }
CSR_WRITE_2(sc, XL_COMMAND,
- XL_CMD_TX_SET_START|XL_MIN_FRAMELEN);
+ XL_CMD_TX_SET_START|sc->xl_tx_thresh);
if (sc->xl_type == XL_TYPE_905B) {
CSR_WRITE_2(sc, XL_COMMAND,
XL_CMD_SET_TX_RECLAIM|(XL_PACKET_SIZE >> 4));
@@ -2512,7 +2519,8 @@ static void xl_init(xsc)
CSR_WRITE_1(sc, XL_TX_FREETHRESH, XL_PACKET_SIZE >> 8);
/* Set the TX start threshold for best performance. */
- CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_SET_START|XL_MIN_FRAMELEN);
+ sc->xl_tx_thresh = XL_MIN_FRAMELEN;
+ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_SET_START|sc->xl_tx_thresh);
/*
* If this is a 3c905B, also set the tx reclaim threshold.
diff --git a/sys/pci/if_xlreg.h b/sys/pci/if_xlreg.h
index 312839942467..76614f9962b8 100644
--- a/sys/pci/if_xlreg.h
+++ b/sys/pci/if_xlreg.h
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_xlreg.h,v 1.27 1999/04/29 17:56:55 wpaul Exp $
+ * $Id: if_xlreg.h,v 1.15 1999/05/05 17:05:07 wpaul Exp $
*/
#define XL_EE_READ 0x0080 /* read, 5 bit address */
@@ -553,6 +553,7 @@ struct xl_softc {
u_int8_t xl_want_auto;
u_int8_t xl_autoneg;
u_int8_t xl_stats_no_timeout;
+ u_int16_t xl_tx_thresh;
caddr_t xl_ldata_ptr;
struct xl_list_data *xl_ldata;
struct xl_chain_data xl_cdata;