diff options
author | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-01 05:10:41 +0000 |
---|---|---|
committer | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-01 05:10:41 +0000 |
commit | 21e1018b1c741911deecd1f2b25319ea414e5f3b (patch) | |
tree | 23f2c1212c60a8bd57cc785444ae3b53772b0a3b /MdeModulePkg/Universal/Disk | |
parent | 86da563d36390940d8bd565604b4377c3cebafb2 (diff) | |
download | edk2-platforms-21e1018b1c741911deecd1f2b25319ea414e5f3b.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Universal/Disk')
-rw-r--r-- | MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 33 |
1 files changed, 4 insertions, 29 deletions
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.
|