Commit 3e12a6dc authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-isdn.bkbits.net/linux-2.5.isdn

into home.transmeta.com:/home/torvalds/v2.5/linux
parents a06ae2d9 dd7728a8
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -178,8 +178,6 @@ static int __init b1isa_init(void)
int i, retval;
int found = 0;
MOD_INC_USE_COUNT;
b1_set_revision(&b1isa_driver, revision);
attach_capi_driver(&b1isa_driver);
......@@ -203,7 +201,6 @@ static int __init b1isa_init(void)
err:
detach_capi_driver(&b1isa_driver);
out:
MOD_DEC_USE_COUNT;
return retval;
}
......
......@@ -397,8 +397,6 @@ static int __init b1pci_init(void)
{
int retval;
MOD_INC_USE_COUNT;
b1_set_revision(&b1pci_driver, revision);
attach_capi_driver(&b1pci_driver);
......@@ -422,7 +420,6 @@ static int __init b1pci_init(void)
detach_capi_driver(&b1pciv4_driver);
#endif
out:
MOD_DEC_USE_COUNT;
return retval;
}
......
......@@ -200,12 +200,9 @@ EXPORT_SYMBOL(b1pcmcia_delcard);
static int __init b1pcmcia_init(void)
{
MOD_INC_USE_COUNT;
b1_set_revision(&b1pcmcia_driver, revision);
attach_capi_driver(&b1pcmcia_driver);
MOD_DEC_USE_COUNT;
return 0;
}
......
......@@ -1282,8 +1282,6 @@ static int __init c4_init(void)
{
int retval;
MOD_INC_USE_COUNT;
b1_set_revision(&c2_driver, revision);
attach_capi_driver(&c2_driver);
......@@ -1304,7 +1302,6 @@ static int __init c4_init(void)
detach_capi_driver(&c2_driver);
detach_capi_driver(&c4_driver);
out:
MOD_DEC_USE_COUNT;
return retval;
}
......
......@@ -345,12 +345,11 @@ static void t1isa_remove(struct pci_dev *pdev)
/* ------------------------------------------------------------- */
static int __init t1isa_probe(struct pci_dev *pdev)
static int __init t1isa_probe(struct pci_dev *pdev, int cardnr)
{
avmctrl_info *cinfo;
avmcard *card;
int retval;
static int cardnr = 1;
card = b1_alloc_card(1);
if (!card) {
......@@ -363,7 +362,7 @@ static int __init t1isa_probe(struct pci_dev *pdev)
card->port = pci_resource_start(pdev, 0);
card->irq = pdev->irq;
card->cardtype = avm_t1isa;
card->cardnr = cardnr++;
card->cardnr = cardnr;
sprintf(card->name, "t1isa-%x", card->port);
if (!(((card->port & 0x7) == 0) && ((card->port & 0x30) != 0x30))) {
......@@ -505,19 +504,20 @@ static struct capi_driver t1isa_driver = {
static struct pci_dev isa_dev[MAX_CARDS];
static int io[MAX_CARDS];
static int irq[MAX_CARDS];
static int cardnr[MAX_CARDS];
MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i");
MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i");
MODULE_PARM(cardnr, "1-" __MODULE_STRING(MAX_CARDS) "i");
MODULE_PARM_DESC(io, "I/O base address(es)");
MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)");
MODULE_PARM_DESC(cardnr, "Card number(s) (as jumpered)");
static int __init t1isa_init(void)
{
int i, retval;
int found = 0;
MOD_INC_USE_COUNT;
b1_set_revision(&t1isa_driver, revision);
attach_capi_driver(&t1isa_driver);
......@@ -528,7 +528,7 @@ static int __init t1isa_init(void)
isa_dev[i].resource[0].start = io[i];
isa_dev[i].irq_resource[0].start = irq[i];
if (t1isa_probe(&isa_dev[i]) == 0)
if (t1isa_probe(&isa_dev[i], cardnr[i]) == 0)
found++;
}
if (found == 0) {
......@@ -541,7 +541,6 @@ static int __init t1isa_init(void)
err:
detach_capi_driver(&t1isa_driver);
out:
MOD_DEC_USE_COUNT;
return retval;
}
......
......@@ -239,8 +239,6 @@ static int __init t1pci_init(void)
{
int retval;
MOD_INC_USE_COUNT;
b1_set_revision(&t1pci_driver, revision);
attach_capi_driver(&t1pci_driver);
......@@ -256,7 +254,6 @@ static int __init t1pci_init(void)
err:
detach_capi_driver(&t1pci_driver);
out:
MOD_DEC_USE_COUNT;
return retval;
}
......
......@@ -49,40 +49,41 @@ typedef struct kcapi_carddef {
#include <linux/skbuff.h>
struct capi_interface {
__u16 (*capi_isinstalled) (void);
__u16 (*capi_register) (capi_register_params * rparam, __u16 * applidp);
__u16 (*capi_release) (__u16 applid);
__u16 (*capi_put_message) (__u16 applid, struct sk_buff * msg);
__u16 (*capi_get_message) (__u16 applid, struct sk_buff ** msgp);
__u16 (*capi_set_signal) (__u16 applid,
void (*signal) (__u16 applid, void *param),
void *param);
__u16 (*capi_get_manufacturer) (__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN]);
__u16 (*capi_get_version) (__u32 contr, struct capi_version * verp);
__u16(*capi_get_serial) (__u32 contr, __u8 serial[CAPI_SERIAL_LEN]);
__u16(*capi_get_profile) (__u32 contr, struct capi_profile * profp);
/*
* to init controllers, data is always in user memory
#define KCI_CONTRUP 0 /* arg: struct capi_profile */
#define KCI_CONTRDOWN 1 /* arg: NULL */
struct capi20_appl {
u16 applid;
capi_register_params rparam;
void (*recv_message)(struct capi20_appl *ap, struct sk_buff *skb);
void *private;
/* internal to kernelcapi.o */
unsigned long nrecvctlpkt;
unsigned long nrecvdatapkt;
unsigned long nsentctlpkt;
unsigned long nsentdatapkt;
/* ugly hack to allow for notification of added/removed
* controllers. The Right Way (tm) is known. XXX
*/
int (*capi_manufacturer) (unsigned int cmd, void *data);
void (*callback) (unsigned int cmd, __u32 contr, void *data);
};
#define KCI_CONTRUP 0 /* struct capi_profile */
#define KCI_CONTRDOWN 1 /* NULL */
u16 capi20_isinstalled(void);
u16 capi20_register(struct capi20_appl *ap);
u16 capi20_release(struct capi20_appl *ap);
u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb);
u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]);
u16 capi20_get_version(u32 contr, struct capi_version *verp);
u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]);
u16 capi20_get_profile(u32 contr, struct capi_profile *profp);
int capi20_manufacturer(unsigned int cmd, void *data);
struct capi_interface_user {
char name[20];
void (*callback) (unsigned int cmd, __u32 contr, void *data);
/* internal */
struct list_head user_list;
};
/* temporary hack XXX */
void capi20_set_callback(struct capi20_appl *ap,
void (*callback) (unsigned int cmd, __u32 contr, void *data));
struct capi_interface *attach_capi_interface(struct capi_interface_user *);
int detach_capi_interface(struct capi_interface_user *);
#define CAPI_NOERROR 0x0000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment