diff options
author | Ursula Braun <ursula.braun@de.ibm.com> | 2010-03-08 15:36:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-10 10:32:26 -0500 |
commit | 869da90b9ae39f0d5b9b5aa3a84502684a6aa1f4 (patch) | |
tree | 50519820fcb4c2cd7ab4a0d76074a46539680229 /drivers/s390/net | |
parent | a959189a978e0104e8aa7f1522f5eff42d891456 (diff) |
qeth: no recovery after layer mismatch (z/VM NICs)
Depending on their definition in z/VM, virtual devices for z/VM
VSWITCH or GuestLAN must be configured either in layer2 or in
layer3 mode. If qeth detects a layer mismatch, device activation
fails. Trying to recover from this error cannot help; thus
scheduling a recovery should be avoided.
In addition, since recovery is forbidden during online setting of
a qeth device, existence of its network device is guaranteed for all
dev_close() calls in qeth. The corresponding checks can be removed.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.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 | 3 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 16 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 16 |
3 files changed, 14 insertions, 21 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index fa8a519218ac..834830a4866d 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -537,7 +537,8 @@ static void qeth_send_control_data_cb(struct qeth_channel *channel, | |||
537 | dev_err(&card->gdev->dev, | 537 | dev_err(&card->gdev->dev, |
538 | "The qeth device is not configured " | 538 | "The qeth device is not configured " |
539 | "for the OSI layer required by z/VM\n"); | 539 | "for the OSI layer required by z/VM\n"); |
540 | qeth_schedule_recovery(card); | 540 | else |
541 | qeth_schedule_recovery(card); | ||
541 | goto out; | 542 | goto out; |
542 | } | 543 | } |
543 | 544 | ||
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 51fde6f2e0b8..6f1e3036bafd 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -1071,11 +1071,9 @@ static int qeth_l2_recover(void *ptr) | |||
1071 | dev_info(&card->gdev->dev, | 1071 | dev_info(&card->gdev->dev, |
1072 | "Device successfully recovered!\n"); | 1072 | "Device successfully recovered!\n"); |
1073 | else { | 1073 | else { |
1074 | if (card->dev) { | 1074 | rtnl_lock(); |
1075 | rtnl_lock(); | 1075 | dev_close(card->dev); |
1076 | dev_close(card->dev); | 1076 | rtnl_unlock(); |
1077 | rtnl_unlock(); | ||
1078 | } | ||
1079 | dev_warn(&card->gdev->dev, "The qeth device driver " | 1077 | dev_warn(&card->gdev->dev, "The qeth device driver " |
1080 | "failed to recover an error on the device\n"); | 1078 | "failed to recover an error on the device\n"); |
1081 | } | 1079 | } |
@@ -1129,11 +1127,9 @@ static int qeth_l2_pm_resume(struct ccwgroup_device *gdev) | |||
1129 | if (card->state == CARD_STATE_RECOVER) { | 1127 | if (card->state == CARD_STATE_RECOVER) { |
1130 | rc = __qeth_l2_set_online(card->gdev, 1); | 1128 | rc = __qeth_l2_set_online(card->gdev, 1); |
1131 | if (rc) { | 1129 | if (rc) { |
1132 | if (card->dev) { | 1130 | rtnl_lock(); |
1133 | rtnl_lock(); | 1131 | dev_close(card->dev); |
1134 | dev_close(card->dev); | 1132 | rtnl_unlock(); |
1135 | rtnl_unlock(); | ||
1136 | } | ||
1137 | } | 1133 | } |
1138 | } else | 1134 | } else |
1139 | rc = __qeth_l2_set_online(card->gdev, 0); | 1135 | rc = __qeth_l2_set_online(card->gdev, 0); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index cd746da2951e..b3b6e872d806 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2219,11 +2219,9 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode) | |||
2219 | if (recovery_mode) | 2219 | if (recovery_mode) |
2220 | qeth_l3_stop(card->dev); | 2220 | qeth_l3_stop(card->dev); |
2221 | else { | 2221 | else { |
2222 | if (card->dev) { | 2222 | rtnl_lock(); |
2223 | rtnl_lock(); | 2223 | dev_close(card->dev); |
2224 | dev_close(card->dev); | 2224 | rtnl_unlock(); |
2225 | rtnl_unlock(); | ||
2226 | } | ||
2227 | } | 2225 | } |
2228 | if (!card->use_hard_stop) { | 2226 | if (!card->use_hard_stop) { |
2229 | rc = qeth_send_stoplan(card); | 2227 | rc = qeth_send_stoplan(card); |
@@ -3536,11 +3534,9 @@ static int qeth_l3_pm_resume(struct ccwgroup_device *gdev) | |||
3536 | if (card->state == CARD_STATE_RECOVER) { | 3534 | if (card->state == CARD_STATE_RECOVER) { |
3537 | rc = __qeth_l3_set_online(card->gdev, 1); | 3535 | rc = __qeth_l3_set_online(card->gdev, 1); |
3538 | if (rc) { | 3536 | if (rc) { |
3539 | if (card->dev) { | 3537 | rtnl_lock(); |
3540 | rtnl_lock(); | 3538 | dev_close(card->dev); |
3541 | dev_close(card->dev); | 3539 | rtnl_unlock(); |
3542 | rtnl_unlock(); | ||
3543 | } | ||
3544 | } | 3540 | } |
3545 | } else | 3541 | } else |
3546 | rc = __qeth_l3_set_online(card->gdev, 0); | 3542 | rc = __qeth_l3_set_online(card->gdev, 0); |