From 9528578d29d0b89682a0e657debd3ecffca863c5c99ff261233def02ce770c6f Mon Sep 17 00:00:00 2001 From: Mark Post Date: Mon, 22 Oct 2018 22:02:59 +0000 Subject: [PATCH] Accepting request 643829 from home:markkp:branches:Base:System - Added s390-tools-sles15-zdev-fix-qeth-BridgePort-and-VNICC-conflict-checking.patch zdev: qeth BridgePort and VNICC attribute conflict (bsc#1112536) OBS-URL: https://build.opensuse.org/request/show/643829 OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=56 --- ...idgePort-and-VNICC-conflict-checking.patch | 70 +++++++++++++++++++ s390-tools.changes | 6 ++ s390-tools.spec | 2 + 3 files changed, 78 insertions(+) create mode 100644 s390-tools-sles15-zdev-fix-qeth-BridgePort-and-VNICC-conflict-checking.patch diff --git a/s390-tools-sles15-zdev-fix-qeth-BridgePort-and-VNICC-conflict-checking.patch b/s390-tools-sles15-zdev-fix-qeth-BridgePort-and-VNICC-conflict-checking.patch new file mode 100644 index 0000000..607162a --- /dev/null +++ b/s390-tools-sles15-zdev-fix-qeth-BridgePort-and-VNICC-conflict-checking.patch @@ -0,0 +1,70 @@ +Subject: zdev: qeth BridgePort and VNICC attribute conflict +From: Hans Wippel + +Description: zdev: qeth BridgePort and VNICC attribute conflict +Symptom: chzdev cannot set VNICC attributes due to a conflict with + BridgePort attributes. +Problem: Existing conflict checking always assumes a BridgePort and a + VNICC attribute are active. +Solution: Introduce a function that determines if BridgePort or VNICC + attributes are active and use only active attributes for conflict + checking. +Reproduction: Set VNICC attribute with chzdev w/o active BridgePort attributes. +Upstream-ID: df01c470c2a680a924ccdba3b6657af4669002b2 +Problem-ID: 172409 + + +Signed-off-by: Hans Wippel +--- + zdev/src/qeth.c | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +--- a/zdev/src/qeth.c ++++ b/zdev/src/qeth.c +@@ -1170,6 +1170,37 @@ static exit_code_t check_ineffective_set + return rc; + } + ++/* Check if a possibly conflicting setting is active in the configuration */ ++static bool conflict_setting_active(struct setting *s) ++{ ++ enum qeth_attr_group_type t; ++ ++ t = get_attr_group_type(s); ++ if (t != group_bridge && t != group_vnicc) { ++ /* Check BridgePort and VNICC attributes only */ ++ return false; ++ } ++ if (s->specified) { ++ /* Specified on the command line: We are strict here and do not ++ * allow to specify VNICC and BridgePort attributes in the same ++ * command to avoid issues when attributes are enabled/disabled ++ * in the wrong order. Example: disable VNICC and enable ++ * BridgePort in the same command would result in an error ++ * because BridgePort attributes are set first. ++ */ ++ return true; ++ } ++ if (attrib_match_default(s->attrib, s->value)) { ++ /* Not active if set to default value */ ++ return false; ++ } ++ if (s->actual_value && strncmp(s->actual_value, "n/a", 3) == 0) { ++ /* Not active if in n/a state (conflicting attribute set) */ ++ return false; ++ } ++ return true; ++} ++ + /* Check if there are conflicting attribute settings */ + static exit_code_t check_conflicting_settings(struct setting_list *list) + { +@@ -1181,6 +1212,8 @@ static exit_code_t check_conflicting_set + util_list_iterate(&list->list, s) { + if (s->removed) + continue; ++ if (!conflict_setting_active(s)) ++ continue; + t = get_attr_group_type(s); + if (t == group_bridge && (!bridge || !bridge->specified)) + bridge = s; diff --git a/s390-tools.changes b/s390-tools.changes index 81ee9af..e6ab8d2 100644 --- a/s390-tools.changes +++ b/s390-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 22 19:44:05 UTC 2018 - mpost@suse.com + +- Added s390-tools-sles15-zdev-fix-qeth-BridgePort-and-VNICC-conflict-checking.patch + zdev: qeth BridgePort and VNICC attribute conflict (bsc#1112536) + ------------------------------------------------------------------- Fri Aug 31 18:57:54 UTC 2018 - mpost@suse.com diff --git a/s390-tools.spec b/s390-tools.spec index 118e259..733d015 100644 --- a/s390-tools.spec +++ b/s390-tools.spec @@ -151,6 +151,7 @@ Patch40: s390-tools-sles15-5-lstape-fix-to-prevent-error-messages-if-ther Patch41: s390-tools-sles15-6-lstape-fix-description-of-type-and-devbusid-filter-f.patch Patch42: s390-tools-sles15-7-lstape-fix-SCSI-output-description-in-man-page.patch Patch43: s390-tools-sles15-8-lstape-fix-SCSI-HBA-CCW-device-bus-ID-e.g.-for-virti.patch +Patch44: s390-tools-sles15-zdev-fix-qeth-BridgePort-and-VNICC-conflict-checking.patch Patch999: customize-zdev-root-update-script.patch @@ -252,6 +253,7 @@ to list files and directories. %patch41 -p1 %patch42 -p1 %patch43 -p1 +%patch44 -p1 %patch999 -p1