riodrvr.h 4.9 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
/*
** -----------------------------------------------------------------------------
**
**  Perle Specialix driver for Linux
**  Ported from existing RIO Driver for SCO sources.
 *
 *  (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
 *
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
**	Module		: riodrvr.h
**	SID		: 1.3
**	Last Modified	: 11/6/98 09:22:46
**	Retrieved	: 11/6/98 09:22:46
**
**  ident @(#)riodrvr.h	1.3
**
** -----------------------------------------------------------------------------
*/

#ifndef __riodrvr_h
#define __riodrvr_h

A
Andrew Morton 已提交
36
#include <asm/param.h>		/* for HZ */
L
Linus Torvalds 已提交
37 38 39 40 41 42 43 44 45 46

#ifdef SCCS_LABELS
static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h	1.3";
#endif

#define MEMDUMP_SIZE	32
#define	MOD_DISABLE	(RIO_NOREAD|RIO_NOWRITE|RIO_NOXPRINT)


struct rio_info {
A
Andrew Morton 已提交
47 48 49 50 51 52 53 54 55
	int mode;		/* Intr or polled, word/byte */
	spinlock_t RIOIntrSem;	/* Interrupt thread sem */
	int current_chan;	/* current channel */
	int RIOFailed;		/* Not initialised ? */
	int RIOInstallAttempts;	/* no. of rio-install() calls */
	int RIOLastPCISearch;	/* status of last search */
	int RIONumHosts;	/* Number of RIO Hosts */
	struct Host *RIOHosts;	/* RIO Host values */
	struct Port **RIOPortp;	/* RIO port values */
L
Linus Torvalds 已提交
56 57 58 59 60 61 62
/*
** 02.03.1999 ARG - ESIL 0820 fix
** We no longer use RIOBootMode
**
	int			RIOBootMode;		* RIO boot mode *
**
*/
A
Andrew Morton 已提交
63 64 65
	int RIOPrintDisabled;	/* RIO printing disabled ? */
	int RIOPrintLogState;	/* RIO printing state ? */
	int RIOPolling;		/* Polling ? */
L
Linus Torvalds 已提交
66 67 68 69 70 71 72
/*
** 09.12.1998 ARG - ESIL 0776 part fix
** The 'RIO_QUICK_CHECK' ioctl was using RIOHalted.
** The fix for this ESIL introduces another member (RIORtaDisCons) here to be
** updated in RIOConCon() - to keep track of RTA connections/disconnections.
** 'RIO_QUICK_CHECK' now returns the value of RIORtaDisCons.
*/
A
Andrew Morton 已提交
73 74
	int RIOHalted;		/* halted ? */
	int RIORtaDisCons;	/* RTA connections/disconnections */
75 76 77 78 79 80 81 82 83 84 85
	unsigned int RIOReadCheck;	/* Rio read check */
	unsigned int RIONoMessage;	/* To display message or not */
	unsigned int RIONumBootPkts;	/* how many packets for an RTA */
	unsigned int RIOBootCount;	/* size of RTA code */
	unsigned int RIOBooting;	/* count of outstanding boots */
	unsigned int RIOSystemUp;	/* Booted ?? */
	unsigned int RIOCounting;	/* for counting interrupts */
	unsigned int RIOIntCount;	/* # of intr since last check */
	unsigned int RIOTxCount;	/* number of xmit intrs  */
	unsigned int RIORxCount;	/* number of rx intrs */
	unsigned int RIORupCount;	/* number of rup intrs */
A
Andrew Morton 已提交
86 87 88 89 90 91
	int RIXTimer;
	int RIOBufferSize;	/* Buffersize */
	int RIOBufferMask;	/* Buffersize */

	int RIOFirstMajor;	/* First host card's major no */

92 93
	unsigned int RIOLastPortsMapped;	/* highest port number known */
	unsigned int RIOFirstPortsMapped;	/* lowest port number known */
A
Andrew Morton 已提交
94

95 96
	unsigned int RIOLastPortsBooted;	/* highest port number running */
	unsigned int RIOFirstPortsBooted;	/* lowest port number running */
A
Andrew Morton 已提交
97

98 99
	unsigned int RIOLastPortsOpened;	/* highest port number running */
	unsigned int RIOFirstPortsOpened;	/* lowest port number running */
L
Linus Torvalds 已提交
100 101

	/* Flag to say that the topology information has been changed. */
102 103
	unsigned int RIOQuickCheck;
	unsigned int CdRegister;	/* ??? */
A
Andrew Morton 已提交
104 105 106 107 108
	int RIOSignalProcess;	/* Signalling process */
	int rio_debug;		/* To debug ... */
	int RIODebugWait;	/* For what ??? */
	int tpri;		/* Thread prio */
	int tid;		/* Thread id */
109 110
	unsigned int _RIO_Polled;	/* Counter for polling */
	unsigned int _RIO_Interrupted;	/* Counter for interrupt */
A
Andrew Morton 已提交
111 112 113 114 115 116 117 118 119 120 121
	int intr_tid;		/* iointset return value */
	int TxEnSem;		/* TxEnable Semaphore */


	struct Error RIOError;	/* to Identify what went wrong */
	struct Conf RIOConf;	/* Configuration ??? */
	struct ttystatics channel[RIO_PORTS];	/* channel information */
	char RIOBootPackets[1 + (SIXTY_FOUR_K / RTA_BOOT_DATA_SIZE)]
	    [RTA_BOOT_DATA_SIZE];
	struct Map RIOConnectTable[TOTAL_MAP_ENTRIES];
	struct Map RIOSavedTable[TOTAL_MAP_ENTRIES];
L
Linus Torvalds 已提交
122 123

	/* RTA to host binding table for master/slave operation */
124
	unsigned long RIOBindTab[MAX_RTA_BINDINGS];
L
Linus Torvalds 已提交
125
	/* RTA memory dump variable */
126
	unsigned char RIOMemDump[MEMDUMP_SIZE];
A
Andrew Morton 已提交
127
	struct ModuleInfo RIOModuleTypes[MAX_MODULE_TYPES];
L
Linus Torvalds 已提交
128 129 130 131 132 133 134 135 136 137 138 139 140 141

};


#ifdef linux
#define debug(x)        printk x
#else
#define debug(x)	kkprintf x
#endif



#define RIO_RESET_INT	0x7d80

A
Andrew Morton 已提交
142
#endif				/* __riodrvr.h */