X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=FmpDevicePkg%2FFmpDxe%2FFmpDxe.c;h=3794ac5008f95ecc51cb881540e745e62fa3782e;hp=eb3a9b0e32c293993c6984ac85a3aede57177344;hb=27e42bf61bb27a61b5b4dd053c6bc219c73c4cc8;hpb=cefc8d8821f0a5ec7995901146dd6b055d7b956a diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c index eb3a9b0e32..3794ac5008 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.c +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c @@ -906,9 +906,6 @@ SetTheImage ( UINT32 AllHeaderSize; UINT32 IncommingFwVersion; UINT32 LastAttemptStatus; - EFI_STATUS GetAttributesStatus; - UINT64 AttributesSupported; - UINT64 AttributesSetting; UINT32 Version; UINT32 LowestSupportedVersion; @@ -1121,18 +1118,6 @@ SetTheImage ( LastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS; - // - // Set flag so the descriptor is repopulated - // This is only applied to devices that do not require reset - // - GetAttributesStatus = FmpDeviceGetAttributes (&AttributesSupported, &AttributesSetting); - if (!EFI_ERROR (GetAttributesStatus)) { - if (((AttributesSupported & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0) || - ((AttributesSetting & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0)) { - mDescriptorPopulated = FALSE; - } - } - cleanup: mProgressFunc = NULL; mProgressSupported = FALSE; @@ -1145,6 +1130,12 @@ cleanup: Progress (100); } + // + // Need repopulate after SetImage is called to + // update LastAttemptVersion and LastAttemptStatus. + // + mDescriptorPopulated = FALSE; + return Status; }