Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc40363b authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Bjorn Helgaas
Browse files

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: default avatarAlexander Gordeev <agordeev@redhat.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
parent 1f42db78
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;