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

Commit 8d2a171f authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

PCI/AER: Set dev->__aer_firmware_first only for matching devices



Previously, we always updated info->firmware_first, even for HEST entries
that didn't match the device.  Therefore, if the last HEST descriptor was
a PCIe structure that didn't match the device, we always cleared
dev->__aer_firmware_first.

Tested-by: default avatarBetty Dall <betty.dall@hp.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent a6bd73cd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -54,15 +54,15 @@ static int aer_hest_parse(struct acpi_hest_header *hest_hdr, void *data)
{
	struct aer_hest_parse_info *info = data;
	struct acpi_hest_aer_common *p;
	int ff = 0;
	int ff;

	p = (struct acpi_hest_aer_common *)(hest_hdr + 1);
	ff = !!(p->flags & ACPI_HEST_FIRMWARE_FIRST);
	if (p->flags & ACPI_HEST_GLOBAL) {
		if (hest_match_type(hest_hdr, info->pci_dev))
			ff = !!(p->flags & ACPI_HEST_FIRMWARE_FIRST);
			info->firmware_first = ff;
	} else
		if (hest_match_pci(p, info->pci_dev))
			ff = !!(p->flags & ACPI_HEST_FIRMWARE_FIRST);
			info->firmware_first = ff;

	return 0;