xref: /original-bsd/sys/vax/uba/tmscpreg.h (revision a05d0f95)
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)tmscpreg.h	7.2 (Berkeley) 05/09/91
8  */
9 
10 /*	@(#)tmscpreg.h	1.1	11/2/84	84/09/25	*/
11 
12 /****************************************************************
13  *								*
14  *        Licensed from Digital Equipment Corporation 		*
15  *                       Copyright (c) 				*
16  *               Digital Equipment Corporation			*
17  *                   Maynard, Massachusetts 			*
18  *                         1985, 1986 				*
19  *                    All rights reserved. 			*
20  *								*
21  *        The Information in this software is subject to change *
22  *   without notice and should not be construed as a commitment *
23  *   by  Digital  Equipment  Corporation.   Digital   makes  no *
24  *   representations about the suitability of this software for *
25  *   any purpose.  It is supplied "As Is" without expressed  or *
26  *   implied  warranty. 					*
27  *								*
28  *        If the Regents of the University of California or its *
29  *   licensees modify the software in a manner creating  	*
30  *   diriviative copyright rights, appropriate copyright  	*
31  *   legends may be placed on  the drivative work in addition   *
32  *   to that set forth above. 					*
33  *								*
34  ****************************************************************/
35 /*
36  * TMSCP registers and structures
37  */
38 
39 struct tmscpdevice {
40 	short	tmscpip;	/* initialization and polling */
41 	short	tmscpsa;	/* status and address */
42 };
43 
44 #define	TMSCP_ERR		0100000	/* error bit */
45 #define	TMSCP_STEP4	0040000	/* step 4 has started */
46 #define	TMSCP_STEP3	0020000	/* step 3 has started */
47 #define	TMSCP_STEP2	0010000	/* step 2 has started */
48 #define	TMSCP_STEP1	0004000	/* step 1 has started */
49 #define	TMSCP_NV		0002000	/* no host settable interrupt vector */
50 #define	TMSCP_QB		0001000	/* controller supports Q22 bus */
51 #define	TMSCP_DI		0000400	/* controller implements diagnostics */
52 #define	TMSCP_OD		0000200	/* port allows odd host addr's in the buffer descriptor */
53 #define	TMSCP_IE		0000200	/* interrupt enable */
54 #define	TMSCP_MP		0000100	/* port supports address mapping */
55 #define	TMSCP_LF		0000002	/* host requests last fail response packet */
56 #define	TMSCP_PI		0000001	/* host requests adapter purge interrupts */
57 #define	TMSCP_GO		0000001	/* start operation, after init */
58 
59 
60 /*
61  * TMSCP Communications Area
62  */
63 
64 struct tmscpca {
65 	short	ca_xxx1;	/* unused */
66 	char	ca_xxx2;	/* unused */
67 	char	ca_bdp;		/* BDP to purge */
68 	short	ca_cmdint;	/* command queue transition interrupt flag */
69 	short	ca_rspint;	/* response queue transition interrupt flag */
70 	long	ca_rspdsc[NRSP];/* response descriptors */
71 	long	ca_cmddsc[NCMD];/* command descriptors */
72 };
73 
74 #define	ca_ringbase	ca_rspdsc[0]
75 
76 #define	TMSCP_OWN	0x80000000	/* port owns this descriptor (else host
77  owns it) */
78 #define	TMSCP_INT	0x40000000	/* allow interrupt on ring transition */
79 
80 #define	TMSCP_MAP	0x80000000	/* modifier for mapped buffer descriptors */
81 
82 /*
83  * TMSCP packet info (same as MSCP)
84  */
85 struct mscp_header {
86 	short	tmscp_msglen;	/* length of MSCP packet */
87 	char	tmscp_credits;	/* low 4 bits: credits, high 4 bits: msgtype */
88 	char	tmscp_vcid;	/* virtual circuit id (connection id) */
89 };
90