提交 22f48c33 编写于 作者: A Alexandra Winter 提交者: Yang Yingliang

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

[ Upstream commit be40a86c319706f90caca144343c64743c32b953 ]

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: NAlexandra Winter <wintera@linux.ibm.com>
Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 8795347a
...@@ -2358,11 +2358,15 @@ static void qeth_l2_vnicc_init(struct qeth_card *card) ...@@ -2358,11 +2358,15 @@ static void qeth_l2_vnicc_init(struct qeth_card *card)
sup_cmds = 0; sup_cmds = 0;
error = true; error = true;
} }
if (!(sup_cmds & IPA_VNICC_SET_TIMEOUT) || if ((sup_cmds & IPA_VNICC_SET_TIMEOUT) &&
!(sup_cmds & IPA_VNICC_GET_TIMEOUT)) (sup_cmds & IPA_VNICC_GET_TIMEOUT))
card->options.vnicc.getset_timeout_sup |= vnicc;
else
card->options.vnicc.getset_timeout_sup &= ~vnicc; card->options.vnicc.getset_timeout_sup &= ~vnicc;
if (!(sup_cmds & IPA_VNICC_ENABLE) || if ((sup_cmds & IPA_VNICC_ENABLE) &&
!(sup_cmds & IPA_VNICC_DISABLE)) (sup_cmds & IPA_VNICC_DISABLE))
card->options.vnicc.set_char_sup |= vnicc;
else
card->options.vnicc.set_char_sup &= ~vnicc; card->options.vnicc.set_char_sup &= ~vnicc;
} }
/* enforce assumed default values and recover settings, if changed */ /* enforce assumed default values and recover settings, if changed */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册