aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/sc/card.h30
-rw-r--r--drivers/isdn/sc/command.c17
-rw-r--r--drivers/isdn/sc/event.c3
-rw-r--r--drivers/isdn/sc/init.c6
-rw-r--r--drivers/isdn/sc/interrupt.c10
-rw-r--r--drivers/isdn/sc/ioctl.c10
-rw-r--r--drivers/isdn/sc/message.c10
-rw-r--r--drivers/isdn/sc/packet.c10
-rw-r--r--drivers/isdn/sc/scioc.h6
-rw-r--r--drivers/isdn/sc/shmem.c6
-rw-r--r--drivers/isdn/sc/timer.c8
11 files changed, 38 insertions, 78 deletions
diff --git a/drivers/isdn/sc/card.h b/drivers/isdn/sc/card.h
index 8e44928cdf1c..4fbfa825c3a2 100644
--- a/drivers/isdn/sc/card.h
+++ b/drivers/isdn/sc/card.h
@@ -26,7 +26,9 @@
26#include <linux/timer.h> 26#include <linux/timer.h>
27#include <linux/time.h> 27#include <linux/time.h>
28#include <linux/isdnif.h> 28#include <linux/isdnif.h>
29#include <linux/irqreturn.h>
29#include "message.h" 30#include "message.h"
31#include "scioc.h"
30 32
31/* 33/*
32 * Amount of time to wait for a reset to complete 34 * Amount of time to wait for a reset to complete
@@ -98,4 +100,32 @@ typedef struct {
98 spinlock_t lock; /* local lock */ 100 spinlock_t lock; /* local lock */
99} board; 101} board;
100 102
103
104extern board *sc_adapter[];
105extern int cinst;
106
107void memcpy_toshmem(int card, void *dest, const void *src, size_t n);
108void memcpy_fromshmem(int card, void *dest, const void *src, size_t n);
109int get_card_from_id(int driver);
110int indicate_status(int card, int event, ulong Channel, char *Data);
111irqreturn_t interrupt_handler(int interrupt, void *cardptr);
112int sndpkt(int devId, int channel, struct sk_buff *data);
113void rcvpkt(int card, RspMessage *rcvmsg);
114int command(isdn_ctrl *cmd);
115int reset(int card);
116int startproc(int card);
117int send_and_receive(int card, unsigned int procid, unsigned char type,
118 unsigned char class, unsigned char code,
119 unsigned char link, unsigned char data_len,
120 unsigned char *data, RspMessage *mesgdata, int timeout);
121void flushreadfifo (int card);
122int sendmessage(int card, unsigned int procid, unsigned int type,
123 unsigned int class, unsigned int code, unsigned int link,
124 unsigned int data_len, unsigned int *data);
125int receivemessage(int card, RspMessage *rspmsg);
126int sc_ioctl(int card, scs_ioctl *data);
127int setup_buffers(int card, int c);
128void check_reset(unsigned long data);
129void check_phystat(unsigned long data);
130
101#endif /* CARD_H */ 131#endif /* CARD_H */
diff --git a/drivers/isdn/sc/command.c b/drivers/isdn/sc/command.c
index 04b8a58f03b5..b7bb7cbcf503 100644
--- a/drivers/isdn/sc/command.c
+++ b/drivers/isdn/sc/command.c
@@ -31,19 +31,6 @@ static int setl2(int card, unsigned long arg);
31static int setl3(int card, unsigned long arg); 31static int setl3(int card, unsigned long arg);
32static int acceptb(int card, unsigned long channel); 32static int acceptb(int card, unsigned long channel);
33 33
34extern int cinst;
35extern board *sc_adapter[];
36
37extern int sc_ioctl(int, scs_ioctl *);
38extern int setup_buffers(int, int, unsigned int);
39extern int indicate_status(int, int,ulong,char*);
40extern void check_reset(unsigned long);
41extern int send_and_receive(int, unsigned int, unsigned char, unsigned char,
42 unsigned char, unsigned char, unsigned char, unsigned char *,
43 RspMessage *, int);
44extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
45 unsigned int, unsigned int, unsigned int, unsigned int *);
46
47#ifdef DEBUG 34#ifdef DEBUG
48/* 35/*
49 * Translate command codes to strings 36 * Translate command codes to strings
@@ -208,7 +195,7 @@ static int answer(int card, unsigned long channel)
208 return -ENODEV; 195 return -ENODEV;
209 } 196 }
210 197
211 if(setup_buffers(card, channel+1, BUFFER_SIZE)) { 198 if(setup_buffers(card, channel+1)) {
212 hangup(card, channel+1); 199 hangup(card, channel+1);
213 return -ENOBUFS; 200 return -ENOBUFS;
214 } 201 }
@@ -297,7 +284,7 @@ static int acceptb(int card, unsigned long channel)
297 return -ENODEV; 284 return -ENODEV;
298 } 285 }
299 286
300 if(setup_buffers(card, channel+1, BUFFER_SIZE)) 287 if(setup_buffers(card, channel+1))
301 { 288 {
302 hangup(card, channel+1); 289 hangup(card, channel+1);
303 return -ENOBUFS; 290 return -ENOBUFS;
diff --git a/drivers/isdn/sc/event.c b/drivers/isdn/sc/event.c
index 57367325ef04..498f4039ece2 100644
--- a/drivers/isdn/sc/event.c
+++ b/drivers/isdn/sc/event.c
@@ -20,9 +20,6 @@
20#include "message.h" 20#include "message.h"
21#include "card.h" 21#include "card.h"
22 22
23extern int cinst;
24extern board *sc_adapter[];
25
26#ifdef DEBUG 23#ifdef DEBUG
27static char *events[] = { "ISDN_STAT_STAVAIL", 24static char *events[] = { "ISDN_STAT_STAVAIL",
28 "ISDN_STAT_ICALL", 25 "ISDN_STAT_ICALL",
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c
index 150759a5cddf..0bf76344a0d5 100644
--- a/drivers/isdn/sc/init.c
+++ b/drivers/isdn/sc/init.c
@@ -35,12 +35,6 @@ module_param_array(irq, int, NULL, 0);
35module_param_array(ram, int, NULL, 0); 35module_param_array(ram, int, NULL, 0);
36module_param(do_reset, bool, 0); 36module_param(do_reset, bool, 0);
37 37
38extern irqreturn_t interrupt_handler(int, void *);
39extern int sndpkt(int, int, int, struct sk_buff *);
40extern int command(isdn_ctrl *);
41extern int indicate_status(int, int, ulong, char*);
42extern int reset(int);
43
44static int identify_board(unsigned long, unsigned int); 38static int identify_board(unsigned long, unsigned int);
45 39
46static int __init sc_init(void) 40static int __init sc_init(void)
diff --git a/drivers/isdn/sc/interrupt.c b/drivers/isdn/sc/interrupt.c
index cd17de18cb76..bef7963cdd02 100644
--- a/drivers/isdn/sc/interrupt.c
+++ b/drivers/isdn/sc/interrupt.c
@@ -21,16 +21,6 @@
21#include "card.h" 21#include "card.h"
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23 23
24extern int indicate_status(int, int, ulong, char *);
25extern void check_phystat(unsigned long);
26extern int receivemessage(int, RspMessage *);
27extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
28 unsigned int, unsigned int, unsigned int, unsigned int *);
29extern void rcvpkt(int, RspMessage *);
30
31extern int cinst;
32extern board *sc_adapter[];
33
34static int get_card_from_irq(int irq) 24static int get_card_from_irq(int irq)
35{ 25{
36 int i; 26 int i;
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c
index 57c4ab96d136..7817d2244921 100644
--- a/drivers/isdn/sc/ioctl.c
+++ b/drivers/isdn/sc/ioctl.c
@@ -12,16 +12,6 @@
12#include "card.h" 12#include "card.h"
13#include "scioc.h" 13#include "scioc.h"
14 14
15extern int indicate_status(int, int, unsigned long, char *);
16extern int startproc(int);
17extern int reset(int);
18extern int send_and_receive(int, unsigned int, unsigned char,unsigned char,
19 unsigned char,unsigned char,
20 unsigned char, unsigned char *, RspMessage *, int);
21
22extern board *sc_adapter[];
23
24
25static int GetStatus(int card, boardInfo *); 15static int GetStatus(int card, boardInfo *);
26 16
27/* 17/*
diff --git a/drivers/isdn/sc/message.c b/drivers/isdn/sc/message.c
index 0a0fe6b8039b..c5a307e3c496 100644
--- a/drivers/isdn/sc/message.c
+++ b/drivers/isdn/sc/message.c
@@ -22,16 +22,6 @@
22#include "message.h" 22#include "message.h"
23#include "card.h" 23#include "card.h"
24 24
25extern board *sc_adapter[];
26extern unsigned int cinst;
27
28/*
29 * Obligatory function prototypes
30 */
31extern int indicate_status(int,ulong,char*);
32extern int scm_command(isdn_ctrl *);
33
34
35/* 25/*
36 * receive a message from the board 26 * receive a message from the board
37 */ 27 */
diff --git a/drivers/isdn/sc/packet.c b/drivers/isdn/sc/packet.c
index 1e04676b016b..92016a2608e9 100644
--- a/drivers/isdn/sc/packet.c
+++ b/drivers/isdn/sc/packet.c
@@ -20,16 +20,6 @@
20#include "message.h" 20#include "message.h"
21#include "card.h" 21#include "card.h"
22 22
23extern board *sc_adapter[];
24extern unsigned int cinst;
25
26extern int get_card_from_id(int);
27extern int indicate_status(int, int,ulong, char*);
28extern void memcpy_toshmem(int, void *, const void *, size_t);
29extern void memcpy_fromshmem(int, void *, const void *, size_t);
30extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
31 unsigned int, unsigned int, unsigned int, unsigned int *);
32
33int sndpkt(int devId, int channel, struct sk_buff *data) 23int sndpkt(int devId, int channel, struct sk_buff *data)
34{ 24{
35 LLData ReqLnkWrite; 25 LLData ReqLnkWrite;
diff --git a/drivers/isdn/sc/scioc.h b/drivers/isdn/sc/scioc.h
index d08e650c7b6a..dfb107a6de44 100644
--- a/drivers/isdn/sc/scioc.h
+++ b/drivers/isdn/sc/scioc.h
@@ -1,3 +1,6 @@
1#ifndef __ISDN_SC_SCIOC_H__
2#define __ISDN_SC_SCIOC_H__
3
1/* 4/*
2 * This software may be used and distributed according to the terms 5 * This software may be used and distributed according to the terms
3 * of the GNU General Public License, incorporated herein by reference. 6 * of the GNU General Public License, incorporated herein by reference.
@@ -103,3 +106,6 @@ typedef struct {
103 POTInfo potsinfo; 106 POTInfo potsinfo;
104 } info; 107 } info;
105} boardInfo; 108} boardInfo;
109
110#endif /* __ISDN_SC_SCIOC_H__ */
111
diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c
index 6f58862992db..034d41a61ae1 100644
--- a/drivers/isdn/sc/shmem.c
+++ b/drivers/isdn/sc/shmem.c
@@ -22,12 +22,6 @@
22#include "card.h" 22#include "card.h"
23 23
24/* 24/*
25 * Main adapter array
26 */
27extern board *sc_adapter[];
28extern int cinst;
29
30/*
31 * 25 *
32 */ 26 */
33void memcpy_toshmem(int card, void *dest, const void *src, size_t n) 27void memcpy_toshmem(int card, void *dest, const void *src, size_t n)
diff --git a/drivers/isdn/sc/timer.c b/drivers/isdn/sc/timer.c
index f43282be0ada..cc1b8861be2a 100644
--- a/drivers/isdn/sc/timer.c
+++ b/drivers/isdn/sc/timer.c
@@ -20,14 +20,6 @@
20#include "message.h" 20#include "message.h"
21#include "card.h" 21#include "card.h"
22 22
23extern board *sc_adapter[];
24
25extern void flushreadfifo(int);
26extern int startproc(int);
27extern int indicate_status(int, int, unsigned long, char *);
28extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
29 unsigned int, unsigned int, unsigned int, unsigned int *);
30
31 23
32/* 24/*
33 * Write the proper values into the I/O ports following a reset 25 * Write the proper values into the I/O ports following a reset