riodrvr.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. ** -----------------------------------------------------------------------------
  3. **
  4. ** Perle Specialix driver for Linux
  5. ** Ported from existing RIO Driver for SCO sources.
  6. *
  7. * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. **
  23. ** Module : riodrvr.h
  24. ** SID : 1.3
  25. ** Last Modified : 11/6/98 09:22:46
  26. ** Retrieved : 11/6/98 09:22:46
  27. **
  28. ** ident @(#)riodrvr.h 1.3
  29. **
  30. ** -----------------------------------------------------------------------------
  31. */
  32. #ifndef __riodrvr_h
  33. #define __riodrvr_h
  34. #include <asm/param.h> /* for HZ */
  35. #ifdef SCCS_LABELS
  36. static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h 1.3";
  37. #endif
  38. #define MEMDUMP_SIZE 32
  39. #define MOD_DISABLE (RIO_NOREAD|RIO_NOWRITE|RIO_NOXPRINT)
  40. struct rio_info {
  41. int mode; /* Intr or polled, word/byte */
  42. spinlock_t RIOIntrSem; /* Interrupt thread sem */
  43. int current_chan; /* current channel */
  44. int RIOFailed; /* Not initialised ? */
  45. int RIOInstallAttempts; /* no. of rio-install() calls */
  46. int RIOLastPCISearch; /* status of last search */
  47. int RIONumHosts; /* Number of RIO Hosts */
  48. struct Host *RIOHosts; /* RIO Host values */
  49. struct Port **RIOPortp; /* RIO port values */
  50. /*
  51. ** 02.03.1999 ARG - ESIL 0820 fix
  52. ** We no longer use RIOBootMode
  53. **
  54. int RIOBootMode; * RIO boot mode *
  55. **
  56. */
  57. int RIOPrintDisabled; /* RIO printing disabled ? */
  58. int RIOPrintLogState; /* RIO printing state ? */
  59. int RIOPolling; /* Polling ? */
  60. /*
  61. ** 09.12.1998 ARG - ESIL 0776 part fix
  62. ** The 'RIO_QUICK_CHECK' ioctl was using RIOHalted.
  63. ** The fix for this ESIL introduces another member (RIORtaDisCons) here to be
  64. ** updated in RIOConCon() - to keep track of RTA connections/disconnections.
  65. ** 'RIO_QUICK_CHECK' now returns the value of RIORtaDisCons.
  66. */
  67. int RIOHalted; /* halted ? */
  68. int RIORtaDisCons; /* RTA connections/disconnections */
  69. unsigned int RIOReadCheck; /* Rio read check */
  70. unsigned int RIONoMessage; /* To display message or not */
  71. unsigned int RIONumBootPkts; /* how many packets for an RTA */
  72. unsigned int RIOBootCount; /* size of RTA code */
  73. unsigned int RIOBooting; /* count of outstanding boots */
  74. unsigned int RIOSystemUp; /* Booted ?? */
  75. unsigned int RIOCounting; /* for counting interrupts */
  76. unsigned int RIOIntCount; /* # of intr since last check */
  77. unsigned int RIOTxCount; /* number of xmit intrs */
  78. unsigned int RIORxCount; /* number of rx intrs */
  79. unsigned int RIORupCount; /* number of rup intrs */
  80. int RIXTimer;
  81. int RIOBufferSize; /* Buffersize */
  82. int RIOBufferMask; /* Buffersize */
  83. int RIOFirstMajor; /* First host card's major no */
  84. unsigned int RIOLastPortsMapped; /* highest port number known */
  85. unsigned int RIOFirstPortsMapped; /* lowest port number known */
  86. unsigned int RIOLastPortsBooted; /* highest port number running */
  87. unsigned int RIOFirstPortsBooted; /* lowest port number running */
  88. unsigned int RIOLastPortsOpened; /* highest port number running */
  89. unsigned int RIOFirstPortsOpened; /* lowest port number running */
  90. /* Flag to say that the topology information has been changed. */
  91. unsigned int RIOQuickCheck;
  92. unsigned int CdRegister; /* ??? */
  93. int RIOSignalProcess; /* Signalling process */
  94. int rio_debug; /* To debug ... */
  95. int RIODebugWait; /* For what ??? */
  96. int tpri; /* Thread prio */
  97. int tid; /* Thread id */
  98. unsigned int _RIO_Polled; /* Counter for polling */
  99. unsigned int _RIO_Interrupted; /* Counter for interrupt */
  100. int intr_tid; /* iointset return value */
  101. int TxEnSem; /* TxEnable Semaphore */
  102. struct Error RIOError; /* to Identify what went wrong */
  103. struct Conf RIOConf; /* Configuration ??? */
  104. struct ttystatics channel[RIO_PORTS]; /* channel information */
  105. char RIOBootPackets[1 + (SIXTY_FOUR_K / RTA_BOOT_DATA_SIZE)]
  106. [RTA_BOOT_DATA_SIZE];
  107. struct Map RIOConnectTable[TOTAL_MAP_ENTRIES];
  108. struct Map RIOSavedTable[TOTAL_MAP_ENTRIES];
  109. /* RTA to host binding table for master/slave operation */
  110. unsigned long RIOBindTab[MAX_RTA_BINDINGS];
  111. /* RTA memory dump variable */
  112. unsigned char RIOMemDump[MEMDUMP_SIZE];
  113. struct ModuleInfo RIOModuleTypes[MAX_MODULE_TYPES];
  114. };
  115. #ifdef linux
  116. #define debug(x) printk x
  117. #else
  118. #define debug(x) kkprintf x
  119. #endif
  120. #define RIO_RESET_INT 0x7d80
  121. #endif /* __riodrvr.h */