diff mbox

ahci: fix the single MSI-X case in ahci_init_one

Message ID 1477397074-26799-1-git-send-email-hch@lst.de
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Christoph Hellwig Oct. 25, 2016, 12:04 p.m. UTC
We need to make sure hpriv->irq is set properly if we don't use per-port
vectors, so switch from blindly assigning pdev->irq to using
pci_irq_vector, which handles all interrupt types correctly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Robert Richter <robert.richter@cavium.com>
Tested-by: Robert Richter <robert.richter@cavium.com>
Tested-by: David Daney <ddaney.cavm@gmail.com>
Fixes: 0b9e2988ab22 ("ahci: use pci_alloc_irq_vectors")

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Tejun Heo Oct. 25, 2016, 3:43 p.m. UTC | #1
On Tue, Oct 25, 2016 at 02:04:34PM +0200, Christoph Hellwig wrote:
> We need to make sure hpriv->irq is set properly if we don't use per-port
> vectors, so switch from blindly assigning pdev->irq to using
> pci_irq_vector, which handles all interrupt types correctly.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reported-by: Robert Richter <robert.richter@cavium.com>
> Tested-by: Robert Richter <robert.richter@cavium.com>
> Tested-by: David Daney <ddaney.cavm@gmail.com>
> Fixes: 0b9e2988ab22 ("ahci: use pci_alloc_irq_vectors")

Applied to libata/for-4.9-fixes.

Thanks.
diff mbox

Patch

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ba5f11c..5fe852d 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1617,7 +1617,7 @@  static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		/* legacy intx interrupts */
 		pci_intx(pdev, 1);
 	}
-	hpriv->irq = pdev->irq;
+	hpriv->irq = pci_irq_vector(pdev, 0);
 
 	if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss)
 		host->flags |= ATA_HOST_PARALLEL_SCAN;