From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by mx.groups.io with SMTP id smtpd.web11.4500.1607678768534106579 for ; Fri, 11 Dec 2020 01:26:08 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: ispras.ru, ip: 83.149.199.84, mailfrom: cheptsov@ispras.ru) Received: from localhost.localdomain (unknown [77.232.9.83]) by mail.ispras.ru (Postfix) with ESMTPSA id 18DE140A1DAB; Fri, 11 Dec 2020 09:26:06 +0000 (UTC) From: "Vitaly Cheptsov" To: devel@edk2.groups.io Cc: Vitaly Cheptsov , Jian J Wang , Hao A Wu , Mateusz Albecki , Laszlo Ersek Subject: [PATCH 2/2] MdeModulePkg/AtaAtapiPassThru: Add support for drives in RAID mode Date: Fri, 11 Dec 2020 12:25:02 +0300 Message-Id: <20201211092502.21763-2-cheptsov@ispras.ru> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20201211092502.21763-1-cheptsov@ispras.ru> References: <20201211092502.21763-1-cheptsov@ispras.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 Cc: Hao A Wu Cc: Mateusz Albecki Cc: Laszlo Ersek Signed-off-by: Vitaly 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)