Skip to content

Commit

Permalink
s390/qeth: only init the isolation mode when necessary
Browse files Browse the repository at this point in the history
A newly initialized device defaults to ISOLATION_MODE_NONE, don't bother
with programming this a second time.

Then remove the OSD/OSX check, it's already done in the sysfs path
whenever the user actually changes the configuration.

Signed-off-by: Julian Wiedmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
julianwiedmann authored and davem330 committed Jul 14, 2020
1 parent dbdd04d commit 08e95ca
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/s390/net/qeth_core_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4663,8 +4663,7 @@ int qeth_set_access_ctrl_online(struct qeth_card *card, int fallback)

QETH_CARD_TEXT(card, 4, "setactlo");

if ((IS_OSD(card) || IS_OSX(card)) &&
qeth_adp_supported(card, IPA_SETADP_SET_ACCESS_CONTROL)) {
if (qeth_adp_supported(card, IPA_SETADP_SET_ACCESS_CONTROL)) {
rc = qeth_setadpparms_set_access_ctrl(card,
card->options.isolation, fallback);
if (rc) {
Expand Down Expand Up @@ -5347,9 +5346,11 @@ int qeth_core_hardsetup_card(struct qeth_card *card, bool *carrier_ok)
(card->info.hwtrap && qeth_hw_trap(card, QETH_DIAGS_TRAP_ARM)))
card->info.hwtrap = 0;

rc = qeth_set_access_ctrl_online(card, 0);
if (rc)
goto out;
if (card->options.isolation != ISOLATION_MODE_NONE) {
rc = qeth_set_access_ctrl_online(card, 0);
if (rc)
goto out;
}

rc = qeth_init_qdio_queues(card);
if (rc) {
Expand Down

0 comments on commit 08e95ca

Please sign in to comment.