aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l2_main.c
diff options
context:
space:
mode:
authorUrsula Braun <ursula.braun@de.ibm.com>2008-09-19 06:56:03 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-24 20:47:57 -0400
commit28a7e4c906bd86419eb8572b3b1343e619cd1470 (patch)
tree9d2c13335eeffdf3fe00b89576f6b1b55e7e04ab /drivers/s390/net/qeth_l2_main.c
parentf1d58672de4e89478e0b02ea8fd1f60eb0626457 (diff)
qeth: avoid qeth recovery problems
Do not touch IFF_UP flag during qeth recovery, but invoke dev_close() in case of failing recovery. Cancel outstanding control commands in case of Data Checks or Channel Checks. Do not invoke qeth_l2_del_all_mc() in case of a hard stop to speed up removal of qeth devices. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r--drivers/s390/net/qeth_l2_main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 573b5e564edd..955ba7a31b90 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -395,7 +395,8 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
395 } 395 }
396 if (card->state == CARD_STATE_SOFTSETUP) { 396 if (card->state == CARD_STATE_SOFTSETUP) {
397 qeth_l2_process_vlans(card, 1); 397 qeth_l2_process_vlans(card, 1);
398 qeth_l2_del_all_mc(card); 398 if (!card->use_hard_stop)
399 qeth_l2_del_all_mc(card);
399 qeth_clear_ipacmd_list(card); 400 qeth_clear_ipacmd_list(card);
400 card->state = CARD_STATE_HARDSETUP; 401 card->state = CARD_STATE_HARDSETUP;
401 } 402 }
@@ -826,7 +827,6 @@ static int qeth_l2_open(struct net_device *dev)
826 } 827 }
827 card->data.state = CH_STATE_UP; 828 card->data.state = CH_STATE_UP;
828 card->state = CARD_STATE_UP; 829 card->state = CARD_STATE_UP;
829 card->dev->flags |= IFF_UP;
830 netif_start_queue(dev); 830 netif_start_queue(dev);
831 831
832 if (!card->lan_online && netif_carrier_ok(dev)) 832 if (!card->lan_online && netif_carrier_ok(dev))
@@ -841,7 +841,6 @@ static int qeth_l2_stop(struct net_device *dev)
841 841
842 QETH_DBF_TEXT(TRACE, 4, "qethstop"); 842 QETH_DBF_TEXT(TRACE, 4, "qethstop");
843 netif_tx_disable(dev); 843 netif_tx_disable(dev);
844 card->dev->flags &= ~IFF_UP;
845 if (card->state == CARD_STATE_UP) 844 if (card->state == CARD_STATE_UP)
846 card->state = CARD_STATE_SOFTSETUP; 845 card->state = CARD_STATE_SOFTSETUP;
847 return 0; 846 return 0;
@@ -1138,9 +1137,13 @@ static int qeth_l2_recover(void *ptr)
1138 if (!rc) 1137 if (!rc)
1139 PRINT_INFO("Device %s successfully recovered!\n", 1138 PRINT_INFO("Device %s successfully recovered!\n",
1140 CARD_BUS_ID(card)); 1139 CARD_BUS_ID(card));
1141 else 1140 else {
1141 rtnl_lock();
1142 dev_close(card->dev);
1143 rtnl_unlock();
1142 PRINT_INFO("Device %s could not be recovered!\n", 1144 PRINT_INFO("Device %s could not be recovered!\n",
1143 CARD_BUS_ID(card)); 1145 CARD_BUS_ID(card));
1146 }
1144 return 0; 1147 return 0;
1145} 1148}
1146 1149