[PATCH 2/2] MdeModulePkg/AtaAtapiPassThru: Add support for drives in RAID mode


Vitaly Cheptsov
 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3118

This resolves the problem of using drivers connected to Intel G33
builtin SATA controller when run from DuetPkg when it can only
be configured in RAID mode through the firmware settings.

Cc: Jian J Wang <jian.j.wang@...>
Cc: Hao A Wu <hao.a.wu@...>
Cc: Mateusz Albecki <mateusz.albecki@...>
Cc: Laszlo Ersek <lersek@...>
Signed-off-by: Vitaly Cheptsov <cheptsov@...>
---
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c b/M=
deModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
index 86fe9d954f..5892508aef 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
@@ -620,7 +620,7 @@ AtaAtapiPassThruSupported (
return EFI_UNSUPPORTED;
}
=20
- if (IS_PCI_IDE (&PciData) || IS_PCI_SATADPA (&PciData)) {
+ if (IS_PCI_IDE (&PciData) || IS_PCI_SATADPA (&PciData) || IS_PCI_RAID =
(&PciData)) {
return EFI_SUCCESS;
}
=20
@@ -1208,6 +1208,12 @@ EnumerateAttachedDevice (
goto Done;
}
break;
+ case PCI_CLASS_MASS_STORAGE_RAID :
+ Instance->AtaPassThruMode.Attributes &=3D ~EFI_ATA_PASS_THRU_ATTRI=
BUTES_PHYSICAL;
+ Instance->ExtScsiPassThruMode.Attributes &=3D ~EFI_EXT_SCSI_PASS_T=
HRU_ATTRIBUTES_PHYSICAL;
+ //
+ // Fall through to AHCI
+ //
case PCI_CLASS_MASS_STORAGE_SATADPA :
//
// The ATA controller is working at AHCI mode
--=20
2.24.3 (Apple Git-128)

Join devel@edk2.groups.io to automatically receive all group messages.