linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/03] sata_mv Fix MSI irq race
@ 2009-03-10 22:49 Mark Lord
  2009-03-10 22:51 ` [PATCH 02/03] sata_mv cosmetic preparations for IRQ coalescing Mark Lord
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Lord @ 2009-03-10 22:49 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list

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>
---

Duplicate of earlier patch submitted for #upstream-fixes (2.6.29).
This one is for libata-dev #upstream

--- old/drivers/ata/sata_mv.c	2009-03-10 14:04:49.000000000 -0400
+++ new/drivers/ata/sata_mv.c	2009-03-10 17:49:50.000000000 -0400
@@ -2631,12 +2631,13 @@
 		else
 			handled = mv_host_intr(host, pending_irqs);
 	}
-	spin_unlock(&host->lock);
 
 	/* for MSI: unmask; interrupt cause bits will retrigger now */
 	if (using_msi)
 		writel(hpriv->main_irq_mask, hpriv->main_irq_mask_addr);
 
+	spin_unlock(&host->lock);
+
 	return IRQ_RETVAL(handled);
 }
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-03-25 13:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-10 22:49 [PATCH 01/03] sata_mv Fix MSI irq race Mark Lord
2009-03-10 22:51 ` [PATCH 02/03] sata_mv cosmetic preparations for IRQ coalescing Mark Lord
2009-03-10 22:52   ` [PATCH 03/03] sata_mv implement " Mark Lord
2009-03-10 23:06     ` Grant Grundler
2009-03-10 23:21     ` Mark Lord
2009-03-11  2:01     ` [PATCH 03/03] sata_mv implement IRQ coalescing (v2) Mark Lord
2009-03-11  4:56       ` [PATCH 04/03] sata_mv optimize IRQ coalescing for 8-port chips Mark Lord
2009-03-15 15:33         ` [PATCH 05/03] sata_mv fix LED blinking for SoC+NCQ Mark Lord
2009-03-25  2:34   ` [PATCH 02/03] sata_mv cosmetic preparations for IRQ coalescing Jeff Garzik
2009-03-25 13:45     ` Mark Lord
2009-03-25  2:36   ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).