diff --git a/Assemble.c b/Assemble.c index 94e314b..dbac9ae 100644 --- a/Assemble.c +++ b/Assemble.c @@ -1219,6 +1219,8 @@ try_again: mddev ? mddev : "further assembly"); content = &info; + if (st) + st->ignore_hw_compat = 1; num_devs = select_devices(devlist, ident, &st, &content, c, inargv, auto_assem); if (num_devs < 0) diff --git a/Incremental.c b/Incremental.c index 4c889b5..bc23a88 100644 --- a/Incremental.c +++ b/Incremental.c @@ -127,6 +127,8 @@ int Incremental(char *devname, struct context *c, if (must_be_container(dfd)) { if (!st) st = super_by_fd(dfd, NULL); + if (st) + st->ignore_hw_compat = 1; if (st && st->ss->load_container) rv = st->ss->load_container(st, dfd, NULL); @@ -185,6 +187,7 @@ int Incremental(char *devname, struct context *c, st, c->verbose); goto out; } + st->ignore_hw_compat = 1; if (st->ss->compare_super == NULL || st->ss->load_super(st, dfd, NULL)) { if (c->verbose >= 0) diff --git a/super-intel.c b/super-intel.c index 452fae4..202b83f 100644 --- a/super-intel.c +++ b/super-intel.c @@ -3069,10 +3069,11 @@ static int compare_super_imsm(struct supertype *st, struct supertype *tst) } /* in platform dependent environment test if the disks * use the same Intel hba + * If not on Intel hba at all, allow anything. */ if (!check_env("IMSM_NO_PLATFORM")) { - if (!first->hba || !sec->hba || - (first->hba->type != sec->hba->type)) { + if (first->hba && sec->hba && + first->hba->type != sec->hba->type) { fprintf(stderr, "HBAs of devices does not match %s != %s\n", first->hba ? get_sys_dev_type(first->hba->type) : NULL, @@ -4326,7 +4327,6 @@ static int get_super_block(struct intel_super **super_list, int devnum, char *de struct intel_super*s = NULL; char nm[32]; int dfd = -1; - int rv; int err = 0; int retry; @@ -4343,13 +4343,7 @@ static int get_super_block(struct intel_super **super_list, int devnum, char *de goto error; } - rv = find_intel_hba_capability(dfd, s, devname); - /* no orom/efi or non-intel hba of the disk */ - if (rv != 0) { - err = 4; - goto error; - } - + find_intel_hba_capability(dfd, s, devname); err = load_and_parse_mpb(dfd, s, NULL, keep_fd); /* retry the load if we might have raced against mdmon */ diff --git a/util.c b/util.c index 498162f..6c10365 100644 --- a/util.c +++ b/util.c @@ -559,8 +559,8 @@ int check_raid(int fd, char *name) char *level; struct supertype *st = guess_super(fd); - if (!st) return 0; - st->ignore_hw_compat = 1; + if (!st) + return 0; st->ss->load_super(st, fd, name); /* Looks like a raid array .. */ pr_err("%s appears to be part of a raid array:\n", @@ -1077,6 +1077,7 @@ struct supertype *dup_super(struct supertype *orig) st->ss = orig->ss; st->max_devs = orig->max_devs; st->minor_version = orig->minor_version; + st->ignore_hw_compat = orig->ignore_hw_compat; st->sb = NULL; st->info = NULL; return st; @@ -1124,7 +1125,6 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type) rv = superlist[bestsuper]->load_super(st, fd, NULL); if (rv == 0) { superlist[bestsuper]->free_super(st); - st->ignore_hw_compat = 0; return st; } }