aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_l3_main.c
diff options
context:
space:
mode:
authorUrsula Braun <ursula.braun@de.ibm.com>2010-03-08 20:36:56 +0000
committerDavid S. Miller <davem@davemloft.net>2010-03-10 07:32:26 -0800
commit869da90b9ae39f0d5b9b5aa3a84502684a6aa1f4 (patch)
tree50519820fcb4c2cd7ab4a0d76074a46539680229 /drivers/s390/net/qeth_l3_main.c
parenta959189a978e0104e8aa7f1522f5eff42d891456 (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/qeth_l3_main.c')
-rw-r--r--drivers/s390/net/qeth_l3_main.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index cd746da2951..b3b6e872d80 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)
if (recovery_mode)
qeth_l3_stop(card->dev);
else {
- if (card->dev) {
- rtnl_lock();
- dev_close(card->dev);
- rtnl_unlock();
- }
+ rtnl_lock();
+ dev_close(card->dev);
+ rtnl_unlock();
}
if (!card->use_hard_stop) {
rc = qeth_send_stoplan(card);
@@ -3536,11 +3534,9 @@ static int qeth_l3_pm_resume(struct ccwgroup_device *gdev)
if (card->state == CARD_STATE_RECOVER) {
rc = __qeth_l3_set_online(card->gdev, 1);
if (rc) {
- if (card->dev) {
- rtnl_lock();
- dev_close(card->dev);
- rtnl_unlock();
- }
+ rtnl_lock();
+ dev_close(card->dev);
+ rtnl_unlock();
}
} else
rc = __qeth_l3_set_online(card->gdev, 0);