mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/Bus: Fix port multiplier port in AhciPei PEIM
If there is no port multiplier, PortMultiplierPort should be converted to 0 to follow AHCI spec. The same logic already applied in AtaAtapiPassThruDxe driver. Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com> Acked-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
ded0b489af
commit
67fc78d026
|
@ -3,6 +3,7 @@
|
||||||
mode at PEI phase.
|
mode at PEI phase.
|
||||||
|
|
||||||
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
|
Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
|
@ -92,6 +93,15 @@ AhciPassThruExecute (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
if (PortMultiplierPort == 0xFFFF) {
|
||||||
|
//
|
||||||
|
// If there is no port multiplier, PortMultiplierPort will be 0xFFFF
|
||||||
|
// according to UEFI spec. Here, we convert its value to 0 to follow
|
||||||
|
// AHCI spec.
|
||||||
|
//
|
||||||
|
PortMultiplierPort = 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch (Packet->Protocol) {
|
switch (Packet->Protocol) {
|
||||||
case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
|
case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
|
||||||
Status = AhciNonDataTransfer (
|
Status = AhciNonDataTransfer (
|
||||||
|
|
Loading…
Reference in New Issue