diff options
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r-- | drivers/ata/sata_nv.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index f6d498e1cf80..f7a963eb1f02 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -700,7 +700,6 @@ static void nv_adma_check_cpb(struct ata_port *ap, int cpb_num, int force_err) | |||
700 | static int nv_host_intr(struct ata_port *ap, u8 irq_stat) | 700 | static int nv_host_intr(struct ata_port *ap, u8 irq_stat) |
701 | { | 701 | { |
702 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); | 702 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); |
703 | int handled; | ||
704 | 703 | ||
705 | /* freeze if hotplugged */ | 704 | /* freeze if hotplugged */ |
706 | if (unlikely(irq_stat & (NV_INT_ADDED | NV_INT_REMOVED))) { | 705 | if (unlikely(irq_stat & (NV_INT_ADDED | NV_INT_REMOVED))) { |
@@ -719,13 +718,7 @@ static int nv_host_intr(struct ata_port *ap, u8 irq_stat) | |||
719 | } | 718 | } |
720 | 719 | ||
721 | /* handle interrupt */ | 720 | /* handle interrupt */ |
722 | handled = ata_host_intr(ap, qc); | 721 | return ata_host_intr(ap, qc); |
723 | if (unlikely(!handled)) { | ||
724 | /* spurious, clear it */ | ||
725 | ata_check_status(ap); | ||
726 | } | ||
727 | |||
728 | return 1; | ||
729 | } | 722 | } |
730 | 723 | ||
731 | static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance) | 724 | static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance) |
@@ -752,6 +745,11 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance) | |||
752 | if (pp->flags & NV_ADMA_PORT_REGISTER_MODE) { | 745 | if (pp->flags & NV_ADMA_PORT_REGISTER_MODE) { |
753 | u8 irq_stat = readb(host->mmio_base + NV_INT_STATUS_CK804) | 746 | u8 irq_stat = readb(host->mmio_base + NV_INT_STATUS_CK804) |
754 | >> (NV_INT_PORT_SHIFT * i); | 747 | >> (NV_INT_PORT_SHIFT * i); |
748 | if(ata_tag_valid(ap->active_tag)) | ||
749 | /** NV_INT_DEV indication seems unreliable at times | ||
750 | at least in ADMA mode. Force it on always when a | ||
751 | command is active, to prevent losing interrupts. */ | ||
752 | irq_stat |= NV_INT_DEV; | ||
755 | handled += nv_host_intr(ap, irq_stat); | 753 | handled += nv_host_intr(ap, irq_stat); |
756 | continue; | 754 | continue; |
757 | } | 755 | } |