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/errno.h>
11 #include <linux/major.h>
13 #include <linux/delay.h>
14 #include <linux/kernel.h>
15 #include <linux/signal.h>
16 #include <linux/slab.h>
18 #include <linux/mman.h>
19 #include <linux/ioport.h>
20 #include <linux/timer.h>
21 #include <linux/wait.h>
22 #include <linux/isdnif.h>
23 #include <linux/tty.h>
24 #include <linux/serial_reg.h>
25 #include <linux/netdevice.h>
27 #define ERROR_STATISTIC
34 #define HW_ENABLE 0x0000
35 #define HW_RESET 0x0004
36 #define HW_POWERUP 0x0008
37 #define HW_ACTIVATE 0x0010
38 #define HW_DEACTIVATE 0x0018
40 #define HW_INFO1 0x0010
41 #define HW_INFO2 0x0020
42 #define HW_INFO3 0x0030
43 #define HW_INFO4 0x0040
44 #define HW_INFO4_P8 0x0040
45 #define HW_INFO4_P10 0x0048
46 #define HW_RSYNC 0x0060
47 #define HW_TESTLOOP 0x0070
48 #define CARD_RESET 0x00F0
49 #define CARD_INIT 0x00F2
50 #define CARD_RELEASE 0x00F3
51 #define CARD_TEST 0x00F4
52 #define CARD_AUX_IND 0x00F5
54 #define PH_ACTIVATE 0x0100
55 #define PH_DEACTIVATE 0x0110
56 #define PH_DATA 0x0120
57 #define PH_PULL 0x0130
58 #define PH_TESTLOOP 0x0140
59 #define PH_PAUSE 0x0150
60 #define MPH_ACTIVATE 0x0180
61 #define MPH_DEACTIVATE 0x0190
62 #define MPH_INFORMATION 0x01A0
64 #define DL_ESTABLISH 0x0200
65 #define DL_RELEASE 0x0210
66 #define DL_DATA 0x0220
67 #define DL_FLUSH 0x0224
68 #define DL_UNIT_DATA 0x0230
70 #define MDL_BC_RELEASE 0x0278 // Formula-n enter:now
71 #define MDL_BC_ASSIGN 0x027C // Formula-n enter:now
72 #define MDL_ASSIGN 0x0280
73 #define MDL_REMOVE 0x0284
74 #define MDL_ERROR 0x0288
75 #define MDL_INFO_SETUP 0x02E0
76 #define MDL_INFO_CONN 0x02E4
77 #define MDL_INFO_REL 0x02E8
79 #define CC_SETUP 0x0300
80 #define CC_RESUME 0x0304
81 #define CC_MORE_INFO 0x0310
82 #define CC_IGNORE 0x0320
83 #define CC_REJECT 0x0324
84 #define CC_SETUP_COMPL 0x0330
85 #define CC_PROCEEDING 0x0340
86 #define CC_ALERTING 0x0344
87 #define CC_PROGRESS 0x0348
88 #define CC_CONNECT 0x0350
89 #define CC_CHARGE 0x0354
90 #define CC_NOTIFY 0x0358
91 #define CC_DISCONNECT 0x0360
92 #define CC_RELEASE 0x0368
93 #define CC_SUSPEND 0x0370
94 #define CC_PROCEED_SEND 0x0374
95 #define CC_REDIR 0x0378
96 #define CC_T302 0x0382
97 #define CC_T303 0x0383
98 #define CC_T304 0x0384
99 #define CC_T305 0x0385
100 #define CC_T308_1 0x0388
101 #define CC_T308_2 0x038A
102 #define CC_T309 0x0309
103 #define CC_T310 0x0390
104 #define CC_T313 0x0393
105 #define CC_T318 0x0398
106 #define CC_T319 0x0399
107 #define CC_TSPID 0x03A0
108 #define CC_NOSETUP_RSP 0x03E0
109 #define CC_SETUP_ERR 0x03E1
110 #define CC_SUSPEND_ERR 0x03E2
111 #define CC_RESUME_ERR 0x03E3
112 #define CC_CONNECT_ERR 0x03E4
113 #define CC_RELEASE_ERR 0x03E5
114 #define CC_RESTART 0x03F4
115 #define CC_TDSS1_IO 0x13F4 /* DSS1 IO user timer */
116 #define CC_TNI1_IO 0x13F5 /* NI1 IO user timer */
118 /* define maximum number of possible waiting incoming calls */
119 #define MAX_WAITING_CALLS 2
124 /* include l3dss1 & ni1 specific process structures, but no other defines */
125 #ifdef CONFIG_HISAX_EURO
126 #define l3dss1_process
128 #undef l3dss1_process
129 #endif /* CONFIG_HISAX_EURO */
131 #ifdef CONFIG_HISAX_NI1
132 #define l3ni1_process
135 #endif /* CONFIG_HISAX_NI1 */
137 #define MAX_DFRAME_LEN 260
138 #define MAX_DFRAME_LEN_L1 300
139 #define HSCX_BUFMAX 4096
140 #define MAX_DATA_SIZE (HSCX_BUFMAX - 4)
141 #define MAX_DATA_MEM (HSCX_BUFMAX + 64)
142 #define RAW_BUFMAX (((HSCX_BUFMAX*6)/5) + 5)
143 #define MAX_HEADER_LEN 4
145 #define MAX_MON_FRAME 32
146 #define MAX_DLOG_SPACE 2048
147 #define MAX_BLOG_SPACE 256
149 /* #define I4L_IRQ_FLAG SA_INTERRUPT */
150 #define I4L_IRQ_FLAG 0
158 typedef void (* FSMFNPTR
)(struct FsmInst
*, int, void *);
161 FSMFNPTR
*jumpmatrix
;
162 int state_count
, event_count
;
163 char **strEvent
, **strState
;
172 void (*printdebug
) (struct FsmInst
*, char *, ...);
177 void (*routine
) (struct FsmInst
*, int, void *);
182 struct timer_list tl
;
188 struct l3_process
*pc
;
189 struct timer_list tl
;
193 #define FLG_L1_ACTIVATING 1
194 #define FLG_L1_ACTIVATED 2
195 #define FLG_L1_DEACTTIMER 3
196 #define FLG_L1_ACTTIMER 4
197 #define FLG_L1_T3RUN 5
198 #define FLG_L1_PULL_REQ 6
199 #define FLG_L1_UINT 7
204 struct PStack
**stlistp
;
207 struct FsmTimer timer
;
208 void (*l1l2
) (struct PStack
*, int, void *);
209 void (*l1hw
) (struct PStack
*, int, void *);
210 void (*l1tei
) (struct PStack
*, int, void *);
215 #define GROUP_TEI 127
218 #define PACKET_NOACK 7
226 #define FLG_PEND_REL 4
227 #define FLG_L3_INIT 5
228 #define FLG_T200_RUN 6
229 #define FLG_ACK_PEND 7
231 #define FLG_OWN_BUSY 9
232 #define FLG_PEER_BUSY 10
233 #define FLG_DCHAN_BUSY 11
234 #define FLG_L1_ACTIV 12
235 #define FLG_ESTAB_PEND 13
237 #define FLG_FIXED_TEI 15
238 #define FLG_L2BLOCK 16
250 struct sk_buff
*windowar
[MAX_WINDOW
];
251 struct sk_buff_head i_queue
;
252 struct sk_buff_head ui_queue
;
253 void (*l2l1
) (struct PStack
*, int, void *);
254 void (*l2l3
) (struct PStack
*, int, void *);
255 void (*l2tei
) (struct PStack
*, int, void *);
257 struct FsmTimer t200
, t203
;
258 int T200
, N200
, T203
;
264 void (*l3l4
) (struct PStack
*, int, void *);
265 void (*l3ml3
) (struct PStack
*, int, void *);
266 void (*l3l2
) (struct PStack
*, int, void *);
268 struct FsmTimer l3m_timer
;
269 struct sk_buff_head squeue
;
270 struct l3_process
*proc
;
271 struct l3_process
*global
;
278 void (*l4l3
) (struct PStack
*, int, void *);
279 int (*l4l3_proto
) (struct PStack
*, isdn_ctrl
*);
284 #define FLG_LLI_L1WAKEUP 1
285 #define FLG_LLI_L2WAKEUP 2
289 struct FsmInst tei_m
;
290 struct FsmTimer t202
;
291 int T202
, N202
, debug
;
292 void (*layer
) (struct PStack
*, int, void *);
303 int spv
; /* SPV Flag */
304 setup_parm setup
; /* from isdnif.h numbers and Serviceindicator */
305 u_char moderate
; /* transfer mode and rate (bearer octet 4) */
314 struct LLInterface lli
;
315 struct Management ma
;
316 int protocol
; /* EDSS1, 1TR6 or NI1 */
318 /* protocol specific data fields */
320 { u_char uuuu
; /* only as dummy */
321 #ifdef CONFIG_HISAX_EURO
322 dss1_stk_priv dss1
; /* private dss1 data */
323 #endif /* CONFIG_HISAX_EURO */
324 #ifdef CONFIG_HISAX_NI1
325 ni1_stk_priv ni1
; /* private ni1 data */
326 #endif /* CONFIG_HISAX_NI1 */
333 struct L3Timer timer
;
337 struct Channel
*chan
;
339 struct l3_process
*next
;
342 /* protocol specific data fields */
344 { u_char uuuu
; /* only when euro not defined, avoiding empty union */
345 #ifdef CONFIG_HISAX_EURO
346 dss1_proc_priv dss1
; /* private dss1 data */
347 #endif /* CONFIG_HISAX_EURO */
348 #ifdef CONFIG_HISAX_NI1
349 ni1_proc_priv ni1
; /* private ni1 data */
350 #endif /* CONFIG_HISAX_NI1 */
357 int count
; /* Current skb sent count */
358 u_char
*rcvbuf
; /* B-Channel receive Buffer */
366 int count
; /* Current skb sent count */
367 u_char
*rcvbuf
; /* B-Channel receive Buffer */
372 volatile u_char bstat
;
374 volatile u_char cmsb
;
375 volatile u_char clsb
;
376 volatile u_char par
[8];
390 struct timer_list ftimer
;
391 u_char
*rcvbuf
; /* B-Channel receive Buffer */
393 struct isar_reg
*reg
;
396 struct hdlc_stat_reg
{
408 } __attribute__((packed
));
413 struct hdlc_stat_reg sr
;
417 int count
; /* Current skb sent count */
418 u_char
*rcvbuf
; /* B-Channel receive Buffer */
454 struct sk_buff
*rv_skb
;
455 struct hdlc_state
*hdlc_state
;
456 struct work_struct tq_rcv
;
457 struct work_struct tq_xmt
;
460 #define BC_FLG_INIT 1
461 #define BC_FLG_ACTIV 2
462 #define BC_FLG_BUSY 3
463 #define BC_FLG_NOFRAME 4
464 #define BC_FLG_HALF 5
465 #define BC_FLG_EMPTY 6
466 #define BC_FLG_ORIG 7
467 #define BC_FLG_DLEETX 8
468 #define BC_FLG_LASTDLE 9
469 #define BC_FLG_FIRST 10
470 #define BC_FLG_LASTDATA 11
471 #define BC_FLG_NMD_DATA 12
472 #define BC_FLG_FTI_RUN 13
473 #define BC_FLG_LL_OK 14
474 #define BC_FLG_LL_CONN 15
475 #define BC_FLG_FTI_FTS 16
476 #define BC_FLG_FRH_WAIT 17
478 #define L1_MODE_NULL 0
479 #define L1_MODE_TRANS 1
480 #define L1_MODE_HDLC 2
481 #define L1_MODE_EXTRN 3
482 #define L1_MODE_HDLC_56K 4
483 #define L1_MODE_MODEM 7
484 #define L1_MODE_V32 8
485 #define L1_MODE_FAX 9
491 struct IsdnCardState
*cs
;
492 int tx_cnt
; /* B-Channel transmit counter */
493 struct sk_buff
*tx_skb
; /* B-Channel transmit Buffer */
494 struct sk_buff_head rqueue
; /* B-Channel receive Queue */
495 struct sk_buff_head squeue
; /* B-Channel send Queue */
501 struct timer_list transbusy
;
502 struct work_struct tqueue
;
504 int (*BC_SetStack
) (struct PStack
*, struct BCState
*);
505 void (*BC_Close
) (struct BCState
*);
506 #ifdef ERROR_STATISTIC
517 struct tiger_hw tiger
;
518 struct amd7930_hw amd7930
;
519 struct w6692B_hw w6692
;
520 struct hisax_b_if
*b_if
;
525 struct PStack
*b_st
, *d_st
;
526 struct IsdnCardState
*cs
;
531 struct FsmTimer drel_timer
, dial_timer
;
533 int l2_protocol
, l2_active_protocol
;
536 struct l3_process
*proc
;
537 setup_parm setup
; /* from isdnif.h numbers and Serviceindicator */
538 u_long Flags
; /* for remembering action done in l4 */
553 unsigned int counter
;
555 struct timer_list tl
;
562 unsigned int transcnt
;
572 unsigned int cfg_reg
;
576 signed int hscxfifo
[2];
580 unsigned int cfg_reg
;
581 void __iomem
*membase
;
582 unsigned long phymem
;
586 unsigned int cfg_reg
;
588 unsigned int hscx
[2];
589 unsigned int isacfifo
;
590 unsigned int hscxfifo
[2];
591 unsigned int counter
;
596 unsigned int cfg_reg
;
597 unsigned int isac_ale
;
599 unsigned int hscx_ale
;
604 unsigned long cfg_reg
;
605 unsigned long pci_cfg
;
607 unsigned long isac_adr
;
609 unsigned long hscx_adr
;
612 struct timer_list tl
;
618 unsigned int cfg_reg
;
629 unsigned int fifosize
;
634 struct timer_list timer
;
638 unsigned int cfg_reg
;
642 unsigned int reset_on
;
643 unsigned int reset_off
;
644 struct isar_reg isar
;
651 unsigned int cfg_reg
;
653 unsigned int hscx
[2];
654 unsigned char res_irq
;
658 unsigned int cfg_reg
;
669 unsigned char dmactrl
;
670 unsigned char ctrl_reg
;
671 unsigned char irqmask0
;
672 unsigned char irqstat0
;
673 unsigned char last_is0
;
682 unsigned char int_m1
;
683 unsigned char int_m2
;
684 unsigned char int_s1
;
686 unsigned char sctrl_r
;
687 unsigned char sctrl_e
;
691 unsigned char fifo_en
;
692 unsigned char bswapped
;
693 unsigned char nt_mode
;
696 unsigned char *pci_io
; /* start of PCI IO memory */
697 void *share_start
; /* shared memory for Fifos start */
698 void *fifos
; /* FIFO memory */
699 int last_bfifo_cnt
[2]; /* marker saving last b-fifo frame count */
700 struct timer_list timer
;
709 unsigned char int_m1
;
710 unsigned char int_m2
;
711 unsigned char int_s1
;
713 unsigned char sctrl_r
;
714 unsigned char sctrl_e
;
718 unsigned char bswapped
;
719 unsigned char nt_mode
;
722 unsigned char last_fifo
;
725 struct timer_list timer
;
730 unsigned int bfifosize
;
731 unsigned int dfifosize
;
737 unsigned char int_m1
;
738 unsigned char int_m2
;
739 unsigned char int_s1
;
746 struct timer_list timer
;
751 unsigned long phymem
;
754 struct isar_reg isar_r
;
759 unsigned int cfg_reg
;
763 struct timer_list timer
;
770 unsigned long isac_adr
;
771 unsigned int isac_ale
;
772 unsigned long jade_adr
;
773 unsigned int jade_ale
;
774 /* Scitel Quadro stuff */
775 unsigned long plx_adr
;
776 unsigned long data_adr
;
781 unsigned int cfg_reg
;
782 unsigned int pciaddr
[2];
787 signed int hscxfifo
[2];
788 unsigned char timeslot
;
795 struct timer_list timer
;
798 #ifdef CONFIG_HISAX_TESTEMU
800 unsigned char *sfifo
;
801 unsigned char *sfifo_w
;
802 unsigned char *sfifo_r
;
803 unsigned char *sfifo_e
;
806 wait_queue_head_t rwaitq
;
807 wait_queue_head_t swaitq
;
812 struct arcofi_msg
*next
;
825 struct arcofi_msg
*arcofi_list
;
826 struct timer_list arcofitimer
;
827 wait_queue_head_t arcofi_wait
;
850 struct amd7930_chip
{
855 unsigned int tx_xmtlen
;
856 struct timer_list timer3
;
857 void (*ph_command
) (struct IsdnCardState
*, u_char
, char *);
858 void (*setIrqMask
) (struct IsdnCardState
*, u_char
);
868 struct arcofi_msg
*arcofi_list
;
869 struct timer_list arcofitimer
;
870 wait_queue_head_t arcofi_wait
;
881 #define FLG_TWO_DCHAN 4
882 #define FLG_L1_DBUSY 5
883 #define FLG_DBUSY_TIMER 6
884 #define FLG_LOCK_ATOMIC 7
885 #define FLG_ARCOFI_TIMER 8
886 #define FLG_ARCOFI_ERROR 9
887 #define FLG_HW_L1_UINT 10
889 struct IsdnCardState
{
898 int chanlimit
; /* limited number of B-chans to use */
899 int logecho
; /* log echo if supported by card */
902 struct teles0_hw teles0
;
903 struct teles3_hw teles3
;
914 struct hfcPCI_hw hfcpci
;
915 struct hfcSX_hw hfcsx
;
917 struct isurf_hw isurf
;
918 struct saphir_hw saphir
;
919 #ifdef CONFIG_HISAX_TESTEMU
923 struct gazel_hw gazel
;
924 struct w6692_hw w6692
;
925 struct hisax_d_if
*hisax_d_if
;
932 u_char
*status_write
;
934 u_char (*readisac
) (struct IsdnCardState
*, u_char
);
935 void (*writeisac
) (struct IsdnCardState
*, u_char
, u_char
);
936 void (*readisacfifo
) (struct IsdnCardState
*, u_char
*, int);
937 void (*writeisacfifo
) (struct IsdnCardState
*, u_char
*, int);
938 u_char (*BC_Read_Reg
) (struct IsdnCardState
*, int, u_char
);
939 void (*BC_Write_Reg
) (struct IsdnCardState
*, int, u_char
, u_char
);
940 void (*BC_Send_Data
) (struct BCState
*);
941 int (*cardmsg
) (struct IsdnCardState
*, int, void *);
942 void (*setstack_d
) (struct PStack
*, struct IsdnCardState
*);
943 void (*DC_Close
) (struct IsdnCardState
*);
944 int (*irq_func
) (int, void *);
945 int (*auxcmd
) (struct IsdnCardState
*, isdn_ctrl
*);
946 struct Channel channel
[2+MAX_WAITING_CALLS
];
947 struct BCState bcs
[2+MAX_WAITING_CALLS
];
948 struct PStack
*stlist
;
949 struct sk_buff_head rq
, sq
; /* D-channel queues */
954 struct isac_chip isac
;
955 struct hfcd_chip hfcd
;
956 struct hfcpci_chip hfcpci
;
957 struct hfcsx_chip hfcsx
;
958 struct w6692_chip w6692
;
959 struct amd7930_chip amd7930
;
964 struct sk_buff
*tx_skb
;
967 struct work_struct tqueue
;
968 struct timer_list dbusytimer
;
969 #ifdef ERROR_STATISTIC
977 #define schedule_event(s, ev) do {test_and_set_bit(ev, &s->event);schedule_work(&s->tqueue); } while(0)
985 #ifdef ISDN_CHIP_ISAC
986 #undef ISDN_CHIP_ISAC
989 #ifdef CONFIG_HISAX_16_0
990 #define CARD_TELES0 1
991 #ifndef ISDN_CHIP_ISAC
992 #define ISDN_CHIP_ISAC 1
995 #define CARD_TELES0 0
998 #ifdef CONFIG_HISAX_16_3
999 #define CARD_TELES3 1
1000 #ifndef ISDN_CHIP_ISAC
1001 #define ISDN_CHIP_ISAC 1
1004 #define CARD_TELES3 0
1007 #ifdef CONFIG_HISAX_TELESPCI
1008 #define CARD_TELESPCI 1
1009 #ifndef ISDN_CHIP_ISAC
1010 #define ISDN_CHIP_ISAC 1
1013 #define CARD_TELESPCI 0
1016 #ifdef CONFIG_HISAX_AVM_A1
1017 #define CARD_AVM_A1 1
1018 #ifndef ISDN_CHIP_ISAC
1019 #define ISDN_CHIP_ISAC 1
1022 #define CARD_AVM_A1 0
1025 #ifdef CONFIG_HISAX_AVM_A1_PCMCIA
1026 #define CARD_AVM_A1_PCMCIA 1
1027 #ifndef ISDN_CHIP_ISAC
1028 #define ISDN_CHIP_ISAC 1
1031 #define CARD_AVM_A1_PCMCIA 0
1034 #ifdef CONFIG_HISAX_FRITZPCI
1035 #define CARD_FRITZPCI 1
1036 #ifndef ISDN_CHIP_ISAC
1037 #define ISDN_CHIP_ISAC 1
1040 #define CARD_FRITZPCI 0
1043 #ifdef CONFIG_HISAX_ELSA
1045 #ifndef ISDN_CHIP_ISAC
1046 #define ISDN_CHIP_ISAC 1
1052 #ifdef CONFIG_HISAX_IX1MICROR2
1053 #define CARD_IX1MICROR2 1
1054 #ifndef ISDN_CHIP_ISAC
1055 #define ISDN_CHIP_ISAC 1
1058 #define CARD_IX1MICROR2 0
1061 #ifdef CONFIG_HISAX_DIEHLDIVA
1062 #define CARD_DIEHLDIVA 1
1063 #ifndef ISDN_CHIP_ISAC
1064 #define ISDN_CHIP_ISAC 1
1067 #define CARD_DIEHLDIVA 0
1070 #ifdef CONFIG_HISAX_ASUSCOM
1071 #define CARD_ASUSCOM 1
1072 #ifndef ISDN_CHIP_ISAC
1073 #define ISDN_CHIP_ISAC 1
1076 #define CARD_ASUSCOM 0
1079 #ifdef CONFIG_HISAX_TELEINT
1080 #define CARD_TELEINT 1
1081 #ifndef ISDN_CHIP_ISAC
1082 #define ISDN_CHIP_ISAC 1
1085 #define CARD_TELEINT 0
1088 #ifdef CONFIG_HISAX_SEDLBAUER
1089 #define CARD_SEDLBAUER 1
1090 #ifndef ISDN_CHIP_ISAC
1091 #define ISDN_CHIP_ISAC 1
1094 #define CARD_SEDLBAUER 0
1097 #ifdef CONFIG_HISAX_SPORTSTER
1098 #define CARD_SPORTSTER 1
1099 #ifndef ISDN_CHIP_ISAC
1100 #define ISDN_CHIP_ISAC 1
1103 #define CARD_SPORTSTER 0
1106 #ifdef CONFIG_HISAX_MIC
1108 #ifndef ISDN_CHIP_ISAC
1109 #define ISDN_CHIP_ISAC 1
1115 #ifdef CONFIG_HISAX_NETJET
1116 #define CARD_NETJET_S 1
1117 #ifndef ISDN_CHIP_ISAC
1118 #define ISDN_CHIP_ISAC 1
1121 #define CARD_NETJET_S 0
1124 #ifdef CONFIG_HISAX_HFCS
1130 #ifdef CONFIG_HISAX_HFC_PCI
1131 #define CARD_HFC_PCI 1
1133 #define CARD_HFC_PCI 0
1136 #ifdef CONFIG_HISAX_HFC_SX
1137 #define CARD_HFC_SX 1
1139 #define CARD_HFC_SX 0
1142 #ifdef CONFIG_HISAX_AMD7930
1143 #define CARD_AMD7930 1
1145 #define CARD_AMD7930 0
1148 #ifdef CONFIG_HISAX_NICCY
1149 #define CARD_NICCY 1
1150 #ifndef ISDN_CHIP_ISAC
1151 #define ISDN_CHIP_ISAC 1
1154 #define CARD_NICCY 0
1157 #ifdef CONFIG_HISAX_ISURF
1158 #define CARD_ISURF 1
1159 #ifndef ISDN_CHIP_ISAC
1160 #define ISDN_CHIP_ISAC 1
1163 #define CARD_ISURF 0
1166 #ifdef CONFIG_HISAX_S0BOX
1167 #define CARD_S0BOX 1
1168 #ifndef ISDN_CHIP_ISAC
1169 #define ISDN_CHIP_ISAC 1
1172 #define CARD_S0BOX 0
1175 #ifdef CONFIG_HISAX_HSTSAPHIR
1176 #define CARD_HSTSAPHIR 1
1177 #ifndef ISDN_CHIP_ISAC
1178 #define ISDN_CHIP_ISAC 1
1181 #define CARD_HSTSAPHIR 0
1184 #ifdef CONFIG_HISAX_TESTEMU
1185 #define CARD_TESTEMU 1
1186 #define ISDN_CTYPE_TESTEMU 99
1187 #undef ISDN_CTYPE_COUNT
1188 #define ISDN_CTYPE_COUNT ISDN_CTYPE_TESTEMU
1190 #define CARD_TESTEMU 0
1193 #ifdef CONFIG_HISAX_BKM_A4T
1194 #define CARD_BKM_A4T 1
1195 #ifndef ISDN_CHIP_ISAC
1196 #define ISDN_CHIP_ISAC 1
1199 #define CARD_BKM_A4T 0
1202 #ifdef CONFIG_HISAX_SCT_QUADRO
1203 #define CARD_SCT_QUADRO 1
1204 #ifndef ISDN_CHIP_ISAC
1205 #define ISDN_CHIP_ISAC 1
1208 #define CARD_SCT_QUADRO 0
1211 #ifdef CONFIG_HISAX_GAZEL
1212 #define CARD_GAZEL 1
1213 #ifndef ISDN_CHIP_ISAC
1214 #define ISDN_CHIP_ISAC 1
1217 #define CARD_GAZEL 0
1220 #ifdef CONFIG_HISAX_W6692
1221 #define CARD_W6692 1
1222 #ifndef ISDN_CHIP_W6692
1223 #define ISDN_CHIP_W6692 1
1226 #define CARD_W6692 0
1229 #ifdef CONFIG_HISAX_NETJET_U
1230 #define CARD_NETJET_U 1
1231 #ifndef ISDN_CHIP_ICC
1232 #define ISDN_CHIP_ICC 1
1234 #ifndef HISAX_UINTERFACE
1235 #define HISAX_UINTERFACE 1
1238 #define CARD_NETJET_U 0
1241 #ifdef CONFIG_HISAX_ENTERNOW_PCI
1242 #define CARD_FN_ENTERNOW_PCI 1
1244 #define CARD_FN_ENTERNOW_PCI 0
1247 #define TEI_PER_CARD 1
1250 #define L1_DEB_WARN 0x01
1251 #define L1_DEB_INTSTAT 0x02
1252 #define L1_DEB_ISAC 0x04
1253 #define L1_DEB_ISAC_FIFO 0x08
1254 #define L1_DEB_HSCX 0x10
1255 #define L1_DEB_HSCX_FIFO 0x20
1256 #define L1_DEB_LAPD 0x40
1257 #define L1_DEB_IPAC 0x80
1258 #define L1_DEB_RECEIVE_FRAME 0x100
1259 #define L1_DEB_MONITOR 0x200
1260 #define DEB_DLOG_HEX 0x400
1261 #define DEB_DLOG_VERBOSE 0x800
1263 #define L2FRAME_DEBUG
1265 #ifdef L2FRAME_DEBUG
1266 extern void Logl2Frame(struct IsdnCardState
*cs
, struct sk_buff
*skb
, char *buf
, int dir
);
1269 #include "hisax_cfg.h"
1271 void init_bcstate(struct IsdnCardState
*cs
, int bc
);
1273 void setstack_HiSax(struct PStack
*st
, struct IsdnCardState
*cs
);
1274 void HiSax_addlist(struct IsdnCardState
*sp
, struct PStack
*st
);
1275 void HiSax_rmlist(struct IsdnCardState
*sp
, struct PStack
*st
);
1277 void setstack_l1_B(struct PStack
*st
);
1279 void setstack_tei(struct PStack
*st
);
1280 void setstack_manager(struct PStack
*st
);
1282 void setstack_isdnl2(struct PStack
*st
, char *debug_id
);
1283 void releasestack_isdnl2(struct PStack
*st
);
1284 void setstack_transl2(struct PStack
*st
);
1285 void releasestack_transl2(struct PStack
*st
);
1286 void lli_writewakeup(struct PStack
*st
, int len
);
1288 void setstack_l3dc(struct PStack
*st
, struct Channel
*chanp
);
1289 void setstack_l3bc(struct PStack
*st
, struct Channel
*chanp
);
1290 void releasestack_isdnl3(struct PStack
*st
);
1292 u_char
*findie(u_char
* p
, int size
, u_char ie
, int wanted_set
);
1293 int getcallref(u_char
* p
);
1294 int newcallref(void);
1296 int FsmNew(struct Fsm
*fsm
, struct FsmNode
*fnlist
, int fncount
);
1297 void FsmFree(struct Fsm
*fsm
);
1298 int FsmEvent(struct FsmInst
*fi
, int event
, void *arg
);
1299 void FsmChangeState(struct FsmInst
*fi
, int newstate
);
1300 void FsmInitTimer(struct FsmInst
*fi
, struct FsmTimer
*ft
);
1301 int FsmAddTimer(struct FsmTimer
*ft
, int millisec
, int event
,
1302 void *arg
, int where
);
1303 void FsmRestartTimer(struct FsmTimer
*ft
, int millisec
, int event
,
1304 void *arg
, int where
);
1305 void FsmDelTimer(struct FsmTimer
*ft
, int where
);
1306 int jiftime(char *s
, long mark
);
1308 int HiSax_command(isdn_ctrl
* ic
);
1309 int HiSax_writebuf_skb(int id
, int chan
, int ack
, struct sk_buff
*skb
);
1310 void HiSax_putstatus(struct IsdnCardState
*cs
, char *head
, char *fmt
, ...);
1311 void VHiSax_putstatus(struct IsdnCardState
*cs
, char *head
, char *fmt
, va_list args
);
1312 void HiSax_reportcard(int cardnr
, int sel
);
1313 int QuickHex(char *txt
, u_char
* p
, int cnt
);
1314 void LogFrame(struct IsdnCardState
*cs
, u_char
* p
, int size
);
1315 void dlogframe(struct IsdnCardState
*cs
, struct sk_buff
*skb
, int dir
);
1316 void iecpy(u_char
* dest
, u_char
* iestart
, int ieoffset
);
1317 #endif /* __KERNEL__ */
1320 * Busywait delay for `jiffs' jiffies
1322 #define HZDELAY(jiffs) do { \
1326 int loops = USEC_PER_SEC / HZ; \
1332 int ll_run(struct IsdnCardState
*cs
, int addfeatures
);
1334 void CallcFree(void);
1335 int CallcNewChan(struct IsdnCardState
*cs
);
1336 void CallcFreeChan(struct IsdnCardState
*cs
);
1337 int Isdnl1New(void);
1338 void Isdnl1Free(void);
1339 int Isdnl2New(void);
1340 void Isdnl2Free(void);
1341 int Isdnl3New(void);
1342 void Isdnl3Free(void);
1343 void init_tei(struct IsdnCardState
*cs
, int protocol
);
1344 void release_tei(struct IsdnCardState
*cs
);
1345 char *HiSax_getrev(const char *revision
);