Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be40a86c authored by Alexandra Winter's avatar Alexandra Winter Committed by Jakub Kicinski
Browse files

s390/qeth: Fix initialization of vnicc cmd masks during set online



Without this patch, a command bit in the supported commands mask is only
ever set to unsupported during set online. If a command is ever marked as
unsupported (e.g. because of error during qeth_l2_vnicc_query_cmds),
subsequent successful initialization (offline/online) would not bring it
back.

Fixes: caa1f0b1 ("s390/qeth: add VNICC enable/disable support")
Signed-off-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
parent b528965b
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -2049,11 +2049,15 @@ static void qeth_l2_vnicc_init(struct qeth_card *card)
			sup_cmds = 0;
			error = true;
		}
		if (!(sup_cmds & IPA_VNICC_SET_TIMEOUT) ||
		    !(sup_cmds & IPA_VNICC_GET_TIMEOUT))
		if ((sup_cmds & IPA_VNICC_SET_TIMEOUT) &&
		    (sup_cmds & IPA_VNICC_GET_TIMEOUT))
			card->options.vnicc.getset_timeout_sup |= vnicc;
		else
			card->options.vnicc.getset_timeout_sup &= ~vnicc;
		if (!(sup_cmds & IPA_VNICC_ENABLE) ||
		    !(sup_cmds & IPA_VNICC_DISABLE))
		if ((sup_cmds & IPA_VNICC_ENABLE) &&
		    (sup_cmds & IPA_VNICC_DISABLE))
			card->options.vnicc.set_char_sup |= vnicc;
		else
			card->options.vnicc.set_char_sup &= ~vnicc;
	}
	/* enforce assumed default values and recover settings, if changed  */