[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <4488267294095310@karneval.cz>
Date: Wed, 18 Apr 2007 12:07:56 +0200 (CEST)
From: Jiri Slaby <jirislaby@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: <linux-kernel@...r.kernel.org>
Subject: [PATCH 10/11] Char: cyclades, clear interrupts before releasing
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@...il.com>
---
commit 0156510dee9d326af2ec52cf8b1a388ce9a839e9
tree 29d863d5eca58913c306bc8cd9a6b3a5dcef01fe
parent ad4f792b92f8e6350a62b61442bb6812969bfd73
author Jiri Slaby <jirislaby@...il.com> Thu, 05 Apr 2007 18:26:08 +0200
committer Jiri Slaby <jirislaby@...il.com> Tue, 10 Apr 2007 10:48:09 +0200
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 0c2c120..5a9e7d6 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)
struct cyclades_card *cinfo = pci_get_drvdata(pdev);
unsigned int i;
+ /* non-Z with old PLX */
+ if (cinfo->num_chips != -1 && (readb(cinfo->base_addr + CyPLX_VER) &
+ 0x0f) == PLX_9050)
+ cy_writeb(cinfo->ctl_addr + 0x4c, 0);
+ else
+#ifndef CONFIG_CYZ_INTR
+ if (cinfo->num_chips != -1)
+#endif
+ cy_writew(cinfo->ctl_addr + 0x68,
+ readw(cinfo->ctl_addr + 0x68) & ~0x0900);
+
pci_iounmap(pdev, cinfo->base_addr);
if (cinfo->ctl_addr)
pci_iounmap(pdev, cinfo->ctl_addr);
@@ -5560,6 +5571,8 @@ static void __exit cy_cleanup_module(void)
cy_pci_release(cy_card[i].pdev);
continue;
}
+ /* clear interrupt */
+ cy_writeb(cy_card[i].base_addr + Cy_ClrIntr, 0);
iounmap(cy_card[i].base_addr);
if (cy_card[i].ctl_addr)
iounmap(cy_card[i].ctl_addr);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists