1 /* $Id: hisax.h,v 2.64.2.4 2004/02/11 13:21:33 keil Exp $
3 * Basic declarations, defines and prototypes
5 * This software may be used and distributed according to the terms
6 * of the GNU General Public License, incorporated herein by reference.
9 #include <linux/config.h>
10 #include <linux/errno.h>
12 #include <linux/major.h>
14 #include <linux/delay.h>
15 #include <linux/kernel.h>
16 #include <linux/signal.h>
17 #include <linux/slab.h>
19 #include <linux/mman.h>
20 #include <linux/ioport.h>
21 #include <linux/timer.h>
22 #include <linux/wait.h>
23 #include <linux/isdnif.h>
24 #include <linux/tty.h>
25 #include <linux/serial_reg.h>
26 #include <linux/netdevice.h>
28 #define ERROR_STATISTIC
35 #define HW_ENABLE 0x0000
36 #define HW_RESET 0x0004
37 #define HW_POWERUP 0x0008
38 #define HW_ACTIVATE 0x0010
39 #define HW_DEACTIVATE 0x0018
41 #define HW_INFO1 0x0010
42 #define HW_INFO2 0x0020
43 #define HW_INFO3 0x0030
44 #define HW_INFO4 0x0040
45 #define HW_INFO4_P8 0x0040
46 #define HW_INFO4_P10 0x0048
47 #define HW_RSYNC 0x0060
48 #define HW_TESTLOOP 0x0070
49 #define CARD_RESET 0x00F0
50 #define CARD_INIT 0x00F2
51 #define CARD_RELEASE 0x00F3
52 #define CARD_TEST 0x00F4
53 #define CARD_AUX_IND 0x00F5
55 #define PH_ACTIVATE 0x0100
56 #define PH_DEACTIVATE 0x0110
57 #define PH_DATA 0x0120
58 #define PH_PULL 0x0130
59 #define PH_TESTLOOP 0x0140
60 #define PH_PAUSE 0x0150
61 #define MPH_ACTIVATE 0x0180
62 #define MPH_DEACTIVATE 0x0190
63 #define MPH_INFORMATION 0x01A0
65 #define DL_ESTABLISH 0x0200
66 #define DL_RELEASE 0x0210
67 #define DL_DATA 0x0220
68 #define DL_FLUSH 0x0224
69 #define DL_UNIT_DATA 0x0230
71 #define MDL_BC_RELEASE 0x0278 // Formula-n enter:now
72 #define MDL_BC_ASSIGN 0x027C // Formula-n enter:now
73 #define MDL_ASSIGN 0x0280
74 #define MDL_REMOVE 0x0284
75 #define MDL_ERROR 0x0288
76 #define MDL_INFO_SETUP 0x02E0
77 #define MDL_INFO_CONN 0x02E4
78 #define MDL_INFO_REL 0x02E8
80 #define CC_SETUP 0x0300
81 #define CC_RESUME 0x0304
82 #define CC_MORE_INFO 0x0310
83 #define CC_IGNORE 0x0320
84 #define CC_REJECT 0x0324
85 #define CC_SETUP_COMPL 0x0330
86 #define CC_PROCEEDING 0x0340
87 #define CC_ALERTING 0x0344
88 #define CC_PROGRESS 0x0348
89 #define CC_CONNECT 0x0350
90 #define CC_CHARGE 0x0354
91 #define CC_NOTIFY 0x0358
92 #define CC_DISCONNECT 0x0360
93 #define CC_RELEASE 0x0368
94 #define CC_SUSPEND 0x0370
95 #define CC_PROCEED_SEND 0x0374
96 #define CC_REDIR 0x0378
97 #define CC_T302 0x0382
98 #define CC_T303 0x0383
99 #define CC_T304 0x0384
100 #define CC_T305 0x0385
101 #define CC_T308_1 0x0388
102 #define CC_T308_2 0x038A
103 #define CC_T309 0x0309
104 #define CC_T310 0x0390
105 #define CC_T313 0x0393
106 #define CC_T318 0x0398
107 #define CC_T319 0x0399
108 #define CC_TSPID 0x03A0
109 #define CC_NOSETUP_RSP 0x03E0
110 #define CC_SETUP_ERR 0x03E1
111 #define CC_SUSPEND_ERR 0x03E2
112 #define CC_RESUME_ERR 0x03E3
113 #define CC_CONNECT_ERR 0x03E4
114 #define CC_RELEASE_ERR 0x03E5
115 #define CC_RESTART 0x03F4
116 #define CC_TDSS1_IO 0x13F4 /* DSS1 IO user timer */
117 #define CC_TNI1_IO 0x13F5 /* NI1 IO user timer */
119 /* define maximum number of possible waiting incoming calls */
120 #define MAX_WAITING_CALLS 2
125 /* include l3dss1 & ni1 specific process structures, but no other defines */
126 #ifdef CONFIG_HISAX_EURO
127 #define l3dss1_process
129 #undef l3dss1_process
130 #endif /* CONFIG_HISAX_EURO */
132 #ifdef CONFIG_HISAX_NI1
133 #define l3ni1_process
136 #endif /* CONFIG_HISAX_NI1 */
138 #define MAX_DFRAME_LEN 260
139 #define MAX_DFRAME_LEN_L1 300
140 #define HSCX_BUFMAX 4096
141 #define MAX_DATA_SIZE (HSCX_BUFMAX - 4)
142 #define MAX_DATA_MEM (HSCX_BUFMAX + 64)
143 #define RAW_BUFMAX (((HSCX_BUFMAX*6)/5) + 5)
144 #define MAX_HEADER_LEN 4
146 #define MAX_MON_FRAME 32
147 #define MAX_DLOG_SPACE 2048
148 #define MAX_BLOG_SPACE 256
150 /* #define I4L_IRQ_FLAG SA_INTERRUPT */
151 #define I4L_IRQ_FLAG 0
159 typedef void (* FSMFNPTR)(struct FsmInst *, int, void *);
162 FSMFNPTR *jumpmatrix;
163 int state_count, event_count;
164 char **strEvent, **strState;
173 void (*printdebug) (struct FsmInst *, char *, ...);
178 void (*routine) (struct FsmInst *, int, void *);
183 struct timer_list tl;
189 struct l3_process *pc;
190 struct timer_list tl;
194 #define FLG_L1_ACTIVATING 1
195 #define FLG_L1_ACTIVATED 2
196 #define FLG_L1_DEACTTIMER 3
197 #define FLG_L1_ACTTIMER 4
198 #define FLG_L1_T3RUN 5
199 #define FLG_L1_PULL_REQ 6
200 #define FLG_L1_UINT 7
205 struct PStack **stlistp;
208 struct FsmTimer timer;
209 void (*l1l2) (struct PStack *, int, void *);
210 void (*l1hw) (struct PStack *, int, void *);
211 void (*l1tei) (struct PStack *, int, void *);
216 #define GROUP_TEI 127
219 #define PACKET_NOACK 7
227 #define FLG_PEND_REL 4
228 #define FLG_L3_INIT 5
229 #define FLG_T200_RUN 6
230 #define FLG_ACK_PEND 7
232 #define FLG_OWN_BUSY 9
233 #define FLG_PEER_BUSY 10
234 #define FLG_DCHAN_BUSY 11
235 #define FLG_L1_ACTIV 12
236 #define FLG_ESTAB_PEND 13
238 #define FLG_FIXED_TEI 15
239 #define FLG_L2BLOCK 16
251 struct sk_buff *windowar[MAX_WINDOW];
252 struct sk_buff_head i_queue;
253 struct sk_buff_head ui_queue;
254 void (*l2l1) (struct PStack *, int, void *);
255 void (*l2l3) (struct PStack *, int, void *);
256 void (*l2tei) (struct PStack *, int, void *);
258 struct FsmTimer t200, t203;
259 int T200, N200, T203;
265 void (*l3l4) (struct PStack *, int, void *);
266 void (*l3ml3) (struct PStack *, int, void *);
267 void (*l3l2) (struct PStack *, int, void *);
269 struct FsmTimer l3m_timer;
270 struct sk_buff_head squeue;
271 struct l3_process *proc;
272 struct l3_process *global;
279 void (*l4l3) (struct PStack *, int, void *);
280 int (*l4l3_proto) (struct PStack *, isdn_ctrl *);
285 #define FLG_LLI_L1WAKEUP 1
286 #define FLG_LLI_L2WAKEUP 2
290 struct FsmInst tei_m;
291 struct FsmTimer t202;
292 int T202, N202, debug;
293 void (*layer) (struct PStack *, int, void *);
304 int spv; /* SPV Flag */
305 setup_parm setup; /* from isdnif.h numbers and Serviceindicator */
306 u_char moderate; /* transfer mode and rate (bearer octet 4) */
315 struct LLInterface lli;
316 struct Management ma;
317 int protocol; /* EDSS1, 1TR6 or NI1 */
319 /* protocol specific data fields */
321 { u_char uuuu; /* only as dummy */
322 #ifdef CONFIG_HISAX_EURO
323 dss1_stk_priv dss1; /* private dss1 data */
324 #endif /* CONFIG_HISAX_EURO */
325 #ifdef CONFIG_HISAX_NI1
326 ni1_stk_priv ni1; /* private ni1 data */
327 #endif /* CONFIG_HISAX_NI1 */
334 struct L3Timer timer;
338 struct Channel *chan;
340 struct l3_process *next;
343 /* protocol specific data fields */
345 { u_char uuuu; /* only when euro not defined, avoiding empty union */
346 #ifdef CONFIG_HISAX_EURO
347 dss1_proc_priv dss1; /* private dss1 data */
348 #endif /* CONFIG_HISAX_EURO */
349 #ifdef CONFIG_HISAX_NI1
350 ni1_proc_priv ni1; /* private ni1 data */
351 #endif /* CONFIG_HISAX_NI1 */
358 int count; /* Current skb sent count */
359 u_char *rcvbuf; /* B-Channel receive Buffer */
367 int count; /* Current skb sent count */
368 u_char *rcvbuf; /* B-Channel receive Buffer */
373 volatile u_char bstat;
375 volatile u_char cmsb;
376 volatile u_char clsb;
377 volatile u_char par[8];
391 struct timer_list ftimer;
392 u_char *rcvbuf; /* B-Channel receive Buffer */
394 struct isar_reg *reg;
397 struct hdlc_stat_reg {
409 } __attribute__((packed));
414 struct hdlc_stat_reg sr;
418 int count; /* Current skb sent count */
419 u_char *rcvbuf; /* B-Channel receive Buffer */
455 struct sk_buff *rv_skb;
456 struct hdlc_state *hdlc_state;
457 struct work_struct tq_rcv;
458 struct work_struct tq_xmt;
461 #define BC_FLG_INIT 1
462 #define BC_FLG_ACTIV 2
463 #define BC_FLG_BUSY 3
464 #define BC_FLG_NOFRAME 4
465 #define BC_FLG_HALF 5
466 #define BC_FLG_EMPTY 6
467 #define BC_FLG_ORIG 7
468 #define BC_FLG_DLEETX 8
469 #define BC_FLG_LASTDLE 9
470 #define BC_FLG_FIRST 10
471 #define BC_FLG_LASTDATA 11
472 #define BC_FLG_NMD_DATA 12
473 #define BC_FLG_FTI_RUN 13
474 #define BC_FLG_LL_OK 14
475 #define BC_FLG_LL_CONN 15
476 #define BC_FLG_FTI_FTS 16
477 #define BC_FLG_FRH_WAIT 17
479 #define L1_MODE_NULL 0
480 #define L1_MODE_TRANS 1
481 #define L1_MODE_HDLC 2
482 #define L1_MODE_EXTRN 3
483 #define L1_MODE_HDLC_56K 4
484 #define L1_MODE_MODEM 7
485 #define L1_MODE_V32 8
486 #define L1_MODE_FAX 9
492 struct IsdnCardState *cs;
493 int tx_cnt; /* B-Channel transmit counter */
494 struct sk_buff *tx_skb; /* B-Channel transmit Buffer */
495 struct sk_buff_head rqueue; /* B-Channel receive Queue */
496 struct sk_buff_head squeue; /* B-Channel send Queue */
502 struct timer_list transbusy;
503 struct work_struct tqueue;
505 int (*BC_SetStack) (struct PStack *, struct BCState *);
506 void (*BC_Close) (struct BCState *);
507 #ifdef ERROR_STATISTIC
518 struct tiger_hw tiger;
519 struct amd7930_hw amd7930;
520 struct w6692B_hw w6692;
521 struct hisax_b_if *b_if;
526 struct PStack *b_st, *d_st;
527 struct IsdnCardState *cs;
532 struct FsmTimer drel_timer, dial_timer;
534 int l2_protocol, l2_active_protocol;
537 struct l3_process *proc;
538 setup_parm setup; /* from isdnif.h numbers and Serviceindicator */
539 u_long Flags; /* for remembering action done in l4 */
554 unsigned int counter;
556 struct timer_list tl;
563 unsigned int transcnt;
573 unsigned int cfg_reg;
577 signed int hscxfifo[2];
581 unsigned int cfg_reg;
582 void __iomem *membase;
583 unsigned long phymem;
587 unsigned int cfg_reg;
589 unsigned int hscx[2];
590 unsigned int isacfifo;
591 unsigned int hscxfifo[2];
592 unsigned int counter;
597 unsigned int cfg_reg;
598 unsigned int isac_ale;
600 unsigned int hscx_ale;
605 unsigned long cfg_reg;
606 unsigned long pci_cfg;
608 unsigned long isac_adr;
610 unsigned long hscx_adr;
613 struct timer_list tl;
619 unsigned int cfg_reg;
630 unsigned int fifosize;
635 struct timer_list timer;
639 unsigned int cfg_reg;
643 unsigned int reset_on;
644 unsigned int reset_off;
645 struct isar_reg isar;
652 unsigned int cfg_reg;
654 unsigned int hscx[2];
655 unsigned char res_irq;
659 unsigned int cfg_reg;
670 unsigned char dmactrl;
671 unsigned char ctrl_reg;
672 unsigned char irqmask0;
673 unsigned char irqstat0;
674 unsigned char last_is0;
683 unsigned char int_m1;
684 unsigned char int_m2;
685 unsigned char int_s1;
687 unsigned char sctrl_r;
688 unsigned char sctrl_e;
692 unsigned char fifo_en;
693 unsigned char bswapped;
694 unsigned char nt_mode;
697 unsigned char *pci_io; /* start of PCI IO memory */
698 void *share_start; /* shared memory for Fifos start */
699 void *fifos; /* FIFO memory */
700 int last_bfifo_cnt[2]; /* marker saving last b-fifo frame count */
701 struct timer_list timer;
710 unsigned char int_m1;
711 unsigned char int_m2;
712 unsigned char int_s1;
714 unsigned char sctrl_r;
715 unsigned char sctrl_e;
719 unsigned char bswapped;
720 unsigned char nt_mode;
723 unsigned char last_fifo;
726 struct timer_list timer;
731 unsigned int bfifosize;
732 unsigned int dfifosize;
738 unsigned char int_m1;
739 unsigned char int_m2;
740 unsigned char int_s1;
747 struct timer_list timer;
752 unsigned long phymem;
755 struct isar_reg isar_r;
760 unsigned int cfg_reg;
764 struct timer_list timer;
771 unsigned long isac_adr;
772 unsigned int isac_ale;
773 unsigned long jade_adr;
774 unsigned int jade_ale;
775 /* Scitel Quadro stuff */
776 unsigned long plx_adr;
777 unsigned long data_adr;
782 unsigned int cfg_reg;
783 unsigned int pciaddr[2];
788 signed int hscxfifo[2];
789 unsigned char timeslot;
796 struct timer_list timer;
799 #ifdef CONFIG_HISAX_TESTEMU
801 unsigned char *sfifo;
802 unsigned char *sfifo_w;
803 unsigned char *sfifo_r;
804 unsigned char *sfifo_e;
807 wait_queue_head_t rwaitq;
808 wait_queue_head_t swaitq;
813 struct arcofi_msg *next;
826 struct arcofi_msg *arcofi_list;
827 struct timer_list arcofitimer;
828 wait_queue_head_t arcofi_wait;
851 struct amd7930_chip {
856 unsigned int tx_xmtlen;
857 struct timer_list timer3;
858 void (*ph_command) (struct IsdnCardState *, u_char, char *);
859 void (*setIrqMask) (struct IsdnCardState *, u_char);
869 struct arcofi_msg *arcofi_list;
870 struct timer_list arcofitimer;
871 wait_queue_head_t arcofi_wait;
882 #define FLG_TWO_DCHAN 4
883 #define FLG_L1_DBUSY 5
884 #define FLG_DBUSY_TIMER 6
885 #define FLG_LOCK_ATOMIC 7
886 #define FLG_ARCOFI_TIMER 8
887 #define FLG_ARCOFI_ERROR 9
888 #define FLG_HW_L1_UINT 10
890 struct IsdnCardState {
899 int chanlimit; /* limited number of B-chans to use */
900 int logecho; /* log echo if supported by card */
903 struct teles0_hw teles0;
904 struct teles3_hw teles3;
915 struct hfcPCI_hw hfcpci;
916 struct hfcSX_hw hfcsx;
918 struct isurf_hw isurf;
919 struct saphir_hw saphir;
920 #ifdef CONFIG_HISAX_TESTEMU
924 struct gazel_hw gazel;
925 struct w6692_hw w6692;
926 struct hisax_d_if *hisax_d_if;
933 u_char *status_write;
935 u_char (*readisac) (struct IsdnCardState *, u_char);
936 void (*writeisac) (struct IsdnCardState *, u_char, u_char);
937 void (*readisacfifo) (struct IsdnCardState *, u_char *, int);
938 void (*writeisacfifo) (struct IsdnCardState *, u_char *, int);
939 u_char (*BC_Read_Reg) (struct IsdnCardState *, int, u_char);
940 void (*BC_Write_Reg) (struct IsdnCardState *, int, u_char, u_char);
941 void (*BC_Send_Data) (struct BCState *);
942 int (*cardmsg) (struct IsdnCardState *, int, void *);
943 void (*setstack_d) (struct PStack *, struct IsdnCardState *);
944 void (*DC_Close) (struct IsdnCardState *);
945 int (*irq_func) (int, void *, struct pt_regs *);
946 int (*auxcmd) (struct IsdnCardState *, isdn_ctrl *);
947 struct Channel channel[2+MAX_WAITING_CALLS];
948 struct BCState bcs[2+MAX_WAITING_CALLS];
949 struct PStack *stlist;
950 struct sk_buff_head rq, sq; /* D-channel queues */
955 struct isac_chip isac;
956 struct hfcd_chip hfcd;
957 struct hfcpci_chip hfcpci;
958 struct hfcsx_chip hfcsx;
959 struct w6692_chip w6692;
960 struct amd7930_chip amd7930;
965 struct sk_buff *tx_skb;
968 struct work_struct tqueue;
969 struct timer_list dbusytimer;
970 #ifdef ERROR_STATISTIC
978 #define schedule_event(s, ev) do {test_and_set_bit(ev, &s->event);schedule_work(&s->tqueue); } while(0)
986 #ifdef ISDN_CHIP_ISAC
987 #undef ISDN_CHIP_ISAC
990 #ifdef CONFIG_HISAX_16_0
991 #define CARD_TELES0 1
992 #ifndef ISDN_CHIP_ISAC
993 #define ISDN_CHIP_ISAC 1
996 #define CARD_TELES0 0
999 #ifdef CONFIG_HISAX_16_3
1000 #define CARD_TELES3 1
1001 #ifndef ISDN_CHIP_ISAC
1002 #define ISDN_CHIP_ISAC 1
1005 #define CARD_TELES3 0
1008 #ifdef CONFIG_HISAX_TELESPCI
1009 #define CARD_TELESPCI 1
1010 #ifndef ISDN_CHIP_ISAC
1011 #define ISDN_CHIP_ISAC 1
1014 #define CARD_TELESPCI 0
1017 #ifdef CONFIG_HISAX_AVM_A1
1018 #define CARD_AVM_A1 1
1019 #ifndef ISDN_CHIP_ISAC
1020 #define ISDN_CHIP_ISAC 1
1023 #define CARD_AVM_A1 0
1026 #ifdef CONFIG_HISAX_AVM_A1_PCMCIA
1027 #define CARD_AVM_A1_PCMCIA 1
1028 #ifndef ISDN_CHIP_ISAC
1029 #define ISDN_CHIP_ISAC 1
1032 #define CARD_AVM_A1_PCMCIA 0
1035 #ifdef CONFIG_HISAX_FRITZPCI
1036 #define CARD_FRITZPCI 1
1037 #ifndef ISDN_CHIP_ISAC
1038 #define ISDN_CHIP_ISAC 1
1041 #define CARD_FRITZPCI 0
1044 #ifdef CONFIG_HISAX_ELSA
1046 #ifndef ISDN_CHIP_ISAC
1047 #define ISDN_CHIP_ISAC 1
1053 #ifdef CONFIG_HISAX_IX1MICROR2
1054 #define CARD_IX1MICROR2 1
1055 #ifndef ISDN_CHIP_ISAC
1056 #define ISDN_CHIP_ISAC 1
1059 #define CARD_IX1MICROR2 0
1062 #ifdef CONFIG_HISAX_DIEHLDIVA
1063 #define CARD_DIEHLDIVA 1
1064 #ifndef ISDN_CHIP_ISAC
1065 #define ISDN_CHIP_ISAC 1
1068 #define CARD_DIEHLDIVA 0
1071 #ifdef CONFIG_HISAX_ASUSCOM
1072 #define CARD_ASUSCOM 1
1073 #ifndef ISDN_CHIP_ISAC
1074 #define ISDN_CHIP_ISAC 1
1077 #define CARD_ASUSCOM 0
1080 #ifdef CONFIG_HISAX_TELEINT
1081 #define CARD_TELEINT 1
1082 #ifndef ISDN_CHIP_ISAC
1083 #define ISDN_CHIP_ISAC 1
1086 #define CARD_TELEINT 0
1089 #ifdef CONFIG_HISAX_SEDLBAUER
1090 #define CARD_SEDLBAUER 1
1091 #ifndef ISDN_CHIP_ISAC
1092 #define ISDN_CHIP_ISAC 1
1095 #define CARD_SEDLBAUER 0
1098 #ifdef CONFIG_HISAX_SPORTSTER
1099 #define CARD_SPORTSTER 1
1100 #ifndef ISDN_CHIP_ISAC
1101 #define ISDN_CHIP_ISAC 1
1104 #define CARD_SPORTSTER 0
1107 #ifdef CONFIG_HISAX_MIC
1109 #ifndef ISDN_CHIP_ISAC
1110 #define ISDN_CHIP_ISAC 1
1116 #ifdef CONFIG_HISAX_NETJET
1117 #define CARD_NETJET_S 1
1118 #ifndef ISDN_CHIP_ISAC
1119 #define ISDN_CHIP_ISAC 1
1122 #define CARD_NETJET_S 0
1125 #ifdef CONFIG_HISAX_HFCS
1131 #ifdef CONFIG_HISAX_HFC_PCI
1132 #define CARD_HFC_PCI 1
1134 #define CARD_HFC_PCI 0
1137 #ifdef CONFIG_HISAX_HFC_SX
1138 #define CARD_HFC_SX 1
1140 #define CARD_HFC_SX 0
1143 #ifdef CONFIG_HISAX_AMD7930
1144 #define CARD_AMD7930 1
1146 #define CARD_AMD7930 0
1149 #ifdef CONFIG_HISAX_NICCY
1150 #define CARD_NICCY 1
1151 #ifndef ISDN_CHIP_ISAC
1152 #define ISDN_CHIP_ISAC 1
1155 #define CARD_NICCY 0
1158 #ifdef CONFIG_HISAX_ISURF
1159 #define CARD_ISURF 1
1160 #ifndef ISDN_CHIP_ISAC
1161 #define ISDN_CHIP_ISAC 1
1164 #define CARD_ISURF 0
1167 #ifdef CONFIG_HISAX_S0BOX
1168 #define CARD_S0BOX 1
1169 #ifndef ISDN_CHIP_ISAC
1170 #define ISDN_CHIP_ISAC 1
1173 #define CARD_S0BOX 0
1176 #ifdef CONFIG_HISAX_HSTSAPHIR
1177 #define CARD_HSTSAPHIR 1
1178 #ifndef ISDN_CHIP_ISAC
1179 #define ISDN_CHIP_ISAC 1
1182 #define CARD_HSTSAPHIR 0
1185 #ifdef CONFIG_HISAX_TESTEMU
1186 #define CARD_TESTEMU 1
1187 #define ISDN_CTYPE_TESTEMU 99
1188 #undef ISDN_CTYPE_COUNT
1189 #define ISDN_CTYPE_COUNT ISDN_CTYPE_TESTEMU
1191 #define CARD_TESTEMU 0
1194 #ifdef CONFIG_HISAX_BKM_A4T
1195 #define CARD_BKM_A4T 1
1196 #ifndef ISDN_CHIP_ISAC
1197 #define ISDN_CHIP_ISAC 1
1200 #define CARD_BKM_A4T 0
1203 #ifdef CONFIG_HISAX_SCT_QUADRO
1204 #define CARD_SCT_QUADRO 1
1205 #ifndef ISDN_CHIP_ISAC
1206 #define ISDN_CHIP_ISAC 1
1209 #define CARD_SCT_QUADRO 0
1212 #ifdef CONFIG_HISAX_GAZEL
1213 #define CARD_GAZEL 1
1214 #ifndef ISDN_CHIP_ISAC
1215 #define ISDN_CHIP_ISAC 1
1218 #define CARD_GAZEL 0
1221 #ifdef CONFIG_HISAX_W6692
1222 #define CARD_W6692 1
1223 #ifndef ISDN_CHIP_W6692
1224 #define ISDN_CHIP_W6692 1
1227 #define CARD_W6692 0
1230 #ifdef CONFIG_HISAX_NETJET_U
1231 #define CARD_NETJET_U 1
1232 #ifndef ISDN_CHIP_ICC
1233 #define ISDN_CHIP_ICC 1
1235 #ifndef HISAX_UINTERFACE
1236 #define HISAX_UINTERFACE 1
1239 #define CARD_NETJET_U 0
1242 #ifdef CONFIG_HISAX_ENTERNOW_PCI
1243 #define CARD_FN_ENTERNOW_PCI 1
1245 #define CARD_FN_ENTERNOW_PCI 0
1248 #define TEI_PER_CARD 1
1251 #define L1_DEB_WARN 0x01
1252 #define L1_DEB_INTSTAT 0x02
1253 #define L1_DEB_ISAC 0x04
1254 #define L1_DEB_ISAC_FIFO 0x08
1255 #define L1_DEB_HSCX 0x10
1256 #define L1_DEB_HSCX_FIFO 0x20
1257 #define L1_DEB_LAPD 0x40
1258 #define L1_DEB_IPAC 0x80
1259 #define L1_DEB_RECEIVE_FRAME 0x100
1260 #define L1_DEB_MONITOR 0x200
1261 #define DEB_DLOG_HEX 0x400
1262 #define DEB_DLOG_VERBOSE 0x800
1264 #define L2FRAME_DEBUG
1266 #ifdef L2FRAME_DEBUG
1267 extern void Logl2Frame(struct IsdnCardState *cs, struct sk_buff *skb, char *buf, int dir);
1270 #include "hisax_cfg.h"
1272 void init_bcstate(struct IsdnCardState *cs, int bc);
1274 void setstack_HiSax(struct PStack *st, struct IsdnCardState *cs);
1275 void HiSax_addlist(struct IsdnCardState *sp, struct PStack *st);
1276 void HiSax_rmlist(struct IsdnCardState *sp, struct PStack *st);
1278 void setstack_l1_B(struct PStack *st);
1280 void setstack_tei(struct PStack *st);
1281 void setstack_manager(struct PStack *st);
1283 void setstack_isdnl2(struct PStack *st, char *debug_id);
1284 void releasestack_isdnl2(struct PStack *st);
1285 void setstack_transl2(struct PStack *st);
1286 void releasestack_transl2(struct PStack *st);
1287 void lli_writewakeup(struct PStack *st, int len);
1289 void setstack_l3dc(struct PStack *st, struct Channel *chanp);
1290 void setstack_l3bc(struct PStack *st, struct Channel *chanp);
1291 void releasestack_isdnl3(struct PStack *st);
1293 u_char *findie(u_char * p, int size, u_char ie, int wanted_set);
1294 int getcallref(u_char * p);
1295 int newcallref(void);
1297 int FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount);
1298 void FsmFree(struct Fsm *fsm);
1299 int FsmEvent(struct FsmInst *fi, int event, void *arg);
1300 void FsmChangeState(struct FsmInst *fi, int newstate);
1301 void FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft);
1302 int FsmAddTimer(struct FsmTimer *ft, int millisec, int event,
1303 void *arg, int where);
1304 void FsmRestartTimer(struct FsmTimer *ft, int millisec, int event,
1305 void *arg, int where);
1306 void FsmDelTimer(struct FsmTimer *ft, int where);
1307 int jiftime(char *s, long mark);
1309 int HiSax_command(isdn_ctrl * ic);
1310 int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb);
1311 void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...);
1312 void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args);
1313 void HiSax_reportcard(int cardnr, int sel);
1314 int QuickHex(char *txt, u_char * p, int cnt);
1315 void LogFrame(struct IsdnCardState *cs, u_char * p, int size);
1316 void dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir);
1317 void iecpy(u_char * dest, u_char * iestart, int ieoffset);
1318 #endif /* __KERNEL__ */
1320 #define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);}
1322 int ll_run(struct IsdnCardState *cs, int addfeatures);
1324 void CallcFree(void);
1325 int CallcNewChan(struct IsdnCardState *cs);
1326 void CallcFreeChan(struct IsdnCardState *cs);
1327 int Isdnl1New(void);
1328 void Isdnl1Free(void);
1329 int Isdnl2New(void);
1330 void Isdnl2Free(void);
1331 int Isdnl3New(void);
1332 void Isdnl3Free(void);
1333 void init_tei(struct IsdnCardState *cs, int protocol);
1334 void release_tei(struct IsdnCardState *cs);
1335 char *HiSax_getrev(const char *revision);