When merging the user provided configuration with the internal
hwtable entry in merge_hwe(), it can happen that the resulting
entry has a discrepancy between 'features' and 'no_path_retry'.
Check for this special case and fix it.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
merge_num(retain_hwhandler);
merge_num(detect_prio);
+ /*
+ * Make sure features is consistent with
+ * no_path_retry
+ */
+ if (dst->no_path_retry == NO_PATH_RETRY_FAIL)
+ remove_feature(&dst->features, "queue_if_no_path");
+ else if (dst->no_path_retry != NO_PATH_RETRY_UNDEF)
+ add_feature(&dst->features, "queue_if_no_path");
+
return 0;
}