diff options
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 7a7a1b664781..2ac8f6aff5a4 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -831,12 +831,14 @@ tx_drop: | |||
831 | return NETDEV_TX_OK; | 831 | return NETDEV_TX_OK; |
832 | } | 832 | } |
833 | 833 | ||
834 | static int qeth_l2_open(struct net_device *dev) | 834 | static int __qeth_l2_open(struct net_device *dev) |
835 | { | 835 | { |
836 | struct qeth_card *card = dev->ml_priv; | 836 | struct qeth_card *card = dev->ml_priv; |
837 | int rc = 0; | 837 | int rc = 0; |
838 | 838 | ||
839 | QETH_CARD_TEXT(card, 4, "qethopen"); | 839 | QETH_CARD_TEXT(card, 4, "qethopen"); |
840 | if (card->state == CARD_STATE_UP) | ||
841 | return rc; | ||
840 | if (card->state != CARD_STATE_SOFTSETUP) | 842 | if (card->state != CARD_STATE_SOFTSETUP) |
841 | return -ENODEV; | 843 | return -ENODEV; |
842 | 844 | ||
@@ -857,6 +859,18 @@ static int qeth_l2_open(struct net_device *dev) | |||
857 | return rc; | 859 | return rc; |
858 | } | 860 | } |
859 | 861 | ||
862 | static int qeth_l2_open(struct net_device *dev) | ||
863 | { | ||
864 | struct qeth_card *card = dev->ml_priv; | ||
865 | |||
866 | QETH_CARD_TEXT(card, 5, "qethope_"); | ||
867 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { | ||
868 | QETH_CARD_TEXT(card, 3, "openREC"); | ||
869 | return -ERESTARTSYS; | ||
870 | } | ||
871 | return __qeth_l2_open(dev); | ||
872 | } | ||
873 | |||
860 | static int qeth_l2_stop(struct net_device *dev) | 874 | static int qeth_l2_stop(struct net_device *dev) |
861 | { | 875 | { |
862 | struct qeth_card *card = dev->ml_priv; | 876 | struct qeth_card *card = dev->ml_priv; |
@@ -1046,7 +1060,7 @@ contin: | |||
1046 | if (recover_flag == CARD_STATE_RECOVER) { | 1060 | if (recover_flag == CARD_STATE_RECOVER) { |
1047 | if (recovery_mode && | 1061 | if (recovery_mode && |
1048 | card->info.type != QETH_CARD_TYPE_OSN) { | 1062 | card->info.type != QETH_CARD_TYPE_OSN) { |
1049 | qeth_l2_open(card->dev); | 1063 | __qeth_l2_open(card->dev); |
1050 | } else { | 1064 | } else { |
1051 | rtnl_lock(); | 1065 | rtnl_lock(); |
1052 | dev_open(card->dev); | 1066 | dev_open(card->dev); |