aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2005-11-09 18:19:14 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2005-11-09 18:19:14 -0500
commitd868dd19ad0828b1b3b56f3b06bd4a39971847be (patch)
treee037cbe83e3a5ebe4e77de5fff01538794d57339 /drivers/ide/pci
parent25000c2c8a6cbf9bba2de6560370ee222b4c613d (diff)
[PATCH] siimage: enable interrupts on Adaptec SA-1210 card
The siimage driver proports to support the Adaptec SA-1210 SATA controller. However, at least some of those cards boot-up with their interrupts disabled internally. The siimage driver currently ignores that fact, so that driver does not actually work with those cards. This patch enables those interrupts on cards that need it. [ This is implemented based on similar code in the libata-based sata_sil driver. ] Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r--drivers/ide/pci/siimage.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 2b9961b88135..022d244f2eb0 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -701,6 +701,7 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
701 unsigned long barsize = pci_resource_len(dev, 5); 701 unsigned long barsize = pci_resource_len(dev, 5);
702 u8 tmpbyte = 0; 702 u8 tmpbyte = 0;
703 void __iomem *ioaddr; 703 void __iomem *ioaddr;
704 u32 tmp, irq_mask;
704 705
705 /* 706 /*
706 * Drop back to PIO if we can't map the mmio. Some 707 * Drop back to PIO if we can't map the mmio. Some
@@ -726,6 +727,14 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
726 pci_set_drvdata(dev, (void *) ioaddr); 727 pci_set_drvdata(dev, (void *) ioaddr);
727 728
728 if (pdev_is_sata(dev)) { 729 if (pdev_is_sata(dev)) {
730 /* make sure IDE0/1 interrupts are not masked */
731 irq_mask = (1 << 22) | (1 << 23);
732 tmp = readl(ioaddr + 0x48);
733 if (tmp & irq_mask) {
734 tmp &= ~irq_mask;
735 writel(tmp, ioaddr + 0x48);
736 readl(ioaddr + 0x48); /* flush */
737 }
729 writel(0, ioaddr + 0x148); 738 writel(0, ioaddr + 0x148);
730 writel(0, ioaddr + 0x1C8); 739 writel(0, ioaddr + 0x1C8);
731 } 740 }