1 /* $Id: hisax.h,v 2.48 2000/07/04 10:24:32 keil Exp $
3 * Basic declarations, defines and prototypes
5 * This file is (c) under GNU PUBLIC LICENSE
8 #include <linux/config.h>
9 #include <linux/module.h>
10 #include <linux/version.h>
11 #include <linux/errno.h>
13 #include <linux/major.h>
14 #include <asm/segment.h>
16 #include <linux/delay.h>
17 #include <linux/kernel.h>
18 #include <linux/signal.h>
19 #include <linux/malloc.h>
21 #include <linux/mman.h>
22 #include <linux/ioport.h>
23 #include <linux/timer.h>
24 #include <linux/wait.h>
25 #include <linux/isdnif.h>
26 #include <linux/tty.h>
27 #include <linux/serial_reg.h>
28 #include <linux/netdevice.h>
30 #define ERROR_STATISTIC
37 #define HW_ENABLE 0x0000
38 #define HW_RESET 0x0004
39 #define HW_POWERUP 0x0008
40 #define HW_ACTIVATE 0x0010
41 #define HW_DEACTIVATE 0x0018
42 #define HW_INFO2 0x0020
43 #define HW_INFO3 0x0030
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
69 #define MDL_ASSIGN 0x0280
70 #define MDL_REMOVE 0x0284
71 #define MDL_ERROR 0x0288
72 #define MDL_INFO_SETUP 0x02E0
73 #define MDL_INFO_CONN 0x02E4
74 #define MDL_INFO_REL 0x02E8
76 #define CC_SETUP 0x0300
77 #define CC_RESUME 0x0304
78 #define CC_MORE_INFO 0x0310
79 #define CC_IGNORE 0x0320
80 #define CC_REJECT 0x0324
81 #define CC_SETUP_COMPL 0x0330
82 #define CC_PROCEEDING 0x0340
83 #define CC_ALERTING 0x0344
84 #define CC_PROGRESS 0x0348
85 #define CC_CONNECT 0x0350
86 #define CC_CHARGE 0x0354
87 #define CC_NOTIFY 0x0358
88 #define CC_DISCONNECT 0x0360
89 #define CC_RELEASE 0x0368
90 #define CC_SUSPEND 0x0370
91 #define CC_PROCEED_SEND 0x0374
92 #define CC_REDIR 0x0378
93 #define CC_T303 0x0383
94 #define CC_T304 0x0384
95 #define CC_T305 0x0385
96 #define CC_T308_1 0x0388
97 #define CC_T308_2 0x038A
98 #define CC_T309 0x0309
99 #define CC_T310 0x0390
100 #define CC_T313 0x0393
101 #define CC_T318 0x0398
102 #define CC_T319 0x0399
103 #define CC_NOSETUP_RSP 0x03E0
104 #define CC_SETUP_ERR 0x03E1
105 #define CC_SUSPEND_ERR 0x03E2
106 #define CC_RESUME_ERR 0x03E3
107 #define CC_CONNECT_ERR 0x03E4
108 #define CC_RELEASE_ERR 0x03E5
109 #define CC_RESTART 0x03F4
110 #define CC_TDSS1_IO 0x13F4 /* DSS1 IO user timer */
112 /* define maximum number of possible waiting incoming calls */
113 #define MAX_WAITING_CALLS 2
118 /* include only l3dss1 specific process structures, but no other defines */
119 #ifdef CONFIG_HISAX_EURO
120 #define l3dss1_process
122 #undef l3dss1_process
123 #endif CONFIG_HISAX_EURO
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
133 #define MAX_MON_FRAME 32
134 #define MAX_DLOG_SPACE 2048
135 #define MAX_BLOG_SPACE 256
137 /* #define I4L_IRQ_FLAG SA_INTERRUPT */
138 #define I4L_IRQ_FLAG 0
146 typedef void (* FSMFNPTR
)(struct FsmInst
*, int, void *);
149 FSMFNPTR
*jumpmatrix
;
150 int state_count
, event_count
;
151 char **strEvent
, **strState
;
160 void (*printdebug
) (struct FsmInst
*, char *, ...);
165 void (*routine
) (struct FsmInst
*, int, void *);
170 struct timer_list tl
;
176 struct l3_process
*pc
;
177 struct timer_list tl
;
181 #define FLG_L1_ACTIVATING 1
182 #define FLG_L1_ACTIVATED 2
183 #define FLG_L1_DEACTTIMER 3
184 #define FLG_L1_ACTTIMER 4
185 #define FLG_L1_T3RUN 5
186 #define FLG_L1_PULL_REQ 6
191 struct PStack
**stlistp
;
194 struct FsmTimer timer
;
195 void (*l1l2
) (struct PStack
*, int, void *);
196 void (*l1hw
) (struct PStack
*, int, void *);
197 void (*l1tei
) (struct PStack
*, int, void *);
202 #define GROUP_TEI 127
205 #define PACKET_NOACK 250
213 #define FLG_PEND_REL 4
214 #define FLG_L3_INIT 5
215 #define FLG_T200_RUN 6
216 #define FLG_ACK_PEND 7
218 #define FLG_OWN_BUSY 9
219 #define FLG_PEER_BUSY 10
220 #define FLG_DCHAN_BUSY 11
221 #define FLG_L1_ACTIV 12
222 #define FLG_ESTAB_PEND 13
224 #define FLG_FIXED_TEI 15
225 #define FLG_L2BLOCK 16
232 unsigned int vs
, va
, vr
;
236 struct sk_buff
*windowar
[MAX_WINDOW
];
237 struct sk_buff_head i_queue
;
238 struct sk_buff_head ui_queue
;
239 void (*l2l1
) (struct PStack
*, int, void *);
240 void (*l2l3
) (struct PStack
*, int, void *);
241 void (*l2tei
) (struct PStack
*, int, void *);
243 struct FsmTimer t200
, t203
;
244 int T200
, N200
, T203
;
250 void (*l3l4
) (struct PStack
*, int, void *);
251 void (*l3ml3
) (struct PStack
*, int, void *);
252 void (*l3l2
) (struct PStack
*, int, void *);
254 struct FsmTimer l3m_timer
;
255 struct sk_buff_head squeue
;
256 struct l3_process
*proc
;
257 struct l3_process
*global
;
264 void (*l4l3
) (struct PStack
*, int, void *);
265 int (*l4l3_proto
) (struct PStack
*, isdn_ctrl
*);
267 void (*l1writewakeup
) (struct PStack
*, int);
268 void (*l2writewakeup
) (struct PStack
*, int);
274 struct FsmInst tei_m
;
275 struct FsmTimer t202
;
276 int T202
, N202
, debug
;
277 void (*layer
) (struct PStack
*, int, void *);
288 int spv
; /* SPV Flag */
289 setup_parm setup
; /* from isdnif.h numbers and Serviceindicator */
290 u_char moderate
; /* transfer mode and rate (bearer octet 4) */
299 struct LLInterface lli
;
300 struct Management ma
;
301 int protocol
; /* EDSS1 or 1TR6 */
303 /* protocol specific data fields */
305 { u_char uuuu
; /* only as dummy */
306 #ifdef CONFIG_HISAX_EURO
307 dss1_stk_priv dss1
; /* private dss1 data */
308 #endif CONFIG_HISAX_EURO
315 struct L3Timer timer
;
319 struct Channel
*chan
;
321 struct l3_process
*next
;
324 /* protocol specific data fields */
326 { u_char uuuu
; /* only when euro not defined, avoiding empty union */
327 #ifdef CONFIG_HISAX_EURO
328 dss1_proc_priv dss1
; /* private dss1 data */
329 #endif CONFIG_HISAX_EURO
336 int count
; /* Current skb sent count */
337 u_char
*rcvbuf
; /* B-Channel receive Buffer */
345 int count
; /* Current skb sent count */
346 u_char
*rcvbuf
; /* B-Channel receive Buffer */
351 volatile u_char bstat
;
353 volatile u_char cmsb
;
354 volatile u_char clsb
;
355 volatile u_char par
[8];
369 struct timer_list ftimer
;
370 u_char
*rcvbuf
; /* B-Channel receive Buffer */
372 struct isar_reg
*reg
;
375 struct hdlc_stat_reg
{
376 u_char cmd
__attribute__((packed
));
377 u_char xml
__attribute__((packed
));
378 u_char mode
__attribute__((packed
));
379 u_char fill
__attribute__((packed
));
385 struct hdlc_stat_reg sr
;
389 int count
; /* Current skb sent count */
390 u_char
*rcvbuf
; /* B-Channel receive Buffer */
426 struct sk_buff
*rv_skb
;
427 struct hdlc_state
*hdlc_state
;
428 struct tq_struct tq_rcv
;
429 struct tq_struct tq_xmt
;
433 #define BC_FLG_INIT 1
434 #define BC_FLG_ACTIV 2
435 #define BC_FLG_BUSY 3
436 #define BC_FLG_NOFRAME 4
437 #define BC_FLG_HALF 5
438 #define BC_FLG_EMPTY 6
439 #define BC_FLG_ORIG 7
440 #define BC_FLG_DLEETX 8
441 #define BC_FLG_LASTDLE 9
442 #define BC_FLG_FIRST 10
443 #define BC_FLG_LASTDATA 11
444 #define BC_FLG_NMD_DATA 12
445 #define BC_FLG_FTI_RUN 13
446 #define BC_FLG_LL_OK 14
447 #define BC_FLG_LL_CONN 15
449 #define L1_MODE_NULL 0
450 #define L1_MODE_TRANS 1
451 #define L1_MODE_HDLC 2
452 #define L1_MODE_EXTRN 3
453 #define L1_MODE_MODEM 7
454 #define L1_MODE_V32 8
455 #define L1_MODE_FAX 9
461 struct IsdnCardState
*cs
;
462 int tx_cnt
; /* B-Channel transmit counter */
463 struct sk_buff
*tx_skb
; /* B-Channel transmit Buffer */
464 struct sk_buff_head rqueue
; /* B-Channel receive Queue */
465 struct sk_buff_head squeue
; /* B-Channel send Queue */
469 struct timer_list transbusy
;
470 struct tq_struct tqueue
;
472 int (*BC_SetStack
) (struct PStack
*, struct BCState
*);
473 void (*BC_Close
) (struct BCState
*);
474 #ifdef ERROR_STATISTIC
485 struct tiger_hw tiger
;
486 struct amd7930_hw amd7930
;
487 struct w6692B_hw w6692
;
492 struct PStack
*b_st
, *d_st
;
493 struct IsdnCardState
*cs
;
498 struct FsmTimer drel_timer
, dial_timer
;
500 int l2_protocol
, l2_active_protocol
;
503 struct l3_process
*proc
;
504 setup_parm setup
; /* from isdnif.h numbers and Serviceindicator */
505 int Flags
; /* for remembering action done in l4 */
519 unsigned int counter
;
521 struct timer_list tl
;
528 unsigned int transcnt
;
538 unsigned int cfg_reg
;
542 signed int hscxfifo
[2];
546 unsigned int cfg_reg
;
547 unsigned long membase
;
548 unsigned long phymem
;
552 unsigned int cfg_reg
;
554 unsigned int hscx
[2];
555 unsigned int isacfifo
;
556 unsigned int hscxfifo
[2];
557 unsigned int counter
;
561 unsigned int cfg_reg
;
562 unsigned int isac_ale
;
564 unsigned int hscx_ale
;
569 unsigned long cfg_reg
;
570 unsigned long pci_cfg
;
572 unsigned int isac_adr
;
574 unsigned int hscx_adr
;
577 struct timer_list tl
;
582 unsigned int cfg_reg
;
593 unsigned int fifosize
;
598 struct timer_list timer
;
602 unsigned int cfg_reg
;
606 unsigned int reset_on
;
607 unsigned int reset_off
;
608 struct isar_reg isar
;
614 unsigned int cfg_reg
;
616 unsigned int hscx
[2];
617 unsigned char res_irq
;
621 unsigned int cfg_reg
;
632 unsigned char dmactrl
;
633 unsigned char ctrl_reg
;
634 unsigned char irqmask0
;
635 unsigned char irqstat0
;
636 unsigned char last_is0
;
644 unsigned char int_m1
;
645 unsigned char int_m2
;
646 unsigned char int_s1
;
648 unsigned char sctrl_r
;
649 unsigned char sctrl_e
;
653 unsigned char fifo_en
;
654 unsigned char bswapped
;
655 unsigned char nt_mode
;
657 unsigned char pci_bus
;
658 unsigned char pci_device_fn
;
659 unsigned char *pci_io
; /* start of PCI IO memory */
660 void *share_start
; /* shared memory for Fifos start */
661 void *fifos
; /* FIFO memory */
662 struct timer_list timer
;
671 unsigned char int_m1
;
672 unsigned char int_m2
;
673 unsigned char int_s1
;
675 unsigned char sctrl_r
;
676 unsigned char sctrl_e
;
680 unsigned char bswapped
;
681 unsigned char nt_mode
;
684 unsigned char last_fifo
;
687 struct timer_list timer
;
692 unsigned int bfifosize
;
693 unsigned int dfifosize
;
699 unsigned char int_m1
;
700 unsigned char int_m2
;
701 unsigned char int_s1
;
708 struct timer_list timer
;
713 unsigned long phymem
;
716 struct isar_reg isar_r
;
720 unsigned int cfg_reg
;
724 struct timer_list timer
;
730 unsigned int isac_adr
;
731 unsigned int isac_ale
;
732 unsigned int jade_adr
;
733 unsigned int jade_ale
;
734 /* Scitel Quadro stuff */
735 unsigned int plx_adr
;
736 unsigned int data_adr
;
740 unsigned int cfg_reg
;
741 unsigned int pciaddr
[2];
746 signed int hscxfifo
[2];
747 unsigned char timeslot
;
753 struct timer_list timer
;
756 #ifdef CONFIG_HISAX_TESTEMU
758 unsigned char *sfifo
;
759 unsigned char *sfifo_w
;
760 unsigned char *sfifo_r
;
761 unsigned char *sfifo_e
;
764 wait_queue_head_t rwaitq
;
765 wait_queue_head_t swaitq
;
770 struct arcofi_msg
*next
;
783 struct arcofi_msg
*arcofi_list
;
784 struct timer_list arcofitimer
;
785 wait_queue_head_t arcofi_wait
;
812 #define FLG_TWO_DCHAN 4
813 #define FLG_L1_DBUSY 5
814 #define FLG_DBUSY_TIMER 6
815 #define FLG_LOCK_ATOMIC 7
816 #define FLG_ARCOFI_TIMER 8
817 #define FLG_ARCOFI_ERROR 9
819 struct IsdnCardState
{
821 unsigned char subtyp
;
824 unsigned long irq_flags
;
827 int chanlimit
; /* limited number of B-chans to use */
828 int logecho
; /* log echo if supported by card */
831 struct teles0_hw teles0
;
832 struct teles3_hw teles3
;
843 struct hfcPCI_hw hfcpci
;
844 struct hfcSX_hw hfcsx
;
846 struct isurf_hw isurf
;
847 struct saphir_hw saphir
;
848 #ifdef CONFIG_HISAX_TESTEMU
852 struct gazel_hw gazel
;
853 struct w6692_hw w6692
;
859 u_char
*status_write
;
861 u_char (*readisac
) (struct IsdnCardState
*, u_char
);
862 void (*writeisac
) (struct IsdnCardState
*, u_char
, u_char
);
863 void (*readisacfifo
) (struct IsdnCardState
*, u_char
*, int);
864 void (*writeisacfifo
) (struct IsdnCardState
*, u_char
*, int);
865 u_char (*BC_Read_Reg
) (struct IsdnCardState
*, int, u_char
);
866 void (*BC_Write_Reg
) (struct IsdnCardState
*, int, u_char
, u_char
);
867 void (*BC_Send_Data
) (struct BCState
*);
868 int (*cardmsg
) (struct IsdnCardState
*, int, void *);
869 void (*setstack_d
) (struct PStack
*, struct IsdnCardState
*);
870 void (*DC_Close
) (struct IsdnCardState
*);
871 void (*irq_func
) (int, void *, struct pt_regs
*);
872 int (*auxcmd
) (struct IsdnCardState
*, isdn_ctrl
*);
873 struct Channel channel
[2+MAX_WAITING_CALLS
];
874 struct BCState bcs
[2+MAX_WAITING_CALLS
];
875 struct PStack
*stlist
;
876 struct sk_buff_head rq
, sq
; /* D-channel queues */
881 struct isac_chip isac
;
882 struct hfcd_chip hfcd
;
883 struct hfcpci_chip hfcpci
;
884 struct hfcsx_chip hfcsx
;
885 struct w6692_chip w6692
;
889 struct sk_buff
*tx_skb
;
892 struct tq_struct tqueue
;
893 struct timer_list dbusytimer
;
894 #ifdef ERROR_STATISTIC
906 #define HISAX_MAX_CARDS 8
908 #define ISDN_CTYPE_16_0 1
909 #define ISDN_CTYPE_8_0 2
910 #define ISDN_CTYPE_16_3 3
911 #define ISDN_CTYPE_PNP 4
912 #define ISDN_CTYPE_A1 5
913 #define ISDN_CTYPE_ELSA 6
914 #define ISDN_CTYPE_ELSA_PNP 7
915 #define ISDN_CTYPE_TELESPCMCIA 8
916 #define ISDN_CTYPE_IX1MICROR2 9
917 #define ISDN_CTYPE_ELSA_PCMCIA 10
918 #define ISDN_CTYPE_DIEHLDIVA 11
919 #define ISDN_CTYPE_ASUSCOM 12
920 #define ISDN_CTYPE_TELEINT 13
921 #define ISDN_CTYPE_TELES3C 14
922 #define ISDN_CTYPE_SEDLBAUER 15
923 #define ISDN_CTYPE_SPORTSTER 16
924 #define ISDN_CTYPE_MIC 17
925 #define ISDN_CTYPE_ELSA_PCI 18
926 #define ISDN_CTYPE_COMPAQ_ISA 19
927 #define ISDN_CTYPE_NETJET 20
928 #define ISDN_CTYPE_TELESPCI 21
929 #define ISDN_CTYPE_SEDLBAUER_PCMCIA 22
930 #define ISDN_CTYPE_AMD7930 23
931 #define ISDN_CTYPE_NICCY 24
932 #define ISDN_CTYPE_S0BOX 25
933 #define ISDN_CTYPE_A1_PCMCIA 26
934 #define ISDN_CTYPE_FRITZPCI 27
935 #define ISDN_CTYPE_SEDLBAUER_FAX 28
936 #define ISDN_CTYPE_ISURF 29
937 #define ISDN_CTYPE_ACERP10 30
938 #define ISDN_CTYPE_HSTSAPHIR 31
939 #define ISDN_CTYPE_BKM_A4T 32
940 #define ISDN_CTYPE_SCT_QUADRO 33
941 #define ISDN_CTYPE_GAZEL 34
942 #define ISDN_CTYPE_HFC_PCI 35
943 #define ISDN_CTYPE_W6692 36
944 #define ISDN_CTYPE_HFC_SX 37
945 #define ISDN_CTYPE_COUNT 37
948 #ifdef ISDN_CHIP_ISAC
949 #undef ISDN_CHIP_ISAC
953 #define __initfunc(__arginit) __arginit
960 #define HISAX_INITFUNC(__arginit) __initfunc(__arginit)
961 #define HISAX_INITDATA __initdata
963 #ifdef CONFIG_HISAX_16_0
964 #define CARD_TELES0 1
965 #ifndef ISDN_CHIP_ISAC
966 #define ISDN_CHIP_ISAC 1
969 #define CARD_TELES0 0
972 #ifdef CONFIG_HISAX_16_3
973 #define CARD_TELES3 1
974 #ifndef ISDN_CHIP_ISAC
975 #define ISDN_CHIP_ISAC 1
978 #define CARD_TELES3 0
981 #ifdef CONFIG_HISAX_TELESPCI
982 #define CARD_TELESPCI 1
983 #ifndef ISDN_CHIP_ISAC
984 #define ISDN_CHIP_ISAC 1
987 #define CARD_TELESPCI 0
990 #ifdef CONFIG_HISAX_AVM_A1
991 #define CARD_AVM_A1 1
992 #ifndef ISDN_CHIP_ISAC
993 #define ISDN_CHIP_ISAC 1
996 #define CARD_AVM_A1 0
999 #ifdef CONFIG_HISAX_AVM_A1_PCMCIA
1000 #define CARD_AVM_A1_PCMCIA 1
1001 #ifndef ISDN_CHIP_ISAC
1002 #define ISDN_CHIP_ISAC 1
1005 #define CARD_AVM_A1_PCMCIA 0
1008 #ifdef CONFIG_HISAX_FRITZPCI
1009 #define CARD_FRITZPCI 1
1010 #ifndef ISDN_CHIP_ISAC
1011 #define ISDN_CHIP_ISAC 1
1014 #define CARD_FRITZPCI 0
1017 #ifdef CONFIG_HISAX_ELSA
1019 #ifndef ISDN_CHIP_ISAC
1020 #define ISDN_CHIP_ISAC 1
1022 #undef HISAX_INITFUNC
1023 #define HISAX_INITFUNC(__arginit) __arginit
1024 #undef HISAX_INITDATA
1025 #define HISAX_INITDATA
1030 #ifdef CONFIG_HISAX_IX1MICROR2
1031 #define CARD_IX1MICROR2 1
1032 #ifndef ISDN_CHIP_ISAC
1033 #define ISDN_CHIP_ISAC 1
1036 #define CARD_IX1MICROR2 0
1039 #ifdef CONFIG_HISAX_DIEHLDIVA
1040 #define CARD_DIEHLDIVA 1
1041 #ifndef ISDN_CHIP_ISAC
1042 #define ISDN_CHIP_ISAC 1
1045 #define CARD_DIEHLDIVA 0
1048 #ifdef CONFIG_HISAX_ASUSCOM
1049 #define CARD_ASUSCOM 1
1050 #ifndef ISDN_CHIP_ISAC
1051 #define ISDN_CHIP_ISAC 1
1054 #define CARD_ASUSCOM 0
1057 #ifdef CONFIG_HISAX_TELEINT
1058 #define CARD_TELEINT 1
1059 #ifndef ISDN_CHIP_ISAC
1060 #define ISDN_CHIP_ISAC 1
1063 #define CARD_TELEINT 0
1066 #ifdef CONFIG_HISAX_SEDLBAUER
1067 #define CARD_SEDLBAUER 1
1068 #ifndef ISDN_CHIP_ISAC
1069 #define ISDN_CHIP_ISAC 1
1072 #define CARD_SEDLBAUER 0
1075 #ifdef CONFIG_HISAX_SPORTSTER
1076 #define CARD_SPORTSTER 1
1077 #ifndef ISDN_CHIP_ISAC
1078 #define ISDN_CHIP_ISAC 1
1081 #define CARD_SPORTSTER 0
1084 #ifdef CONFIG_HISAX_MIC
1086 #ifndef ISDN_CHIP_ISAC
1087 #define ISDN_CHIP_ISAC 1
1093 #ifdef CONFIG_HISAX_NETJET
1094 #define CARD_NETJET 1
1095 #ifndef ISDN_CHIP_ISAC
1096 #define ISDN_CHIP_ISAC 1
1099 #define CARD_NETJET 0
1102 #ifdef CONFIG_HISAX_HFCS
1108 #ifdef CONFIG_HISAX_HFC_PCI
1109 #define CARD_HFC_PCI 1
1111 #define CARD_HFC_PCI 0
1114 #ifdef CONFIG_HISAX_HFC_SX
1115 #define CARD_HFC_SX 1
1117 #define CARD_HFC_SX 0
1120 #ifdef CONFIG_HISAX_AMD7930
1121 #define CARD_AMD7930 1
1123 #define CARD_AMD7930 0
1126 #ifdef CONFIG_HISAX_NICCY
1127 #define CARD_NICCY 1
1128 #ifndef ISDN_CHIP_ISAC
1129 #define ISDN_CHIP_ISAC 1
1132 #define CARD_NICCY 0
1135 #ifdef CONFIG_HISAX_ISURF
1136 #define CARD_ISURF 1
1137 #ifndef ISDN_CHIP_ISAC
1138 #define ISDN_CHIP_ISAC 1
1141 #define CARD_ISURF 0
1144 #ifdef CONFIG_HISAX_S0BOX
1145 #define CARD_S0BOX 1
1146 #ifndef ISDN_CHIP_ISAC
1147 #define ISDN_CHIP_ISAC 1
1150 #define CARD_S0BOX 0
1153 #ifdef CONFIG_HISAX_HSTSAPHIR
1154 #define CARD_HSTSAPHIR 1
1155 #ifndef ISDN_CHIP_ISAC
1156 #define ISDN_CHIP_ISAC 1
1159 #define CARD_HSTSAPHIR 0
1162 #ifdef CONFIG_HISAX_TESTEMU
1163 #define CARD_TESTEMU 1
1164 #define ISDN_CTYPE_TESTEMU 99
1165 #undef ISDN_CTYPE_COUNT
1166 #define ISDN_CTYPE_COUNT ISDN_CTYPE_TESTEMU
1168 #define CARD_TESTEMU 0
1171 #ifdef CONFIG_HISAX_BKM_A4T
1172 #define CARD_BKM_A4T 1
1173 #ifndef ISDN_CHIP_ISAC
1174 #define ISDN_CHIP_ISAC 1
1177 #define CARD_BKM_A4T 0
1180 #ifdef CONFIG_HISAX_SCT_QUADRO
1181 #define CARD_SCT_QUADRO 1
1182 #ifndef ISDN_CHIP_ISAC
1183 #define ISDN_CHIP_ISAC 1
1186 #define CARD_SCT_QUADRO 0
1189 #ifdef CONFIG_HISAX_GAZEL
1190 #define CARD_GAZEL 1
1191 #ifndef ISDN_CHIP_ISAC
1192 #define ISDN_CHIP_ISAC 1
1195 #define CARD_GAZEL 0
1198 #ifdef CONFIG_HISAX_W6692
1199 #define CARD_W6692 1
1200 #ifndef ISDN_CHIP_W6692
1201 #define ISDN_CHIP_W6692 1
1204 #define CARD_W6692 0
1207 #define TEI_PER_CARD 0
1209 #ifdef CONFIG_HISAX_1TR6
1211 #define TEI_PER_CARD 1
1214 #ifdef CONFIG_HISAX_EURO
1216 #define TEI_PER_CARD 1
1220 #define L1_DEB_WARN 0x01
1221 #define L1_DEB_INTSTAT 0x02
1222 #define L1_DEB_ISAC 0x04
1223 #define L1_DEB_ISAC_FIFO 0x08
1224 #define L1_DEB_HSCX 0x10
1225 #define L1_DEB_HSCX_FIFO 0x20
1226 #define L1_DEB_LAPD 0x40
1227 #define L1_DEB_IPAC 0x80
1228 #define L1_DEB_RECEIVE_FRAME 0x100
1229 #define L1_DEB_MONITOR 0x200
1230 #define DEB_DLOG_HEX 0x400
1231 #define DEB_DLOG_VERBOSE 0x800
1233 #define L2FRAME_DEBUG
1235 #ifdef L2FRAME_DEBUG
1236 extern void Logl2Frame(struct IsdnCardState
*cs
, struct sk_buff
*skb
, char *buf
, int dir
);
1241 int protocol
; /* EDSS1 or 1TR6 */
1242 unsigned int para
[4];
1243 struct IsdnCardState
*cs
;
1246 void init_bcstate(struct IsdnCardState
*cs
, int bc
);
1248 void setstack_HiSax(struct PStack
*st
, struct IsdnCardState
*cs
);
1249 unsigned int random_ri(void);
1250 void HiSax_addlist(struct IsdnCardState
*sp
, struct PStack
*st
);
1251 void HiSax_rmlist(struct IsdnCardState
*sp
, struct PStack
*st
);
1253 void setstack_l1_B(struct PStack
*st
);
1255 void setstack_tei(struct PStack
*st
);
1256 void setstack_manager(struct PStack
*st
);
1258 void setstack_isdnl2(struct PStack
*st
, char *debug_id
);
1259 void releasestack_isdnl2(struct PStack
*st
);
1260 void setstack_transl2(struct PStack
*st
);
1261 void releasestack_transl2(struct PStack
*st
);
1263 void setstack_l3dc(struct PStack
*st
, struct Channel
*chanp
);
1264 void setstack_l3bc(struct PStack
*st
, struct Channel
*chanp
);
1265 void releasestack_isdnl3(struct PStack
*st
);
1267 u_char
*findie(u_char
* p
, int size
, u_char ie
, int wanted_set
);
1268 int getcallref(u_char
* p
);
1269 int newcallref(void);
1271 void FsmNew(struct Fsm
*fsm
, struct FsmNode
*fnlist
, int fncount
);
1272 void FsmFree(struct Fsm
*fsm
);
1273 int FsmEvent(struct FsmInst
*fi
, int event
, void *arg
);
1274 void FsmChangeState(struct FsmInst
*fi
, int newstate
);
1275 void FsmInitTimer(struct FsmInst
*fi
, struct FsmTimer
*ft
);
1276 int FsmAddTimer(struct FsmTimer
*ft
, int millisec
, int event
,
1277 void *arg
, int where
);
1278 void FsmRestartTimer(struct FsmTimer
*ft
, int millisec
, int event
,
1279 void *arg
, int where
);
1280 void FsmDelTimer(struct FsmTimer
*ft
, int where
);
1281 int jiftime(char *s
, long mark
);
1283 int HiSax_command(isdn_ctrl
* ic
);
1284 int HiSax_writebuf_skb(int id
, int chan
, int ack
, struct sk_buff
*skb
);
1285 void HiSax_putstatus(struct IsdnCardState
*cs
, char *head
, char *fmt
, ...);
1286 void VHiSax_putstatus(struct IsdnCardState
*cs
, char *head
, char *fmt
, va_list args
);
1287 void HiSax_reportcard(int cardnr
, int sel
);
1288 int QuickHex(char *txt
, u_char
* p
, int cnt
);
1289 void LogFrame(struct IsdnCardState
*cs
, u_char
* p
, int size
);
1290 void dlogframe(struct IsdnCardState
*cs
, struct sk_buff
*skb
, int dir
);
1291 void iecpy(u_char
* dest
, u_char
* iestart
, int ieoffset
);
1292 int discard_queue(struct sk_buff_head
*q
);
1293 #ifdef ISDN_CHIP_ISAC
1294 void setstack_isac(struct PStack
*st
, struct IsdnCardState
*cs
);
1295 #endif /* ISDN_CHIP_ISAC */
1296 #endif /* __KERNEL__ */
1298 #define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);}
1300 int ll_run(struct IsdnCardState
*cs
, int addfeatures
);
1301 void ll_stop(struct IsdnCardState
*cs
);
1302 void CallcNew(void);
1303 void CallcFree(void);
1304 int CallcNewChan(struct IsdnCardState
*cs
);
1305 void CallcFreeChan(struct IsdnCardState
*cs
);
1306 void Isdnl1New(void);
1307 void Isdnl1Free(void);
1308 void Isdnl2New(void);
1309 void Isdnl2Free(void);
1310 void Isdnl3New(void);
1311 void Isdnl3Free(void);
1312 void init_tei(struct IsdnCardState
*cs
, int protocol
);
1313 void release_tei(struct IsdnCardState
*cs
);
1314 char *HiSax_getrev(const char *revision
);
1317 int certification_check(int output
);