提交 bc03fd3a 编写于 作者: A Alexander Gordeev 提交者: Bjorn Helgaas

ahci: Fix broken fallback to single MSI mode

Commit 7b92b4f6 ("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: 7b92b4f6 ("PCI/MSI: Remove pci_enable_msi_block_auto()")
Signed-off-by: NAlexander Gordeev <agordeev@redhat.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NTejun Heo <tj@kernel.org>
上级 f7fc32cb
......@@ -1170,8 +1170,10 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
nvec = rc;
rc = pci_enable_msi_block(pdev, nvec);
if (rc)
if (rc < 0)
goto intx;
else if (rc > 0)
goto single_msi;
return nvec;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册