Home | History | Annotate | Line # | Download | only in dev
if_aereg.h revision 1.2
      1  1.1  briggs /*
      2  1.1  briggs  * National Semiconductor DS8390 NIC register definitions
      3  1.1  briggs  *
      4  1.2  briggs  * $Id: if_aereg.h,v 1.2 1994/03/01 15:24:26 briggs Exp $
      5  1.1  briggs  *
      6  1.1  briggs  * Modification history
      7  1.1  briggs  *
      8  1.2  briggs  * $Log: if_aereg.h,v $
      9  1.2  briggs  * Revision 1.2  1994/03/01 15:24:26  briggs
     10  1.2  briggs  * More Dayna separation.
     11  1.2  briggs  *
     12  1.2  briggs  * Revision 1.1  1993/11/29  00:32:46  briggs
     13  1.2  briggs  * Update to current work in progress.  This includes an update to
     14  1.2  briggs  * use config.new.
     15  1.2  briggs  * Numerous updates to console so it works better on the SE/30 screen.
     16  1.1  briggs  * Some nice changes from Brad Parker for handling NuBUS and an ethernet
     17  1.1  briggs  * driver that I haven't worked on, yet.
     18  1.1  briggs  *
     19  1.1  briggs  *
     20  1.1  briggs  */
     21  1.1  briggs 
     22  1.1  briggs /*
     23  1.1  briggs  * Page 0 register offsets
     24  1.1  briggs  */
     25  1.1  briggs #define AE_P0_CR	0x00	/* Command Register */
     26  1.1  briggs 
     27  1.1  briggs #define AE_P0_CLDA0	0x01	/* Current Local DMA Addr low (read) */
     28  1.1  briggs #define AE_P0_PSTART	0x01	/* Page Start register (write) */
     29  1.1  briggs 
     30  1.1  briggs #define AE_P0_CLDA1	0x02	/* Current Local DMA Addr high (read) */
     31  1.1  briggs #define AE_P0_PSTOP	0x02	/* Page Stop register (write) */
     32  1.1  briggs 
     33  1.1  briggs #define AE_P0_BNRY	0x03	/* Boundary Pointer */
     34  1.1  briggs 
     35  1.1  briggs #define AE_P0_TSR	0x04	/* Transmit Status Register (read) */
     36  1.1  briggs #define AE_P0_TPSR	0x04	/* Transmit Page Start (write) */
     37  1.1  briggs 
     38  1.1  briggs #define AE_P0_NCR	0x05	/* Number of Collisions Reg (read) */
     39  1.1  briggs #define AE_P0_TBCR0	0x05	/* Transmit Byte count, low (write) */
     40  1.1  briggs 
     41  1.1  briggs #define AE_P0_FIFO	0x06	/* FIFO register (read) */
     42  1.1  briggs #define AE_P0_TBCR1	0x06	/* Transmit Byte count, high (write) */
     43  1.1  briggs 
     44  1.1  briggs #define AE_P0_ISR	0x07	/* Interrupt Status Register */
     45  1.1  briggs 
     46  1.1  briggs #define AE_P0_CRDA0	0x08	/* Current Remote DMA Addr low (read) */
     47  1.1  briggs #define AE_P0_RSAR0	0x08	/* Remote Start Address low (write) */
     48  1.1  briggs 
     49  1.1  briggs #define AE_P0_CRDA1	0x09	/* Current Remote DMA Addr high (read) */
     50  1.1  briggs #define AE_P0_RSAR1	0x09	/* Remote Start Address high (write) */
     51  1.1  briggs 
     52  1.1  briggs #define AE_P0_RBCR0	0x0a	/* Remote Byte Count low (write) */
     53  1.1  briggs 
     54  1.1  briggs #define AE_P0_RBCR1	0x0b	/* Remote Byte Count high (write) */
     55  1.1  briggs 
     56  1.1  briggs #define AE_P0_RSR	0x0c	/* Receive Status (read) */
     57  1.1  briggs #define AE_P0_RCR	0x0c	/* Receive Configuration Reg (write) */
     58  1.1  briggs 
     59  1.1  briggs #define AE_P0_CNTR0	0x0d	/* frame alignment error counter (read) */
     60  1.1  briggs #define AE_P0_TCR	0x0d	/* Transmit Configuration Reg (write) */
     61  1.1  briggs 
     62  1.1  briggs #define AE_P0_CNTR1	0x0e	/* CRC error counter (read) */
     63  1.1  briggs #define AE_P0_DCR	0x0e	/* Data Configuration Reg (write) */
     64  1.1  briggs 
     65  1.1  briggs #define AE_P0_CNTR2	0x0f	/* missed packet counter (read) */
     66  1.1  briggs #define AE_P0_IMR	0x0f	/* Interrupt Mask Register (write) */
     67  1.1  briggs 
     68  1.1  briggs /*
     69  1.1  briggs  * Page 1 register offsets
     70  1.1  briggs  */
     71  1.1  briggs #define AE_P1_CR	0x00	/* Command Register */
     72  1.1  briggs #define AE_P1_PAR0	0x01	/* Physical Address Register 0 */
     73  1.1  briggs #define AE_P1_PAR1	0x02	/* Physical Address Register 1 */
     74  1.1  briggs #define AE_P1_PAR2	0x03	/* Physical Address Register 2 */
     75  1.1  briggs #define AE_P1_PAR3	0x04	/* Physical Address Register 3 */
     76  1.1  briggs #define AE_P1_PAR4	0x05	/* Physical Address Register 4 */
     77  1.1  briggs #define AE_P1_PAR5	0x06	/* Physical Address Register 5 */
     78  1.1  briggs #define AE_P1_CURR	0x07	/* Current RX ring-buffer page */
     79  1.1  briggs #define AE_P1_MAR0	0x08	/* Multicast Address Register 0 */
     80  1.1  briggs #define AE_P1_MAR1	0x09	/* Multicast Address Register 1 */
     81  1.1  briggs #define AE_P1_MAR2	0x0a	/* Multicast Address Register 2 */
     82  1.1  briggs #define AE_P1_MAR3	0x0b	/* Multicast Address Register 3 */
     83  1.1  briggs #define AE_P1_MAR4	0x0c	/* Multicast Address Register 4 */
     84  1.1  briggs #define AE_P1_MAR5	0x0d	/* Multicast Address Register 5 */
     85  1.1  briggs #define AE_P1_MAR6	0x0e	/* Multicast Address Register 6 */
     86  1.1  briggs #define AE_P1_MAR7	0x0f	/* Multicast Address Register 7 */
     87  1.1  briggs 
     88  1.1  briggs /*
     89  1.1  briggs  * Page 2 register offsets
     90  1.1  briggs  */
     91  1.1  briggs #define AE_P2_CR	0x00	/* Command Register */
     92  1.1  briggs #define AE_P2_PSTART	0x01	/* Page Start (read) */
     93  1.1  briggs #define AE_P2_CLDA0	0x01	/* Current Local DMA Addr 0 (write) */
     94  1.1  briggs #define AE_P2_PSTOP	0x02	/* Page Stop (read) */
     95  1.1  briggs #define AE_P2_CLDA1	0x02	/* Current Local DMA Addr 1 (write) */
     96  1.1  briggs #define AE_P2_RNPP	0x03	/* Remote Next Packet Pointer */
     97  1.1  briggs #define AE_P2_TPSR	0x04	/* Transmit Page Start (read) */
     98  1.1  briggs #define AE_P2_LNPP	0x05	/* Local Next Packet Pointer */
     99  1.1  briggs #define AE_P2_ACU	0x06	/* Address Counter Upper */
    100  1.1  briggs #define AE_P2_ACL	0x07	/* Address Counter Lower */
    101  1.1  briggs #define AE_P2_RCR	0x0c	/* Receive Configuration Register (read) */
    102  1.1  briggs #define AE_P2_TCR	0x0d	/* Transmit Configuration Register (read) */
    103  1.1  briggs #define AE_P2_DCR	0x0e	/* Data Configuration Register (read) */
    104  1.1  briggs #define AE_P2_IMR	0x0f	/* Interrupt Mask Register (read) */
    105  1.1  briggs 
    106  1.1  briggs /*
    107  1.1  briggs  *		Command Register (CR) definitions
    108  1.1  briggs  */
    109  1.1  briggs 
    110  1.1  briggs /*
    111  1.1  briggs  * STP: SToP. Software reset command. Takes the controller offline. No
    112  1.1  briggs  *	packets will be received or transmitted. Any reception or
    113  1.1  briggs  *	transmission in progress will continue to completion before
    114  1.1  briggs  *	entering reset state. To exit this state, the STP bit must
    115  1.1  briggs  *	reset and the STA bit must be set. The software reset has
    116  1.1  briggs  *	executed only when indicated by the RST bit in the ISR being
    117  1.1  briggs  *	set.
    118  1.1  briggs  */
    119  1.1  briggs #define AE_CR_STP	0x01
    120  1.1  briggs 
    121  1.1  briggs /*
    122  1.1  briggs  * STA: STArt. This bit is used to activate the NIC after either power-up,
    123  1.1  briggs  *	or when the NIC has been put in reset mode by software command
    124  1.1  briggs  *	or error.
    125  1.1  briggs  */
    126  1.1  briggs #define AE_CR_STA	0x02
    127  1.1  briggs 
    128  1.1  briggs /*
    129  1.1  briggs  * TXP: Transmit Packet. This bit must be set to indicate transmission of
    130  1.1  briggs  *	a packet. TXP is internally reset either after the transmission is
    131  1.1  briggs  *	completed or aborted. This bit should be set only after the Transmit
    132  1.1  briggs  *	Byte Count and Transmit Page Start register have been programmed.
    133  1.1  briggs  */
    134  1.1  briggs #define AE_CR_TXP	0x04
    135  1.1  briggs 
    136  1.1  briggs /*
    137  1.1  briggs  * RD0, RD1, RD2: Remote DMA Command. These three bits control the operation
    138  1.1  briggs  *	of the remote DMA channel. RD2 can be set to abort any remote DMA
    139  1.1  briggs  *	command in progress. The Remote Byte Count registers should be cleared
    140  1.1  briggs  *	when a remote DMA has been aborted. The Remote Start Addresses are not
    141  1.1  briggs  *	restored to the starting address if the remote DMA is aborted.
    142  1.1  briggs  *
    143  1.1  briggs  *	RD2 RD1 RD0	function
    144  1.1  briggs  *	 0   0   0	not allowed
    145  1.1  briggs  *	 0   0   1	remote read
    146  1.1  briggs  *	 0   1   0	remote write
    147  1.1  briggs  *	 0   1   1	send packet
    148  1.1  briggs  *	 1   X   X	abort
    149  1.1  briggs  */
    150  1.1  briggs #define AE_CR_RD0	0x08
    151  1.1  briggs #define AE_CR_RD1	0x10
    152  1.1  briggs #define AE_CR_RD2	0x20
    153  1.1  briggs 
    154  1.1  briggs /*
    155  1.1  briggs  * PS0, PS1: Page Select. The two bits select which register set or 'page' to
    156  1.1  briggs  *	access.
    157  1.1  briggs  *
    158  1.1  briggs  *	PS1 PS0		page
    159  1.1  briggs  *	 0   0		0
    160  1.1  briggs  *	 0   1		1
    161  1.1  briggs  *	 1   0		2
    162  1.1  briggs  *	 1   1		reserved
    163  1.1  briggs  */
    164  1.1  briggs #define AE_CR_PS0	0x40
    165  1.1  briggs #define AE_CR_PS1	0x80
    166  1.1  briggs /* bit encoded aliases */
    167  1.1  briggs #define AE_CR_PAGE_0	0x00 /* (for consistency) */
    168  1.1  briggs #define AE_CR_PAGE_1	0x40
    169  1.1  briggs #define AE_CR_PAGE_2	0x80
    170  1.1  briggs 
    171  1.1  briggs /*
    172  1.1  briggs  *		Interrupt Status Register (ISR) definitions
    173  1.1  briggs  */
    174  1.1  briggs 
    175  1.1  briggs /*
    176  1.1  briggs  * PRX: Packet Received. Indicates packet received with no errors.
    177  1.1  briggs  */
    178  1.1  briggs #define AE_ISR_PRX	0x01
    179  1.1  briggs 
    180  1.1  briggs /*
    181  1.1  briggs  * PTX: Packet Transmitted. Indicates packet transmitted with no errors.
    182  1.1  briggs  */
    183  1.1  briggs #define AE_ISR_PTX	0x02
    184  1.1  briggs 
    185  1.1  briggs /*
    186  1.1  briggs  * RXE: Receive Error. Indicates that a packet was received with one or more
    187  1.1  briggs  *	the following errors: CRC error, frame alignment error, FIFO overrun,
    188  1.1  briggs  *	missed packet.
    189  1.1  briggs  */
    190  1.1  briggs #define AE_ISR_RXE	0x04
    191  1.1  briggs 
    192  1.1  briggs /*
    193  1.1  briggs  * TXE: Transmission Error. Indicates that an attempt to transmit a packet
    194  1.1  briggs  *	resulted in one or more of the following errors: excessive
    195  1.1  briggs  *	collisions, FIFO underrun.
    196  1.1  briggs  */
    197  1.1  briggs #define AE_ISR_TXE	0x08
    198  1.1  briggs 
    199  1.1  briggs /*
    200  1.1  briggs  * OVW: OverWrite. Indicates a receive ring-buffer overrun. Incoming network
    201  1.1  briggs  *	would exceed (has exceeded?) the boundry pointer, resulting in data
    202  1.1  briggs  *	that was previously received and not yet read from the buffer to be
    203  1.1  briggs  *	overwritten.
    204  1.1  briggs  */
    205  1.1  briggs #define AE_ISR_OVW	0x10
    206  1.1  briggs 
    207  1.1  briggs /*
    208  1.1  briggs  * CNT: Counter Overflow. Set when the MSB of one or more of the Network Talley
    209  1.1  briggs  *	Counters has been set.
    210  1.1  briggs  */
    211  1.1  briggs #define AE_ISR_CNT	0x20
    212  1.1  briggs 
    213  1.1  briggs /*
    214  1.1  briggs  * RDC: Remote Data Complete. Indicates that a Remote DMA operation has completed.
    215  1.1  briggs  */
    216  1.1  briggs #define AE_ISR_RDC	0x40
    217  1.1  briggs 
    218  1.1  briggs /*
    219  1.1  briggs  * RST: Reset status. Set when the NIC enters the reset state and cleared when a
    220  1.1  briggs  *	Start Command is issued to the CR. This bit is also set when a receive
    221  1.1  briggs  *	ring-buffer overrun (OverWrite) occurs and is cleared when one or more
    222  1.1  briggs  *	packets have been removed from the ring. This is a read-only bit.
    223  1.1  briggs  */
    224  1.1  briggs #define AE_ISR_RST	0x80
    225  1.1  briggs 
    226  1.1  briggs /*
    227  1.1  briggs  *		Interrupt Mask Register (IMR) definitions
    228  1.1  briggs  */
    229  1.1  briggs 
    230  1.1  briggs /*
    231  1.1  briggs  * PRXE: Packet Received interrupt Enable. If set, a received packet will cause
    232  1.1  briggs  *	an interrupt.
    233  1.1  briggs  */
    234  1.1  briggs #define AE_IMR_PRXE	0x01
    235  1.1  briggs 
    236  1.1  briggs /*
    237  1.1  briggs  * PTXE: Packet Transmit interrupt Enable. If set, an interrupt is generated when
    238  1.1  briggs  *	a packet transmission completes.
    239  1.1  briggs  */
    240  1.1  briggs #define AE_IMR_PTXE	0x02
    241  1.1  briggs 
    242  1.1  briggs /*
    243  1.1  briggs  * RXEE: Receive Error interrupt Enable. If set, an interrupt will occur whenever a
    244  1.1  briggs  *	packet is received with an error.
    245  1.1  briggs  */
    246  1.1  briggs #define AE_IMR_RXEE 	0x04
    247  1.1  briggs 
    248  1.1  briggs /*
    249  1.1  briggs  * TXEE: Transmit Error interrupt Enable. If set, an interrupt will occur whenever
    250  1.1  briggs  *	a transmission results in an error.
    251  1.1  briggs  */
    252  1.1  briggs #define AE_IMR_TXEE	0x08
    253  1.1  briggs 
    254  1.1  briggs /*
    255  1.1  briggs  * OVWE: OverWrite error interrupt Enable. If set, an interrupt is generated whenever
    256  1.1  briggs  *	the receive ring-buffer is overrun. i.e. when the boundry pointer is exceeded.
    257  1.1  briggs  */
    258  1.1  briggs #define AE_IMR_OVWE	0x10
    259  1.1  briggs 
    260  1.1  briggs /*
    261  1.1  briggs  * CNTE: Counter overflow interrupt Enable. If set, an interrupt is generated whenever
    262  1.1  briggs  *	the MSB of one or more of the Network Statistics counters has been set.
    263  1.1  briggs  */
    264  1.1  briggs #define AE_IMR_CNTE	0x20
    265  1.1  briggs 
    266  1.1  briggs /*
    267  1.1  briggs  * RDCE: Remote DMA Complete interrupt Enable. If set, an interrupt is generated
    268  1.1  briggs  *	when a remote DMA transfer has completed.
    269  1.1  briggs  */
    270  1.1  briggs #define AE_IMR_RDCE	0x40
    271  1.1  briggs 
    272  1.1  briggs /*
    273  1.1  briggs  * bit 7 is unused/reserved
    274  1.1  briggs  */
    275  1.1  briggs 
    276  1.1  briggs /*
    277  1.1  briggs  *		Data Configuration Register (DCR) definitions
    278  1.1  briggs  */
    279  1.1  briggs 
    280  1.1  briggs /*
    281  1.1  briggs  * WTS: Word Transfer Select. WTS establishes byte or word transfers for
    282  1.1  briggs  *	both remote and local DMA transfers
    283  1.1  briggs  */
    284  1.1  briggs #define AE_DCR_WTS	0x01
    285  1.1  briggs 
    286  1.1  briggs /*
    287  1.1  briggs  * BOS: Byte Order Select. BOS sets the byte order for the host.
    288  1.1  briggs  *	Should be 0 for 80x86, and 1 for 68000 series processors
    289  1.1  briggs  */
    290  1.1  briggs #define AE_DCR_BOS	0x02
    291  1.1  briggs 
    292  1.1  briggs /*
    293  1.1  briggs  * LAS: Long Address Select. When LAS is 1, the contents of the remote
    294  1.1  briggs  *	DMA registers RSAR0 and RSAR1 are used to provide A16-A31
    295  1.1  briggs  */
    296  1.1  briggs #define AE_DCR_LAS	0x04
    297  1.1  briggs 
    298  1.1  briggs #ifdef huh
    299  1.1  briggs /*
    300  1.1  briggs  * LS: Loopback Select. When 0, loopback mode is selected. Bits D1 and D2
    301  1.1  briggs  *	of the TCR must also be programmed for loopback operation.
    302  1.1  briggs  *	When 1, normal operation is selected.
    303  1.1  briggs  */
    304  1.1  briggs #define AE_DCR_LS	0x08
    305  1.1  briggs #endif
    306  1.1  briggs /*
    307  1.1  briggs  * BMS: Burst Mode Select
    308  1.1  briggs  */
    309  1.1  briggs #define AE_DCR_BMS	0x08
    310  1.1  briggs 
    311  1.1  briggs /*
    312  1.1  briggs  * AR: Auto-initialize Remote. When 0, data must be removed from ring-buffer
    313  1.1  briggs  *	under program control. When 1, remote DMA is automatically initiated
    314  1.1  briggs  *	and the boundry pointer is automatically updated
    315  1.1  briggs  */
    316  1.1  briggs #define AE_DCR_AR	0x10
    317  1.1  briggs 
    318  1.1  briggs /*
    319  1.1  briggs  * FT0, FT1: Fifo Threshold select.
    320  1.1  briggs  *		FT1	FT0	Word-width	Byte-width
    321  1.1  briggs  *		 0	 0	1 word		2 bytes
    322  1.1  briggs  *		 0	 1	2 words		4 bytes
    323  1.1  briggs  *		 1	 0	4 words		8 bytes
    324  1.1  briggs  *		 1	 1	8 words		12 bytes
    325  1.1  briggs  *
    326  1.1  briggs  *	During transmission, the FIFO threshold indicates the number of bytes
    327  1.1  briggs  *	or words that the FIFO has filled from the local DMA before BREQ is
    328  1.1  briggs  *	asserted. The transmission threshold is 16 bytes minus the receiver
    329  1.1  briggs  *	threshold.
    330  1.1  briggs  */
    331  1.1  briggs #define AE_DCR_FT0	0x20
    332  1.1  briggs #define AE_DCR_FT1	0x40
    333  1.1  briggs 
    334  1.1  briggs /*
    335  1.1  briggs  * bit 7 (0x80) is unused/reserved
    336  1.1  briggs  */
    337  1.1  briggs 
    338  1.1  briggs /*
    339  1.1  briggs  *		Transmit Configuration Register (TCR) definitions
    340  1.1  briggs  */
    341  1.1  briggs 
    342  1.1  briggs /*
    343  1.1  briggs  * CRC: Inhibit CRC. If 0, CRC will be appended by the transmitter, if 0, CRC
    344  1.1  briggs  *	is not appended by the transmitter.
    345  1.1  briggs  */
    346  1.1  briggs #define AE_TCR_CRC	0x01
    347  1.1  briggs 
    348  1.1  briggs /*
    349  1.1  briggs  * LB0, LB1: Loopback control. These two bits set the type of loopback that is
    350  1.1  briggs  *	to be performed.
    351  1.1  briggs  *
    352  1.1  briggs  *	LB1 LB0		mode
    353  1.1  briggs  *	 0   0		0 - normal operation (DCR_LS = 0)
    354  1.1  briggs  *	 0   1		1 - internal loopback (DCR_LS = 0)
    355  1.1  briggs  *	 1   0		2 - external loopback (DCR_LS = 1)
    356  1.1  briggs  *	 1   1		3 - external loopback (DCR_LS = 0)
    357  1.1  briggs  */
    358  1.1  briggs #define AE_TCR_LB0	0x02
    359  1.1  briggs #define AE_TCR_LB1	0x04
    360  1.1  briggs 
    361  1.1  briggs /*
    362  1.1  briggs  * ATD: Auto Transmit Disable. Clear for normal operation. When set, allows
    363  1.1  briggs  *	another station to disable the NIC's transmitter by transmitting to
    364  1.1  briggs  *	a multicast address hashing to bit 62. Reception of a multicast address
    365  1.1  briggs  *	hashing to bit 63 enables the transmitter.
    366  1.1  briggs  */
    367  1.1  briggs #define AE_TCR_ATD	0x08
    368  1.1  briggs 
    369  1.1  briggs /*
    370  1.1  briggs  * OFST: Collision Offset enable. This bit when set modifies the backoff
    371  1.1  briggs  *	algorithm to allow prioritization of nodes.
    372  1.1  briggs  */
    373  1.1  briggs #define AE_TCR_OFST	0x10
    374  1.1  briggs 
    375  1.1  briggs /*
    376  1.1  briggs  * bits 5, 6, and 7 are unused/reserved
    377  1.1  briggs  */
    378  1.1  briggs 
    379  1.1  briggs /*
    380  1.1  briggs  *		Transmit Status Register (TSR) definitions
    381  1.1  briggs  */
    382  1.1  briggs 
    383  1.1  briggs /*
    384  1.1  briggs  * PTX: Packet Transmitted. Indicates successful transmission of packet.
    385  1.1  briggs  */
    386  1.1  briggs #define AE_TSR_PTX	0x01
    387  1.1  briggs 
    388  1.1  briggs /*
    389  1.1  briggs  * bit 1 (0x02) is unused/reserved
    390  1.1  briggs  */
    391  1.1  briggs 
    392  1.1  briggs /*
    393  1.1  briggs  * COL: Transmit Collided. Indicates that the transmission collided at least
    394  1.1  briggs  *	once with another station on the network.
    395  1.1  briggs  */
    396  1.1  briggs #define AE_TSR_COL	0x04
    397  1.1  briggs 
    398  1.1  briggs /*
    399  1.1  briggs  * ABT: Transmit aborted. Indicates that the transmission was aborted due to
    400  1.1  briggs  *	excessive collisions.
    401  1.1  briggs  */
    402  1.1  briggs #define AE_TSR_ABT	0x08
    403  1.1  briggs 
    404  1.1  briggs /*
    405  1.1  briggs  * CRS: Carrier Sense Lost. Indicates that carrier was lost during the
    406  1.1  briggs  *	transmission of the packet. (Transmission is not aborted because
    407  1.1  briggs  *	of a loss of carrier)
    408  1.1  briggs  */
    409  1.1  briggs #define AE_TSR_CRS	0x10
    410  1.1  briggs 
    411  1.1  briggs /*
    412  1.1  briggs  * FU: FIFO Underrun. Indicates that the NIC wasn't able to access bus/
    413  1.1  briggs  *	transmission memory before the FIFO emptied. Transmission of the
    414  1.1  briggs  *	packet was aborted.
    415  1.1  briggs  */
    416  1.1  briggs #define AE_TSR_FU	0x20
    417  1.1  briggs 
    418  1.1  briggs /*
    419  1.1  briggs  * CDH: CD Heartbeat. Indicates that the collision detection circuitry
    420  1.1  briggs  *	isn't working correctly during a collision heartbeat test.
    421  1.1  briggs  */
    422  1.1  briggs #define AE_TSR_CDH	0x40
    423  1.1  briggs 
    424  1.1  briggs /*
    425  1.1  briggs  * OWC: Out of Window Collision: Indicates that a collision occurred after
    426  1.1  briggs  *	a slot time (51.2us). The transmission is rescheduled just as in
    427  1.1  briggs  *	normal collisions.
    428  1.1  briggs  */
    429  1.1  briggs #define AE_TSR_OWC	0x80
    430  1.1  briggs 
    431  1.1  briggs /*
    432  1.1  briggs  *		Receiver Configuration Register (RCR) definitions
    433  1.1  briggs  */
    434  1.1  briggs 
    435  1.1  briggs /*
    436  1.1  briggs  * SEP: Save Errored Packets. If 0, error packets are discarded. If set to 1,
    437  1.1  briggs  *	packets with CRC and frame errors are not discarded.
    438  1.1  briggs  */
    439  1.1  briggs #define AE_RCR_SEP	0x01
    440  1.1  briggs 
    441  1.1  briggs /*
    442  1.1  briggs  * AR: Accept Runt packet. If 0, packet with less than 64 byte are discarded.
    443  1.1  briggs  *	If set to 1, packets with less than 64 byte are not discarded.
    444  1.1  briggs  */
    445  1.1  briggs #define AE_RCR_AR	0x02
    446  1.1  briggs 
    447  1.1  briggs /*
    448  1.1  briggs  * AB: Accept Broadcast. If set, packets sent to the broadcast address will be
    449  1.1  briggs  *	accepted.
    450  1.1  briggs  */
    451  1.1  briggs #define AE_RCR_AB	0x04
    452  1.1  briggs 
    453  1.1  briggs /*
    454  1.1  briggs  * AM: Accept Multicast. If set, packets sent to a multicast address are checked
    455  1.1  briggs  *	for a match in the hashing array. If clear, multicast packets are ignored.
    456  1.1  briggs  */
    457  1.1  briggs #define AE_RCR_AM	0x08
    458  1.1  briggs 
    459  1.1  briggs /*
    460  1.1  briggs  * PRO: Promiscuous Physical. If set, all packets with a physical addresses are
    461  1.1  briggs  *	accepted. If clear, a physical destination address must match this
    462  1.1  briggs  *	station's address. Note: for full promiscuous mode, RCR_AB and RCR_AM
    463  1.1  briggs  *	must also be set. In addition, the multicast hashing array must be set
    464  1.1  briggs  *	to all 1's so that all multicast addresses are accepted.
    465  1.1  briggs  */
    466  1.1  briggs #define AE_RCR_PRO	0x10
    467  1.1  briggs 
    468  1.1  briggs /*
    469  1.1  briggs  * MON: Monitor Mode. If set, packets will be checked for good CRC and framing,
    470  1.1  briggs  *	but are not stored in the ring-buffer. If clear, packets are stored (normal
    471  1.1  briggs  *	operation).
    472  1.1  briggs  */
    473  1.1  briggs #define AE_RCR_MON	0x20
    474  1.1  briggs 
    475  1.1  briggs /*
    476  1.1  briggs  * bits 6 and 7 are unused/reserved.
    477  1.1  briggs  */
    478  1.1  briggs 
    479  1.1  briggs /*
    480  1.1  briggs  *		Receiver Status Register (RSR) definitions
    481  1.1  briggs  */
    482  1.1  briggs 
    483  1.1  briggs /*
    484  1.1  briggs  * PRX: Packet Received without error.
    485  1.1  briggs  */
    486  1.1  briggs #define AE_RSR_PRX	0x01
    487  1.1  briggs 
    488  1.1  briggs /*
    489  1.1  briggs  * CRC: CRC error. Indicates that a packet has a CRC error. Also set for frame
    490  1.1  briggs  *	alignment errors.
    491  1.1  briggs  */
    492  1.1  briggs #define AE_RSR_CRC	0x02
    493  1.1  briggs 
    494  1.1  briggs /*
    495  1.1  briggs  * FAE: Frame Alignment Error. Indicates that the incoming packet did not end on
    496  1.1  briggs  *	a byte boundry and the CRC did not match at the last byte boundry.
    497  1.1  briggs  */
    498  1.1  briggs #define AE_RSR_FAE	0x04
    499  1.1  briggs 
    500  1.1  briggs /*
    501  1.1  briggs  * FO: FIFO Overrun. Indicates that the FIFO was not serviced (during local DMA)
    502  1.1  briggs  *	causing it to overrun. Reception of the packet is aborted.
    503  1.1  briggs  */
    504  1.1  briggs #define AE_RSR_FO	0x08
    505  1.1  briggs 
    506  1.1  briggs /*
    507  1.1  briggs  * MPA: Missed Packet. Indicates that the received packet couldn't be stored in
    508  1.1  briggs  *	the ring-buffer because of insufficient buffer space (exceeding the
    509  1.1  briggs  *	boundry pointer), or because the transfer to the ring-buffer was inhibited
    510  1.1  briggs  *	by RCR_MON - monitor mode.
    511  1.1  briggs  */
    512  1.1  briggs #define AE_RSR_MPA	0x10
    513  1.1  briggs 
    514  1.1  briggs /*
    515  1.1  briggs  * PHY: Physical address. If 0, the packet received was sent to a physical address.
    516  1.1  briggs  *	If 1, the packet was accepted because of a multicast/broadcast address
    517  1.1  briggs  *	match.
    518  1.1  briggs  */
    519  1.1  briggs #define AE_RSR_PHY	0x20
    520  1.1  briggs 
    521  1.1  briggs /*
    522  1.1  briggs  * DIS: Receiver Disabled. Set to indicate that the receiver has enetered monitor
    523  1.1  briggs  *	mode. Cleared when the receiver exits monitor mode.
    524  1.1  briggs  */
    525  1.1  briggs #define AE_RSR_DIS	0x40
    526  1.1  briggs 
    527  1.1  briggs /*
    528  1.1  briggs  * DFR: Deferring. Set to indicate a 'jabber' condition. The CRS and COL inputs
    529  1.1  briggs  *	are active, and the transceiver has set the CD line as a result of the
    530  1.1  briggs  *	jabber.
    531  1.1  briggs  */
    532  1.1  briggs #define AE_RSR_DFR	0x80
    533  1.1  briggs 
    534  1.1  briggs /*
    535  1.1  briggs  * receive ring discriptor
    536  1.1  briggs  *
    537  1.1  briggs  * The National Semiconductor DS8390 Network interface controller uses
    538  1.1  briggs  * the following receive ring headers.  The way this works is that the
    539  1.1  briggs  * memory on the interface card is chopped up into 256 bytes blocks.
    540  1.1  briggs  * A contiguous portion of those blocks are marked for receive packets
    541  1.1  briggs  * by setting start and end block #'s in the NIC.  For each packet that
    542  1.1  briggs  * is put into the receive ring, one of these headers (4 bytes each) is
    543  1.1  briggs  * tacked onto the front.
    544  1.1  briggs  */
    545  1.1  briggs struct ae_ring	{
    546  1.1  briggs 	u_char	rcv_status;		/* received packet status	*/
    547  1.1  briggs 	u_char	next_packet;		/* pointer to next packet	*/
    548  1.1  briggs 	u_char	count[2];		/* bytes in packet (length + 4)	*/
    549  1.1  briggs };
    550  1.1  briggs 
    551  1.1  briggs /*
    552  1.1  briggs  * 				Common constants
    553  1.1  briggs  */
    554  1.1  briggs #define AE_PAGE_SIZE		256		/* Size of RAM pages in bytes */
    555  1.1  briggs #define AE_TXBUF_SIZE		6		/* Size of TX buffer in pages */
    556  1.1  briggs 
    557  1.2  briggs /*
    558  1.1  briggs  * Vendor types
    559  1.1  briggs  */
    560  1.2  briggs #define AE_VENDOR_UNKNOWN	0xFF		/* Unknown network card */
    561  1.1  briggs #define AE_VENDOR_APPLE		0x00		/* Apple Ethernet card */
    562  1.1  briggs #define AE_VENDOR_INTERLAN	0x01		/* Interlan A310 card (GatorCard) */
    563  1.1  briggs #define AE_VENDOR_DAYNA		0x02		/* DaynaPORT E/30s (and others?) */
    564  1.1  briggs 
    565  1.1  briggs /*
    566  1.1  briggs  * Compile-time config flags
    567  1.1  briggs  */
    568  1.1  briggs /*
    569  1.1  briggs  * this sets the default for enabling/disablng the tranceiver
    570  1.1  briggs  */
    571  1.1  briggs #define AE_FLAGS_DISABLE_TRANCEIVER	0x01
    572  1.1  briggs 
    573  1.1  briggs /*
    574  1.1  briggs  * This disables the use of double transmit buffers.
    575  1.1  briggs  */
    576  1.1  briggs #define AE_FLAGS_NO_DOUBLE_BUFFERING	0x08
    577  1.1  briggs 
    578  1.1  briggs /* */
    579  1.1  briggs #define	GC_RESET_OFFSET		0x000c0000 /* writes here reset NIC */
    580  1.2  briggs #define	GC_ROM_OFFSET		0x000c0000 /* address prom */
    581  1.2  briggs #define GC_DATA_OFFSET		0x000d0000 /* Offset to NIC memory */
    582  1.2  briggs #define GC_NIC_OFFSET		0x000e0000 /* Offset to NIC registers */
    583  1.2  briggs 
    584  1.1  briggs #define DP_ROM_OFFSET		0x000f0000
    585  1.1  briggs #define DP_DATA_OFFSET		0x000d0000 /* Offset to SONIC memory */
    586  1.1  briggs #define DP_NIC_OFFSET		0x000e0000 /* Offset to SONIC registers */
    587  1.1  briggs 
    588              #define AE_ROM_OFFSET		0x000f0000
    589              #define AE_DATA_OFFSET		0x000d0000 /* Offset to NIC memory */
    590              #define AE_NIC_OFFSET		0x000e0000 /* Offset to NIC registers */
    591