diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-01-14 18:14:15 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-01-14 18:14:15 +0000 |
commit | c0462b3c116de4545eaa156174431a39ed524d0d (patch) | |
tree | f6ce9f7ff6f21e703f88741d21932a4dff0c6953 /sys/dev/ic | |
parent | 6722be7d99de66cc41dbfed233d586b59f8a10f1 (diff) |
use PCI Memory Write and Invalidate; from bogdan@eastonline.ru, ok pascoe
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/fxp.c | 7 | ||||
-rw-r--r-- | sys/dev/ic/fxpreg.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/fxpvar.h | 3 |
3 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 9140fb11d68..7c0cbb78c65 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.63 2004/12/23 19:40:21 deraadt Exp $ */ +/* $OpenBSD: fxp.c,v 1.64 2005/01/14 18:14:12 deraadt Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -129,7 +129,7 @@ static u_char fxp_cb_config_template[] = { 0x16, /* 0 Byte count. */ 0x08, /* 1 Fifo limit */ 0x00, /* 2 Adaptive ifs */ - 0x00, /* 3 void1 */ + 0x00, /* 3 ctrl0 */ 0x00, /* 4 rx_dma_bytecount */ 0x80, /* 5 tx_dma_bytecount */ 0xb2, /* 6 ctrl 1*/ @@ -1312,6 +1312,9 @@ fxp_init(xsc) cbp->stripping |= 0x01; /* truncate rx packets */ } + if (sc->sc_flags & FXPF_MWI_ENABLE) + cbp->ctrl0 |= 0x01; /* enable PCI MWI command */ + if(!sc->phy_10Mbps_only) /* interface mode */ cbp->mediatype |= 0x01; else diff --git a/sys/dev/ic/fxpreg.h b/sys/dev/ic/fxpreg.h index 99f1cd81a0a..ffb02907684 100644 --- a/sys/dev/ic/fxpreg.h +++ b/sys/dev/ic/fxpreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fxpreg.h,v 1.7 2004/12/08 22:35:13 pascoe Exp $ */ +/* $OpenBSD: fxpreg.h,v 1.8 2005/01/14 18:14:12 deraadt Exp $ */ /* * Copyright (c) 1995, David Greenman @@ -129,7 +129,7 @@ struct fxp_cb_config { volatile u_int8_t byte_count; volatile u_int8_t fifo_limit; volatile u_int8_t adaptive_ifs; - volatile u_int8_t void1; + volatile u_int8_t ctrl0; volatile u_int8_t rx_dma_bytecount; volatile u_int8_t tx_dma_bytecount; volatile u_int8_t ctrl1; diff --git a/sys/dev/ic/fxpvar.h b/sys/dev/ic/fxpvar.h index bf7e0e1b819..6e274a417c0 100644 --- a/sys/dev/ic/fxpvar.h +++ b/sys/dev/ic/fxpvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fxpvar.h,v 1.20 2004/12/23 19:40:21 deraadt Exp $ */ +/* $OpenBSD: fxpvar.h,v 1.21 2005/01/14 18:14:12 deraadt Exp $ */ /* $NetBSD: if_fxpvar.h,v 1.1 1997/06/05 02:01:58 thorpej Exp $ */ /* @@ -104,6 +104,7 @@ struct fxp_softc { struct mbuf *rfa_headm; /* first mbuf in receive frame area */ struct mbuf *rfa_tailm; /* last mbuf in receive frame area */ int sc_flags; /* misc. flags */ +#define FXPF_MWI_ENABLE 0x10 /* enable use of PCI MWI command */ #define FXPF_DISABLE_STANDBY 0x20 /* currently need to work-around */ #define FXPF_UCODE 0x40 /* ucode load already attempted */ struct timeout stats_update_to; /* Pointer to timeout structure */ |