aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorMark Lord <liml@rtr.ca>2009-03-10 16:28:51 -0400
committerJeff Garzik <jgarzik@redhat.com>2009-03-13 14:55:44 -0400
commit9d51af7bd2f1d730cb6eeeb9ff837e3441ad4e07 (patch)
tree7651fdab75e8a6b7c2f2d17aadd6bc9e5a239393 /drivers/ata
parent041b62374c7fedc11a8a1eeda2868612d3d1436c (diff)
sata_mv: fix MSI irq race condition
Fix a (rare) race condition in mv_interrupt() when using MSI. The value of hpriv->main_irq_mask_addr can change on on the fly, and without this patch we could end up writing back a stale copy to the hardware. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_mv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 7007edd2d451..74b1080d116d 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2218,12 +2218,13 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance)
2218 else 2218 else
2219 handled = mv_host_intr(host, pending_irqs); 2219 handled = mv_host_intr(host, pending_irqs);
2220 } 2220 }
2221 spin_unlock(&host->lock);
2222 2221
2223 /* for MSI: unmask; interrupt cause bits will retrigger now */ 2222 /* for MSI: unmask; interrupt cause bits will retrigger now */
2224 if (using_msi) 2223 if (using_msi)
2225 writel(hpriv->main_irq_mask, hpriv->main_irq_mask_addr); 2224 writel(hpriv->main_irq_mask, hpriv->main_irq_mask_addr);
2226 2225
2226 spin_unlock(&host->lock);
2227
2227 return IRQ_RETVAL(handled); 2228 return IRQ_RETVAL(handled);
2228} 2229}
2229 2230