mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/AtaAtapiPassThru: To follow UEFI 2.4, updating the implementation of ATA_PASS_THRU.PassThru() to allow sending ATA cmds to ATAPI devices.
Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Eric Jin <eric.jin@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14681 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
80c83a6995
commit
df202d72eb
|
@ -2,7 +2,7 @@
|
|||
This file implements ATA_PASSTHRU_PROCTOCOL and EXT_SCSI_PASSTHRU_PROTOCOL interfaces
|
||||
for managed ATA controllers.
|
||||
|
||||
Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2013, 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
|
||||
|
@ -1265,6 +1265,15 @@ AtaPassThruPassThru (
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Node = SearchDeviceInfoList (Instance, Port, PortMultiplierPort, EfiIdeHarddisk);
|
||||
|
||||
if (Node == NULL) {
|
||||
Node = SearchDeviceInfoList(Instance, Port, PortMultiplierPort, EfiIdeCdrom);
|
||||
if (Node == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// convert the transfer length from sector count to byte.
|
||||
//
|
||||
|
@ -1281,12 +1290,6 @@ AtaPassThruPassThru (
|
|||
Packet->OutTransferLength = Packet->OutTransferLength * 0x200;
|
||||
}
|
||||
|
||||
Node = SearchDeviceInfoList (Instance, Port, PortMultiplierPort, EfiIdeHarddisk);
|
||||
|
||||
if (Node == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
//
|
||||
// Check whether this device needs 48-bit addressing (ATAPI-6 ata device).
|
||||
// Per ATA-6 spec, word83: bit15 is zero and bit14 is one.
|
||||
|
|
Loading…
Reference in New Issue