aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/net/qeth.h2
-rw-r--r--drivers/s390/net/qeth_main.c22
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index 4df0fcd7b10b..65e2b1bc08a5 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -1099,7 +1099,7 @@ qeth_string_to_ipaddr4(const char *buf, __u8 *addr)
1099 1099
1100 rc = sscanf(buf, "%d.%d.%d.%d%n", 1100 rc = sscanf(buf, "%d.%d.%d.%d%n",
1101 &in[0], &in[1], &in[2], &in[3], &count); 1101 &in[0], &in[1], &in[2], &in[3], &count);
1102 if (rc != 4 || count) 1102 if (rc != 4 || count<=0)
1103 return -EINVAL; 1103 return -EINVAL;
1104 for (count = 0; count < 4; count++) { 1104 for (count = 0; count < 4; count++) {
1105 if (in[count] > 255) 1105 if (in[count] > 255)
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index cb14642d97aa..0f6648fdec1d 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -3817,7 +3817,7 @@ qeth_stop(struct net_device *dev)
3817 3817
3818 card = (struct qeth_card *) dev->priv; 3818 card = (struct qeth_card *) dev->priv;
3819 3819
3820 netif_stop_queue(dev); 3820 netif_tx_disable(dev);
3821 card->dev->flags &= ~IFF_UP; 3821 card->dev->flags &= ~IFF_UP;
3822 if (card->state == CARD_STATE_UP) 3822 if (card->state == CARD_STATE_UP)
3823 card->state = CARD_STATE_SOFTSETUP; 3823 card->state = CARD_STATE_SOFTSETUP;
@@ -6359,12 +6359,9 @@ qeth_netdev_init(struct net_device *dev)
6359 dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; 6359 dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid;
6360 dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; 6360 dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid;
6361#endif 6361#endif
6362 dev->hard_header = card->orig_hard_header;
6363 if (qeth_get_netdev_flags(card) & IFF_NOARP) { 6362 if (qeth_get_netdev_flags(card) & IFF_NOARP) {
6364 dev->rebuild_header = NULL; 6363 dev->rebuild_header = NULL;
6365 dev->hard_header = NULL; 6364 dev->hard_header = NULL;
6366 if (card->options.fake_ll)
6367 dev->hard_header = qeth_fake_header;
6368 dev->header_cache_update = NULL; 6365 dev->header_cache_update = NULL;
6369 dev->hard_header_cache = NULL; 6366 dev->hard_header_cache = NULL;
6370 } 6367 }
@@ -6477,6 +6474,9 @@ retry:
6477 /*network device will be recovered*/ 6474 /*network device will be recovered*/
6478 if (card->dev) { 6475 if (card->dev) {
6479 card->dev->hard_header = card->orig_hard_header; 6476 card->dev->hard_header = card->orig_hard_header;
6477 if (card->options.fake_ll &&
6478 (qeth_get_netdev_flags(card) & IFF_NOARP))
6479 card->dev->hard_header = qeth_fake_header;
6480 return 0; 6480 return 0;
6481 } 6481 }
6482 /* at first set_online allocate netdev */ 6482 /* at first set_online allocate netdev */
@@ -7031,7 +7031,7 @@ qeth_softsetup_ipv6(struct qeth_card *card)
7031 7031
7032 QETH_DBF_TEXT(trace,3,"softipv6"); 7032 QETH_DBF_TEXT(trace,3,"softipv6");
7033 7033
7034 netif_stop_queue(card->dev); 7034 netif_tx_disable(card->dev);
7035 rc = qeth_send_startlan(card, QETH_PROT_IPV6); 7035 rc = qeth_send_startlan(card, QETH_PROT_IPV6);
7036 if (rc) { 7036 if (rc) {
7037 PRINT_ERR("IPv6 startlan failed on %s\n", 7037 PRINT_ERR("IPv6 startlan failed on %s\n",
@@ -7352,7 +7352,8 @@ qeth_set_large_send(struct qeth_card *card, enum qeth_large_send_types type)
7352 card->options.large_send = type; 7352 card->options.large_send = type;
7353 return 0; 7353 return 0;
7354 } 7354 }
7355 netif_stop_queue(card->dev); 7355 if (card->state == CARD_STATE_UP)
7356 netif_tx_disable(card->dev);
7356 card->options.large_send = type; 7357 card->options.large_send = type;
7357 switch (card->options.large_send) { 7358 switch (card->options.large_send) {
7358 case QETH_LARGE_SEND_EDDP: 7359 case QETH_LARGE_SEND_EDDP:
@@ -7374,7 +7375,8 @@ qeth_set_large_send(struct qeth_card *card, enum qeth_large_send_types type)
7374 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); 7375 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG);
7375 break; 7376 break;
7376 } 7377 }
7377 netif_wake_queue(card->dev); 7378 if (card->state == CARD_STATE_UP)
7379 netif_wake_queue(card->dev);
7378 return rc; 7380 return rc;
7379} 7381}
7380 7382
@@ -7427,7 +7429,7 @@ qeth_softsetup_card(struct qeth_card *card)
7427 if ((rc = qeth_setrouting_v6(card))) 7429 if ((rc = qeth_setrouting_v6(card)))
7428 QETH_DBF_TEXT_(setup, 2, "5err%d", rc); 7430 QETH_DBF_TEXT_(setup, 2, "5err%d", rc);
7429out: 7431out:
7430 netif_stop_queue(card->dev); 7432 netif_tx_disable(card->dev);
7431 return 0; 7433 return 0;
7432} 7434}
7433 7435
@@ -7736,10 +7738,8 @@ static int
7736qeth_register_netdev(struct qeth_card *card) 7738qeth_register_netdev(struct qeth_card *card)
7737{ 7739{
7738 QETH_DBF_TEXT(setup, 3, "regnetd"); 7740 QETH_DBF_TEXT(setup, 3, "regnetd");
7739 if (card->dev->reg_state != NETREG_UNINITIALIZED) { 7741 if (card->dev->reg_state != NETREG_UNINITIALIZED)
7740 qeth_netdev_init(card->dev);
7741 return 0; 7742 return 0;
7742 }
7743 /* sysfs magic */ 7743 /* sysfs magic */
7744 SET_NETDEV_DEV(card->dev, &card->gdev->dev); 7744 SET_NETDEV_DEV(card->dev, &card->gdev->dev);
7745 return register_netdev(card->dev); 7745 return register_netdev(card->dev);