]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
SecurityPkg/OpalPassword: Fixed input correct password not works issue
[mirror_edk2.git] / SecurityPkg / Tcg / Opal / OpalPassword / OpalDriver.c
index 5d1638d5cf01f8ac8676e119eaf8373960ef3a0b..e3f5056953bb21809354364bb14ac11a37116cbb 100644 (file)
@@ -1076,6 +1076,15 @@ OpalDriverRequestPassword (
         break;\r
       }\r
 \r
+      //\r
+      // Check whether opal device's Tries value has reach the TryLimit value, if yes, force a shutdown\r
+      // before accept new password.\r
+      //\r
+      if (Ret == TcgResultFailureInvalidType) {\r
+        Count = MAX_PASSWORD_TRY_COUNT;\r
+        break;\r
+      }\r
+\r
       Count++;\r
 \r
       do {\r