Commit 2cf532f5 authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Tejun Heo

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: default avatarAlexander Gordeev <agordeev@redhat.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Tested-by: default avatarDavid Milburn <dmilburn@redhat.com>
Cc: linux-ide@vger.kernel.org
Cc: stable@vger.kernel.org
Fixes: 5ca72c4f ("AHCI: Support multiple MSIs")
parent ccf8f53c
...@@ -1241,10 +1241,14 @@ int ahci_host_activate(struct ata_host *host, int irq, unsigned int n_msis) ...@@ -1241,10 +1241,14 @@ int ahci_host_activate(struct ata_host *host, int irq, unsigned int n_msis)
for (i = 0; i < host->n_ports; i++) { for (i = 0; i < host->n_ports; i++) {
struct ahci_port_priv *pp = host->ports[i]->private_data; struct ahci_port_priv *pp = host->ports[i]->private_data;
/* pp is NULL for dummy ports */ /* Do not receive interrupts sent by dummy ports */
if (pp) if (!pp) {
rc = devm_request_threaded_irq(host->dev, disable_irq(irq + i);
irq + i, ahci_hw_interrupt, continue;
}
rc = devm_request_threaded_irq(host->dev, irq + i,
ahci_hw_interrupt,
ahci_thread_fn, IRQF_SHARED, ahci_thread_fn, IRQF_SHARED,
pp->irq_desc, host->ports[i]); pp->irq_desc, host->ports[i]);
if (rc) if (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