summaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_l3_main.c
diff options
context:
space:
mode:
authorUrsula Braun <ursula.braun@de.ibm.com>2009-11-12 00:11:43 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-16 02:42:07 -0800
commitaa90922479513db0d080239324d0d04701418ba5 (patch)
tree6399b72c47c9826049a62d8217f1613f729c47dd /drivers/s390/net/qeth_l3_main.c
parentf20b04597b9f75dce16c898abb487eff06ddf677 (diff)
qeth: Recognize return codes of ccw_device_set_online
Setting a qeth device online requires to call function ccw_device_set_online() for read-, write-, and data-subchannel. Failures should be detected immediately without an attempt to invoke follow-on activity qeth_qdio_clear_card()., In addition, ccw_device_set_online calls are consolidated in qeth_core_main.c only. 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.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index dd6766672a00..03f67bb51e99 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3156,32 +3156,19 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
recover_flag = card->state;
- rc = ccw_device_set_online(CARD_RDEV(card));
- if (rc) {
- QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
- return -EIO;
- }
- rc = ccw_device_set_online(CARD_WDEV(card));
- if (rc) {
- QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
- return -EIO;
- }
- rc = ccw_device_set_online(CARD_DDEV(card));
- if (rc) {
- QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
- return -EIO;
- }
-
rc = qeth_core_hardsetup_card(card);
if (rc) {
QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
+ rc = -ENODEV;
goto out_remove;
}
qeth_l3_query_ipassists(card, QETH_PROT_IPV4);
- if (!card->dev && qeth_l3_setup_netdev(card))
+ if (!card->dev && qeth_l3_setup_netdev(card)) {
+ rc = -ENODEV;
goto out_remove;
+ }
card->state = CARD_STATE_HARDSETUP;
qeth_print_status_message(card);
@@ -3198,6 +3185,7 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
card->lan_online = 0;
return 0;
}
+ rc = -ENODEV;
goto out_remove;
} else
card->lan_online = 1;
@@ -3220,6 +3208,7 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
rc = qeth_init_qdio_queues(card);
if (rc) {
QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
+ rc = -ENODEV;
goto out_remove;
}
card->state = CARD_STATE_SOFTSETUP;
@@ -3250,7 +3239,7 @@ out_remove:
card->state = CARD_STATE_RECOVER;
else
card->state = CARD_STATE_DOWN;
- return -ENODEV;
+ return rc;
}
static int qeth_l3_set_online(struct ccwgroup_device *gdev)