QcomModulePkg: fix flash image stuck issue

Some devices which do not support multithread will not begin to
flash after download.

Add condition to flash image when multithread not supported.

Change-Id: I4ace247ccb11d1b191f0644716fcfddd8ff4479d
diff --git a/QcomModulePkg/Library/FastbootLib/FastbootCmds.c b/QcomModulePkg/Library/FastbootLib/FastbootCmds.c
old mode 100644
new mode 100755
index e02cf35..b057b21
--- a/QcomModulePkg/Library/FastbootLib/FastbootCmds.c
+++ b/QcomModulePkg/Library/FastbootLib/FastbootCmds.c
@@ -1896,15 +1896,18 @@
 
       if (!EFI_ERROR (Status)) {
         FastbootOkay ("");
-        goto out;
       }
     }
 
-    FlashResult = HandleSparseImgFlash (PartitionName,
-                                      ARRAY_SIZE (PartitionName),
-                                      mFlashDataBuffer, mFlashNumDataBytes);
-    IsFlashComplete = TRUE;
-    StopUsbTimer ();
+    if (EFI_ERROR (Status) ||
+      !IsUseMThreadParallel () ||
+      (PartitionSize <= MaxDownLoadSize)) {
+      FlashResult = HandleSparseImgFlash (PartitionName,
+                                        ARRAY_SIZE (PartitionName),
+                                        mFlashDataBuffer, mFlashNumDataBytes);
+      IsFlashComplete = TRUE;
+      StopUsbTimer ();
+    }
   } else if (!AsciiStrnCmp (UbiHeader->HdrMagic, UBI_HEADER_MAGIC, 4)) {
     FlashResult = HandleUbiImgFlash (PartitionName,
                                      ARRAY_SIZE (PartitionName),