]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
MdeModulePkg/ScsiBusDxe: remove redundant "else" after "break" statement
[mirror_edk2.git] / MdeModulePkg / Bus / Scsi / ScsiBusDxe / ScsiBus.c
index 8eb73e7673fab86a3eed6c0839b4a670ba72885a..1068770cd87f02903ca28e31b4ae94da09487fcc 100644 (file)
@@ -1007,9 +1007,10 @@ ScsiExecuteSCSICommand (
                                                 ExtRequestPacket,\r
                                                 NULL\r
                                                 );\r
-      if (Event != NULL) {\r
+      if ((!EFI_ERROR(Status)) && (Event != NULL)) {\r
         //\r
-        // Signal Event to tell caller to pick up the SCSI IO Packet.\r
+        // Signal Event to tell caller to pick up the SCSI IO packet if the\r
+        // PassThru() succeeds.\r
         //\r
         gBS->SignalEvent (Event);\r
       }\r
@@ -1039,7 +1040,7 @@ ScsiExecuteSCSICommand (
       //\r
       Status = gBS->CreateEvent (\r
                        EVT_NOTIFY_SIGNAL,\r
-                       TPL_CALLBACK,\r
+                       TPL_NOTIFY,\r
                        NotifyFunction,\r
                        &EventData,\r
                        &PacketEvent\r
@@ -1332,9 +1333,10 @@ DiscoverScsiDevice (
               );\r
     if (!EFI_ERROR (Status)) {\r
       break;\r
-    } else if ((Status == EFI_BAD_BUFFER_SIZE) || \r
-               (Status == EFI_INVALID_PARAMETER) ||\r
-               (Status == EFI_UNSUPPORTED)) {\r
+    }\r
+    if ((Status == EFI_BAD_BUFFER_SIZE) ||\r
+        (Status == EFI_INVALID_PARAMETER) ||\r
+        (Status == EFI_UNSUPPORTED)) {\r
       ScsiDeviceFound = FALSE;\r
       goto Done;\r
     }\r
@@ -1348,19 +1350,11 @@ DiscoverScsiDevice (
   //\r
   // Retrieved inquiry data successfully\r
   //\r
-  if ((InquiryData->Peripheral_Qualifier != 0) &&\r
-      (InquiryData->Peripheral_Qualifier != 3)) {\r
+  if (InquiryData->Peripheral_Qualifier != 0) {\r
     ScsiDeviceFound = FALSE;\r
     goto Done;\r
   }\r
 \r
-  if (InquiryData->Peripheral_Qualifier == 3) {\r
-    if (InquiryData->Peripheral_Type != 0x1f) {\r
-      ScsiDeviceFound = FALSE;\r
-      goto Done;\r
-    }\r
-  }\r
-\r
   if (0x1e >= InquiryData->Peripheral_Type && InquiryData->Peripheral_Type >= 0xa) {\r
     ScsiDeviceFound = FALSE;\r
     goto Done;\r