summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Disk/PartitionDxe
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-23 07:47:19 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-23 07:47:19 +0000
commit0e87144ee042186bf6a233d956c9979f1cd3e6a0 (patch)
tree502a66a5ff515121f9874d5276364dfefe6ab9da /MdeModulePkg/Universal/Disk/PartitionDxe
parentb8a62661e4093be5e55a8a5c06dbd13e36d136c4 (diff)
downloadedk2-0e87144ee042186bf6a233d956c9979f1cd3e6a0.zip
edk2-0e87144ee042186bf6a233d956c9979f1cd3e6a0.tar.gz
edk2-0e87144ee042186bf6a233d956c9979f1cd3e6a0.tar.bz2
Change Partition/ScsiDxe driver to produce Block IO revision 3.
Signed-off-by: niruiyu Reviewed-by: erictian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11692 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Disk/PartitionDxe')
-rw-r--r--MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
index a4ddc5d..dd62171 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
@@ -1049,12 +1049,18 @@ PartitionInstallChildHandle (
Private->Media2.BlockSize = (UINT32) BlockSize;
//
- // Per UEFI Spec, LowestAlignedLba and LogicalBlocksPerPhysicalBlock must be 0
+ // Per UEFI Spec, LowestAlignedLba, LogicalBlocksPerPhysicalBlock and OptimalTransferLengthGranularity must be 0
// for logical partitions.
//
if (Private->BlockIo.Revision >= EFI_BLOCK_IO_PROTOCOL_REVISION2) {
- Private->BlockIo.Media->LowestAlignedLba = 0;
- Private->BlockIo.Media->LogicalBlocksPerPhysicalBlock = 0;
+ Private->BlockIo.Media->LowestAlignedLba = 0;
+ Private->BlockIo.Media->LogicalBlocksPerPhysicalBlock = 0;
+ Private->BlockIo2.Media->LowestAlignedLba = 0;
+ Private->BlockIo2.Media->LogicalBlocksPerPhysicalBlock = 0;
+ if (Private->BlockIo.Revision >= EFI_BLOCK_IO_PROTOCOL_REVISION3) {
+ Private->BlockIo.Media->OptimalTransferLengthGranularity = 0;
+ Private->BlockIo2.Media->OptimalTransferLengthGranularity = 0;
+ }
}
Private->DevicePath = AppendDevicePathNode (ParentDevicePath, DevicePathNode);