diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2020-07-14 16:22:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-14 14:53:45 -0700 |
commit | 62f0379c6c9b169b99a89c4677a32e45d7778bc4 (patch) | |
tree | e95233dc1cc95657855e2eda62a19b3193e69b1c /drivers/s390/net | |
parent | 08e95cae648ef8db998d48c38c4774831da5f869 (diff) | |
download | linux-62f0379c6c9b169b99a89c4677a32e45d7778bc4.tar.gz linux-62f0379c6c9b169b99a89c4677a32e45d7778bc4.tar.bz2 linux-62f0379c6c9b169b99a89c4677a32e45d7778bc4.zip |
s390/qeth: don't clear the configured isolation mode
When qeth_set_access_ctrl_online() is called during the device's
initialization and discovers that isolation mode isn't supported, don't
clear the user's currently configured mode.
They intentionally choose to operate the device in this specific mode,
and degrading the isolation is not an option.
Only adjust the configuration when called via sysfs (ie. fallback = 1),
and here follow the common pattern and restore it from prev_isolation.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net')
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 514795c5eaad..782a5128ac04 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -4663,19 +4663,19 @@ int qeth_set_access_ctrl_online(struct qeth_card *card, int fallback) QETH_CARD_TEXT(card, 4, "setactlo"); - if (qeth_adp_supported(card, IPA_SETADP_SET_ACCESS_CONTROL)) { - rc = qeth_setadpparms_set_access_ctrl(card, - card->options.isolation, fallback); - if (rc) { - QETH_DBF_MESSAGE(3, "IPA(SET_ACCESS_CTRL(%d) on device %x: sent failed\n", - rc, CARD_DEVID(card)); - rc = -EOPNOTSUPP; - } - } else if (card->options.isolation != ISOLATION_MODE_NONE) { - card->options.isolation = ISOLATION_MODE_NONE; - + if (!qeth_adp_supported(card, IPA_SETADP_SET_ACCESS_CONTROL)) { dev_err(&card->gdev->dev, "Adapter does not " "support QDIO data connection isolation\n"); + if (fallback) + card->options.isolation = card->options.prev_isolation; + return -EOPNOTSUPP; + } + + rc = qeth_setadpparms_set_access_ctrl(card, card->options.isolation, + fallback); + if (rc) { + QETH_DBF_MESSAGE(3, "IPA(SET_ACCESS_CTRL(%d) on device %x: sent failed\n", + rc, CARD_DEVID(card)); rc = -EOPNOTSUPP; } return rc; |