hisax.h 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336
  1. /* $Id: hisax.h,v 2.64.2.4 2004/02/11 13:21:33 keil Exp $
  2. *
  3. * Basic declarations, defines and prototypes
  4. *
  5. * This software may be used and distributed according to the terms
  6. * of the GNU General Public License, incorporated herein by reference.
  7. *
  8. */
  9. #include <linux/config.h>
  10. #include <linux/errno.h>
  11. #include <linux/fs.h>
  12. #include <linux/major.h>
  13. #include <asm/segment.h>
  14. #include <asm/io.h>
  15. #include <linux/delay.h>
  16. #include <linux/kernel.h>
  17. #include <linux/signal.h>
  18. #include <linux/slab.h>
  19. #include <linux/mm.h>
  20. #include <linux/mman.h>
  21. #include <linux/ioport.h>
  22. #include <linux/timer.h>
  23. #include <linux/wait.h>
  24. #include <linux/isdnif.h>
  25. #include <linux/tty.h>
  26. #include <linux/serial_reg.h>
  27. #include <linux/netdevice.h>
  28. #define ERROR_STATISTIC
  29. #define REQUEST 0
  30. #define CONFIRM 1
  31. #define INDICATION 2
  32. #define RESPONSE 3
  33. #define HW_ENABLE 0x0000
  34. #define HW_RESET 0x0004
  35. #define HW_POWERUP 0x0008
  36. #define HW_ACTIVATE 0x0010
  37. #define HW_DEACTIVATE 0x0018
  38. #define HW_INFO1 0x0010
  39. #define HW_INFO2 0x0020
  40. #define HW_INFO3 0x0030
  41. #define HW_INFO4 0x0040
  42. #define HW_INFO4_P8 0x0040
  43. #define HW_INFO4_P10 0x0048
  44. #define HW_RSYNC 0x0060
  45. #define HW_TESTLOOP 0x0070
  46. #define CARD_RESET 0x00F0
  47. #define CARD_INIT 0x00F2
  48. #define CARD_RELEASE 0x00F3
  49. #define CARD_TEST 0x00F4
  50. #define CARD_AUX_IND 0x00F5
  51. #define PH_ACTIVATE 0x0100
  52. #define PH_DEACTIVATE 0x0110
  53. #define PH_DATA 0x0120
  54. #define PH_PULL 0x0130
  55. #define PH_TESTLOOP 0x0140
  56. #define PH_PAUSE 0x0150
  57. #define MPH_ACTIVATE 0x0180
  58. #define MPH_DEACTIVATE 0x0190
  59. #define MPH_INFORMATION 0x01A0
  60. #define DL_ESTABLISH 0x0200
  61. #define DL_RELEASE 0x0210
  62. #define DL_DATA 0x0220
  63. #define DL_FLUSH 0x0224
  64. #define DL_UNIT_DATA 0x0230
  65. #define MDL_BC_RELEASE 0x0278 // Formula-n enter:now
  66. #define MDL_BC_ASSIGN 0x027C // Formula-n enter:now
  67. #define MDL_ASSIGN 0x0280
  68. #define MDL_REMOVE 0x0284
  69. #define MDL_ERROR 0x0288
  70. #define MDL_INFO_SETUP 0x02E0
  71. #define MDL_INFO_CONN 0x02E4
  72. #define MDL_INFO_REL 0x02E8
  73. #define CC_SETUP 0x0300
  74. #define CC_RESUME 0x0304
  75. #define CC_MORE_INFO 0x0310
  76. #define CC_IGNORE 0x0320
  77. #define CC_REJECT 0x0324
  78. #define CC_SETUP_COMPL 0x0330
  79. #define CC_PROCEEDING 0x0340
  80. #define CC_ALERTING 0x0344
  81. #define CC_PROGRESS 0x0348
  82. #define CC_CONNECT 0x0350
  83. #define CC_CHARGE 0x0354
  84. #define CC_NOTIFY 0x0358
  85. #define CC_DISCONNECT 0x0360
  86. #define CC_RELEASE 0x0368
  87. #define CC_SUSPEND 0x0370
  88. #define CC_PROCEED_SEND 0x0374
  89. #define CC_REDIR 0x0378
  90. #define CC_T302 0x0382
  91. #define CC_T303 0x0383
  92. #define CC_T304 0x0384
  93. #define CC_T305 0x0385
  94. #define CC_T308_1 0x0388
  95. #define CC_T308_2 0x038A
  96. #define CC_T309 0x0309
  97. #define CC_T310 0x0390
  98. #define CC_T313 0x0393
  99. #define CC_T318 0x0398
  100. #define CC_T319 0x0399
  101. #define CC_TSPID 0x03A0
  102. #define CC_NOSETUP_RSP 0x03E0
  103. #define CC_SETUP_ERR 0x03E1
  104. #define CC_SUSPEND_ERR 0x03E2
  105. #define CC_RESUME_ERR 0x03E3
  106. #define CC_CONNECT_ERR 0x03E4
  107. #define CC_RELEASE_ERR 0x03E5
  108. #define CC_RESTART 0x03F4
  109. #define CC_TDSS1_IO 0x13F4 /* DSS1 IO user timer */
  110. #define CC_TNI1_IO 0x13F5 /* NI1 IO user timer */
  111. /* define maximum number of possible waiting incoming calls */
  112. #define MAX_WAITING_CALLS 2
  113. #ifdef __KERNEL__
  114. /* include l3dss1 & ni1 specific process structures, but no other defines */
  115. #ifdef CONFIG_HISAX_EURO
  116. #define l3dss1_process
  117. #include "l3dss1.h"
  118. #undef l3dss1_process
  119. #endif /* CONFIG_HISAX_EURO */
  120. #ifdef CONFIG_HISAX_NI1
  121. #define l3ni1_process
  122. #include "l3ni1.h"
  123. #undef l3ni1_process
  124. #endif /* CONFIG_HISAX_NI1 */
  125. #define MAX_DFRAME_LEN 260
  126. #define MAX_DFRAME_LEN_L1 300
  127. #define HSCX_BUFMAX 4096
  128. #define MAX_DATA_SIZE (HSCX_BUFMAX - 4)
  129. #define MAX_DATA_MEM (HSCX_BUFMAX + 64)
  130. #define RAW_BUFMAX (((HSCX_BUFMAX*6)/5) + 5)
  131. #define MAX_HEADER_LEN 4
  132. #define MAX_WINDOW 8
  133. #define MAX_MON_FRAME 32
  134. #define MAX_DLOG_SPACE 2048
  135. #define MAX_BLOG_SPACE 256
  136. /* #define I4L_IRQ_FLAG SA_INTERRUPT */
  137. #define I4L_IRQ_FLAG 0
  138. /*
  139. * Statemachine
  140. */
  141. struct FsmInst;
  142. typedef void (* FSMFNPTR)(struct FsmInst *, int, void *);
  143. struct Fsm {
  144. FSMFNPTR *jumpmatrix;
  145. int state_count, event_count;
  146. char **strEvent, **strState;
  147. };
  148. struct FsmInst {
  149. struct Fsm *fsm;
  150. int state;
  151. int debug;
  152. void *userdata;
  153. int userint;
  154. void (*printdebug) (struct FsmInst *, char *, ...);
  155. };
  156. struct FsmNode {
  157. int state, event;
  158. void (*routine) (struct FsmInst *, int, void *);
  159. };
  160. struct FsmTimer {
  161. struct FsmInst *fi;
  162. struct timer_list tl;
  163. int event;
  164. void *arg;
  165. };
  166. struct L3Timer {
  167. struct l3_process *pc;
  168. struct timer_list tl;
  169. int event;
  170. };
  171. #define FLG_L1_ACTIVATING 1
  172. #define FLG_L1_ACTIVATED 2
  173. #define FLG_L1_DEACTTIMER 3
  174. #define FLG_L1_ACTTIMER 4
  175. #define FLG_L1_T3RUN 5
  176. #define FLG_L1_PULL_REQ 6
  177. #define FLG_L1_UINT 7
  178. struct Layer1 {
  179. void *hardware;
  180. struct BCState *bcs;
  181. struct PStack **stlistp;
  182. long Flags;
  183. struct FsmInst l1m;
  184. struct FsmTimer timer;
  185. void (*l1l2) (struct PStack *, int, void *);
  186. void (*l1hw) (struct PStack *, int, void *);
  187. void (*l1tei) (struct PStack *, int, void *);
  188. int mode, bc;
  189. int delay;
  190. };
  191. #define GROUP_TEI 127
  192. #define TEI_SAPI 63
  193. #define CTRL_SAPI 0
  194. #define PACKET_NOACK 250
  195. /* Layer2 Flags */
  196. #define FLG_LAPB 0
  197. #define FLG_LAPD 1
  198. #define FLG_ORIG 2
  199. #define FLG_MOD128 3
  200. #define FLG_PEND_REL 4
  201. #define FLG_L3_INIT 5
  202. #define FLG_T200_RUN 6
  203. #define FLG_ACK_PEND 7
  204. #define FLG_REJEXC 8
  205. #define FLG_OWN_BUSY 9
  206. #define FLG_PEER_BUSY 10
  207. #define FLG_DCHAN_BUSY 11
  208. #define FLG_L1_ACTIV 12
  209. #define FLG_ESTAB_PEND 13
  210. #define FLG_PTP 14
  211. #define FLG_FIXED_TEI 15
  212. #define FLG_L2BLOCK 16
  213. struct Layer2 {
  214. int tei;
  215. int sap;
  216. int maxlen;
  217. u_long flag;
  218. spinlock_t lock;
  219. u_int vs, va, vr;
  220. int rc;
  221. unsigned int window;
  222. unsigned int sow;
  223. struct sk_buff *windowar[MAX_WINDOW];
  224. struct sk_buff_head i_queue;
  225. struct sk_buff_head ui_queue;
  226. void (*l2l1) (struct PStack *, int, void *);
  227. void (*l2l3) (struct PStack *, int, void *);
  228. void (*l2tei) (struct PStack *, int, void *);
  229. struct FsmInst l2m;
  230. struct FsmTimer t200, t203;
  231. int T200, N200, T203;
  232. int debug;
  233. char debug_id[16];
  234. };
  235. struct Layer3 {
  236. void (*l3l4) (struct PStack *, int, void *);
  237. void (*l3ml3) (struct PStack *, int, void *);
  238. void (*l3l2) (struct PStack *, int, void *);
  239. struct FsmInst l3m;
  240. struct FsmTimer l3m_timer;
  241. struct sk_buff_head squeue;
  242. struct l3_process *proc;
  243. struct l3_process *global;
  244. int N303;
  245. int debug;
  246. char debug_id[8];
  247. };
  248. struct LLInterface {
  249. void (*l4l3) (struct PStack *, int, void *);
  250. int (*l4l3_proto) (struct PStack *, isdn_ctrl *);
  251. void *userdata;
  252. u_long flag;
  253. };
  254. #define FLG_LLI_L1WAKEUP 1
  255. #define FLG_LLI_L2WAKEUP 2
  256. struct Management {
  257. int ri;
  258. struct FsmInst tei_m;
  259. struct FsmTimer t202;
  260. int T202, N202, debug;
  261. void (*layer) (struct PStack *, int, void *);
  262. };
  263. #define NO_CAUSE 254
  264. struct Param {
  265. u_char cause;
  266. u_char loc;
  267. u_char diag[6];
  268. int bchannel;
  269. int chargeinfo;
  270. int spv; /* SPV Flag */
  271. setup_parm setup; /* from isdnif.h numbers and Serviceindicator */
  272. u_char moderate; /* transfer mode and rate (bearer octet 4) */
  273. };
  274. struct PStack {
  275. struct PStack *next;
  276. struct Layer1 l1;
  277. struct Layer2 l2;
  278. struct Layer3 l3;
  279. struct LLInterface lli;
  280. struct Management ma;
  281. int protocol; /* EDSS1, 1TR6 or NI1 */
  282. /* protocol specific data fields */
  283. union
  284. { u_char uuuu; /* only as dummy */
  285. #ifdef CONFIG_HISAX_EURO
  286. dss1_stk_priv dss1; /* private dss1 data */
  287. #endif /* CONFIG_HISAX_EURO */
  288. #ifdef CONFIG_HISAX_NI1
  289. ni1_stk_priv ni1; /* private ni1 data */
  290. #endif /* CONFIG_HISAX_NI1 */
  291. } prot;
  292. };
  293. struct l3_process {
  294. int callref;
  295. int state;
  296. struct L3Timer timer;
  297. int N303;
  298. int debug;
  299. struct Param para;
  300. struct Channel *chan;
  301. struct PStack *st;
  302. struct l3_process *next;
  303. ulong redir_result;
  304. /* protocol specific data fields */
  305. union
  306. { u_char uuuu; /* only when euro not defined, avoiding empty union */
  307. #ifdef CONFIG_HISAX_EURO
  308. dss1_proc_priv dss1; /* private dss1 data */
  309. #endif /* CONFIG_HISAX_EURO */
  310. #ifdef CONFIG_HISAX_NI1
  311. ni1_proc_priv ni1; /* private ni1 data */
  312. #endif /* CONFIG_HISAX_NI1 */
  313. } prot;
  314. };
  315. struct hscx_hw {
  316. int hscx;
  317. int rcvidx;
  318. int count; /* Current skb sent count */
  319. u_char *rcvbuf; /* B-Channel receive Buffer */
  320. u_char tsaxr0;
  321. u_char tsaxr1;
  322. };
  323. struct w6692B_hw {
  324. int bchan;
  325. int rcvidx;
  326. int count; /* Current skb sent count */
  327. u_char *rcvbuf; /* B-Channel receive Buffer */
  328. };
  329. struct isar_reg {
  330. unsigned long Flags;
  331. volatile u_char bstat;
  332. volatile u_char iis;
  333. volatile u_char cmsb;
  334. volatile u_char clsb;
  335. volatile u_char par[8];
  336. };
  337. struct isar_hw {
  338. int dpath;
  339. int rcvidx;
  340. int txcnt;
  341. int mml;
  342. u_char state;
  343. u_char cmd;
  344. u_char mod;
  345. u_char newcmd;
  346. u_char newmod;
  347. char try_mod;
  348. struct timer_list ftimer;
  349. u_char *rcvbuf; /* B-Channel receive Buffer */
  350. u_char conmsg[16];
  351. struct isar_reg *reg;
  352. };
  353. struct hdlc_stat_reg {
  354. #ifdef __BIG_ENDIAN
  355. u_char fill __attribute__((packed));
  356. u_char mode __attribute__((packed));
  357. u_char xml __attribute__((packed));
  358. u_char cmd __attribute__((packed));
  359. #else
  360. u_char cmd __attribute__((packed));
  361. u_char xml __attribute__((packed));
  362. u_char mode __attribute__((packed));
  363. u_char fill __attribute__((packed));
  364. #endif
  365. };
  366. struct hdlc_hw {
  367. union {
  368. u_int ctrl;
  369. struct hdlc_stat_reg sr;
  370. } ctrl;
  371. u_int stat;
  372. int rcvidx;
  373. int count; /* Current skb sent count */
  374. u_char *rcvbuf; /* B-Channel receive Buffer */
  375. };
  376. struct hfcB_hw {
  377. unsigned int *send;
  378. int f1;
  379. int f2;
  380. };
  381. struct tiger_hw {
  382. u_int *send;
  383. u_int *s_irq;
  384. u_int *s_end;
  385. u_int *sendp;
  386. u_int *rec;
  387. int free;
  388. u_char *rcvbuf;
  389. u_char *sendbuf;
  390. u_char *sp;
  391. int sendcnt;
  392. u_int s_tot;
  393. u_int r_bitcnt;
  394. u_int r_tot;
  395. u_int r_err;
  396. u_int r_fcs;
  397. u_char r_state;
  398. u_char r_one;
  399. u_char r_val;
  400. u_char s_state;
  401. };
  402. struct amd7930_hw {
  403. u_char *tx_buff;
  404. u_char *rv_buff;
  405. int rv_buff_in;
  406. int rv_buff_out;
  407. struct sk_buff *rv_skb;
  408. struct hdlc_state *hdlc_state;
  409. struct work_struct tq_rcv;
  410. struct work_struct tq_xmt;
  411. };
  412. #define BC_FLG_INIT 1
  413. #define BC_FLG_ACTIV 2
  414. #define BC_FLG_BUSY 3
  415. #define BC_FLG_NOFRAME 4
  416. #define BC_FLG_HALF 5
  417. #define BC_FLG_EMPTY 6
  418. #define BC_FLG_ORIG 7
  419. #define BC_FLG_DLEETX 8
  420. #define BC_FLG_LASTDLE 9
  421. #define BC_FLG_FIRST 10
  422. #define BC_FLG_LASTDATA 11
  423. #define BC_FLG_NMD_DATA 12
  424. #define BC_FLG_FTI_RUN 13
  425. #define BC_FLG_LL_OK 14
  426. #define BC_FLG_LL_CONN 15
  427. #define BC_FLG_FTI_FTS 16
  428. #define BC_FLG_FRH_WAIT 17
  429. #define L1_MODE_NULL 0
  430. #define L1_MODE_TRANS 1
  431. #define L1_MODE_HDLC 2
  432. #define L1_MODE_EXTRN 3
  433. #define L1_MODE_HDLC_56K 4
  434. #define L1_MODE_MODEM 7
  435. #define L1_MODE_V32 8
  436. #define L1_MODE_FAX 9
  437. struct BCState {
  438. int channel;
  439. int mode;
  440. u_long Flag;
  441. struct IsdnCardState *cs;
  442. int tx_cnt; /* B-Channel transmit counter */
  443. struct sk_buff *tx_skb; /* B-Channel transmit Buffer */
  444. struct sk_buff_head rqueue; /* B-Channel receive Queue */
  445. struct sk_buff_head squeue; /* B-Channel send Queue */
  446. int ackcnt;
  447. spinlock_t aclock;
  448. struct PStack *st;
  449. u_char *blog;
  450. u_char *conmsg;
  451. struct timer_list transbusy;
  452. struct work_struct tqueue;
  453. u_long event;
  454. int (*BC_SetStack) (struct PStack *, struct BCState *);
  455. void (*BC_Close) (struct BCState *);
  456. #ifdef ERROR_STATISTIC
  457. int err_crc;
  458. int err_tx;
  459. int err_rdo;
  460. int err_inv;
  461. #endif
  462. union {
  463. struct hscx_hw hscx;
  464. struct hdlc_hw hdlc;
  465. struct isar_hw isar;
  466. struct hfcB_hw hfc;
  467. struct tiger_hw tiger;
  468. struct amd7930_hw amd7930;
  469. struct w6692B_hw w6692;
  470. struct hisax_b_if *b_if;
  471. } hw;
  472. };
  473. struct Channel {
  474. struct PStack *b_st, *d_st;
  475. struct IsdnCardState *cs;
  476. struct BCState *bcs;
  477. int chan;
  478. int incoming;
  479. struct FsmInst fi;
  480. struct FsmTimer drel_timer, dial_timer;
  481. int debug;
  482. int l2_protocol, l2_active_protocol;
  483. int l3_protocol;
  484. int data_open;
  485. struct l3_process *proc;
  486. setup_parm setup; /* from isdnif.h numbers and Serviceindicator */
  487. u_long Flags; /* for remembering action done in l4 */
  488. int leased;
  489. };
  490. struct elsa_hw {
  491. struct pci_dev *dev;
  492. unsigned long base;
  493. unsigned int cfg;
  494. unsigned int ctrl;
  495. unsigned int ale;
  496. unsigned int isac;
  497. unsigned int itac;
  498. unsigned int hscx;
  499. unsigned int trig;
  500. unsigned int timer;
  501. unsigned int counter;
  502. unsigned int status;
  503. struct timer_list tl;
  504. unsigned int MFlag;
  505. struct BCState *bcs;
  506. u_char *transbuf;
  507. u_char *rcvbuf;
  508. unsigned int transp;
  509. unsigned int rcvp;
  510. unsigned int transcnt;
  511. unsigned int rcvcnt;
  512. u_char IER;
  513. u_char FCR;
  514. u_char LCR;
  515. u_char MCR;
  516. u_char ctrl_reg;
  517. };
  518. struct teles3_hw {
  519. unsigned int cfg_reg;
  520. signed int isac;
  521. signed int hscx[2];
  522. signed int isacfifo;
  523. signed int hscxfifo[2];
  524. };
  525. struct teles0_hw {
  526. unsigned int cfg_reg;
  527. void __iomem *membase;
  528. unsigned long phymem;
  529. };
  530. struct avm_hw {
  531. unsigned int cfg_reg;
  532. unsigned int isac;
  533. unsigned int hscx[2];
  534. unsigned int isacfifo;
  535. unsigned int hscxfifo[2];
  536. unsigned int counter;
  537. struct pci_dev *dev;
  538. };
  539. struct ix1_hw {
  540. unsigned int cfg_reg;
  541. unsigned int isac_ale;
  542. unsigned int isac;
  543. unsigned int hscx_ale;
  544. unsigned int hscx;
  545. };
  546. struct diva_hw {
  547. unsigned long cfg_reg;
  548. unsigned long pci_cfg;
  549. unsigned int ctrl;
  550. unsigned long isac_adr;
  551. unsigned int isac;
  552. unsigned long hscx_adr;
  553. unsigned int hscx;
  554. unsigned int status;
  555. struct timer_list tl;
  556. u_char ctrl_reg;
  557. struct pci_dev *dev;
  558. };
  559. struct asus_hw {
  560. unsigned int cfg_reg;
  561. unsigned int adr;
  562. unsigned int isac;
  563. unsigned int hscx;
  564. unsigned int u7;
  565. unsigned int pots;
  566. };
  567. struct hfc_hw {
  568. unsigned int addr;
  569. unsigned int fifosize;
  570. unsigned char cirm;
  571. unsigned char ctmt;
  572. unsigned char cip;
  573. u_char isac_spcr;
  574. struct timer_list timer;
  575. };
  576. struct sedl_hw {
  577. unsigned int cfg_reg;
  578. unsigned int adr;
  579. unsigned int isac;
  580. unsigned int hscx;
  581. unsigned int reset_on;
  582. unsigned int reset_off;
  583. struct isar_reg isar;
  584. unsigned int chip;
  585. unsigned int bus;
  586. struct pci_dev *dev;
  587. };
  588. struct spt_hw {
  589. unsigned int cfg_reg;
  590. unsigned int isac;
  591. unsigned int hscx[2];
  592. unsigned char res_irq;
  593. };
  594. struct mic_hw {
  595. unsigned int cfg_reg;
  596. unsigned int adr;
  597. unsigned int isac;
  598. unsigned int hscx;
  599. };
  600. struct njet_hw {
  601. unsigned long base;
  602. unsigned int isac;
  603. unsigned int auxa;
  604. unsigned char auxd;
  605. unsigned char dmactrl;
  606. unsigned char ctrl_reg;
  607. unsigned char irqmask0;
  608. unsigned char irqstat0;
  609. unsigned char last_is0;
  610. struct pci_dev *dev;
  611. };
  612. struct hfcPCI_hw {
  613. unsigned char cirm;
  614. unsigned char ctmt;
  615. unsigned char conn;
  616. unsigned char mst_m;
  617. unsigned char int_m1;
  618. unsigned char int_m2;
  619. unsigned char int_s1;
  620. unsigned char sctrl;
  621. unsigned char sctrl_r;
  622. unsigned char sctrl_e;
  623. unsigned char trm;
  624. unsigned char stat;
  625. unsigned char fifo;
  626. unsigned char fifo_en;
  627. unsigned char bswapped;
  628. unsigned char nt_mode;
  629. int nt_timer;
  630. struct pci_dev *dev;
  631. unsigned char *pci_io; /* start of PCI IO memory */
  632. void *share_start; /* shared memory for Fifos start */
  633. void *fifos; /* FIFO memory */
  634. int last_bfifo_cnt[2]; /* marker saving last b-fifo frame count */
  635. struct timer_list timer;
  636. };
  637. struct hfcSX_hw {
  638. unsigned long base;
  639. unsigned char cirm;
  640. unsigned char ctmt;
  641. unsigned char conn;
  642. unsigned char mst_m;
  643. unsigned char int_m1;
  644. unsigned char int_m2;
  645. unsigned char int_s1;
  646. unsigned char sctrl;
  647. unsigned char sctrl_r;
  648. unsigned char sctrl_e;
  649. unsigned char trm;
  650. unsigned char stat;
  651. unsigned char fifo;
  652. unsigned char bswapped;
  653. unsigned char nt_mode;
  654. unsigned char chip;
  655. int b_fifo_size;
  656. unsigned char last_fifo;
  657. void *extra;
  658. int nt_timer;
  659. struct timer_list timer;
  660. };
  661. struct hfcD_hw {
  662. unsigned int addr;
  663. unsigned int bfifosize;
  664. unsigned int dfifosize;
  665. unsigned char cirm;
  666. unsigned char ctmt;
  667. unsigned char cip;
  668. unsigned char conn;
  669. unsigned char mst_m;
  670. unsigned char int_m1;
  671. unsigned char int_m2;
  672. unsigned char int_s1;
  673. unsigned char sctrl;
  674. unsigned char stat;
  675. unsigned char fifo;
  676. unsigned char f1;
  677. unsigned char f2;
  678. unsigned int *send;
  679. struct timer_list timer;
  680. };
  681. struct isurf_hw {
  682. unsigned int reset;
  683. unsigned long phymem;
  684. void __iomem *isac;
  685. void __iomem *isar;
  686. struct isar_reg isar_r;
  687. };
  688. struct saphir_hw {
  689. struct pci_dev *dev;
  690. unsigned int cfg_reg;
  691. unsigned int ale;
  692. unsigned int isac;
  693. unsigned int hscx;
  694. struct timer_list timer;
  695. };
  696. struct bkm_hw {
  697. struct pci_dev *dev;
  698. unsigned long base;
  699. /* A4T stuff */
  700. unsigned long isac_adr;
  701. unsigned int isac_ale;
  702. unsigned long jade_adr;
  703. unsigned int jade_ale;
  704. /* Scitel Quadro stuff */
  705. unsigned long plx_adr;
  706. unsigned long data_adr;
  707. };
  708. struct gazel_hw {
  709. struct pci_dev *dev;
  710. unsigned int cfg_reg;
  711. unsigned int pciaddr[2];
  712. signed int ipac;
  713. signed int isac;
  714. signed int hscx[2];
  715. signed int isacfifo;
  716. signed int hscxfifo[2];
  717. unsigned char timeslot;
  718. unsigned char iom2;
  719. };
  720. struct w6692_hw {
  721. struct pci_dev *dev;
  722. unsigned int iobase;
  723. struct timer_list timer;
  724. };
  725. #ifdef CONFIG_HISAX_TESTEMU
  726. struct te_hw {
  727. unsigned char *sfifo;
  728. unsigned char *sfifo_w;
  729. unsigned char *sfifo_r;
  730. unsigned char *sfifo_e;
  731. int sfifo_cnt;
  732. unsigned int stat;
  733. wait_queue_head_t rwaitq;
  734. wait_queue_head_t swaitq;
  735. };
  736. #endif
  737. struct arcofi_msg {
  738. struct arcofi_msg *next;
  739. u_char receive;
  740. u_char len;
  741. u_char msg[10];
  742. };
  743. struct isac_chip {
  744. int ph_state;
  745. u_char *mon_tx;
  746. u_char *mon_rx;
  747. int mon_txp;
  748. int mon_txc;
  749. int mon_rxp;
  750. struct arcofi_msg *arcofi_list;
  751. struct timer_list arcofitimer;
  752. wait_queue_head_t arcofi_wait;
  753. u_char arcofi_bc;
  754. u_char arcofi_state;
  755. u_char mocr;
  756. u_char adf2;
  757. };
  758. struct hfcd_chip {
  759. int ph_state;
  760. };
  761. struct hfcpci_chip {
  762. int ph_state;
  763. };
  764. struct hfcsx_chip {
  765. int ph_state;
  766. };
  767. struct w6692_chip {
  768. int ph_state;
  769. };
  770. struct amd7930_chip {
  771. u_char lmr1;
  772. u_char ph_state;
  773. u_char old_state;
  774. u_char flg_t3;
  775. unsigned int tx_xmtlen;
  776. struct timer_list timer3;
  777. void (*ph_command) (struct IsdnCardState *, u_char, char *);
  778. void (*setIrqMask) (struct IsdnCardState *, u_char);
  779. };
  780. struct icc_chip {
  781. int ph_state;
  782. u_char *mon_tx;
  783. u_char *mon_rx;
  784. int mon_txp;
  785. int mon_txc;
  786. int mon_rxp;
  787. struct arcofi_msg *arcofi_list;
  788. struct timer_list arcofitimer;
  789. wait_queue_head_t arcofi_wait;
  790. u_char arcofi_bc;
  791. u_char arcofi_state;
  792. u_char mocr;
  793. u_char adf2;
  794. };
  795. #define HW_IOM1 0
  796. #define HW_IPAC 1
  797. #define HW_ISAR 2
  798. #define HW_ARCOFI 3
  799. #define FLG_TWO_DCHAN 4
  800. #define FLG_L1_DBUSY 5
  801. #define FLG_DBUSY_TIMER 6
  802. #define FLG_LOCK_ATOMIC 7
  803. #define FLG_ARCOFI_TIMER 8
  804. #define FLG_ARCOFI_ERROR 9
  805. #define FLG_HW_L1_UINT 10
  806. struct IsdnCardState {
  807. spinlock_t lock;
  808. u_char typ;
  809. u_char subtyp;
  810. int protocol;
  811. u_int irq;
  812. u_long irq_flags;
  813. u_long HW_Flags;
  814. int *busy_flag;
  815. int chanlimit; /* limited number of B-chans to use */
  816. int logecho; /* log echo if supported by card */
  817. union {
  818. struct elsa_hw elsa;
  819. struct teles0_hw teles0;
  820. struct teles3_hw teles3;
  821. struct avm_hw avm;
  822. struct ix1_hw ix1;
  823. struct diva_hw diva;
  824. struct asus_hw asus;
  825. struct hfc_hw hfc;
  826. struct sedl_hw sedl;
  827. struct spt_hw spt;
  828. struct mic_hw mic;
  829. struct njet_hw njet;
  830. struct hfcD_hw hfcD;
  831. struct hfcPCI_hw hfcpci;
  832. struct hfcSX_hw hfcsx;
  833. struct ix1_hw niccy;
  834. struct isurf_hw isurf;
  835. struct saphir_hw saphir;
  836. #ifdef CONFIG_HISAX_TESTEMU
  837. struct te_hw te;
  838. #endif
  839. struct bkm_hw ax;
  840. struct gazel_hw gazel;
  841. struct w6692_hw w6692;
  842. struct hisax_d_if *hisax_d_if;
  843. } hw;
  844. int myid;
  845. isdn_if iif;
  846. spinlock_t statlock;
  847. u_char *status_buf;
  848. u_char *status_read;
  849. u_char *status_write;
  850. u_char *status_end;
  851. u_char (*readisac) (struct IsdnCardState *, u_char);
  852. void (*writeisac) (struct IsdnCardState *, u_char, u_char);
  853. void (*readisacfifo) (struct IsdnCardState *, u_char *, int);
  854. void (*writeisacfifo) (struct IsdnCardState *, u_char *, int);
  855. u_char (*BC_Read_Reg) (struct IsdnCardState *, int, u_char);
  856. void (*BC_Write_Reg) (struct IsdnCardState *, int, u_char, u_char);
  857. void (*BC_Send_Data) (struct BCState *);
  858. int (*cardmsg) (struct IsdnCardState *, int, void *);
  859. void (*setstack_d) (struct PStack *, struct IsdnCardState *);
  860. void (*DC_Close) (struct IsdnCardState *);
  861. int (*irq_func) (int, void *, struct pt_regs *);
  862. int (*auxcmd) (struct IsdnCardState *, isdn_ctrl *);
  863. struct Channel channel[2+MAX_WAITING_CALLS];
  864. struct BCState bcs[2+MAX_WAITING_CALLS];
  865. struct PStack *stlist;
  866. struct sk_buff_head rq, sq; /* D-channel queues */
  867. int cardnr;
  868. char *dlog;
  869. int debug;
  870. union {
  871. struct isac_chip isac;
  872. struct hfcd_chip hfcd;
  873. struct hfcpci_chip hfcpci;
  874. struct hfcsx_chip hfcsx;
  875. struct w6692_chip w6692;
  876. struct amd7930_chip amd7930;
  877. struct icc_chip icc;
  878. } dc;
  879. u_char *rcvbuf;
  880. int rcvidx;
  881. struct sk_buff *tx_skb;
  882. int tx_cnt;
  883. u_long event;
  884. struct work_struct tqueue;
  885. struct timer_list dbusytimer;
  886. #ifdef ERROR_STATISTIC
  887. int err_crc;
  888. int err_tx;
  889. int err_rx;
  890. #endif
  891. };
  892. #define schedule_event(s, ev) do {test_and_set_bit(ev, &s->event);schedule_work(&s->tqueue); } while(0)
  893. #define MON0_RX 1
  894. #define MON1_RX 2
  895. #define MON0_TX 4
  896. #define MON1_TX 8
  897. #ifdef ISDN_CHIP_ISAC
  898. #undef ISDN_CHIP_ISAC
  899. #endif
  900. #ifdef CONFIG_HISAX_16_0
  901. #define CARD_TELES0 1
  902. #ifndef ISDN_CHIP_ISAC
  903. #define ISDN_CHIP_ISAC 1
  904. #endif
  905. #else
  906. #define CARD_TELES0 0
  907. #endif
  908. #ifdef CONFIG_HISAX_16_3
  909. #define CARD_TELES3 1
  910. #ifndef ISDN_CHIP_ISAC
  911. #define ISDN_CHIP_ISAC 1
  912. #endif
  913. #else
  914. #define CARD_TELES3 0
  915. #endif
  916. #ifdef CONFIG_HISAX_TELESPCI
  917. #define CARD_TELESPCI 1
  918. #ifndef ISDN_CHIP_ISAC
  919. #define ISDN_CHIP_ISAC 1
  920. #endif
  921. #else
  922. #define CARD_TELESPCI 0
  923. #endif
  924. #ifdef CONFIG_HISAX_AVM_A1
  925. #define CARD_AVM_A1 1
  926. #ifndef ISDN_CHIP_ISAC
  927. #define ISDN_CHIP_ISAC 1
  928. #endif
  929. #else
  930. #define CARD_AVM_A1 0
  931. #endif
  932. #ifdef CONFIG_HISAX_AVM_A1_PCMCIA
  933. #define CARD_AVM_A1_PCMCIA 1
  934. #ifndef ISDN_CHIP_ISAC
  935. #define ISDN_CHIP_ISAC 1
  936. #endif
  937. #else
  938. #define CARD_AVM_A1_PCMCIA 0
  939. #endif
  940. #ifdef CONFIG_HISAX_FRITZPCI
  941. #define CARD_FRITZPCI 1
  942. #ifndef ISDN_CHIP_ISAC
  943. #define ISDN_CHIP_ISAC 1
  944. #endif
  945. #else
  946. #define CARD_FRITZPCI 0
  947. #endif
  948. #ifdef CONFIG_HISAX_ELSA
  949. #define CARD_ELSA 1
  950. #ifndef ISDN_CHIP_ISAC
  951. #define ISDN_CHIP_ISAC 1
  952. #endif
  953. #else
  954. #define CARD_ELSA 0
  955. #endif
  956. #ifdef CONFIG_HISAX_IX1MICROR2
  957. #define CARD_IX1MICROR2 1
  958. #ifndef ISDN_CHIP_ISAC
  959. #define ISDN_CHIP_ISAC 1
  960. #endif
  961. #else
  962. #define CARD_IX1MICROR2 0
  963. #endif
  964. #ifdef CONFIG_HISAX_DIEHLDIVA
  965. #define CARD_DIEHLDIVA 1
  966. #ifndef ISDN_CHIP_ISAC
  967. #define ISDN_CHIP_ISAC 1
  968. #endif
  969. #else
  970. #define CARD_DIEHLDIVA 0
  971. #endif
  972. #ifdef CONFIG_HISAX_ASUSCOM
  973. #define CARD_ASUSCOM 1
  974. #ifndef ISDN_CHIP_ISAC
  975. #define ISDN_CHIP_ISAC 1
  976. #endif
  977. #else
  978. #define CARD_ASUSCOM 0
  979. #endif
  980. #ifdef CONFIG_HISAX_TELEINT
  981. #define CARD_TELEINT 1
  982. #ifndef ISDN_CHIP_ISAC
  983. #define ISDN_CHIP_ISAC 1
  984. #endif
  985. #else
  986. #define CARD_TELEINT 0
  987. #endif
  988. #ifdef CONFIG_HISAX_SEDLBAUER
  989. #define CARD_SEDLBAUER 1
  990. #ifndef ISDN_CHIP_ISAC
  991. #define ISDN_CHIP_ISAC 1
  992. #endif
  993. #else
  994. #define CARD_SEDLBAUER 0
  995. #endif
  996. #ifdef CONFIG_HISAX_SPORTSTER
  997. #define CARD_SPORTSTER 1
  998. #ifndef ISDN_CHIP_ISAC
  999. #define ISDN_CHIP_ISAC 1
  1000. #endif
  1001. #else
  1002. #define CARD_SPORTSTER 0
  1003. #endif
  1004. #ifdef CONFIG_HISAX_MIC
  1005. #define CARD_MIC 1
  1006. #ifndef ISDN_CHIP_ISAC
  1007. #define ISDN_CHIP_ISAC 1
  1008. #endif
  1009. #else
  1010. #define CARD_MIC 0
  1011. #endif
  1012. #ifdef CONFIG_HISAX_NETJET
  1013. #define CARD_NETJET_S 1
  1014. #ifndef ISDN_CHIP_ISAC
  1015. #define ISDN_CHIP_ISAC 1
  1016. #endif
  1017. #else
  1018. #define CARD_NETJET_S 0
  1019. #endif
  1020. #ifdef CONFIG_HISAX_HFCS
  1021. #define CARD_HFCS 1
  1022. #else
  1023. #define CARD_HFCS 0
  1024. #endif
  1025. #ifdef CONFIG_HISAX_HFC_PCI
  1026. #define CARD_HFC_PCI 1
  1027. #else
  1028. #define CARD_HFC_PCI 0
  1029. #endif
  1030. #ifdef CONFIG_HISAX_HFC_SX
  1031. #define CARD_HFC_SX 1
  1032. #else
  1033. #define CARD_HFC_SX 0
  1034. #endif
  1035. #ifdef CONFIG_HISAX_AMD7930
  1036. #define CARD_AMD7930 1
  1037. #else
  1038. #define CARD_AMD7930 0
  1039. #endif
  1040. #ifdef CONFIG_HISAX_NICCY
  1041. #define CARD_NICCY 1
  1042. #ifndef ISDN_CHIP_ISAC
  1043. #define ISDN_CHIP_ISAC 1
  1044. #endif
  1045. #else
  1046. #define CARD_NICCY 0
  1047. #endif
  1048. #ifdef CONFIG_HISAX_ISURF
  1049. #define CARD_ISURF 1
  1050. #ifndef ISDN_CHIP_ISAC
  1051. #define ISDN_CHIP_ISAC 1
  1052. #endif
  1053. #else
  1054. #define CARD_ISURF 0
  1055. #endif
  1056. #ifdef CONFIG_HISAX_S0BOX
  1057. #define CARD_S0BOX 1
  1058. #ifndef ISDN_CHIP_ISAC
  1059. #define ISDN_CHIP_ISAC 1
  1060. #endif
  1061. #else
  1062. #define CARD_S0BOX 0
  1063. #endif
  1064. #ifdef CONFIG_HISAX_HSTSAPHIR
  1065. #define CARD_HSTSAPHIR 1
  1066. #ifndef ISDN_CHIP_ISAC
  1067. #define ISDN_CHIP_ISAC 1
  1068. #endif
  1069. #else
  1070. #define CARD_HSTSAPHIR 0
  1071. #endif
  1072. #ifdef CONFIG_HISAX_TESTEMU
  1073. #define CARD_TESTEMU 1
  1074. #define ISDN_CTYPE_TESTEMU 99
  1075. #undef ISDN_CTYPE_COUNT
  1076. #define ISDN_CTYPE_COUNT ISDN_CTYPE_TESTEMU
  1077. #else
  1078. #define CARD_TESTEMU 0
  1079. #endif
  1080. #ifdef CONFIG_HISAX_BKM_A4T
  1081. #define CARD_BKM_A4T 1
  1082. #ifndef ISDN_CHIP_ISAC
  1083. #define ISDN_CHIP_ISAC 1
  1084. #endif
  1085. #else
  1086. #define CARD_BKM_A4T 0
  1087. #endif
  1088. #ifdef CONFIG_HISAX_SCT_QUADRO
  1089. #define CARD_SCT_QUADRO 1
  1090. #ifndef ISDN_CHIP_ISAC
  1091. #define ISDN_CHIP_ISAC 1
  1092. #endif
  1093. #else
  1094. #define CARD_SCT_QUADRO 0
  1095. #endif
  1096. #ifdef CONFIG_HISAX_GAZEL
  1097. #define CARD_GAZEL 1
  1098. #ifndef ISDN_CHIP_ISAC
  1099. #define ISDN_CHIP_ISAC 1
  1100. #endif
  1101. #else
  1102. #define CARD_GAZEL 0
  1103. #endif
  1104. #ifdef CONFIG_HISAX_W6692
  1105. #define CARD_W6692 1
  1106. #ifndef ISDN_CHIP_W6692
  1107. #define ISDN_CHIP_W6692 1
  1108. #endif
  1109. #else
  1110. #define CARD_W6692 0
  1111. #endif
  1112. #ifdef CONFIG_HISAX_NETJET_U
  1113. #define CARD_NETJET_U 1
  1114. #ifndef ISDN_CHIP_ICC
  1115. #define ISDN_CHIP_ICC 1
  1116. #endif
  1117. #ifndef HISAX_UINTERFACE
  1118. #define HISAX_UINTERFACE 1
  1119. #endif
  1120. #else
  1121. #define CARD_NETJET_U 0
  1122. #endif
  1123. #ifdef CONFIG_HISAX_ENTERNOW_PCI
  1124. #define CARD_FN_ENTERNOW_PCI 1
  1125. #endif
  1126. #define TEI_PER_CARD 1
  1127. /* L1 Debug */
  1128. #define L1_DEB_WARN 0x01
  1129. #define L1_DEB_INTSTAT 0x02
  1130. #define L1_DEB_ISAC 0x04
  1131. #define L1_DEB_ISAC_FIFO 0x08
  1132. #define L1_DEB_HSCX 0x10
  1133. #define L1_DEB_HSCX_FIFO 0x20
  1134. #define L1_DEB_LAPD 0x40
  1135. #define L1_DEB_IPAC 0x80
  1136. #define L1_DEB_RECEIVE_FRAME 0x100
  1137. #define L1_DEB_MONITOR 0x200
  1138. #define DEB_DLOG_HEX 0x400
  1139. #define DEB_DLOG_VERBOSE 0x800
  1140. #define L2FRAME_DEBUG
  1141. #ifdef L2FRAME_DEBUG
  1142. extern void Logl2Frame(struct IsdnCardState *cs, struct sk_buff *skb, char *buf, int dir);
  1143. #endif
  1144. #include "hisax_cfg.h"
  1145. void init_bcstate(struct IsdnCardState *cs, int bc);
  1146. void setstack_HiSax(struct PStack *st, struct IsdnCardState *cs);
  1147. void HiSax_addlist(struct IsdnCardState *sp, struct PStack *st);
  1148. void HiSax_rmlist(struct IsdnCardState *sp, struct PStack *st);
  1149. void setstack_l1_B(struct PStack *st);
  1150. void setstack_tei(struct PStack *st);
  1151. void setstack_manager(struct PStack *st);
  1152. void setstack_isdnl2(struct PStack *st, char *debug_id);
  1153. void releasestack_isdnl2(struct PStack *st);
  1154. void setstack_transl2(struct PStack *st);
  1155. void releasestack_transl2(struct PStack *st);
  1156. void lli_writewakeup(struct PStack *st, int len);
  1157. void setstack_l3dc(struct PStack *st, struct Channel *chanp);
  1158. void setstack_l3bc(struct PStack *st, struct Channel *chanp);
  1159. void releasestack_isdnl3(struct PStack *st);
  1160. u_char *findie(u_char * p, int size, u_char ie, int wanted_set);
  1161. int getcallref(u_char * p);
  1162. int newcallref(void);
  1163. int FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount);
  1164. void FsmFree(struct Fsm *fsm);
  1165. int FsmEvent(struct FsmInst *fi, int event, void *arg);
  1166. void FsmChangeState(struct FsmInst *fi, int newstate);
  1167. void FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft);
  1168. int FsmAddTimer(struct FsmTimer *ft, int millisec, int event,
  1169. void *arg, int where);
  1170. void FsmRestartTimer(struct FsmTimer *ft, int millisec, int event,
  1171. void *arg, int where);
  1172. void FsmDelTimer(struct FsmTimer *ft, int where);
  1173. int jiftime(char *s, long mark);
  1174. int HiSax_command(isdn_ctrl * ic);
  1175. int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb);
  1176. void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...);
  1177. void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args);
  1178. void HiSax_reportcard(int cardnr, int sel);
  1179. int QuickHex(char *txt, u_char * p, int cnt);
  1180. void LogFrame(struct IsdnCardState *cs, u_char * p, int size);
  1181. void dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir);
  1182. void iecpy(u_char * dest, u_char * iestart, int ieoffset);
  1183. #endif /* __KERNEL__ */
  1184. #define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);}
  1185. int ll_run(struct IsdnCardState *cs, int addfeatures);
  1186. int CallcNew(void);
  1187. void CallcFree(void);
  1188. int CallcNewChan(struct IsdnCardState *cs);
  1189. void CallcFreeChan(struct IsdnCardState *cs);
  1190. int Isdnl1New(void);
  1191. void Isdnl1Free(void);
  1192. int Isdnl2New(void);
  1193. void Isdnl2Free(void);
  1194. int Isdnl3New(void);
  1195. void Isdnl3Free(void);
  1196. void init_tei(struct IsdnCardState *cs, int protocol);
  1197. void release_tei(struct IsdnCardState *cs);
  1198. char *HiSax_getrev(const char *revision);
  1199. int TeiNew(void);
  1200. void TeiFree(void);