func.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 : func.h
  24. ** SID : 1.3
  25. ** Last Modified : 11/6/98 11:34:10
  26. ** Retrieved : 11/6/98 11:34:21
  27. **
  28. ** ident @(#)func.h 1.3
  29. **
  30. ** -----------------------------------------------------------------------------
  31. */
  32. #ifndef __func_h_def
  33. #define __func_h_def
  34. #include <linux/kdev_t.h>
  35. #ifdef SCCS_LABELS
  36. #ifndef lint
  37. static char *_func_h_sccs_ = "@(#)func.h 1.3";
  38. #endif
  39. #endif
  40. /* rioboot.c */
  41. int RIOBootCodeRTA(struct rio_info *, struct DownLoad *);
  42. int RIOBootCodeHOST(struct rio_info *, register struct DownLoad *);
  43. int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *);
  44. void msec_timeout(struct Host *);
  45. int RIOBootRup(struct rio_info *, uint, struct Host *, struct PKT *);
  46. int RIOBootOk(struct rio_info *,struct Host *, ulong);
  47. int RIORtaBound(struct rio_info *, uint);
  48. void FillSlot(int, int, uint, struct Host *);
  49. /* riocmd.c */
  50. int RIOFoadRta(struct Host *, struct Map *);
  51. int RIOZombieRta(struct Host *, struct Map *);
  52. int RIOCommandRta(struct rio_info *, uint, int (* func)( struct Host *,
  53. struct Map *));
  54. int RIOIdentifyRta(struct rio_info *, caddr_t);
  55. int RIOKillNeighbour(struct rio_info *, caddr_t);
  56. int RIOSuspendBootRta(struct Host *, int, int);
  57. int RIOFoadWakeup(struct rio_info *);
  58. struct CmdBlk * RIOGetCmdBlk(void);
  59. void RIOFreeCmdBlk(struct CmdBlk *);
  60. int RIOQueueCmdBlk(struct Host *, uint, struct CmdBlk *);
  61. void RIOPollHostCommands(struct rio_info *, struct Host *);
  62. int RIOWFlushMark(int, struct CmdBlk *);
  63. int RIORFlushEnable(int, struct CmdBlk *);
  64. int RIOUnUse(int, struct CmdBlk *);
  65. void ShowPacket(uint, struct PKT *);
  66. /* rioctrl.c */
  67. int copyin(int, caddr_t, int);
  68. int riocontrol(struct rio_info *, dev_t,int,caddr_t,int);
  69. int RIOPreemptiveCmd(struct rio_info *,struct Port *,uchar);
  70. /* rioinit.c */
  71. void rioinit(struct rio_info *, struct RioHostInfo *);
  72. void RIOInitHosts(struct rio_info *, struct RioHostInfo *);
  73. void RIOISAinit(struct rio_info *,int);
  74. int RIODoAT(struct rio_info *, int, int);
  75. caddr_t RIOCheckForATCard(int);
  76. int RIOAssignAT(struct rio_info *, int, caddr_t, int);
  77. int RIOBoardTest(paddr_t, caddr_t, uchar, int);
  78. void RIOAllocDataStructs(struct rio_info *);
  79. void RIOSetupDataStructs(struct rio_info *);
  80. int RIODefaultName(struct rio_info *, struct Host *, uint);
  81. struct rioVersion * RIOVersid(void);
  82. int RIOMapin(paddr_t, int, caddr_t *);
  83. void RIOMapout(paddr_t, long, caddr_t);
  84. void RIOHostReset(uint, volatile struct DpRam *, uint);
  85. /* riointr.c */
  86. void RIOTxEnable(char *);
  87. void RIOServiceHost(struct rio_info *, struct Host *, int);
  88. int riotproc(struct rio_info *, register struct ttystatics *, int, int);
  89. /* rioparam.c */
  90. int RIOParam(struct Port *, int, int, int);
  91. int RIODelay(struct Port *PortP, int);
  92. int RIODelay_ni(struct Port *PortP, int);
  93. void ms_timeout(struct Port *);
  94. int can_add_transmit(struct PKT **, struct Port *);
  95. void add_transmit(struct Port *);
  96. void put_free_end(struct Host *, struct PKT *);
  97. int can_remove_receive(struct PKT **, struct Port *);
  98. void remove_receive(struct Port *);
  99. /* rioroute.c */
  100. int RIORouteRup(struct rio_info *, uint, struct Host *, struct PKT *);
  101. void RIOFixPhbs(struct rio_info *, struct Host *, uint);
  102. uint GetUnitType(uint);
  103. int RIOSetChange(struct rio_info *);
  104. int RIOFindFreeID(struct rio_info *, struct Host *, uint *, uint *);
  105. /* riotty.c */
  106. int riotopen(struct tty_struct * tty, struct file * filp);
  107. int riotclose(void *ptr);
  108. int riotioctl(struct rio_info *, struct tty_struct *, register int, register caddr_t);
  109. void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg);
  110. /* riotable.c */
  111. int RIONewTable(struct rio_info *);
  112. int RIOApel(struct rio_info *);
  113. int RIODeleteRta(struct rio_info *, struct Map *);
  114. int RIOAssignRta(struct rio_info *, struct Map *);
  115. int RIOReMapPorts(struct rio_info *, struct Host *, struct Map *);
  116. int RIOChangeName(struct rio_info *, struct Map*);
  117. #if 0
  118. /* riodrvr.c */
  119. struct rio_info * rio_install(struct RioHostInfo *);
  120. int rio_uninstall(register struct rio_info *);
  121. int rio_open(struct rio_info *, int, struct file *);
  122. int rio_close(struct rio_info *, struct file *);
  123. int rio_read(struct rio_info *, struct file *, char *, int);
  124. int rio_write(struct rio_info *, struct file * f, char *, int);
  125. int rio_ioctl(struct rio_info *, struct file *, int, char *);
  126. int rio_select(struct rio_info *, struct file * f, int, struct sel *);
  127. int rio_intr(char *);
  128. int rio_isr_thread(char *);
  129. struct rio_info * rio_info_store( int cmd, struct rio_info * p);
  130. #endif
  131. extern int rio_pcicopy(char *src, char *dst, int n);
  132. extern int rio_minor (struct tty_struct *tty);
  133. extern int rio_ismodem (struct tty_struct *tty);
  134. extern void rio_start_card_running (struct Host * HostP);
  135. #endif /* __func_h_def */