mdadm/1005-mdadm-enable-Intel-Alderlake-RSTe-configuration.patch
Neil Brown bc59ae8d31 Accepting request 994528 from home:colyli:branches:openSUSE:Factory
- imsm: support for third Sata controller (bsc#1201297)
  0121-imsm-support-for-third-Sata-controller.patch
- mdadm: enable Intel Alderlake RSTe configuration (bsc#1201297)
  1005-mdadm-enable-Intel-Alderlake-RSTe-configuration.patch

OBS-URL: https://build.opensuse.org/request/show/994528
OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=206
2022-08-11 22:41:10 +00:00

61 lines
2.1 KiB
Diff

From 449c8b62164880ab132ad6eec86a8d53f793af69 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Tue, 19 Jul 2022 13:18:23 +0800
Subject: [PATCH 19/23] mdadm: enable Intel Alderlake RSTe configuration
Patch-mainline: N/A, SUSE only patch
References: bsc#1201297
Alderlake has a slightly different RST configuration; the UEFI
variable is name 'RstVmdV', and the AHCI controller shows up as
a child device of the VMD bridge, but continues to use the 'AHCI HBA'
PCI class (and not the RAID class as RSTe would normally do).
Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Coly Li <colyli@suse.de>
---
platform-intel.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/platform-intel.c b/platform-intel.c
index 5a8729e7..a4d55a38 100644
--- a/platform-intel.c
+++ b/platform-intel.c
@@ -512,12 +512,14 @@ 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 AHCI_RST_PROP "RstVmdV"
#define VMD_PROP "RstUefiV"
#define VENDOR_GUID \
EFI_GUID(0x193dfefa, 0xa445, 0x4302, 0x99, 0xd8, 0xef, 0x3a, 0xad, 0x1a, 0x04, 0xc6)
#define PCI_CLASS_RAID_CNTRL 0x010400
+#define PCI_CLASS_SATA_HBA 0x010601
static int read_efi_var(void *buffer, ssize_t buf_size,
const char *variable_name, struct efi_guid guid)
@@ -604,7 +606,8 @@ const struct imsm_orom *find_imsm_efi(struct sys_dev *hba)
struct imsm_orom orom;
struct orom_entry *ret;
static const char * const sata_efivars[] = {AHCI_PROP, AHCI_SSATA_PROP,
- AHCI_TSATA_PROP};
+ AHCI_TSATA_PROP,
+ AHCI_RST_PROP};
unsigned long i;
if (check_env("IMSM_TEST_AHCI_EFI") || check_env("IMSM_TEST_SCU_EFI"))
@@ -622,7 +625,8 @@ const struct imsm_orom *find_imsm_efi(struct sys_dev *hba)
return NULL;
case SYS_DEV_SATA:
- if (hba->class != PCI_CLASS_RAID_CNTRL)
+ if (hba->class != PCI_CLASS_RAID_CNTRL &&
+ hba->class != PCI_CLASS_SATA_HBA)
return NULL;
for (i = 0; i < ARRAY_SIZE(sata_efivars); i++) {
--
2.35.3