]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ahci: fix the single MSI-X case in ahci_init_one
authorChristoph Hellwig <hch@lst.de>
Tue, 25 Oct 2016 12:04:34 +0000 (14:04 +0200)
committerTejun Heo <tj@kernel.org>
Tue, 25 Oct 2016 15:43:07 +0000 (11:43 -0400)
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")
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/ahci.c

index 60e42e2ed68fab1ca23319304cc2c6df985a85d3..9669fc7c19df7fe05b922daf25e0392677433e26 100644 (file)
@@ -1620,7 +1620,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;