1 |
1275 |
phoenix |
/* $Id: card.h,v 1.1.1.1 2004-04-15 02:03:54 phoenix Exp $
|
2 |
|
|
*
|
3 |
|
|
* Driver parameters for SpellCaster ISA ISDN adapters
|
4 |
|
|
*
|
5 |
|
|
* Copyright (C) 1996 SpellCaster Telecommunications Inc.
|
6 |
|
|
*
|
7 |
|
|
* This software may be used and distributed according to the terms
|
8 |
|
|
* of the GNU General Public License, incorporated herein by reference.
|
9 |
|
|
*
|
10 |
|
|
* For more information, please contact gpl-info@spellcast.com or write:
|
11 |
|
|
*
|
12 |
|
|
* SpellCaster Telecommunications Inc.
|
13 |
|
|
* 5621 Finch Avenue East, Unit #3
|
14 |
|
|
* Scarborough, Ontario Canada
|
15 |
|
|
* M1B 2T9
|
16 |
|
|
* +1 (416) 297-8565
|
17 |
|
|
* +1 (416) 297-6433 Facsimile
|
18 |
|
|
*/
|
19 |
|
|
|
20 |
|
|
#ifndef CARD_H
|
21 |
|
|
#define CARD_H
|
22 |
|
|
|
23 |
|
|
/*
|
24 |
|
|
* We need these if they're not already included
|
25 |
|
|
*/
|
26 |
|
|
#include <linux/timer.h>
|
27 |
|
|
#include <linux/isdnif.h>
|
28 |
|
|
#include "message.h"
|
29 |
|
|
|
30 |
|
|
/*
|
31 |
|
|
* Amount of time to wait for a reset to complete
|
32 |
|
|
*/
|
33 |
|
|
#define CHECKRESET_TIME milliseconds(4000)
|
34 |
|
|
|
35 |
|
|
/*
|
36 |
|
|
* Amount of time between line status checks
|
37 |
|
|
*/
|
38 |
|
|
#define CHECKSTAT_TIME milliseconds(8000)
|
39 |
|
|
|
40 |
|
|
/*
|
41 |
|
|
* The maximum amount of time to wait for a message response
|
42 |
|
|
* to arrive. Use exclusively by send_and_receive
|
43 |
|
|
*/
|
44 |
|
|
#define SAR_TIMEOUT milliseconds(10000)
|
45 |
|
|
|
46 |
|
|
/*
|
47 |
|
|
* Macro to determine is a card id is valid
|
48 |
|
|
*/
|
49 |
|
|
#define IS_VALID_CARD(x) ((x >= 0) && (x <= cinst))
|
50 |
|
|
|
51 |
|
|
/*
|
52 |
|
|
* Per channel status and configuration
|
53 |
|
|
*/
|
54 |
|
|
typedef struct {
|
55 |
|
|
int l2_proto;
|
56 |
|
|
int l3_proto;
|
57 |
|
|
char dn[50];
|
58 |
|
|
unsigned long first_sendbuf; /* Offset of first send buffer */
|
59 |
|
|
unsigned int num_sendbufs; /* Number of send buffers */
|
60 |
|
|
unsigned int free_sendbufs; /* Number of free sendbufs */
|
61 |
|
|
unsigned int next_sendbuf; /* Next sequential buffer */
|
62 |
|
|
char eazlist[50]; /* Set with SETEAZ */
|
63 |
|
|
char sillist[50]; /* Set with SETSIL */
|
64 |
|
|
int eazclear; /* Don't accept calls if TRUE */
|
65 |
|
|
} bchan;
|
66 |
|
|
|
67 |
|
|
/*
|
68 |
|
|
* Everything you want to know about the adapter ...
|
69 |
|
|
*/
|
70 |
|
|
typedef struct {
|
71 |
|
|
int model;
|
72 |
|
|
int driverId; /* LL Id */
|
73 |
|
|
char devicename[20]; /* The device name */
|
74 |
|
|
isdn_if *card; /* ISDN4Linux structure */
|
75 |
|
|
bchan *channel; /* status of the B channels */
|
76 |
|
|
char nChannels; /* Number of channels */
|
77 |
|
|
unsigned int interrupt; /* Interrupt number */
|
78 |
|
|
int iobase; /* I/O Base address */
|
79 |
|
|
int ioport[MAX_IO_REGS]; /* Index to I/O ports */
|
80 |
|
|
int shmem_pgport; /* port for the exp mem page reg. */
|
81 |
|
|
int shmem_magic; /* adapter magic number */
|
82 |
|
|
unsigned int rambase; /* Shared RAM base address */
|
83 |
|
|
unsigned int ramsize; /* Size of shared memory */
|
84 |
|
|
RspMessage async_msg; /* Async response message */
|
85 |
|
|
int want_async_messages; /* Snoop the Q ? */
|
86 |
|
|
unsigned char seq_no; /* Next send seq. number */
|
87 |
|
|
struct timer_list reset_timer; /* Check reset timer */
|
88 |
|
|
struct timer_list stat_timer; /* Check startproc timer */
|
89 |
|
|
unsigned char nphystat; /* Latest PhyStat info */
|
90 |
|
|
unsigned char phystat; /* Last PhyStat info */
|
91 |
|
|
HWConfig_pl hwconfig; /* Hardware config info */
|
92 |
|
|
char load_ver[11]; /* CommManage Version string */
|
93 |
|
|
char proc_ver[11]; /* CommEngine Version */
|
94 |
|
|
int StartOnReset; /* Indicates startproc after reset */
|
95 |
|
|
int EngineUp; /* Indicates CommEngine Up */
|
96 |
|
|
int trace_mode; /* Indicate if tracing is on */
|
97 |
|
|
} board;
|
98 |
|
|
|
99 |
|
|
#endif /* CARD_H */
|