Commit 6be96ac1 authored by Mark Lord's avatar Mark Lord Committed by Jeff Garzik

sata_mv: fix SoC interrupt breakage

For some reason, sata_mv doesn't clear interrupt status during init
when it's running on an SoC host adapter.  If the bootloader has
touched the SATA controller before starting Linux, Linux can end up
enabling the SATA interrupt with events pending, which will cause the
interrupt to be marked as spurious and then be disabled, which then
breaks all further accesses to the controller.

This patch makes the SoC path clear interrupt status on init like in
the non-SoC case.
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: default avatarMark Lord <mlord@pobox.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 7ba07d16
...@@ -3114,7 +3114,6 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) ...@@ -3114,7 +3114,6 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS); writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS);
} }
if (!IS_SOC(hpriv)) {
/* Clear any currently outstanding host interrupt conditions */ /* Clear any currently outstanding host interrupt conditions */
writelfl(0, mmio + hpriv->irq_cause_ofs); writelfl(0, mmio + hpriv->irq_cause_ofs);
...@@ -3126,7 +3125,6 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) ...@@ -3126,7 +3125,6 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
* The per-port interrupts get done later as ports are set up. * The per-port interrupts get done later as ports are set up.
*/ */
mv_set_main_irq_mask(host, 0, PCI_ERR); mv_set_main_irq_mask(host, 0, PCI_ERR);
}
done: done:
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment