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

Commit 964a2996 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Benjamin Herrenschmidt
Browse files

powerpc/pseries: Disable MSI using new interface if possible



On upcoming hardware, we have a PCI adapter with two functions, one of
which uses MSI and the other uses MSI-X. This adapter, when MSI is
disabled using the "old" firmware interface (RTAS_CHANGE_FN), still
signals an MSI-X interrupt and triggers an EEH. We are working with the
vendor to ensure that the hardware is not at fault, but if we use the
"new" interface (RTAS_CHANGE_MSI_FN) to disable MSI, we also
automatically disable MSI-X and the adapter does not appear to signal
any stray MSI-X interrupt.

Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Acked-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 17b9f9e2
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -93,9 +93,19 @@ static void rtas_disable_msi(struct pci_dev *pdev)
	if (!pdn)
		return;

	if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0)
	/*
	 * disabling MSI with the explicit interface also disables MSI-X
	 */
	if (rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, 0) != 0) {
		/* 
		 * may have failed because explicit interface is not
		 * present
		 */
		if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0) {
			pr_debug("rtas_msi: Setting MSIs to 0 failed!\n");
		}
	}
}

static int rtas_query_irq_number(struct pci_dn *pdn, int offset)
{