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

Commit ee8c446f authored by Mauro S. M. Rodrigues's avatar Mauro S. M. Rodrigues Committed by Michael Ellerman
Browse files

powerpc/eeh: Avoid misleading message "EEH: no capable adapters found"



Due to recent refactoring in EEH in:
commit b9fde58d ("powerpc/powernv: Rework EEH initialization on
powernv")
a misleading message was seen in the kernel message buffer:

[    0.108431] EEH: PowerNV platform initialized
[    0.589979] EEH: No capable adapters found

This happened due to the removal of the initialization delay for powernv
platform.

Even though the EEH infrastructure for the devices is eventually
initialized and still works just fine the eeh device probe step is
postponed in order to assure the PEs are created. Later
pnv_eeh_post_init does the probe devices job but at that point the
message was already shown right after eeh_init flow.

This patch introduces a new flag EEH_POSTPONED_PROBE to represent that
temporary state and avoid the message mentioned above and showing the
follow one instead:

[    0.107724] EEH: PowerNV platform initialized
[    4.844825] EEH: PCI Enhanced I/O Error Handling Enabled

Signed-off-by: default avatarMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
Acked-by: default avatarRussell Currey <ruscur@russell.cc>
Tested-by: default avatarVenkat Rao B <vrbagal1@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent a545cf03
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ struct pci_dn;
#define EEH_VALID_PE_ZERO	0x10	/* PE#0 is valid		     */
#define EEH_ENABLE_IO_FOR_LOG	0x20	/* Enable IO for log		     */
#define EEH_EARLY_DUMP_LOG	0x40	/* Dump log immediately		     */
#define EEH_POSTPONED_PROBE	0x80    /* Powernv may postpone device probe */

/*
 * Delay for PE reset, all in ms
+1 −1
Original line number Diff line number Diff line
@@ -1087,7 +1087,7 @@ static int eeh_init(void)

	if (eeh_enabled())
		pr_info("EEH: PCI Enhanced I/O Error Handling Enabled\n");
	else
	else if (!eeh_has_flag(EEH_POSTPONED_PROBE))
		pr_info("EEH: No capable adapters found\n");

	return ret;
+11 −1
Original line number Diff line number Diff line
@@ -223,6 +223,14 @@ int pnv_eeh_post_init(void)
	eeh_probe_devices();
	eeh_addr_cache_build();

	if (eeh_has_flag(EEH_POSTPONED_PROBE)) {
		eeh_clear_flag(EEH_POSTPONED_PROBE);
		if (eeh_enabled())
			pr_info("EEH: PCI Enhanced I/O Error Handling Enabled\n");
		else
			pr_info("EEH: No capable adapters found\n");
	}

	/* Register OPAL event notifier */
	eeh_event_irq = opal_event_request(ilog2(OPAL_EVENT_PCI_ERROR));
	if (eeh_event_irq < 0) {
@@ -384,8 +392,10 @@ static void *pnv_eeh_probe(struct pci_dn *pdn, void *data)
		return NULL;

	/* Skip if we haven't probed yet */
	if (phb->ioda.pe_rmap[config_addr] == IODA_INVALID_PE)
	if (phb->ioda.pe_rmap[config_addr] == IODA_INVALID_PE) {
		eeh_add_flag(EEH_POSTPONED_PROBE);
		return NULL;
	}

	/* Initialize eeh device */
	edev->class_code = pdn->class_code;