All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mdadm: added support for Intel Alderlake RST on VMD platform
@ 2022-08-31 17:57 Oldřich Jedlička
  2022-09-14 12:54 ` Kinga Tanska
  0 siblings, 1 reply; 4+ messages in thread
From: Oldřich Jedlička @ 2022-08-31 17:57 UTC (permalink / raw)
  To: linux-raid; +Cc: Oldřich Jedlička

Alderlake RST on VMD uses RstVmdV UEFI variable name, so detect it.

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
---
 platform-intel.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/platform-intel.c b/platform-intel.c
index 5a8729e7..757f0b1b 100644
--- a/platform-intel.c
+++ b/platform-intel.c
@@ -512,7 +512,8 @@ static const struct imsm_orom *find_imsm_hba_orom(struct sys_dev *hba)
 #define AHCI_PROP "RstSataV"
 #define AHCI_SSATA_PROP "RstsSatV"
 #define AHCI_TSATA_PROP "RsttSatV"
-#define VMD_PROP "RstUefiV"
+#define VROC_VMD_PROP "RstUefiV"
+#define RST_VMD_PROP "RstVmdV"
 
 #define VENDOR_GUID \
 	EFI_GUID(0x193dfefa, 0xa445, 0x4302, 0x99, 0xd8, 0xef, 0x3a, 0xad, 0x1a, 0x04, 0xc6)
@@ -605,6 +606,7 @@ const struct imsm_orom *find_imsm_efi(struct sys_dev *hba)
 	struct orom_entry *ret;
 	static const char * const sata_efivars[] = {AHCI_PROP, AHCI_SSATA_PROP,
 						    AHCI_TSATA_PROP};
+	static const char * const vmd_efivars[] = {VROC_VMD_PROP, RST_VMD_PROP};
 	unsigned long i;
 
 	if (check_env("IMSM_TEST_AHCI_EFI") || check_env("IMSM_TEST_SCU_EFI"))
@@ -636,10 +638,16 @@ const struct imsm_orom *find_imsm_efi(struct sys_dev *hba)
 
 		break;
 	case SYS_DEV_VMD:
-		if (!read_efi_variable(&orom, sizeof(orom), VMD_PROP,
-				       VENDOR_GUID))
-			break;
-		return NULL;
+		for (i = 0; i < ARRAY_SIZE(vmd_efivars); i++) {
+			if (!read_efi_variable(&orom, sizeof(orom),
+						vmd_efivars[i], VENDOR_GUID))
+				break;
+		}
+
+		if (i == ARRAY_SIZE(vmd_efivars))
+			return NULL;
+
+		break;
 	default:
 		return NULL;
 	}
-- 
2.37.2.windows.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mdadm: added support for Intel Alderlake RST on VMD platform
  2022-08-31 17:57 [PATCH v2] mdadm: added support for Intel Alderlake RST on VMD platform Oldřich Jedlička
@ 2022-09-14 12:54 ` Kinga Tanska
  2022-09-14 13:46   ` Jes Sorensen
  0 siblings, 1 reply; 4+ messages in thread
From: Kinga Tanska @ 2022-09-14 12:54 UTC (permalink / raw)
  To: Oldřich Jedlička
  Cc: linux-raid, Coly Li, Jes Sorensen, mariusz.tkaczyk

On Wed, 31 Aug 2022 19:57:29 +0200
Oldřich Jedlička <oldium.pro@gmail.com> wrote:

> Alderlake RST on VMD uses RstVmdV UEFI variable name, so detect it.
> 
> Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
> ---
>  platform-intel.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 

Reviewed-by: Kinga Tanska <kinga.tanska@linux.intel.com>



Looks good to me. I've checked this patch with basic VMD test scope and
I didn't find any defect.

Kinga Tanska


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mdadm: added support for Intel Alderlake RST on VMD platform
  2022-09-14 12:54 ` Kinga Tanska
@ 2022-09-14 13:46   ` Jes Sorensen
  2022-09-14 14:13     ` Oldřich Jedlička
  0 siblings, 1 reply; 4+ messages in thread
From: Jes Sorensen @ 2022-09-14 13:46 UTC (permalink / raw)
  To: Kinga Tanska, Oldřich Jedlička
  Cc: linux-raid, Coly Li, mariusz.tkaczyk

On 9/14/22 08:54, Kinga Tanska wrote:
> On Wed, 31 Aug 2022 19:57:29 +0200
> Oldřich Jedlička <oldium.pro@gmail.com> wrote:
> 
>> Alderlake RST on VMD uses RstVmdV UEFI variable name, so detect it.
>>
>> Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
>> ---
>>  platform-intel.c | 18 +++++++++++++-----
>>  1 file changed, 13 insertions(+), 5 deletions(-)
>>
> 
> Reviewed-by: Kinga Tanska <kinga.tanska@linux.intel.com>
> 
> 
> 
> Looks good to me. I've checked this patch with basic VMD test scope and
> I didn't find any defect.

Applied!

Kinga, thanks for testing.

Jes




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mdadm: added support for Intel Alderlake RST on VMD platform
  2022-09-14 13:46   ` Jes Sorensen
@ 2022-09-14 14:13     ` Oldřich Jedlička
  0 siblings, 0 replies; 4+ messages in thread
From: Oldřich Jedlička @ 2022-09-14 14:13 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: Kinga Tanska, linux-raid, Coly Li, mariusz.tkaczyk

st 14. 9. 2022 v 15:46 odesílatel Jes Sorensen <jes@trained-monkey.org> napsal:
>
> On 9/14/22 08:54, Kinga Tanska wrote:
> > On Wed, 31 Aug 2022 19:57:29 +0200
> > Oldřich Jedlička <oldium.pro@gmail.com> wrote:
> >
> >> Alderlake RST on VMD uses RstVmdV UEFI variable name, so detect it.
> >>
> >> Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
> >> ---
> >>  platform-intel.c | 18 +++++++++++++-----
> >>  1 file changed, 13 insertions(+), 5 deletions(-)
> >>
> >
> > Reviewed-by: Kinga Tanska <kinga.tanska@linux.intel.com>
> >
> >
> >
> > Looks good to me. I've checked this patch with basic VMD test scope and
> > I didn't find any defect.
>
> Applied!
>
> Kinga, thanks for testing.

Thanks Jes and Kinga! Great to see it merged :-)

Oldrich.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-14 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31 17:57 [PATCH v2] mdadm: added support for Intel Alderlake RST on VMD platform Oldřich Jedlička
2022-09-14 12:54 ` Kinga Tanska
2022-09-14 13:46   ` Jes Sorensen
2022-09-14 14:13     ` Oldřich Jedlička

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.