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.31604.1607931225827001653 for ; Sun, 13 Dec 2020 23:33:46 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: ispras.ru, ip: 83.149.199.84, mailfrom: cheptsov@ispras.ru) Received: from [10.1.122.65] (unknown [178.255.148.171]) by mail.ispras.ru (Postfix) with ESMTPSA id A7BC240AAD64; Mon, 14 Dec 2020 07:33:41 +0000 (UTC) From: "Vitaly Cheptsov" Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 1/2] MdeModulePkg/SataControllerDxe: Add support for drives in RAID mode Date: Mon, 14 Dec 2020 10:33:39 +0300 Message-Id: References: Cc: devel@edk2.groups.io, "Wang, Jian J" , "Albecki, Mateusz" , Laszlo Ersek In-Reply-To: To: "Wu, Hao A" X-Mailer: iPad Mail (18B92) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Hao, This is for the case when the drives are not used as a RAID, but the control= ler is initialised in RAID mode. However, you are right that if a dedicated R= AID driver is present, it is best to use it instead. To support both cases c= an we introduce an off-by-default PCD (e.g. TreatRaidAsSata) to workaround t= his? Best regards, Vitaly > On 14 Dec 2020, at 09:22, Wu, Hao A wrote: >=20 > =EF=BB=BF >>=20 >> -----Original Message----- >> From: Vitaly Cheptsov >> Sent: Friday, December 11, 2020 5:25 PM >> To: devel@edk2.groups.io >> Cc: Vitaly Cheptsov ; Wang, Jian J >> ; Wu, Hao A ; Albecki, >> Mateusz ; Laszlo Ersek >> Subject: [PATCH 1/2] MdeModulePkg/SataControllerDxe: Add support for >> drives in RAID mode >>=20 >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3118 >>=20 >> 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. >=20 >=20 > Hello Vitaly, >=20 > If my understanding is correct, this driver (SataControllerDxe) and the > AtaAtapiPassThru driver are written for non-RAID case only. >=20 > Both drivers (especially AtaAtapiPassThru) do not distinguish logic/physic= al > SCSI channels, which I think only works for the non-RAID case. I am not su= re if > this patch series will have an impact to existing RAID drivers. >=20 > Best Regards, > Hao Wu >=20 >=20 >>=20 >> Cc: Jian J Wang >> Cc: Hao A Wu >> Cc: Mateusz Albecki >> Cc: Laszlo Ersek >> Signed-off-by: Vitaly Cheptsov >> --- >> MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >>=20 >> diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c >> b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c >> index ab06e2833c..301335c967 100644 >> --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c >> +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c >> @@ -324,7 +324,7 @@ SataControllerSupported ( >> 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 >> @@ -465,7 +465,7 @@ SataControllerStart ( >> if (IS_PCI_IDE (&PciData)) { >> Private->IdeInit.ChannelCount =3D IDE_MAX_CHANNEL; >> Private->DeviceCount =3D IDE_MAX_DEVICES; >> - } else if (IS_PCI_SATADPA (&PciData)) { >> + } else if (IS_PCI_SATADPA (&PciData) || IS_PCI_RAID (&PciData)) { >> // >> // Read Ports Implemented(PI) to calculate max port number (0 based).= >> // >> -- >> 2.24.3 (Apple Git-128) >=20