diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-23 07:47:19 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-23 07:47:19 +0000 |
commit | 0e87144ee042186bf6a233d956c9979f1cd3e6a0 (patch) | |
tree | 502a66a5ff515121f9874d5276364dfefe6ab9da /MdeModulePkg/Universal/Disk | |
parent | b8a62661e4093be5e55a8a5c06dbd13e36d136c4 (diff) | |
download | edk2-platforms-0e87144ee042186bf6a233d956c9979f1cd3e6a0.tar.xz |
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')
-rw-r--r-- | MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index a4ddc5dc08..dd62171749 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);
|