aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@redhat.com>2014-04-17 12:06:15 -0400
committerTejun Heo <tj@kernel.org>2014-04-18 15:55:57 -0400
commit2cf532f5e67c0cfe38c8c100e49280cdadacd2be (patch)
tree61593d1bf73f1fa14d2c203f7b7ec52c0ec69b58 /drivers/ata
parentccf8f53cac7d9321c9af2b14af41e703f44ac198 (diff)
ahci: Do not receive interrupts sent by dummy ports
In multiple MSI mode all AHCI ports (including dummy) get assigned separate MSI vectors and (as result of execution pci_enable_msi_exact() function) separate IRQ numbers, (mapped to the MSI vectors). Therefore, although interrupts from dummy ports are not desired they are still enabled. We do not request IRQs for dummy ports, but that only means we do not assign AHCI-specific ISRs to corresponding IRQ numbers. As result, dummy port interrupts still could come and traverse all the way from the PCI device to the kernel, causing unnecessary overhead. This update disables IRQs for dummy ports and prevents the described issue. Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org> Tested-by: David Milburn <dmilburn@redhat.com> Cc: linux-ide@vger.kernel.org Cc: stable@vger.kernel.org Fixes: 5ca72c4f7c41 ("AHCI: Support multiple MSIs")
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 44d40c746982..71e15b73513d 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1241,12 +1241,16 @@ int ahci_host_activate(struct ata_host *host, int irq, unsigned int n_msis)
1241 for (i = 0; i < host->n_ports; i++) { 1241 for (i = 0; i < host->n_ports; i++) {
1242 struct ahci_port_priv *pp = host->ports[i]->private_data; 1242 struct ahci_port_priv *pp = host->ports[i]->private_data;
1243 1243
1244 /* pp is NULL for dummy ports */ 1244 /* Do not receive interrupts sent by dummy ports */
1245 if (pp) 1245 if (!pp) {
1246 rc = devm_request_threaded_irq(host->dev, 1246 disable_irq(irq + i);
1247 irq + i, ahci_hw_interrupt, 1247 continue;
1248 ahci_thread_fn, IRQF_SHARED, 1248 }
1249 pp->irq_desc, host->ports[i]); 1249
1250 rc = devm_request_threaded_irq(host->dev, irq + i,
1251 ahci_hw_interrupt,
1252 ahci_thread_fn, IRQF_SHARED,
1253 pp->irq_desc, host->ports[i]);
1250 if (rc) 1254 if (rc)
1251 goto out_free_irqs; 1255 goto out_free_irqs;
1252 } 1256 }