diff options
author | Pawel Baldysiak <pawel.baldysiak@intel.com> | 2016-12-12 11:28:44 +0100 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@redhat.com> | 2016-12-12 20:23:39 +0100 |
commit | 32716c51d968de302ee4e9a9e3bfa4dfdeb14e91 (patch) | |
tree | 162f958564dc156a2562b42955d13d530218e981 /super-intel.c | |
parent | mdopen: open md devices O_RDONLY (diff) | |
download | mdadm-32716c51d968de302ee4e9a9e3bfa4dfdeb14e91.tar.xz mdadm-32716c51d968de302ee4e9a9e3bfa4dfdeb14e91.zip |
IMSM: Add support for Non-Intel NVMe drives under VMD
This patch adds checking if platform (preOS) supports
non-Intel NVMe drives under VMD domain,
and - if so - allow creating IMSM Raid Volume
with those drives.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/super-intel.c b/super-intel.c index 0407d430..cee6951f 100644 --- a/super-intel.c +++ b/super-intel.c @@ -2199,9 +2199,6 @@ static int print_vmd_attached_devs(struct sys_dev *hba) continue; sprintf(path, "/sys/bus/pci/drivers/nvme/%s", ent->d_name); - /* if not a intel NVMe - skip it*/ - if (devpath_to_vendor(path) != 0x8086) - continue; rp = realpath(path, NULL); if (!rp) @@ -2416,6 +2413,8 @@ static int detail_platform_imsm(int verbose, int enumerate_only, char *controlle for (entry = orom_entries; entry; entry = entry->next) { if (entry->type == SYS_DEV_VMD) { print_imsm_capability(&entry->orom); + printf(" 3rd party NVMe :%s supported\n", + imsm_orom_has_tpv_support(&entry->orom)?"":" not"); for (hba = list; hba; hba = hba->next) { if (hba->type == SYS_DEV_VMD) { char buf[PATH_MAX]; @@ -5609,6 +5608,13 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk, "\tRAID 0 is the only supported configuration for this type of x8 device.\n"); break; } + } else if (super->hba->type == SYS_DEV_VMD && super->orom && + !imsm_orom_has_tpv_support(super->orom)) { + pr_err("\tPlatform configuration does not support non-Intel NVMe drives.\n" + "\tPlease refer to Intel(R) RSTe user guide.\n"); + free(dd->devname); + free(dd); + return 1; } } |