diff options
Diffstat (limited to 'drivers/s390/net/qeth_main.c')
-rw-r--r-- | drivers/s390/net/qeth_main.c | 108 |
1 files changed, 55 insertions, 53 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index b3c6e7907790..9e671a48cd2f 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -513,7 +513,7 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) | |||
513 | 513 | ||
514 | QETH_DBF_TEXT(setup, 3, "setoffl"); | 514 | QETH_DBF_TEXT(setup, 3, "setoffl"); |
515 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); | 515 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); |
516 | 516 | ||
517 | if (card->dev && netif_carrier_ok(card->dev)) | 517 | if (card->dev && netif_carrier_ok(card->dev)) |
518 | netif_carrier_off(card->dev); | 518 | netif_carrier_off(card->dev); |
519 | recover_flag = card->state; | 519 | recover_flag = card->state; |
@@ -604,13 +604,13 @@ __qeth_ref_ip_on_card(struct qeth_card *card, struct qeth_ipaddr *todo, | |||
604 | list_for_each_entry(addr, &card->ip_list, entry) { | 604 | list_for_each_entry(addr, &card->ip_list, entry) { |
605 | if (card->options.layer2) { | 605 | if (card->options.layer2) { |
606 | if ((addr->type == todo->type) && | 606 | if ((addr->type == todo->type) && |
607 | (memcmp(&addr->mac, &todo->mac, | 607 | (memcmp(&addr->mac, &todo->mac, |
608 | OSA_ADDR_LEN) == 0)) { | 608 | OSA_ADDR_LEN) == 0)) { |
609 | found = 1; | 609 | found = 1; |
610 | break; | 610 | break; |
611 | } | 611 | } |
612 | continue; | 612 | continue; |
613 | } | 613 | } |
614 | if ((addr->proto == QETH_PROT_IPV4) && | 614 | if ((addr->proto == QETH_PROT_IPV4) && |
615 | (todo->proto == QETH_PROT_IPV4) && | 615 | (todo->proto == QETH_PROT_IPV4) && |
616 | (addr->type == todo->type) && | 616 | (addr->type == todo->type) && |
@@ -694,13 +694,13 @@ __qeth_insert_ip_todo(struct qeth_card *card, struct qeth_ipaddr *addr, int add) | |||
694 | if (card->options.layer2) { | 694 | if (card->options.layer2) { |
695 | if ((tmp->type == addr->type) && | 695 | if ((tmp->type == addr->type) && |
696 | (tmp->is_multicast == addr->is_multicast) && | 696 | (tmp->is_multicast == addr->is_multicast) && |
697 | (memcmp(&tmp->mac, &addr->mac, | 697 | (memcmp(&tmp->mac, &addr->mac, |
698 | OSA_ADDR_LEN) == 0)) { | 698 | OSA_ADDR_LEN) == 0)) { |
699 | found = 1; | 699 | found = 1; |
700 | break; | 700 | break; |
701 | } | 701 | } |
702 | continue; | 702 | continue; |
703 | } | 703 | } |
704 | if ((tmp->proto == QETH_PROT_IPV4) && | 704 | if ((tmp->proto == QETH_PROT_IPV4) && |
705 | (addr->proto == QETH_PROT_IPV4) && | 705 | (addr->proto == QETH_PROT_IPV4) && |
706 | (tmp->type == addr->type) && | 706 | (tmp->type == addr->type) && |
@@ -1173,7 +1173,7 @@ qeth_determine_card_type(struct qeth_card *card) | |||
1173 | "due to hardware limitations!\n"); | 1173 | "due to hardware limitations!\n"); |
1174 | card->qdio.no_out_queues = 1; | 1174 | card->qdio.no_out_queues = 1; |
1175 | card->qdio.default_out_queue = 0; | 1175 | card->qdio.default_out_queue = 0; |
1176 | } | 1176 | } |
1177 | return 0; | 1177 | return 0; |
1178 | } | 1178 | } |
1179 | i++; | 1179 | i++; |
@@ -1198,7 +1198,7 @@ qeth_probe_device(struct ccwgroup_device *gdev) | |||
1198 | return -ENODEV; | 1198 | return -ENODEV; |
1199 | 1199 | ||
1200 | QETH_DBF_TEXT_(setup, 2, "%s", gdev->dev.bus_id); | 1200 | QETH_DBF_TEXT_(setup, 2, "%s", gdev->dev.bus_id); |
1201 | 1201 | ||
1202 | card = qeth_alloc_card(); | 1202 | card = qeth_alloc_card(); |
1203 | if (!card) { | 1203 | if (!card) { |
1204 | put_device(dev); | 1204 | put_device(dev); |
@@ -1220,7 +1220,7 @@ qeth_probe_device(struct ccwgroup_device *gdev) | |||
1220 | put_device(dev); | 1220 | put_device(dev); |
1221 | qeth_free_card(card); | 1221 | qeth_free_card(card); |
1222 | return rc; | 1222 | return rc; |
1223 | } | 1223 | } |
1224 | if ((rc = qeth_setup_card(card))){ | 1224 | if ((rc = qeth_setup_card(card))){ |
1225 | QETH_DBF_TEXT_(setup, 2, "2err%d", rc); | 1225 | QETH_DBF_TEXT_(setup, 2, "2err%d", rc); |
1226 | put_device(dev); | 1226 | put_device(dev); |
@@ -1843,7 +1843,7 @@ struct qeth_cmd_buffer *iob) | |||
1843 | &card->seqno.pdu_hdr_ack, QETH_SEQ_NO_LENGTH); | 1843 | &card->seqno.pdu_hdr_ack, QETH_SEQ_NO_LENGTH); |
1844 | QETH_DBF_HEX(control, 2, iob->data, QETH_DBF_CONTROL_LEN); | 1844 | QETH_DBF_HEX(control, 2, iob->data, QETH_DBF_CONTROL_LEN); |
1845 | } | 1845 | } |
1846 | 1846 | ||
1847 | static int | 1847 | static int |
1848 | qeth_send_control_data(struct qeth_card *card, int len, | 1848 | qeth_send_control_data(struct qeth_card *card, int len, |
1849 | struct qeth_cmd_buffer *iob, | 1849 | struct qeth_cmd_buffer *iob, |
@@ -1937,7 +1937,7 @@ qeth_osn_send_control_data(struct qeth_card *card, int len, | |||
1937 | wake_up(&card->wait_q); | 1937 | wake_up(&card->wait_q); |
1938 | } | 1938 | } |
1939 | return rc; | 1939 | return rc; |
1940 | } | 1940 | } |
1941 | 1941 | ||
1942 | static inline void | 1942 | static inline void |
1943 | qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | 1943 | qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, |
@@ -1966,7 +1966,7 @@ qeth_osn_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | |||
1966 | memcpy(QETH_IPA_PDU_LEN_PDU3(iob->data), &s2, 2); | 1966 | memcpy(QETH_IPA_PDU_LEN_PDU3(iob->data), &s2, 2); |
1967 | return qeth_osn_send_control_data(card, s1, iob); | 1967 | return qeth_osn_send_control_data(card, s1, iob); |
1968 | } | 1968 | } |
1969 | 1969 | ||
1970 | static int | 1970 | static int |
1971 | qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | 1971 | qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, |
1972 | int (*reply_cb) | 1972 | int (*reply_cb) |
@@ -2579,7 +2579,7 @@ qeth_process_inbound_buffer(struct qeth_card *card, | |||
2579 | skb->dev = card->dev; | 2579 | skb->dev = card->dev; |
2580 | if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) | 2580 | if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) |
2581 | vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); | 2581 | vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); |
2582 | else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) | 2582 | else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) |
2583 | qeth_rebuild_skb(card, skb, hdr); | 2583 | qeth_rebuild_skb(card, skb, hdr); |
2584 | else { /*in case of OSN*/ | 2584 | else { /*in case of OSN*/ |
2585 | skb_push(skb, sizeof(struct qeth_hdr)); | 2585 | skb_push(skb, sizeof(struct qeth_hdr)); |
@@ -2763,7 +2763,7 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, | |||
2763 | index = i % QDIO_MAX_BUFFERS_PER_Q; | 2763 | index = i % QDIO_MAX_BUFFERS_PER_Q; |
2764 | buffer = &card->qdio.in_q->bufs[index]; | 2764 | buffer = &card->qdio.in_q->bufs[index]; |
2765 | if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && | 2765 | if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && |
2766 | qeth_check_qdio_errors(buffer->buffer, | 2766 | qeth_check_qdio_errors(buffer->buffer, |
2767 | qdio_err, siga_err,"qinerr"))) | 2767 | qdio_err, siga_err,"qinerr"))) |
2768 | qeth_process_inbound_buffer(card, buffer, index); | 2768 | qeth_process_inbound_buffer(card, buffer, index); |
2769 | /* clear buffer and give back to hardware */ | 2769 | /* clear buffer and give back to hardware */ |
@@ -3187,7 +3187,7 @@ qeth_alloc_qdio_buffers(struct qeth_card *card) | |||
3187 | if (card->qdio.state == QETH_QDIO_ALLOCATED) | 3187 | if (card->qdio.state == QETH_QDIO_ALLOCATED) |
3188 | return 0; | 3188 | return 0; |
3189 | 3189 | ||
3190 | card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), | 3190 | card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), |
3191 | GFP_KERNEL|GFP_DMA); | 3191 | GFP_KERNEL|GFP_DMA); |
3192 | if (!card->qdio.in_q) | 3192 | if (!card->qdio.in_q) |
3193 | return - ENOMEM; | 3193 | return - ENOMEM; |
@@ -3476,7 +3476,7 @@ qeth_halt_channels(struct qeth_card *card) | |||
3476 | rc3 = qeth_halt_channel(&card->data); | 3476 | rc3 = qeth_halt_channel(&card->data); |
3477 | if (rc1) | 3477 | if (rc1) |
3478 | return rc1; | 3478 | return rc1; |
3479 | if (rc2) | 3479 | if (rc2) |
3480 | return rc2; | 3480 | return rc2; |
3481 | return rc3; | 3481 | return rc3; |
3482 | } | 3482 | } |
@@ -3491,7 +3491,7 @@ qeth_clear_channels(struct qeth_card *card) | |||
3491 | rc3 = qeth_clear_channel(&card->data); | 3491 | rc3 = qeth_clear_channel(&card->data); |
3492 | if (rc1) | 3492 | if (rc1) |
3493 | return rc1; | 3493 | return rc1; |
3494 | if (rc2) | 3494 | if (rc2) |
3495 | return rc2; | 3495 | return rc2; |
3496 | return rc3; | 3496 | return rc3; |
3497 | } | 3497 | } |
@@ -3798,10 +3798,10 @@ qeth_open(struct net_device *dev) | |||
3798 | QETH_DBF_TEXT(trace,4,"nomacadr"); | 3798 | QETH_DBF_TEXT(trace,4,"nomacadr"); |
3799 | return -EPERM; | 3799 | return -EPERM; |
3800 | } | 3800 | } |
3801 | card->dev->flags |= IFF_UP; | ||
3802 | netif_start_queue(dev); | ||
3803 | card->data.state = CH_STATE_UP; | 3801 | card->data.state = CH_STATE_UP; |
3804 | card->state = CARD_STATE_UP; | 3802 | card->state = CARD_STATE_UP; |
3803 | card->dev->flags |= IFF_UP; | ||
3804 | netif_start_queue(dev); | ||
3805 | 3805 | ||
3806 | if (!card->lan_online && netif_carrier_ok(dev)) | 3806 | if (!card->lan_online && netif_carrier_ok(dev)) |
3807 | netif_carrier_off(dev); | 3807 | netif_carrier_off(dev); |
@@ -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; |
@@ -3958,7 +3958,7 @@ qeth_prepare_skb(struct qeth_card *card, struct sk_buff **skb, | |||
3958 | #endif | 3958 | #endif |
3959 | *hdr = (struct qeth_hdr *) | 3959 | *hdr = (struct qeth_hdr *) |
3960 | qeth_push_skb(card, skb, sizeof(struct qeth_hdr)); | 3960 | qeth_push_skb(card, skb, sizeof(struct qeth_hdr)); |
3961 | if (hdr == NULL) | 3961 | if (*hdr == NULL) |
3962 | return -EINVAL; | 3962 | return -EINVAL; |
3963 | return 0; | 3963 | return 0; |
3964 | } | 3964 | } |
@@ -4098,7 +4098,7 @@ qeth_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | |||
4098 | } | 4098 | } |
4099 | } else { /* passthrough */ | 4099 | } else { /* passthrough */ |
4100 | if((skb->dev->type == ARPHRD_IEEE802_TR) && | 4100 | if((skb->dev->type == ARPHRD_IEEE802_TR) && |
4101 | !memcmp(skb->data + sizeof(struct qeth_hdr) + | 4101 | !memcmp(skb->data + sizeof(struct qeth_hdr) + |
4102 | sizeof(__u16), skb->dev->broadcast, 6)) { | 4102 | sizeof(__u16), skb->dev->broadcast, 6)) { |
4103 | hdr->hdr.l3.flags = QETH_CAST_BROADCAST | | 4103 | hdr->hdr.l3.flags = QETH_CAST_BROADCAST | |
4104 | QETH_HDR_PASSTHRU; | 4104 | QETH_HDR_PASSTHRU; |
@@ -4385,7 +4385,7 @@ out: | |||
4385 | } | 4385 | } |
4386 | 4386 | ||
4387 | static inline int | 4387 | static inline int |
4388 | qeth_get_elements_no(struct qeth_card *card, void *hdr, | 4388 | qeth_get_elements_no(struct qeth_card *card, void *hdr, |
4389 | struct sk_buff *skb, int elems) | 4389 | struct sk_buff *skb, int elems) |
4390 | { | 4390 | { |
4391 | int elements_needed = 0; | 4391 | int elements_needed = 0; |
@@ -4416,6 +4416,8 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4416 | enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; | 4416 | enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; |
4417 | struct qeth_eddp_context *ctx = NULL; | 4417 | struct qeth_eddp_context *ctx = NULL; |
4418 | int tx_bytes = skb->len; | 4418 | int tx_bytes = skb->len; |
4419 | unsigned short nr_frags = skb_shinfo(skb)->nr_frags; | ||
4420 | unsigned short tso_size = skb_shinfo(skb)->tso_size; | ||
4419 | int rc; | 4421 | int rc; |
4420 | 4422 | ||
4421 | QETH_DBF_TEXT(trace, 6, "sendpkt"); | 4423 | QETH_DBF_TEXT(trace, 6, "sendpkt"); |
@@ -4441,7 +4443,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4441 | return 0; | 4443 | return 0; |
4442 | } | 4444 | } |
4443 | cast_type = qeth_get_cast_type(card, skb); | 4445 | cast_type = qeth_get_cast_type(card, skb); |
4444 | if ((cast_type == RTN_BROADCAST) && | 4446 | if ((cast_type == RTN_BROADCAST) && |
4445 | (card->info.broadcast_capable == 0)){ | 4447 | (card->info.broadcast_capable == 0)){ |
4446 | card->stats.tx_dropped++; | 4448 | card->stats.tx_dropped++; |
4447 | card->stats.tx_errors++; | 4449 | card->stats.tx_errors++; |
@@ -4463,7 +4465,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4463 | card->stats.tx_errors++; | 4465 | card->stats.tx_errors++; |
4464 | dev_kfree_skb_any(skb); | 4466 | dev_kfree_skb_any(skb); |
4465 | return NETDEV_TX_OK; | 4467 | return NETDEV_TX_OK; |
4466 | } | 4468 | } |
4467 | elements_needed++; | 4469 | elements_needed++; |
4468 | } else { | 4470 | } else { |
4469 | if ((rc = qeth_prepare_skb(card, &skb, &hdr, ipv))) { | 4471 | if ((rc = qeth_prepare_skb(card, &skb, &hdr, ipv))) { |
@@ -4498,16 +4500,16 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4498 | card->stats.tx_packets++; | 4500 | card->stats.tx_packets++; |
4499 | card->stats.tx_bytes += tx_bytes; | 4501 | card->stats.tx_bytes += tx_bytes; |
4500 | #ifdef CONFIG_QETH_PERF_STATS | 4502 | #ifdef CONFIG_QETH_PERF_STATS |
4501 | if (skb_shinfo(skb)->tso_size && | 4503 | if (tso_size && |
4502 | !(large_send == QETH_LARGE_SEND_NO)) { | 4504 | !(large_send == QETH_LARGE_SEND_NO)) { |
4503 | card->perf_stats.large_send_bytes += skb->len; | 4505 | card->perf_stats.large_send_bytes += tx_bytes; |
4504 | card->perf_stats.large_send_cnt++; | 4506 | card->perf_stats.large_send_cnt++; |
4505 | } | 4507 | } |
4506 | if (skb_shinfo(skb)->nr_frags > 0){ | 4508 | if (nr_frags > 0){ |
4507 | card->perf_stats.sg_skbs_sent++; | 4509 | card->perf_stats.sg_skbs_sent++; |
4508 | /* nr_frags + skb->data */ | 4510 | /* nr_frags + skb->data */ |
4509 | card->perf_stats.sg_frags_sent += | 4511 | card->perf_stats.sg_frags_sent += |
4510 | skb_shinfo(skb)->nr_frags + 1; | 4512 | nr_frags + 1; |
4511 | } | 4513 | } |
4512 | #endif /* CONFIG_QETH_PERF_STATS */ | 4514 | #endif /* CONFIG_QETH_PERF_STATS */ |
4513 | } | 4515 | } |
@@ -5373,7 +5375,7 @@ qeth_layer2_send_setdelvlan_cb(struct qeth_card *card, | |||
5373 | cmd = (struct qeth_ipa_cmd *) data; | 5375 | cmd = (struct qeth_ipa_cmd *) data; |
5374 | if (cmd->hdr.return_code) { | 5376 | if (cmd->hdr.return_code) { |
5375 | PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " | 5377 | PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " |
5376 | "Continuing\n",cmd->data.setdelvlan.vlan_id, | 5378 | "Continuing\n",cmd->data.setdelvlan.vlan_id, |
5377 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); | 5379 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); |
5378 | QETH_DBF_TEXT_(trace, 2, "L2VL%4x", cmd->hdr.command); | 5380 | QETH_DBF_TEXT_(trace, 2, "L2VL%4x", cmd->hdr.command); |
5379 | QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); | 5381 | QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); |
@@ -5393,7 +5395,7 @@ qeth_layer2_send_setdelvlan(struct qeth_card *card, __u16 i, | |||
5393 | iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); | 5395 | iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); |
5394 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | 5396 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
5395 | cmd->data.setdelvlan.vlan_id = i; | 5397 | cmd->data.setdelvlan.vlan_id = i; |
5396 | return qeth_send_ipa_cmd(card, iob, | 5398 | return qeth_send_ipa_cmd(card, iob, |
5397 | qeth_layer2_send_setdelvlan_cb, NULL); | 5399 | qeth_layer2_send_setdelvlan_cb, NULL); |
5398 | } | 5400 | } |
5399 | 5401 | ||
@@ -5457,7 +5459,7 @@ qeth_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | |||
5457 | * Examine hardware response to SET_PROMISC_MODE | 5459 | * Examine hardware response to SET_PROMISC_MODE |
5458 | */ | 5460 | */ |
5459 | static int | 5461 | static int |
5460 | qeth_setadp_promisc_mode_cb(struct qeth_card *card, | 5462 | qeth_setadp_promisc_mode_cb(struct qeth_card *card, |
5461 | struct qeth_reply *reply, | 5463 | struct qeth_reply *reply, |
5462 | unsigned long data) | 5464 | unsigned long data) |
5463 | { | 5465 | { |
@@ -5468,10 +5470,10 @@ qeth_setadp_promisc_mode_cb(struct qeth_card *card, | |||
5468 | 5470 | ||
5469 | cmd = (struct qeth_ipa_cmd *) data; | 5471 | cmd = (struct qeth_ipa_cmd *) data; |
5470 | setparms = &(cmd->data.setadapterparms); | 5472 | setparms = &(cmd->data.setadapterparms); |
5471 | 5473 | ||
5472 | qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd); | 5474 | qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd); |
5473 | if (cmd->hdr.return_code) { | 5475 | if (cmd->hdr.return_code) { |
5474 | QETH_DBF_TEXT_(trace,4,"prmrc%2.2x",cmd->hdr.return_code); | 5476 | QETH_DBF_TEXT_(trace,4,"prmrc%2.2x",cmd->hdr.return_code); |
5475 | setparms->data.mode = SET_PROMISC_MODE_OFF; | 5477 | setparms->data.mode = SET_PROMISC_MODE_OFF; |
5476 | } | 5478 | } |
5477 | card->info.promisc_mode = setparms->data.mode; | 5479 | card->info.promisc_mode = setparms->data.mode; |
@@ -5517,7 +5519,7 @@ qeth_set_multicast_list(struct net_device *dev) | |||
5517 | 5519 | ||
5518 | if (card->info.type == QETH_CARD_TYPE_OSN) | 5520 | if (card->info.type == QETH_CARD_TYPE_OSN) |
5519 | return ; | 5521 | return ; |
5520 | 5522 | ||
5521 | QETH_DBF_TEXT(trace, 3, "setmulti"); | 5523 | QETH_DBF_TEXT(trace, 3, "setmulti"); |
5522 | qeth_delete_mc_addresses(card); | 5524 | qeth_delete_mc_addresses(card); |
5523 | if (card->options.layer2) { | 5525 | if (card->options.layer2) { |
@@ -5575,7 +5577,7 @@ qeth_osn_assist(struct net_device *dev, | |||
5575 | struct qeth_cmd_buffer *iob; | 5577 | struct qeth_cmd_buffer *iob; |
5576 | struct qeth_card *card; | 5578 | struct qeth_card *card; |
5577 | int rc; | 5579 | int rc; |
5578 | 5580 | ||
5579 | QETH_DBF_TEXT(trace, 2, "osnsdmc"); | 5581 | QETH_DBF_TEXT(trace, 2, "osnsdmc"); |
5580 | if (!dev) | 5582 | if (!dev) |
5581 | return -ENODEV; | 5583 | return -ENODEV; |
@@ -5654,7 +5656,7 @@ qeth_osn_deregister(struct net_device * dev) | |||
5654 | card->osn_info.data_cb = NULL; | 5656 | card->osn_info.data_cb = NULL; |
5655 | return; | 5657 | return; |
5656 | } | 5658 | } |
5657 | 5659 | ||
5658 | static void | 5660 | static void |
5659 | qeth_delete_mc_addresses(struct qeth_card *card) | 5661 | qeth_delete_mc_addresses(struct qeth_card *card) |
5660 | { | 5662 | { |
@@ -5818,7 +5820,7 @@ qeth_add_multicast_ipv6(struct qeth_card *card) | |||
5818 | struct inet6_dev *in6_dev; | 5820 | struct inet6_dev *in6_dev; |
5819 | 5821 | ||
5820 | QETH_DBF_TEXT(trace,4,"chkmcv6"); | 5822 | QETH_DBF_TEXT(trace,4,"chkmcv6"); |
5821 | if (!qeth_is_supported(card, IPA_IPV6)) | 5823 | if (!qeth_is_supported(card, IPA_IPV6)) |
5822 | return ; | 5824 | return ; |
5823 | in6_dev = in6_dev_get(card->dev); | 5825 | in6_dev = in6_dev_get(card->dev); |
5824 | if (in6_dev == NULL) | 5826 | if (in6_dev == NULL) |
@@ -6359,12 +6361,9 @@ qeth_netdev_init(struct net_device *dev) | |||
6359 | dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; | 6361 | dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; |
6360 | dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; | 6362 | dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; |
6361 | #endif | 6363 | #endif |
6362 | dev->hard_header = card->orig_hard_header; | ||
6363 | if (qeth_get_netdev_flags(card) & IFF_NOARP) { | 6364 | if (qeth_get_netdev_flags(card) & IFF_NOARP) { |
6364 | dev->rebuild_header = NULL; | 6365 | dev->rebuild_header = NULL; |
6365 | dev->hard_header = NULL; | 6366 | dev->hard_header = NULL; |
6366 | if (card->options.fake_ll) | ||
6367 | dev->hard_header = qeth_fake_header; | ||
6368 | dev->header_cache_update = NULL; | 6367 | dev->header_cache_update = NULL; |
6369 | dev->hard_header_cache = NULL; | 6368 | dev->hard_header_cache = NULL; |
6370 | } | 6369 | } |
@@ -6373,6 +6372,9 @@ qeth_netdev_init(struct net_device *dev) | |||
6373 | if (!(card->info.unique_id & UNIQUE_ID_NOT_BY_CARD)) | 6372 | if (!(card->info.unique_id & UNIQUE_ID_NOT_BY_CARD)) |
6374 | card->dev->dev_id = card->info.unique_id & 0xffff; | 6373 | card->dev->dev_id = card->info.unique_id & 0xffff; |
6375 | #endif | 6374 | #endif |
6375 | if (card->options.fake_ll && | ||
6376 | (qeth_get_netdev_flags(card) & IFF_NOARP)) | ||
6377 | dev->hard_header = qeth_fake_header; | ||
6376 | dev->hard_header_parse = NULL; | 6378 | dev->hard_header_parse = NULL; |
6377 | dev->set_mac_address = qeth_layer2_set_mac_address; | 6379 | dev->set_mac_address = qeth_layer2_set_mac_address; |
6378 | dev->flags |= qeth_get_netdev_flags(card); | 6380 | dev->flags |= qeth_get_netdev_flags(card); |
@@ -6477,6 +6479,9 @@ retry: | |||
6477 | /*network device will be recovered*/ | 6479 | /*network device will be recovered*/ |
6478 | if (card->dev) { | 6480 | if (card->dev) { |
6479 | card->dev->hard_header = card->orig_hard_header; | 6481 | card->dev->hard_header = card->orig_hard_header; |
6482 | if (card->options.fake_ll && | ||
6483 | (qeth_get_netdev_flags(card) & IFF_NOARP)) | ||
6484 | card->dev->hard_header = qeth_fake_header; | ||
6480 | return 0; | 6485 | return 0; |
6481 | } | 6486 | } |
6482 | /* at first set_online allocate netdev */ | 6487 | /* at first set_online allocate netdev */ |
@@ -6584,7 +6589,7 @@ qeth_setadpparms_change_macaddr_cb(struct qeth_card *card, | |||
6584 | 6589 | ||
6585 | cmd = (struct qeth_ipa_cmd *) data; | 6590 | cmd = (struct qeth_ipa_cmd *) data; |
6586 | if (!card->options.layer2 || card->info.guestlan || | 6591 | if (!card->options.layer2 || card->info.guestlan || |
6587 | !(card->info.mac_bits & QETH_LAYER2_MAC_READ)) { | 6592 | !(card->info.mac_bits & QETH_LAYER2_MAC_READ)) { |
6588 | memcpy(card->dev->dev_addr, | 6593 | memcpy(card->dev->dev_addr, |
6589 | &cmd->data.setadapterparms.data.change_addr.addr, | 6594 | &cmd->data.setadapterparms.data.change_addr.addr, |
6590 | OSA_ADDR_LEN); | 6595 | OSA_ADDR_LEN); |
@@ -7031,14 +7036,12 @@ qeth_softsetup_ipv6(struct qeth_card *card) | |||
7031 | 7036 | ||
7032 | QETH_DBF_TEXT(trace,3,"softipv6"); | 7037 | QETH_DBF_TEXT(trace,3,"softipv6"); |
7033 | 7038 | ||
7034 | netif_stop_queue(card->dev); | ||
7035 | rc = qeth_send_startlan(card, QETH_PROT_IPV6); | 7039 | rc = qeth_send_startlan(card, QETH_PROT_IPV6); |
7036 | if (rc) { | 7040 | if (rc) { |
7037 | PRINT_ERR("IPv6 startlan failed on %s\n", | 7041 | PRINT_ERR("IPv6 startlan failed on %s\n", |
7038 | QETH_CARD_IFNAME(card)); | 7042 | QETH_CARD_IFNAME(card)); |
7039 | return rc; | 7043 | return rc; |
7040 | } | 7044 | } |
7041 | netif_wake_queue(card->dev); | ||
7042 | rc = qeth_query_ipassists(card,QETH_PROT_IPV6); | 7045 | rc = qeth_query_ipassists(card,QETH_PROT_IPV6); |
7043 | if (rc) { | 7046 | if (rc) { |
7044 | PRINT_ERR("IPv6 query ipassist failed on %s\n", | 7047 | PRINT_ERR("IPv6 query ipassist failed on %s\n", |
@@ -7352,7 +7355,8 @@ qeth_set_large_send(struct qeth_card *card, enum qeth_large_send_types type) | |||
7352 | card->options.large_send = type; | 7355 | card->options.large_send = type; |
7353 | return 0; | 7356 | return 0; |
7354 | } | 7357 | } |
7355 | netif_stop_queue(card->dev); | 7358 | if (card->state == CARD_STATE_UP) |
7359 | netif_tx_disable(card->dev); | ||
7356 | card->options.large_send = type; | 7360 | card->options.large_send = type; |
7357 | switch (card->options.large_send) { | 7361 | switch (card->options.large_send) { |
7358 | case QETH_LARGE_SEND_EDDP: | 7362 | case QETH_LARGE_SEND_EDDP: |
@@ -7374,7 +7378,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); | 7378 | card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); |
7375 | break; | 7379 | break; |
7376 | } | 7380 | } |
7377 | netif_wake_queue(card->dev); | 7381 | if (card->state == CARD_STATE_UP) |
7382 | netif_wake_queue(card->dev); | ||
7378 | return rc; | 7383 | return rc; |
7379 | } | 7384 | } |
7380 | 7385 | ||
@@ -7427,7 +7432,7 @@ qeth_softsetup_card(struct qeth_card *card) | |||
7427 | if ((rc = qeth_setrouting_v6(card))) | 7432 | if ((rc = qeth_setrouting_v6(card))) |
7428 | QETH_DBF_TEXT_(setup, 2, "5err%d", rc); | 7433 | QETH_DBF_TEXT_(setup, 2, "5err%d", rc); |
7429 | out: | 7434 | out: |
7430 | netif_stop_queue(card->dev); | 7435 | netif_tx_disable(card->dev); |
7431 | return 0; | 7436 | return 0; |
7432 | } | 7437 | } |
7433 | 7438 | ||
@@ -7567,7 +7572,7 @@ qeth_stop_card(struct qeth_card *card, int recovery_mode) | |||
7567 | if (card->read.state == CH_STATE_UP && | 7572 | if (card->read.state == CH_STATE_UP && |
7568 | card->write.state == CH_STATE_UP && | 7573 | card->write.state == CH_STATE_UP && |
7569 | (card->state == CARD_STATE_UP)) { | 7574 | (card->state == CARD_STATE_UP)) { |
7570 | if (recovery_mode && | 7575 | if (recovery_mode && |
7571 | card->info.type != QETH_CARD_TYPE_OSN) { | 7576 | card->info.type != QETH_CARD_TYPE_OSN) { |
7572 | qeth_stop(card->dev); | 7577 | qeth_stop(card->dev); |
7573 | } else { | 7578 | } else { |
@@ -7736,10 +7741,8 @@ static int | |||
7736 | qeth_register_netdev(struct qeth_card *card) | 7741 | qeth_register_netdev(struct qeth_card *card) |
7737 | { | 7742 | { |
7738 | QETH_DBF_TEXT(setup, 3, "regnetd"); | 7743 | QETH_DBF_TEXT(setup, 3, "regnetd"); |
7739 | if (card->dev->reg_state != NETREG_UNINITIALIZED) { | 7744 | if (card->dev->reg_state != NETREG_UNINITIALIZED) |
7740 | qeth_netdev_init(card->dev); | ||
7741 | return 0; | 7745 | return 0; |
7742 | } | ||
7743 | /* sysfs magic */ | 7746 | /* sysfs magic */ |
7744 | SET_NETDEV_DEV(card->dev, &card->gdev->dev); | 7747 | SET_NETDEV_DEV(card->dev, &card->gdev->dev); |
7745 | return register_netdev(card->dev); | 7748 | return register_netdev(card->dev); |
@@ -7750,7 +7753,7 @@ qeth_start_again(struct qeth_card *card, int recovery_mode) | |||
7750 | { | 7753 | { |
7751 | QETH_DBF_TEXT(setup ,2, "startag"); | 7754 | QETH_DBF_TEXT(setup ,2, "startag"); |
7752 | 7755 | ||
7753 | if (recovery_mode && | 7756 | if (recovery_mode && |
7754 | card->info.type != QETH_CARD_TYPE_OSN) { | 7757 | card->info.type != QETH_CARD_TYPE_OSN) { |
7755 | qeth_open(card->dev); | 7758 | qeth_open(card->dev); |
7756 | } else { | 7759 | } else { |
@@ -8014,7 +8017,6 @@ static int (*qeth_old_arp_constructor) (struct neighbour *); | |||
8014 | 8017 | ||
8015 | static struct neigh_ops arp_direct_ops_template = { | 8018 | static struct neigh_ops arp_direct_ops_template = { |
8016 | .family = AF_INET, | 8019 | .family = AF_INET, |
8017 | .destructor = NULL, | ||
8018 | .solicit = NULL, | 8020 | .solicit = NULL, |
8019 | .error_report = NULL, | 8021 | .error_report = NULL, |
8020 | .output = dev_queue_xmit, | 8022 | .output = dev_queue_xmit, |