mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
Latest version from Matt Thomas. This version works with the newer
DC21041 NICs and with ZNYX cards. Submitted by: Matt Thomas
This commit is contained in:
parent
0bf30bc7b2
commit
86d61837c8
1123
sys/dev/de/if_de.c
1123
sys/dev/de/if_de.c
File diff suppressed because it is too large
Load Diff
@ -21,36 +21,15 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: dc21040.h,v 1.3 1995/05/05 19:44:34 thomas Exp $
|
||||
*
|
||||
* $Log: dc21040.h,v $
|
||||
* Revision 1.3 1995/05/05 19:44:34 thomas
|
||||
* cogent em100 support
|
||||
*
|
||||
* Revision 1.1 1994/10/01 20:16:45 wollman
|
||||
* Add Matt Thomas's DC21040 PCI Ethernet driver. (This is turning out
|
||||
* to be quite a popular chip, so expect to see a number of products
|
||||
* based on it.)
|
||||
*
|
||||
* Revision 1.2 1994/08/15 20:42:25 thomas
|
||||
* misc additions
|
||||
*
|
||||
* Revision 1.1 1994/08/12 21:02:46 thomas
|
||||
* Initial revision
|
||||
*
|
||||
* Revision 1.8 1994/08/05 20:20:54 thomas
|
||||
* Enable change log
|
||||
*
|
||||
* Revision 1.7 1994/08/05 20:20:14 thomas
|
||||
* *** empty log message ***
|
||||
* $Id: dc21040.h,v 1.4 1995/05/05 20:09:48 davidg Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(_DC21040_H)
|
||||
#define _DC21040_H
|
||||
|
||||
typedef signed int tulip_sint32_t;
|
||||
typedef unsigned int tulip_uint32_t;
|
||||
typedef unsigned short tulip_uint16_t;
|
||||
typedef unsigned int tulip_uint32_t;
|
||||
|
||||
#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
|
||||
#define TULIP_BITFIELD2(a, b) b, a
|
||||
@ -182,6 +161,7 @@ typedef struct {
|
||||
#define TULIP_STS_RXNOBUF 0x00000080L /* (RW) Receive Buffer Unavailable */
|
||||
#define TULIP_STS_RXINTR 0x00000040L /* (RW) Receive Interrupt */
|
||||
#define TULIP_STS_TXUNDERFLOW 0x00000020L /* (RW) Transmit Underflow */
|
||||
#define TULIP_STS_LINKPASS 0x00000010L /* (RW) LinkPass (DC21041) */
|
||||
#define TULIP_STS_TXBABBLE 0x00000008L /* (RW) Transmit Jabber Timeout */
|
||||
#define TULIP_STS_TXNOBUF 0x00000004L /* (RW) Transmit Buffer Unavailable */
|
||||
#define TULIP_STS_TXSTOPPED 0x00000002L /* (RW) Transmit Process Stopped */
|
||||
@ -197,6 +177,7 @@ typedef struct {
|
||||
#define TULIP_CMD_STOREFWD 0x00200000L /* (RW) Store and Foward (DC21140) */
|
||||
#define TULIP_CMD_NOHEARTBEAT 0x00080000L /* (RW) No Heartbeat (DC21140) */
|
||||
#define TULIP_CMD_PORTSELECT 0x00040000L /* (RW) Post Select (100Mb) (DC21140) */
|
||||
#define TULIP_CMD_ENHCAPTEFFCT 0x00040000L /* (RW) Enhanced Capture Effecty (DC21041) */
|
||||
#define TULIP_CMD_CAPTREFFCT 0x00020000L /* (RW) Capture Effect (!802.3) */
|
||||
#define TULIP_CMD_BACKPRESSURE 0x00010000L /* (RW) Back Pressure (!802.3) (DC21040) */
|
||||
#define TULIP_CMD_THRESHOLDCTL 0x0000C000L /* (RW) Threshold Control */
|
||||
@ -207,7 +188,7 @@ typedef struct {
|
||||
#define TULIP_CMD_TXRUN 0x00002000L /* (RW) Start/Stop Transmitter */
|
||||
#define TULIP_CMD_FORCECOLL 0x00001000L /* (RW) Force Collisions */
|
||||
#define TULIP_CMD_OPERMODE 0x00000C00L /* (RW) Operating Mode */
|
||||
#define TULIP_CMD_FULLDULPEX 0x00000200L /* (RW) Full Duplex Mode */
|
||||
#define TULIP_CMD_FULLDUPLEX 0x00000200L /* (RW) Full Duplex Mode */
|
||||
#define TULIP_CMD_FLAKYOSCDIS 0x00000100L /* (RW) Flakey Oscillator Disable */
|
||||
#define TULIP_CMD_ALLMULTI 0x00000080L /* (RW) Pass All Multicasts */
|
||||
#define TULIP_CMD_PROMISCUOUS 0x00000040L /* (RW) Promiscuous Mode */
|
||||
@ -219,12 +200,26 @@ typedef struct {
|
||||
#define TULIP_CMD_HASHPRFCTFLTR 0x00000001L /* (R ) Hash/Perfect Receive Filtering */
|
||||
|
||||
|
||||
#define TULIP_SIASTS_OTHERRXACTIVITY 0x00000200L
|
||||
#define TULIP_SIASTS_RXACTIVITY 0x00000100L
|
||||
#define TULIP_SIASTS_LINKFAIL 0x00000004L
|
||||
#define TULIP_SIACONN_RESET 0x00000000L
|
||||
|
||||
#define TULIP_SIACONN_AUI 0x0000000DL
|
||||
#define TULIP_SIACONN_10BASET 0x00000005L
|
||||
|
||||
#define TULIP_DC21041_SIACONN_10BASET 0x0000EF01L
|
||||
#define TULIP_DC21041_SIATXRX_10BASET 0x0000FF3FL
|
||||
#define TULIP_DC21041_SIAGEN_10BASET 0x00000000L
|
||||
|
||||
#define TULIP_DC21041_SIACONN_AUI 0x0000EF09L
|
||||
#define TULIP_DC21041_SIATXRX_AUI 0x0000F73DL
|
||||
#define TULIP_DC21041_SIAGEN_AUI 0x0000000EL
|
||||
|
||||
#define TULIP_DC21041_SIACONN_BNC 0x0000EF09L
|
||||
#define TULIP_DC21041_SIATXRX_BNC 0x0000F73DL
|
||||
#define TULIP_DC21041_SIAGEN_BNC 0x00000006L
|
||||
|
||||
#define TULIP_BUSMODE_SWRESET 0x00000001L
|
||||
#define TULIP_BUSMODE_DESCSKIPLEN_MASK 0x0000007CL
|
||||
#define TULIP_BUSMODE_BIGENDIAN 0x00000080L
|
||||
@ -241,19 +236,23 @@ typedef struct {
|
||||
#define TULIP_BUSMODE_CACHE_ALIGN16 0x00008000L
|
||||
#define TULIP_BUSMODE_CACHE_ALIGN32 0x0000C000L
|
||||
#define TULIP_BUSMODE_TXPOLL_NEVER 0x00000000L
|
||||
#define TULIP_BUSMODE_TXPOLL_200us 0x00020000L
|
||||
#define TULIP_BUSMODE_TXPOLL_800us 0x00040000L
|
||||
#define TULIP_BUSMODE_TXPOLL_1600us 0x00060000L
|
||||
|
||||
#define TULIP_BUSMODE_TXPOLL_200000ns 0x00020000L
|
||||
#define TULIP_BUSMODE_TXPOLL_800000ns 0x00040000L
|
||||
#define TULIP_BUSMODE_TXPOLL_1600000ns 0x00060000L
|
||||
#define TULIP_BUSMODE_TXPOLL_12800ns 0x00080000L /* DC21041 only */
|
||||
#define TULIP_BUSMODE_TXPOLL_25600ns 0x000A0000L /* DC21041 only */
|
||||
#define TULIP_BUSMODE_TXPOLL_51200ns 0x000C0000L /* DC21041 only */
|
||||
#define TULIP_BUSMODE_TXPOLL_102400ns 0x000E0000L /* DC21041 only */
|
||||
#define TULIP_BUSMODE_DESC_BIGENDIAN 0x00100000L /* DC21041 only */
|
||||
|
||||
/*
|
||||
* These are the defintitions used for the DEC DC21140
|
||||
* evaluation board.
|
||||
*/
|
||||
#define TULIP_GP_EB_PINS 0x0000011F /* General Purpose Pin directions */
|
||||
#define TULIP_GP_EB_OK10 0x00000080 /* 10 Mb/sec Signal Detect gep<7> */
|
||||
#define TULIP_GP_EB_OK100 0x00000040 /* 100 Mb/sec Signal Detect gep<6> */
|
||||
#define TULIP_GP_EB_INIT 0x0000000B /* No loopback --- point-to-point */
|
||||
#define TULIP_GP_EB_PINS 0x0000011F /* General Purpose Pin directions */
|
||||
#define TULIP_GP_EB_OK10 0x00000080 /* 10 Mb/sec Signal Detect gep<7> */
|
||||
#define TULIP_GP_EB_OK100 0x00000040 /* 100 Mb/sec Signal Detect gep<6> */
|
||||
#define TULIP_GP_EB_INIT 0x0000000B /* No loopback --- point-to-point */
|
||||
|
||||
/*
|
||||
* There are the definitions used for the DEC DE500-XA
|
||||
@ -269,12 +268,27 @@ typedef struct {
|
||||
* These are the defintitions used for the Cogent EM100
|
||||
* DC21140 board.
|
||||
*/
|
||||
#define TULIP_GP_EM100_PINS 0x0000013F /* General Purpose Pin directions */
|
||||
#define TULIP_GP_EM100_INIT 0x00000009 /* No loopback --- point-to-point */
|
||||
#define TULIP_OUI_COGENT_0 0x00
|
||||
#define TULIP_OUI_COGENT_1 0x00
|
||||
#define TULIP_OUI_COGENT_2 0x94
|
||||
#define TULIP_COGENT_EM100_ID 0x12
|
||||
#define TULIP_GP_EM100_PINS 0x0000013F /* General Purpose Pin directions */
|
||||
#define TULIP_GP_EM100_INIT 0x00000009 /* No loopback --- point-to-point */
|
||||
#define TULIP_OUI_COGENT_0 0x00
|
||||
#define TULIP_OUI_COGENT_1 0x00
|
||||
#define TULIP_OUI_COGENT_2 0x92
|
||||
#define TULIP_COGENT_EM100_ID 0x12
|
||||
|
||||
|
||||
/*
|
||||
* These are the defintitions used for the Znyx ZX342
|
||||
* 10/100 board
|
||||
*/
|
||||
#define TULIP_GP_ZX34X_PINS 0x0000011F /* General Purpose Pin directions */
|
||||
#define TULIP_GP_ZX34X_OK10 0x00000080 /* 10 Mb/sec Signal Detect gep<7> */
|
||||
#define TULIP_GP_ZX34X_OK100 0x00000040 /* 100 Mb/sec Signal Detect gep<6> */
|
||||
#define TULIP_GP_ZX34X_INIT 0x00000009
|
||||
#define TULIP_OUI_ZNYX_0 0x00
|
||||
#define TULIP_OUI_ZNYX_1 0xC0
|
||||
#define TULIP_OUI_ZNYX_2 0x95
|
||||
|
||||
|
||||
/*
|
||||
* SROM definitions for the DC21140 and DC21041.
|
||||
*/
|
||||
@ -296,4 +310,24 @@ typedef struct {
|
||||
#define SROMCMD_RD 6
|
||||
|
||||
#define SROM_BITWIDTH 6
|
||||
|
||||
/*
|
||||
* Definitions for the DE425.
|
||||
*/
|
||||
#define DE425_CFID 0x08 /* Configuration Id */
|
||||
#define DE425_CFCS 0x0C /* Configuration Command-Status */
|
||||
#define DE425_CFRV 0x18 /* Configuration Revision */
|
||||
#define DE425_CFLT 0x1C /* Configuration Latency Timer */
|
||||
#define DE425_CBIO 0x28 /* Configuration Base IO Address */
|
||||
#define DE425_CFDA 0x2C /* Configuration Driver Area */
|
||||
#define DE425_ENETROM_OFFSET 0xC90 /* Offset in I/O space for ENETROM */
|
||||
#define DE425_CFG0 0xC88 /* IRQ register */
|
||||
|
||||
#define DEC_VENDORID 0x1011
|
||||
#define DC21040_CHIPID 0x0002
|
||||
#define DC21140_CHIPID 0x0009
|
||||
#define DC21041_CHIPID 0x0014
|
||||
#define PCI_VENDORID(x) ((x) & 0xFFFF)
|
||||
#define PCI_CHIPID(x) (((x) >> 16) & 0xFFFF)
|
||||
|
||||
#endif /* !defined(_DC21040_H) */
|
||||
|
1123
sys/pci/if_de.c
1123
sys/pci/if_de.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user