diff options
author | Mikael Pettersson <mikpe@it.uu.se> | 2008-05-17 12:47:35 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-19 17:30:47 -0400 |
commit | a13db78e2209ebfe1898207f53c353ed836d4a53 (patch) | |
tree | 6e20091316cf2742825ef3f17e8069391657b6f0 /drivers/ata/sata_promise.c | |
parent | 07633b5d0723ce2ec31262e1096dcf61311bf078 (diff) |
sata_promise: fix irq clearing buglets
This patch fixes two bugs in sata_promise's irq status clearing paths:
1. When clearing the irq status for a specific port, the driver
read the global SEQMASK register. This is wrong because that
clears the irq status for _all_ ports.
2. pdc_thaw() incorrectly added the PDC_INT_SEQMASK host register
offset to a per-port ata engine base address. This resulted in
it reading the unrelated PDC_PKT_SUBMIT register, which did not
have the desired irq status clearing effect.
In both cases the fix is to read from the port's Command/Status
register. This also matches what Promise's own driver does.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_promise.c')
-rw-r--r-- | drivers/ata/sata_promise.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index 5a10dc5048ad..f5ea06bbde75 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
@@ -663,7 +663,7 @@ static void pdc_thaw(struct ata_port *ap) | |||
663 | u32 tmp; | 663 | u32 tmp; |
664 | 664 | ||
665 | /* clear IRQ */ | 665 | /* clear IRQ */ |
666 | readl(mmio + PDC_INT_SEQMASK); | 666 | readl(mmio + PDC_COMMAND); |
667 | 667 | ||
668 | /* turn IRQ back on */ | 668 | /* turn IRQ back on */ |
669 | tmp = readl(mmio + PDC_CTLSTAT); | 669 | tmp = readl(mmio + PDC_CTLSTAT); |
@@ -781,10 +781,9 @@ static inline unsigned int pdc_host_intr(struct ata_port *ap, | |||
781 | 781 | ||
782 | static void pdc_irq_clear(struct ata_port *ap) | 782 | static void pdc_irq_clear(struct ata_port *ap) |
783 | { | 783 | { |
784 | struct ata_host *host = ap->host; | 784 | void __iomem *mmio = ap->ioaddr.cmd_addr; |
785 | void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; | ||
786 | 785 | ||
787 | readl(mmio + PDC_INT_SEQMASK); | 786 | readl(mmio + PDC_COMMAND); |
788 | } | 787 | } |
789 | 788 | ||
790 | static irqreturn_t pdc_interrupt(int irq, void *dev_instance) | 789 | static irqreturn_t pdc_interrupt(int irq, void *dev_instance) |