blob: dfb107a6de446dd0dd7956e3278908a58338dba3 [file] [log] [blame]
Adrian Bunkfc238b32007-02-12 00:53:18 -08001#ifndef __ISDN_SC_SCIOC_H__
2#define __ISDN_SC_SCIOC_H__
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004/*
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/*
10 * IOCTL Command Codes
11 */
12#define SCIOCLOAD 0x01 /* Load a firmware record */
13#define SCIOCRESET 0x02 /* Perform hard reset */
14#define SCIOCDEBUG 0x03 /* Set debug level */
15#define SCIOCREV 0x04 /* Get driver revision(s) */
16#define SCIOCSTART 0x05 /* Start the firmware */
17#define SCIOCGETSWITCH 0x06 /* Get switch type */
18#define SCIOCSETSWITCH 0x07 /* Set switch type */
19#define SCIOCGETSPID 0x08 /* Get channel SPID */
20#define SCIOCSETSPID 0x09 /* Set channel SPID */
21#define SCIOCGETDN 0x0A /* Get channel DN */
22#define SCIOCSETDN 0x0B /* Set channel DN */
23#define SCIOCTRACE 0x0C /* Toggle trace mode */
24#define SCIOCSTAT 0x0D /* Get line status */
25#define SCIOCGETSPEED 0x0E /* Set channel speed */
26#define SCIOCSETSPEED 0x0F /* Set channel speed */
27#define SCIOCLOOPTST 0x10 /* Perform loopback test */
28
29typedef struct {
30 int device;
31 int channel;
32 unsigned long command;
33 void __user *dataptr;
34} scs_ioctl;
35
36/* Size of strings */
37#define SCIOC_SPIDSIZE 49
38#define SCIOC_DNSIZE SCIOC_SPIDSIZE
39#define SCIOC_REVSIZE SCIOC_SPIDSIZE
40#define SCIOC_SRECSIZE 49
41
42typedef struct {
43 unsigned long tx_good;
44 unsigned long tx_bad;
45 unsigned long rx_good;
46 unsigned long rx_bad;
47} ChLinkStats;
48
49typedef struct {
50 char spid[49];
51 char dn[49];
52 char call_type;
53 char phy_stat;
54 ChLinkStats link_stats;
55} BRIStat;
56
57typedef BRIStat POTStat;
58
59typedef struct {
60 char call_type;
61 char call_state;
62 char serv_state;
63 char phy_stat;
64 ChLinkStats link_stats;
65} PRIStat;
66
67typedef char PRIInfo;
68typedef char BRIInfo;
69typedef char POTInfo;
70
71
72typedef struct {
73 char acfa_nos;
74 char acfa_ais;
75 char acfa_los;
76 char acfa_rra;
77 char acfa_slpp;
78 char acfa_slpn;
79 char acfa_fsrf;
80} ACFAStat;
81
82typedef struct {
83 unsigned char modelid;
84 char serial_no[13];
85 char part_no[13];
86 char load_ver[11];
87 char proc_ver[11];
88 int iobase;
89 long rambase;
90 char irq;
91 long ramsize;
92 char interface;
93 char switch_type;
94 char l1_status;
95 char l2_status;
96 ChLinkStats dch_stats;
97 ACFAStat AcfaStats;
98 union {
99 PRIStat pristats[23];
100 BRIStat bristats[2];
101 POTStat potsstats[2];
102 } status;
103 union {
104 PRIInfo priinfo;
105 BRIInfo briinfo;
106 POTInfo potsinfo;
107 } info;
108} boardInfo;
Adrian Bunkfc238b32007-02-12 00:53:18 -0800109
110#endif /* __ISDN_SC_SCIOC_H__ */
111