2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
** -----------------------------------------------------------------------------
|
|
|
|
**
|
|
|
|
** 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
|
|
|
|
|
2006-01-12 04:17:49 +08:00
|
|
|
#include <asm/param.h> /* for HZ */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define MEMDUMP_SIZE 32
|
|
|
|
#define MOD_DISABLE (RIO_NOREAD|RIO_NOWRITE|RIO_NOXPRINT)
|
|
|
|
|
|
|
|
|
|
|
|
struct rio_info {
|
2006-01-12 04:17:49 +08:00
|
|
|
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 */
|
2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
** 02.03.1999 ARG - ESIL 0820 fix
|
|
|
|
** We no longer use RIOBootMode
|
|
|
|
**
|
|
|
|
int RIOBootMode; * RIO boot mode *
|
|
|
|
**
|
|
|
|
*/
|
2006-01-12 04:17:49 +08:00
|
|
|
int RIOPrintDisabled; /* RIO printing disabled ? */
|
|
|
|
int RIOPrintLogState; /* RIO printing state ? */
|
|
|
|
int RIOPolling; /* Polling ? */
|
2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
** 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.
|
|
|
|
*/
|
2006-01-12 04:17:49 +08:00
|
|
|
int RIOHalted; /* halted ? */
|
|
|
|
int RIORtaDisCons; /* RTA connections/disconnections */
|
2006-03-24 19:18:26 +08:00
|
|
|
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 */
|
2006-01-12 04:17:49 +08:00
|
|
|
int RIXTimer;
|
|
|
|
int RIOBufferSize; /* Buffersize */
|
|
|
|
int RIOBufferMask; /* Buffersize */
|
|
|
|
|
|
|
|
int RIOFirstMajor; /* First host card's major no */
|
|
|
|
|
2006-03-24 19:18:26 +08:00
|
|
|
unsigned int RIOLastPortsMapped; /* highest port number known */
|
|
|
|
unsigned int RIOFirstPortsMapped; /* lowest port number known */
|
2006-01-12 04:17:49 +08:00
|
|
|
|
2006-03-24 19:18:26 +08:00
|
|
|
unsigned int RIOLastPortsBooted; /* highest port number running */
|
|
|
|
unsigned int RIOFirstPortsBooted; /* lowest port number running */
|
2006-01-12 04:17:49 +08:00
|
|
|
|
2006-03-24 19:18:26 +08:00
|
|
|
unsigned int RIOLastPortsOpened; /* highest port number running */
|
|
|
|
unsigned int RIOFirstPortsOpened; /* lowest port number running */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* Flag to say that the topology information has been changed. */
|
2006-03-24 19:18:26 +08:00
|
|
|
unsigned int RIOQuickCheck;
|
|
|
|
unsigned int CdRegister; /* ??? */
|
2006-01-12 04:17:49 +08:00
|
|
|
int RIOSignalProcess; /* Signalling process */
|
|
|
|
int rio_debug; /* To debug ... */
|
|
|
|
int RIODebugWait; /* For what ??? */
|
|
|
|
int tpri; /* Thread prio */
|
|
|
|
int tid; /* Thread id */
|
2006-03-24 19:18:26 +08:00
|
|
|
unsigned int _RIO_Polled; /* Counter for polling */
|
|
|
|
unsigned int _RIO_Interrupted; /* Counter for interrupt */
|
2006-01-12 04:17:49 +08:00
|
|
|
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];
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* RTA to host binding table for master/slave operation */
|
2006-03-24 19:18:26 +08:00
|
|
|
unsigned long RIOBindTab[MAX_RTA_BINDINGS];
|
2005-04-17 06:20:36 +08:00
|
|
|
/* RTA memory dump variable */
|
2006-03-24 19:18:26 +08:00
|
|
|
unsigned char RIOMemDump[MEMDUMP_SIZE];
|
2006-01-12 04:17:49 +08:00
|
|
|
struct ModuleInfo RIOModuleTypes[MAX_MODULE_TYPES];
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef linux
|
|
|
|
#define debug(x) printk x
|
|
|
|
#else
|
|
|
|
#define debug(x) kkprintf x
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define RIO_RESET_INT 0x7d80
|
|
|
|
|
2006-01-12 04:17:49 +08:00
|
|
|
#endif /* __riodrvr.h */
|