Skip to content

Commit

Permalink
ahci: fix the single MSI-X case in ahci_init_one
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reported-by: Robert Richter <[email protected]>
Tested-by: Robert Richter <[email protected]>
Tested-by: David Daney <[email protected]>
Fixes: 0b9e298 ("ahci: use pci_alloc_irq_vectors")
Signed-off-by: Tejun Heo <[email protected]>
  • Loading branch information
Christoph Hellwig authored and htejun committed Oct 25, 2016
1 parent a478b09 commit 0ce57f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0ce57f8

Please sign in to comment.