diff options
author | Ursula Braun <ursula.braun@de.ibm.com> | 2009-11-11 19:11:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-16 05:42:07 -0500 |
commit | aa90922479513db0d080239324d0d04701418ba5 (patch) | |
tree | 6399b72c47c9826049a62d8217f1613f729c47dd /drivers/s390/net/qeth_l3_main.c | |
parent | f20b04597b9f75dce16c898abb487eff06ddf677 (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.c | 25 |
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) | |||
3156 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); | 3156 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); |
3157 | 3157 | ||
3158 | recover_flag = card->state; | 3158 | recover_flag = card->state; |
3159 | rc = ccw_device_set_online(CARD_RDEV(card)); | ||
3160 | if (rc) { | ||
3161 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | ||
3162 | return -EIO; | ||
3163 | } | ||
3164 | rc = ccw_device_set_online(CARD_WDEV(card)); | ||
3165 | if (rc) { | ||
3166 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | ||
3167 | return -EIO; | ||
3168 | } | ||
3169 | rc = ccw_device_set_online(CARD_DDEV(card)); | ||
3170 | if (rc) { | ||
3171 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | ||
3172 | return -EIO; | ||
3173 | } | ||
3174 | |||
3175 | rc = qeth_core_hardsetup_card(card); | 3159 | rc = qeth_core_hardsetup_card(card); |
3176 | if (rc) { | 3160 | if (rc) { |
3177 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); | 3161 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); |
3162 | rc = -ENODEV; | ||
3178 | goto out_remove; | 3163 | goto out_remove; |
3179 | } | 3164 | } |
3180 | 3165 | ||
3181 | qeth_l3_query_ipassists(card, QETH_PROT_IPV4); | 3166 | qeth_l3_query_ipassists(card, QETH_PROT_IPV4); |
3182 | 3167 | ||
3183 | if (!card->dev && qeth_l3_setup_netdev(card)) | 3168 | if (!card->dev && qeth_l3_setup_netdev(card)) { |
3169 | rc = -ENODEV; | ||
3184 | goto out_remove; | 3170 | goto out_remove; |
3171 | } | ||
3185 | 3172 | ||
3186 | card->state = CARD_STATE_HARDSETUP; | 3173 | card->state = CARD_STATE_HARDSETUP; |
3187 | qeth_print_status_message(card); | 3174 | qeth_print_status_message(card); |
@@ -3198,6 +3185,7 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
3198 | card->lan_online = 0; | 3185 | card->lan_online = 0; |
3199 | return 0; | 3186 | return 0; |
3200 | } | 3187 | } |
3188 | rc = -ENODEV; | ||
3201 | goto out_remove; | 3189 | goto out_remove; |
3202 | } else | 3190 | } else |
3203 | card->lan_online = 1; | 3191 | card->lan_online = 1; |
@@ -3220,6 +3208,7 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
3220 | rc = qeth_init_qdio_queues(card); | 3208 | rc = qeth_init_qdio_queues(card); |
3221 | if (rc) { | 3209 | if (rc) { |
3222 | QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc); | 3210 | QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc); |
3211 | rc = -ENODEV; | ||
3223 | goto out_remove; | 3212 | goto out_remove; |
3224 | } | 3213 | } |
3225 | card->state = CARD_STATE_SOFTSETUP; | 3214 | card->state = CARD_STATE_SOFTSETUP; |
@@ -3250,7 +3239,7 @@ out_remove: | |||
3250 | card->state = CARD_STATE_RECOVER; | 3239 | card->state = CARD_STATE_RECOVER; |
3251 | else | 3240 | else |
3252 | card->state = CARD_STATE_DOWN; | 3241 | card->state = CARD_STATE_DOWN; |
3253 | return -ENODEV; | 3242 | return rc; |
3254 | } | 3243 | } |
3255 | 3244 | ||
3256 | static int qeth_l3_set_online(struct ccwgroup_device *gdev) | 3245 | static int qeth_l3_set_online(struct ccwgroup_device *gdev) |