[PATCH] Char: isicom, remove isa code
ISA is not supported by this driver, remove parts, that take care of this. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Родитель
ca26200511
Коммит
18234f88bc
|
@ -193,7 +193,6 @@ struct isi_board {
|
||||||
unsigned short shift_count;
|
unsigned short shift_count;
|
||||||
struct isi_port * ports;
|
struct isi_port * ports;
|
||||||
signed char count;
|
signed char count;
|
||||||
unsigned char isa;
|
|
||||||
spinlock_t card_lock; /* Card wide lock 11/5/00 -sameer */
|
spinlock_t card_lock; /* Card wide lock 11/5/00 -sameer */
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
};
|
};
|
||||||
|
@ -562,14 +561,12 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
|
||||||
base = card->base;
|
base = card->base;
|
||||||
spin_lock(&card->card_lock);
|
spin_lock(&card->card_lock);
|
||||||
|
|
||||||
if (card->isa == NO) {
|
/*
|
||||||
/*
|
* disable any interrupts from the PCI card and lower the
|
||||||
* disable any interrupts from the PCI card and lower the
|
* interrupt line
|
||||||
* interrupt line
|
*/
|
||||||
*/
|
outw(0x8000, base+0x04);
|
||||||
outw(0x8000, base+0x04);
|
ClearInterrupt(base);
|
||||||
ClearInterrupt(base);
|
|
||||||
}
|
|
||||||
|
|
||||||
inw(base); /* get the dummy word out */
|
inw(base); /* get the dummy word out */
|
||||||
header = inw(base);
|
header = inw(base);
|
||||||
|
@ -579,19 +576,13 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
|
||||||
if (channel + 1 > card->port_count) {
|
if (channel + 1 > card->port_count) {
|
||||||
printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%lx): "
|
printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%lx): "
|
||||||
"%d(channel) > port_count.\n", base, channel+1);
|
"%d(channel) > port_count.\n", base, channel+1);
|
||||||
if (card->isa)
|
outw(0x0000, base+0x04); /* enable interrupts */
|
||||||
ClearInterrupt(base);
|
|
||||||
else
|
|
||||||
outw(0x0000, base+0x04); /* enable interrupts */
|
|
||||||
spin_unlock(&card->card_lock);
|
spin_unlock(&card->card_lock);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
port = card->ports + channel;
|
port = card->ports + channel;
|
||||||
if (!(port->flags & ASYNC_INITIALIZED)) {
|
if (!(port->flags & ASYNC_INITIALIZED)) {
|
||||||
if (card->isa)
|
outw(0x0000, base+0x04); /* enable interrupts */
|
||||||
ClearInterrupt(base);
|
|
||||||
else
|
|
||||||
outw(0x0000, base+0x04); /* enable interrupts */
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -604,10 +595,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
|
||||||
}
|
}
|
||||||
if (byte_count & 0x01)
|
if (byte_count & 0x01)
|
||||||
inw(base);
|
inw(base);
|
||||||
if (card->isa == YES)
|
outw(0x0000, base+0x04); /* enable interrupts */
|
||||||
ClearInterrupt(base);
|
|
||||||
else
|
|
||||||
outw(0x0000, base+0x04); /* enable interrupts */
|
|
||||||
spin_unlock(&card->card_lock);
|
spin_unlock(&card->card_lock);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
@ -708,10 +696,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
|
||||||
}
|
}
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
}
|
}
|
||||||
if (card->isa == YES)
|
outw(0x0000, base+0x04); /* enable interrupts */
|
||||||
ClearInterrupt(base);
|
|
||||||
else
|
|
||||||
outw(0x0000, base+0x04); /* enable interrupts */
|
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
@ -1561,36 +1546,23 @@ static int __devinit reset_card(struct pci_dev *pdev,
|
||||||
|
|
||||||
*signature = inw(base + 0x4) & 0xff;
|
*signature = inw(base + 0x4) & 0xff;
|
||||||
|
|
||||||
if (board->isa == YES) {
|
portcount = inw(base + 0x2);
|
||||||
if (!(inw(base + 0xe) & 0x1) || (inw(base + 0x2))) {
|
if (!(inw(base + 0xe) & 0x1) || ((portcount != 0) &&
|
||||||
dev_dbg(&pdev->dev, "base+0x2=0x%lx, base+0xe=0x%lx\n",
|
(portcount != 4) && (portcount != 8))) {
|
||||||
inw(base + 0x2), inw(base + 0xe));
|
dev_dbg(&pdev->dev, "base+0x2=0x%lx, base+0xe=0x%lx\n",
|
||||||
dev_err(&pdev->dev, "ISILoad:ISA Card%d reset failure "
|
inw(base + 0x2), inw(base + 0xe));
|
||||||
"(Possible bad I/O Port Address 0x%lx).\n",
|
dev_err(&pdev->dev, "ISILoad:PCI Card%d reset failure "
|
||||||
card + 1, base);
|
"(Possible bad I/O Port Address 0x%lx).\n",
|
||||||
retval = -EIO;
|
card + 1, base);
|
||||||
goto end;
|
retval = -EIO;
|
||||||
}
|
goto end;
|
||||||
} else {
|
|
||||||
portcount = inw(base + 0x2);
|
|
||||||
if (!(inw(base + 0xe) & 0x1) || ((portcount != 0) &&
|
|
||||||
(portcount != 4) && (portcount != 8))) {
|
|
||||||
dev_dbg(&pdev->dev, "base+0x2=0x%lx, base+0xe=0x%lx\n",
|
|
||||||
inw(base + 0x2), inw(base + 0xe));
|
|
||||||
dev_err(&pdev->dev, "ISILoad:PCI Card%d reset failure "
|
|
||||||
"(Possible bad I/O Port Address 0x%lx).\n",
|
|
||||||
card + 1, base);
|
|
||||||
retval = -EIO;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (*signature) {
|
switch (*signature) {
|
||||||
case 0xa5:
|
case 0xa5:
|
||||||
case 0xbb:
|
case 0xbb:
|
||||||
case 0xdd:
|
case 0xdd:
|
||||||
board->port_count = (board->isa == NO && portcount == 4) ? 4 :
|
board->port_count = (portcount == 4) ? 4 : 8;
|
||||||
8;
|
|
||||||
board->shift_count = 12;
|
board->shift_count = 12;
|
||||||
break;
|
break;
|
||||||
case 0xcc:
|
case 0xcc:
|
||||||
|
@ -1784,8 +1756,6 @@ end:
|
||||||
/*
|
/*
|
||||||
* Insmod can set static symbols so keep these static
|
* Insmod can set static symbols so keep these static
|
||||||
*/
|
*/
|
||||||
static int io[4];
|
|
||||||
static int irq[4];
|
|
||||||
static int card;
|
static int card;
|
||||||
|
|
||||||
static int __devinit isicom_probe(struct pci_dev *pdev,
|
static int __devinit isicom_probe(struct pci_dev *pdev,
|
||||||
|
@ -1813,7 +1783,6 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
|
||||||
|
|
||||||
board->base = ioaddr;
|
board->base = ioaddr;
|
||||||
board->irq = pciirq;
|
board->irq = pciirq;
|
||||||
board->isa = NO;
|
|
||||||
card++;
|
card++;
|
||||||
|
|
||||||
pci_set_drvdata(pdev, board);
|
pci_set_drvdata(pdev, board);
|
||||||
|
@ -1888,20 +1857,6 @@ static int __init isicom_init(void)
|
||||||
}
|
}
|
||||||
isi_card[idx].base = 0;
|
isi_card[idx].base = 0;
|
||||||
isi_card[idx].irq = 0;
|
isi_card[idx].irq = 0;
|
||||||
|
|
||||||
if (!io[idx])
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (irq[idx] == 2 || irq[idx] == 3 || irq[idx] == 4 ||
|
|
||||||
irq[idx] == 5 || irq[idx] == 7 ||
|
|
||||||
irq[idx] == 10 || irq[idx] == 11 ||
|
|
||||||
irq[idx] == 12 || irq[idx] == 15) {
|
|
||||||
printk(KERN_ERR "ISICOM: ISA not supported yet.\n");
|
|
||||||
retval = -EINVAL;
|
|
||||||
goto error;
|
|
||||||
} else
|
|
||||||
printk(KERN_ERR "ISICOM: Irq %d unsupported. "
|
|
||||||
"Disabling Card%d...\n", irq[idx], idx + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tty driver structure initialization */
|
/* tty driver structure initialization */
|
||||||
|
@ -1971,7 +1926,3 @@ module_exit(isicom_exit);
|
||||||
MODULE_AUTHOR("MultiTech");
|
MODULE_AUTHOR("MultiTech");
|
||||||
MODULE_DESCRIPTION("Driver for the ISI series of cards by MultiTech");
|
MODULE_DESCRIPTION("Driver for the ISI series of cards by MultiTech");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
module_param_array(io, int, NULL, 0);
|
|
||||||
MODULE_PARM_DESC(io, "I/O ports for the cards");
|
|
||||||
module_param_array(irq, int, NULL, 0);
|
|
||||||
MODULE_PARM_DESC(irq, "Interrupts for the cards");
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче