Index: head/stand/efi/loader/main.c =================================================================== --- head/stand/efi/loader/main.c +++ head/stand/efi/loader/main.c @@ -739,6 +739,10 @@ ep = buf + sz; node = (EFI_DEVICE_PATH *)buf; while ((char *)node < ep) { + if (IsDevicePathEndType(node)) { + if (pci_pending && vid_seen == 0) + vid_seen = ++seen; + } pci_pending = false; if (DevicePathType(node) == ACPI_DEVICE_PATH && (DevicePathSubType(node) == ACPI_DP || @@ -772,8 +776,6 @@ } node = NextDevicePathNode(node); } - if (pci_pending && vid_seen == 0) - vid_seen = ++seen; /* * Truth table for RB_MULTIPLE | RB_SERIAL