xref: /csrg-svn/sys/vax/if/if_ilreg.h (revision 6895)
1*6895Sfeldman /*	if_ilreg.h	4.1	82/05/21	*/
2*6895Sfeldman 
3*6895Sfeldman /*
4*6895Sfeldman  * Interlan Ethernet Communications Controller interface
5*6895Sfeldman  */
6*6895Sfeldman struct ildevice {
7*6895Sfeldman 	short	il_csr;		/* Command and Status Register */
8*6895Sfeldman 	short	il_bar;		/* Buffer Address Register */
9*6895Sfeldman 	short	il_bcr;		/* Byte Count Register */
10*6895Sfeldman };
11*6895Sfeldman 
12*6895Sfeldman /*
13*6895Sfeldman  * Command and status bits
14*6895Sfeldman  */
15*6895Sfeldman #define	IL_EUA		0xC000		/* Extended Unibus Address */
16*6895Sfeldman #define	IL_CMD		0x3f00		/* Command Function Code */
17*6895Sfeldman #define	IL_CDONE	0x0080		/* Command Done */
18*6895Sfeldman #define	IL_CIE		0x0040		/* Command Interrupt Enable */
19*6895Sfeldman #define	IL_RDONE	0x0020		/* Receive DMA Done */
20*6895Sfeldman #define	IL_RIE		0x0010		/* Receive Interrupt Enable */
21*6895Sfeldman #define	IL_STATUS	0x000f		/* Command Status Code */
22*6895Sfeldman 
23*6895Sfeldman #define	IL_BITS		"\10\10CDONE\7CIE\6RDONE\5RIE"
24*6895Sfeldman 
25*6895Sfeldman /* Command definitions */
26*6895Sfeldman 
27*6895Sfeldman #define	ILC_MLPBAK	0x0100		/* Set Module Interface Loopback Mode */
28*6895Sfeldman #define	ILC_ILPBAK	0x0200		/* Set Internal Loopback Mode */
29*6895Sfeldman #define	ILC_CLPBAK	0x0300		/* Clear Loopback Mode */
30*6895Sfeldman #define	ILC_PRMSC	0x0400		/* Set Promiscuous Receive Mode */
31*6895Sfeldman #define	ILC_CLPRMSC	0x0500		/* Clear Promiscuous Receive Mode */
32*6895Sfeldman #define	ILC_RCVERR	0x0600		/* Set Receive-On-Error Bit */
33*6895Sfeldman #define	ILC_CRCVERR	0x0700		/* Clear Receive-On-Error Bit */
34*6895Sfeldman #define	ILC_OFFLINE	0x0800		/* Go Offline */
35*6895Sfeldman #define	ILC_ONLINE	0x0900		/* Go Online */
36*6895Sfeldman #define	ILC_DIAG	0x0a00		/* Run On-board Diagnostics */
37*6895Sfeldman #define	ILC_STAT	0x1800		/* Report and Reset Statistics */
38*6895Sfeldman #define	ILC_DELAYS	0x1900		/* Report Collision Delay Times */
39*6895Sfeldman #define	ILC_RCV		0x2000		/* Supply Receive Buffer */
40*6895Sfeldman #define	ILC_LDXMIT	0x2800		/* Load Transmit Data */
41*6895Sfeldman #define	ILC_XMIT	0x2900		/* Load Transmit Data and Send */
42*6895Sfeldman #define	ILC_LDGRPS	0x2a00		/* Load Group Addresses */
43*6895Sfeldman #define	ILC_RMGRPS	0x2b00		/* Delete Group Addresses */
44*6895Sfeldman #define	ILC_FLUSH	0x3000		/* Flush Receive BAR/BCR Queue */
45*6895Sfeldman #define	ILC_RESET	0x3f00		/* Reset */
46*6895Sfeldman 
47*6895Sfeldman /*
48*6895Sfeldman  * Error codes
49*6895Sfeldman  */
50*6895Sfeldman char *ilerrs[] = {
51*6895Sfeldman 			"success",			/* 0 */
52*6895Sfeldman 			"success with retries", 	/* 01 */
53*6895Sfeldman 			"illegal command",		/* 02 */
54*6895Sfeldman 			"inappropriate command",	/* 03 */
55*6895Sfeldman 			"failure",			/* 04 */
56*6895Sfeldman 			"buffer size exceeded",		/* 05 */
57*6895Sfeldman 			"frame too small",		/* 06 */
58*6895Sfeldman 			0,				/* 07 */
59*6895Sfeldman 			"excessive collisions",		/* 010 */
60*6895Sfeldman 			0,				/* 011 */
61*6895Sfeldman 			"buffer alignment error",	/* 012 */
62*6895Sfeldman 			0,				/* 013 */
63*6895Sfeldman 			0,				/* 014 */
64*6895Sfeldman 			0,				/* 015 */
65*6895Sfeldman 			0,				/* 016 */
66*6895Sfeldman 			"non-existent memory"		/* 017 */
67*6895Sfeldman };
68*6895Sfeldman 
69*6895Sfeldman char *ildiag[] = {
70*6895Sfeldman 			"success",			/* 0 */
71*6895Sfeldman 			"checksum error",		/* 1 */
72*6895Sfeldman 			"NM10 dma error",		/* 2 */
73*6895Sfeldman 			"transmitter error",		/* 3 */
74*6895Sfeldman 			"receiver error",		/* 4 */
75*6895Sfeldman 			"loopback failure",		/* 5 */
76*6895Sfeldman };
77