18 #include <linux/string.h>
19 #include <linux/kernel.h>
21 #include <linux/types.h>
28 #include <linux/isdnif.h>
40 "Outgoing call proceeding",
46 "Incoming call proceeding",
49 "Disconnect indication",
63 "Select protocol on B-Channel",
64 "Activate B-channel protocol"
73 {0x01,
"Unallocated (unassigned) number"},
74 {0x02,
"No route to specified transit network"},
75 {0x03,
"No route to destination"},
76 {0x04,
"Send special information tone"},
77 {0x05,
"Misdialled trunk prefix"},
78 {0x06,
"Channel unacceptable"},
79 {0x07,
"Channel awarded and being delivered in an established channel"},
81 {0x09,
"Preemption - circuit reserved for reuse"},
82 {0x10,
"Normal call clearing"},
84 {0x12,
"No user responding"},
85 {0x13,
"No answer from user (user alerted)"},
86 {0x14,
"Subscriber absent"},
87 {0x15,
"Call rejected"},
88 {0x16,
"Number changed"},
89 {0x1a,
"non-selected user clearing"},
90 {0x1b,
"Destination out of order"},
91 {0x1c,
"Invalid number format (address incomplete)"},
92 {0x1d,
"Facility rejected"},
93 {0x1e,
"Response to Status enquiry"},
94 {0x1f,
"Normal, unspecified"},
95 {0x22,
"No circuit/channel available"},
96 {0x26,
"Network out of order"},
97 {0x27,
"Permanent frame mode connection out-of-service"},
98 {0x28,
"Permanent frame mode connection operational"},
99 {0x29,
"Temporary failure"},
100 {0x2a,
"Switching equipment congestion"},
101 {0x2b,
"Access information discarded"},
102 {0x2c,
"Requested circuit/channel not available"},
103 {0x2e,
"Precedence call blocked"},
104 {0x2f,
"Resource unavailable, unspecified"},
105 {0x31,
"Quality of service unavailable"},
106 {0x32,
"Requested facility not subscribed"},
107 {0x35,
"Outgoing calls barred within CUG"},
108 {0x37,
"Incoming calls barred within CUG"},
109 {0x39,
"Bearer capability not authorized"},
110 {0x3a,
"Bearer capability not presently available"},
111 {0x3e,
"Inconsistency in designated outgoing access information and subscriber class"},
112 {0x3f,
"Service or option not available, unspecified"},
113 {0x41,
"Bearer capability not implemented"},
114 {0x42,
"Channel type not implemented"},
115 {0x43,
"Requested facility not implemented"},
116 {0x44,
"Only restricted digital information bearer capability is available"},
117 {0x4f,
"Service or option not implemented"},
118 {0x51,
"Invalid call reference value"},
119 {0x52,
"Identified channel does not exist"},
120 {0x53,
"A suspended call exists, but this call identity does not"},
121 {0x54,
"Call identity in use"},
122 {0x55,
"No call suspended"},
123 {0x56,
"Call having the requested call identity has been cleared"},
124 {0x57,
"User not member of CUG"},
125 {0x58,
"Incompatible destination"},
126 {0x5a,
"Non-existent CUG"},
127 {0x5b,
"Invalid transit network selection"},
128 {0x5f,
"Invalid message, unspecified"},
129 {0x60,
"Mandatory information element is missing"},
130 {0x61,
"Message type non-existent or not implemented"},
131 {0x62,
"Message not compatible with call state or message type non-existent or not implemented"},
132 {0x63,
"Information element/parameter non-existent or not implemented"},
133 {0x64,
"Invalid information element contents"},
134 {0x65,
"Message not compatible with call state"},
135 {0x66,
"Recovery on timer expiry"},
136 {0x67,
"Parameter non-existent or not implemented - passed on"},
137 {0x6e,
"Message with unrecognized parameter discarded"},
138 {0x6f,
"Protocol error, unspecified"},
139 {0x7f,
"Interworking, unspecified"}
144 static struct isdn_event_desc {
147 } isdn_event_table[] = {
169 struct isdn_event_desc *
entry;
171 for (entry = isdn_event_table; entry->ev; entry++)
245 static void pcbit_fsm_timer(
unsigned long data)
247 struct pcbit_dev *
dev;
248 struct pcbit_chan *
chan;
250 chan = (
struct pcbit_chan *) data;
253 chan->fsm_timer.function =
NULL;
255 dev = chan2dev(chan);
275 for (action = fsm_table; action->
init != 0xff; action++)
276 if (action->
init == chan->fsm_state && action->
event == event)
279 if (action->
init == 0xff) {
281 spin_unlock_irqrestore(&dev->lock, flags);
283 event, chan->fsm_state);
287 if (chan->fsm_timer.function) {
289 chan->fsm_timer.function =
NULL;
292 chan->fsm_state = action->
final;
296 for (tentry = fsm_timers; tentry->
init != 0xff; tentry++)
297 if (tentry->
init == chan->fsm_state)
300 if (tentry->
init != 0xff) {
302 chan->fsm_timer.function = &pcbit_fsm_timer;
303 chan->fsm_timer.data = (
ulong) chan;
308 spin_unlock_irqrestore(&dev->lock, flags);
311 action->
callb(dev, chan, data);