diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-05-08 03:36:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:24 -0400 |
commit | 85c93fa95b8fa8dabc6d14c77eb9a9c2e9753ecc (patch) | |
tree | 15f380effd038afa6ee7e741176b69b34ee9ee99 /drivers/char | |
parent | 6ad1ccc196f76833f41b187e01a28a024fe11f8b (diff) |
Char: cyclades, clear interrupts before releasing
Without this patch, the driver sometimes causes "IRQXX: Nobody cares". Fix it
by turning off irqs when releasing.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/cyclades.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 4434c1347221..353e888295d1 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -5341,6 +5341,17 @@ static void __devexit cy_pci_release(struct pci_dev *pdev) | |||
5341 | struct cyclades_card *cinfo = pci_get_drvdata(pdev); | 5341 | struct cyclades_card *cinfo = pci_get_drvdata(pdev); |
5342 | unsigned int i; | 5342 | unsigned int i; |
5343 | 5343 | ||
5344 | /* non-Z with old PLX */ | ||
5345 | if (cinfo->num_chips != -1 && (readb(cinfo->base_addr + CyPLX_VER) & | ||
5346 | 0x0f) == PLX_9050) | ||
5347 | cy_writeb(cinfo->ctl_addr + 0x4c, 0); | ||
5348 | else | ||
5349 | #ifndef CONFIG_CYZ_INTR | ||
5350 | if (cinfo->num_chips != -1) | ||
5351 | #endif | ||
5352 | cy_writew(cinfo->ctl_addr + 0x68, | ||
5353 | readw(cinfo->ctl_addr + 0x68) & ~0x0900); | ||
5354 | |||
5344 | pci_iounmap(pdev, cinfo->base_addr); | 5355 | pci_iounmap(pdev, cinfo->base_addr); |
5345 | if (cinfo->ctl_addr) | 5356 | if (cinfo->ctl_addr) |
5346 | pci_iounmap(pdev, cinfo->ctl_addr); | 5357 | pci_iounmap(pdev, cinfo->ctl_addr); |
@@ -5560,6 +5571,8 @@ static void __exit cy_cleanup_module(void) | |||
5560 | cy_pci_release(cy_card[i].pdev); | 5571 | cy_pci_release(cy_card[i].pdev); |
5561 | continue; | 5572 | continue; |
5562 | } | 5573 | } |
5574 | /* clear interrupt */ | ||
5575 | cy_writeb(cy_card[i].base_addr + Cy_ClrIntr, 0); | ||
5563 | iounmap(cy_card[i].base_addr); | 5576 | iounmap(cy_card[i].base_addr); |
5564 | if (cy_card[i].ctl_addr) | 5577 | if (cy_card[i].ctl_addr) |
5565 | iounmap(cy_card[i].ctl_addr); | 5578 | iounmap(cy_card[i].ctl_addr); |