From: qianouyang Date: Thu, 1 Dec 2011 05:10:41 +0000 (+0000) Subject: 1. Remove the unnecessary check of the existing of BlockIo2 in PartitionDriverBinding... X-Git-Tag: edk2-stable201903~13810 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=21e1018b1c741911deecd1f2b25319ea414e5f3b 1. Remove the unnecessary check of the existing of BlockIo2 in PartitionDriverBindingSupported(). 2. Remove the comments of the BlockIo2 check in PartitionDriverBindingStart(). Signed-off-by: qianouyang Reviewed-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12806 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index a51c7dd8db..318bfe4326 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c @@ -165,27 +165,10 @@ PartitionDriverBindingSupported ( ControllerHandle, EFI_OPEN_PROTOCOL_TEST_PROTOCOL ); - if (EFI_ERROR (Status)) { - return Status; - } - - Status = gBS->OpenProtocol ( - ControllerHandle, - &gEfiBlockIo2ProtocolGuid, - NULL, - This->DriverBindingHandle, - ControllerHandle, - EFI_OPEN_PROTOCOL_TEST_PROTOCOL - ); if (EFI_ERROR (Status)) { - // - // According to UEFI Spec 2.3.1, if a driver is written for a disk device, - // then the EFI_BLOCK_IO_PROTOCOL and EFI_BLOCK_IO2_PROTOCOAL must be implemented. - // Currently, SCSI disk driver only produce the EFI_BLOCK_IO_PROTOCOL, it will - // not be updated until the non blocking SCSI Pass Thru Protocol is provided. - // If there is no EFI_BLOCK_IO2_PROTOCOL, skip here. - // - } + return Status; + } + return EFI_SUCCESS; } @@ -222,6 +205,7 @@ PartitionDriverBindingStart ( BOOLEAN MediaPresent; EFI_TPL OldTpl; + BlockIo2 = NULL; OldTpl = gBS->RaiseTPL (TPL_CALLBACK); // // Check RemainingDevicePath validation @@ -261,15 +245,6 @@ PartitionDriverBindingStart ( ControllerHandle, EFI_OPEN_PROTOCOL_BY_DRIVER ); - if (EFI_ERROR (Status)) { - // - // According to UEFI Spec 2.3.1, if a driver is written for a disk device, - // then the EFI_BLOCK_IO_PROTOCOL and EFI_BLOCK_IO2_PROTOCOAL must be implemented. - // Currently, SCSI disk driver only produce the EFI_BLOCK_IO_PROTOCOL, it will - // not be updated until the non blocking SCSI Pass Thru Protocol is provided. - // If there is no EFI_BLOCK_IO2_PROTOCOL, skip here. - // - } // // Get the Device Path Protocol on ControllerHandle's handle.