]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/FmpDxe/FmpDxe.c
FmpDevicePkg FmpDxe: Need repopulate after SetImage is called
[mirror_edk2.git] / FmpDevicePkg / FmpDxe / FmpDxe.c
index eb3a9b0e32c293993c6984ac85a3aede57177344..3794ac5008f95ecc51cb881540e745e62fa3782e 100644 (file)
@@ -906,9 +906,6 @@ SetTheImage (
   UINT32      AllHeaderSize;\r
   UINT32      IncommingFwVersion;\r
   UINT32      LastAttemptStatus;\r
-  EFI_STATUS  GetAttributesStatus;\r
-  UINT64      AttributesSupported;\r
-  UINT64      AttributesSetting;\r
   UINT32      Version;\r
   UINT32      LowestSupportedVersion;\r
 \r
@@ -1121,18 +1118,6 @@ SetTheImage (
 \r
   LastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS;\r
 \r
-  //\r
-  // Set flag so the descriptor is repopulated\r
-  // This is only applied to devices that do not require reset\r
-  //\r
-  GetAttributesStatus = FmpDeviceGetAttributes (&AttributesSupported, &AttributesSetting);\r
-  if (!EFI_ERROR (GetAttributesStatus)) {\r
-    if (((AttributesSupported & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0) ||\r
-        ((AttributesSetting & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0)) {\r
-      mDescriptorPopulated = FALSE;\r
-    }\r
-  }\r
-\r
 cleanup:\r
   mProgressFunc = NULL;\r
   mProgressSupported = FALSE;\r
@@ -1145,6 +1130,12 @@ cleanup:
     Progress (100);\r
   }\r
 \r
+  //\r
+  // Need repopulate after SetImage is called to\r
+  // update LastAttemptVersion and LastAttemptStatus.\r
+  //\r
+  mDescriptorPopulated = FALSE;\r
+\r
   return Status;\r
 }\r
 \r