diff options
author | Labun, Marcin <Marcin.Labun@intel.com> | 2011-03-20 05:47:33 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-20 05:47:33 +0100 |
commit | 8a0bf4f378c8b9c6bf28b65542c8354eee836c7e (patch) | |
tree | 4138c5feeb240bc094321ed6929e2c7461914b93 /platform-intel.c | |
parent | imsm: FIX: indicate that metadada has to be written (diff) | |
download | mdadm-8a0bf4f378c8b9c6bf28b65542c8354eee836c7e.tar.xz mdadm-8a0bf4f378c8b9c6bf28b65542c8354eee836c7e.zip |
platform_intel: support EFI SCU OEM variable
RstScuV and RstScuO variable names are supported.
First try reading from RstScuV, when it fails try RstScuO.
Signed-off-by: Marcin Labun <marcin.labun@intel.com>
Tested-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'platform-intel.c')
-rw-r--r-- | platform-intel.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/platform-intel.c b/platform-intel.c index 8003da6e..64542b9b 100644 --- a/platform-intel.c +++ b/platform-intel.c @@ -349,6 +349,7 @@ static const struct imsm_orom *find_imsm_hba_orom(enum sys_dev_type hba_id) #define SYS_EFI_VAR_PATH "/sys/firmware/efi/vars" #define SCU_PROP "RstScuV" +#define SCU_PROP_OEM "RstScuO" #define AHCI_PROP "RstSataV" #define VENDOR_GUID \ @@ -393,8 +394,14 @@ const struct imsm_orom *find_imsm_efi(enum sys_dev_type hba_id) snprintf(path, PATH_MAX, "%s/%s-%s", SYS_EFI_VAR_PATH, AHCI_PROP, guid_str(buf, VENDOR_GUID)); dprintf("EFI VAR: path=%s\n", path); - - if ((dfd = open(path, O_RDONLY)) < 0) { + dfd = open(path, O_RDONLY); + if ((dfd < 0) && (hba_id == SYS_DEV_SAS)) { + /* check OEM parameters */ + snprintf(path, PATH_MAX, "%s/%s-%s", SYS_EFI_VAR_PATH, SCU_PROP_OEM, guid_str(buf, VENDOR_GUID)); + dfd = open(path, O_RDONLY); + dprintf("EFI VAR: path=%s\n", path); + } + if (dfd < 0) { populated_efi[hba_id] = 0; return NULL; } |