Commit 97b75e58 authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: AVM T1 ISA CAPI controller fix

Pass the jumpered cardnr as parameter.
parent 73594418
...@@ -345,12 +345,11 @@ static void t1isa_remove(struct pci_dev *pdev) ...@@ -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; avmctrl_info *cinfo;
avmcard *card; avmcard *card;
int retval; int retval;
static int cardnr = 1;
card = b1_alloc_card(1); card = b1_alloc_card(1);
if (!card) { if (!card) {
...@@ -363,7 +362,7 @@ static int __init t1isa_probe(struct pci_dev *pdev) ...@@ -363,7 +362,7 @@ static int __init t1isa_probe(struct pci_dev *pdev)
card->port = pci_resource_start(pdev, 0); card->port = pci_resource_start(pdev, 0);
card->irq = pdev->irq; card->irq = pdev->irq;
card->cardtype = avm_t1isa; card->cardtype = avm_t1isa;
card->cardnr = cardnr++; card->cardnr = cardnr;
sprintf(card->name, "t1isa-%x", card->port); sprintf(card->name, "t1isa-%x", card->port);
if (!(((card->port & 0x7) == 0) && ((card->port & 0x30) != 0x30))) { if (!(((card->port & 0x7) == 0) && ((card->port & 0x30) != 0x30))) {
...@@ -505,11 +504,14 @@ static struct capi_driver t1isa_driver = { ...@@ -505,11 +504,14 @@ static struct capi_driver t1isa_driver = {
static struct pci_dev isa_dev[MAX_CARDS]; static struct pci_dev isa_dev[MAX_CARDS];
static int io[MAX_CARDS]; static int io[MAX_CARDS];
static int irq[MAX_CARDS]; static int irq[MAX_CARDS];
static int cardnr[MAX_CARDS];
MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i"); MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i");
MODULE_PARM(irq, "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(io, "I/O base address(es)");
MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)");
MODULE_PARM_DESC(cardnr, "Card number(s) (as jumpered)");
static int __init t1isa_init(void) static int __init t1isa_init(void)
{ {
...@@ -526,7 +528,7 @@ static int __init t1isa_init(void) ...@@ -526,7 +528,7 @@ static int __init t1isa_init(void)
isa_dev[i].resource[0].start = io[i]; isa_dev[i].resource[0].start = io[i];
isa_dev[i].irq_resource[0].start = irq[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++; found++;
} }
if (found == 0) { if (found == 0) {
......
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