diff options
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index a63a3dfcdf63..372f2c0cd547 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -940,30 +940,17 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
940 | 940 | ||
941 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); | 941 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); |
942 | recover_flag = card->state; | 942 | recover_flag = card->state; |
943 | rc = ccw_device_set_online(CARD_RDEV(card)); | ||
944 | if (rc) { | ||
945 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | ||
946 | return -EIO; | ||
947 | } | ||
948 | rc = ccw_device_set_online(CARD_WDEV(card)); | ||
949 | if (rc) { | ||
950 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | ||
951 | return -EIO; | ||
952 | } | ||
953 | rc = ccw_device_set_online(CARD_DDEV(card)); | ||
954 | if (rc) { | ||
955 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | ||
956 | return -EIO; | ||
957 | } | ||
958 | |||
959 | rc = qeth_core_hardsetup_card(card); | 943 | rc = qeth_core_hardsetup_card(card); |
960 | if (rc) { | 944 | if (rc) { |
961 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); | 945 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); |
946 | rc = -ENODEV; | ||
962 | goto out_remove; | 947 | goto out_remove; |
963 | } | 948 | } |
964 | 949 | ||
965 | if (!card->dev && qeth_l2_setup_netdev(card)) | 950 | if (!card->dev && qeth_l2_setup_netdev(card)) { |
951 | rc = -ENODEV; | ||
966 | goto out_remove; | 952 | goto out_remove; |
953 | } | ||
967 | 954 | ||
968 | if (card->info.type != QETH_CARD_TYPE_OSN) | 955 | if (card->info.type != QETH_CARD_TYPE_OSN) |
969 | qeth_l2_send_setmac(card, &card->dev->dev_addr[0]); | 956 | qeth_l2_send_setmac(card, &card->dev->dev_addr[0]); |
@@ -983,6 +970,7 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
983 | card->lan_online = 0; | 970 | card->lan_online = 0; |
984 | return 0; | 971 | return 0; |
985 | } | 972 | } |
973 | rc = -ENODEV; | ||
986 | goto out_remove; | 974 | goto out_remove; |
987 | } else | 975 | } else |
988 | card->lan_online = 1; | 976 | card->lan_online = 1; |
@@ -999,6 +987,7 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
999 | rc = qeth_init_qdio_queues(card); | 987 | rc = qeth_init_qdio_queues(card); |
1000 | if (rc) { | 988 | if (rc) { |
1001 | QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc); | 989 | QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc); |
990 | rc = -ENODEV; | ||
1002 | goto out_remove; | 991 | goto out_remove; |
1003 | } | 992 | } |
1004 | card->state = CARD_STATE_SOFTSETUP; | 993 | card->state = CARD_STATE_SOFTSETUP; |
@@ -1020,6 +1009,7 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
1020 | /* let user_space know that device is online */ | 1009 | /* let user_space know that device is online */ |
1021 | kobject_uevent(&gdev->dev.kobj, KOBJ_CHANGE); | 1010 | kobject_uevent(&gdev->dev.kobj, KOBJ_CHANGE); |
1022 | return 0; | 1011 | return 0; |
1012 | |||
1023 | out_remove: | 1013 | out_remove: |
1024 | card->use_hard_stop = 1; | 1014 | card->use_hard_stop = 1; |
1025 | qeth_l2_stop_card(card, 0); | 1015 | qeth_l2_stop_card(card, 0); |
@@ -1030,7 +1020,7 @@ out_remove: | |||
1030 | card->state = CARD_STATE_RECOVER; | 1020 | card->state = CARD_STATE_RECOVER; |
1031 | else | 1021 | else |
1032 | card->state = CARD_STATE_DOWN; | 1022 | card->state = CARD_STATE_DOWN; |
1033 | return -ENODEV; | 1023 | return rc; |
1034 | } | 1024 | } |
1035 | 1025 | ||
1036 | static int qeth_l2_set_online(struct ccwgroup_device *gdev) | 1026 | static int qeth_l2_set_online(struct ccwgroup_device *gdev) |