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

Commit c59004cc authored by Gavin Shan's avatar Gavin Shan Committed by Michael Ellerman
Browse files

powerpc/eeh: Don't collect logs on PE with blocked config space



When the PE's config space is marked as blocked, PCI config read
requests always return 0xFF's. It's pointless to collect logs in
this case.

Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent b6541db1
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -257,6 +257,13 @@ static void *eeh_dump_pe_log(void *data, void *flag)
	struct eeh_dev *edev, *tmp;
	struct eeh_dev *edev, *tmp;
	size_t *plen = flag;
	size_t *plen = flag;


	/* If the PE's config space is blocked, 0xFF's will be
	 * returned. It's pointless to collect the log in this
	 * case.
	 */
	if (pe->state & EEH_PE_CFG_BLOCKED)
		return NULL;

	eeh_pe_for_each_dev(pe, edev, tmp)
	eeh_pe_for_each_dev(pe, edev, tmp)
		*plen += eeh_dump_dev_log(edev, pci_regs_buf + *plen,
		*plen += eeh_dump_dev_log(edev, pci_regs_buf + *plen,
					  EEH_PCI_REGS_LOG_LEN - *plen);
					  EEH_PCI_REGS_LOG_LEN - *plen);