diff options
author | Feng Tian <feng.tian@intel.com> | 2015-04-28 04:53:20 +0000 |
---|---|---|
committer | hwu1225 <hwu1225@Edk2> | 2015-04-28 04:53:20 +0000 |
commit | f6a3c4262a279905ef2ce0e163346b92d585357a (patch) | |
tree | 70a722e8f4015a9394c8366e869f6c2d467fa36a | |
parent | 06ac9a898eb3b874b6f311bb1d370df79a57460b (diff) | |
download | edk2-f6a3c4262a279905ef2ce0e163346b92d585357a.tar.gz |
MdeModulePkg/ScsiDisk: Set correct value to the Media->IoAlign field of BlockIo protocol instance.
Media->IoAlign field of BlockIo protocol instance installed by this driver should be set to the value of ScsiIo->IoAlign.
(Sync patch r17195 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2014.SP1@17225 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index e5dd6b9c4d..d30bff769a 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -1,7 +1,7 @@ /** @file
SCSI disk driver that layers on every SCSI IO protocol in the system.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -230,15 +230,16 @@ ScsiDiskDriverBindingStart ( return Status;
}
- ScsiDiskDevice->Signature = SCSI_DISK_DEV_SIGNATURE;
- ScsiDiskDevice->ScsiIo = ScsiIo;
- ScsiDiskDevice->BlkIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION3;
- ScsiDiskDevice->BlkIo.Media = &ScsiDiskDevice->BlkIoMedia;
- ScsiDiskDevice->BlkIo.Reset = ScsiDiskReset;
- ScsiDiskDevice->BlkIo.ReadBlocks = ScsiDiskReadBlocks;
- ScsiDiskDevice->BlkIo.WriteBlocks = ScsiDiskWriteBlocks;
- ScsiDiskDevice->BlkIo.FlushBlocks = ScsiDiskFlushBlocks;
- ScsiDiskDevice->Handle = Controller;
+ ScsiDiskDevice->Signature = SCSI_DISK_DEV_SIGNATURE;
+ ScsiDiskDevice->ScsiIo = ScsiIo;
+ ScsiDiskDevice->BlkIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION3;
+ ScsiDiskDevice->BlkIo.Media = &ScsiDiskDevice->BlkIoMedia;
+ ScsiDiskDevice->BlkIo.Media->IoAlign = ScsiIo->IoAlign;
+ ScsiDiskDevice->BlkIo.Reset = ScsiDiskReset;
+ ScsiDiskDevice->BlkIo.ReadBlocks = ScsiDiskReadBlocks;
+ ScsiDiskDevice->BlkIo.WriteBlocks = ScsiDiskWriteBlocks;
+ ScsiDiskDevice->BlkIo.FlushBlocks = ScsiDiskFlushBlocks;
+ ScsiDiskDevice->Handle = Controller;
ScsiIo->GetDeviceType (ScsiIo, &(ScsiDiskDevice->DeviceType));
switch (ScsiDiskDevice->DeviceType) {
|