diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2014-02-14 16:27:19 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-02-14 16:27:19 -0500 |
commit | fc40363b2140f5777c88e67814fac9327bf1ee68 (patch) | |
tree | 748b4fad10579c2e35c05cd550a71a5bd6f3b6ea /drivers/ata | |
parent | 1f42db786b14a31bf807fc41ee5583a00c08fcb1 (diff) |
ahci: Fix broken fallback to single MSI mode
Commit 7b92b4f61ec4 ("PCI/MSI: Remove pci_enable_msi_block_auto()")
introduced a regression: if multiple MSI initialization fails, the code
falls back to INTx rather than to single MSI.
Fixes: 7b92b4f61ec4 ("PCI/MSI: Remove pci_enable_msi_block_auto()")
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index dc2756fb6f33..3c5f35ef7e55 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1170,8 +1170,10 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports, | |||
1170 | 1170 | ||
1171 | nvec = rc; | 1171 | nvec = rc; |
1172 | rc = pci_enable_msi_block(pdev, nvec); | 1172 | rc = pci_enable_msi_block(pdev, nvec); |
1173 | if (rc) | 1173 | if (rc < 0) |
1174 | goto intx; | 1174 | goto intx; |
1175 | else if (rc > 0) | ||
1176 | goto single_msi; | ||
1175 | 1177 | ||
1176 | return nvec; | 1178 | return nvec; |
1177 | 1179 | ||