diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 22:06:19 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 22:06:19 -0400 |
commit | 3c8c7b2f32c52b259daa7564fefd582146799b23 (patch) | |
tree | 59ff1ad0d6b7821d474d8fccafd884703684b6d7 /drivers/s390 | |
parent | 7cb3cd090c2725b80561958a362c2ba15a7a8c86 (diff) | |
parent | 9123e0d78990246304fe681167b8d8097f1e02d7 (diff) |
Merge branch 'upstream-fixes'
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth.h | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 41 |
2 files changed, 21 insertions, 22 deletions
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index 2ad4797ce024..9963479ba89f 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h | |||
@@ -686,6 +686,7 @@ struct qeth_seqno { | |||
686 | __u32 pdu_hdr; | 686 | __u32 pdu_hdr; |
687 | __u32 pdu_hdr_ack; | 687 | __u32 pdu_hdr_ack; |
688 | __u16 ipa; | 688 | __u16 ipa; |
689 | __u32 pkt_seqno; | ||
689 | }; | 690 | }; |
690 | 691 | ||
691 | struct qeth_reply { | 692 | struct qeth_reply { |
@@ -848,6 +849,7 @@ qeth_realloc_headroom(struct qeth_card *card, struct sk_buff **skb, int size) | |||
848 | "on interface %s", QETH_CARD_IFNAME(card)); | 849 | "on interface %s", QETH_CARD_IFNAME(card)); |
849 | return -ENOMEM; | 850 | return -ENOMEM; |
850 | } | 851 | } |
852 | kfree_skb(*skb); | ||
851 | *skb = new_skb; | 853 | *skb = new_skb; |
852 | } | 854 | } |
853 | return 0; | 855 | return 0; |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 86582cf1e19e..bd28e2438d7f 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -511,7 +511,7 @@ static int | |||
511 | __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) | 511 | __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) |
512 | { | 512 | { |
513 | struct qeth_card *card = (struct qeth_card *) cgdev->dev.driver_data; | 513 | struct qeth_card *card = (struct qeth_card *) cgdev->dev.driver_data; |
514 | int rc = 0; | 514 | int rc = 0, rc2 = 0, rc3 = 0; |
515 | enum qeth_card_states recover_flag; | 515 | enum qeth_card_states recover_flag; |
516 | 516 | ||
517 | QETH_DBF_TEXT(setup, 3, "setoffl"); | 517 | QETH_DBF_TEXT(setup, 3, "setoffl"); |
@@ -523,11 +523,13 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) | |||
523 | CARD_BUS_ID(card)); | 523 | CARD_BUS_ID(card)); |
524 | return -ERESTARTSYS; | 524 | return -ERESTARTSYS; |
525 | } | 525 | } |
526 | if ((rc = ccw_device_set_offline(CARD_DDEV(card))) || | 526 | rc = ccw_device_set_offline(CARD_DDEV(card)); |
527 | (rc = ccw_device_set_offline(CARD_WDEV(card))) || | 527 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); |
528 | (rc = ccw_device_set_offline(CARD_RDEV(card)))) { | 528 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); |
529 | if (!rc) | ||
530 | rc = (rc2) ? rc2 : rc3; | ||
531 | if (rc) | ||
529 | QETH_DBF_TEXT_(setup, 2, "1err%d", rc); | 532 | QETH_DBF_TEXT_(setup, 2, "1err%d", rc); |
530 | } | ||
531 | if (recover_flag == CARD_STATE_UP) | 533 | if (recover_flag == CARD_STATE_UP) |
532 | card->state = CARD_STATE_RECOVER; | 534 | card->state = CARD_STATE_RECOVER; |
533 | qeth_notify_processes(); | 535 | qeth_notify_processes(); |
@@ -1046,6 +1048,7 @@ qeth_setup_card(struct qeth_card *card) | |||
1046 | spin_lock_init(&card->vlanlock); | 1048 | spin_lock_init(&card->vlanlock); |
1047 | card->vlangrp = NULL; | 1049 | card->vlangrp = NULL; |
1048 | #endif | 1050 | #endif |
1051 | spin_lock_init(&card->lock); | ||
1049 | spin_lock_init(&card->ip_lock); | 1052 | spin_lock_init(&card->ip_lock); |
1050 | spin_lock_init(&card->thread_mask_lock); | 1053 | spin_lock_init(&card->thread_mask_lock); |
1051 | card->thread_start_mask = 0; | 1054 | card->thread_start_mask = 0; |
@@ -1626,16 +1629,6 @@ qeth_cmd_timeout(unsigned long data) | |||
1626 | spin_unlock_irqrestore(&reply->card->lock, flags); | 1629 | spin_unlock_irqrestore(&reply->card->lock, flags); |
1627 | } | 1630 | } |
1628 | 1631 | ||
1629 | static void | ||
1630 | qeth_reset_ip_addresses(struct qeth_card *card) | ||
1631 | { | ||
1632 | QETH_DBF_TEXT(trace, 2, "rstipadd"); | ||
1633 | |||
1634 | qeth_clear_ip_list(card, 0, 1); | ||
1635 | /* this function will also schedule the SET_IP_THREAD */ | ||
1636 | qeth_set_multicast_list(card->dev); | ||
1637 | } | ||
1638 | |||
1639 | static struct qeth_ipa_cmd * | 1632 | static struct qeth_ipa_cmd * |
1640 | qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) | 1633 | qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) |
1641 | { | 1634 | { |
@@ -1664,9 +1657,8 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) | |||
1664 | "IP address reset.\n", | 1657 | "IP address reset.\n", |
1665 | QETH_CARD_IFNAME(card), | 1658 | QETH_CARD_IFNAME(card), |
1666 | card->info.chpid); | 1659 | card->info.chpid); |
1667 | card->lan_online = 1; | ||
1668 | netif_carrier_on(card->dev); | 1660 | netif_carrier_on(card->dev); |
1669 | qeth_reset_ip_addresses(card); | 1661 | qeth_schedule_recovery(card); |
1670 | return NULL; | 1662 | return NULL; |
1671 | case IPA_CMD_REGISTER_LOCAL_ADDR: | 1663 | case IPA_CMD_REGISTER_LOCAL_ADDR: |
1672 | QETH_DBF_TEXT(trace,3, "irla"); | 1664 | QETH_DBF_TEXT(trace,3, "irla"); |
@@ -2387,6 +2379,7 @@ qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, | |||
2387 | skb_pull(skb, VLAN_HLEN); | 2379 | skb_pull(skb, VLAN_HLEN); |
2388 | } | 2380 | } |
2389 | #endif | 2381 | #endif |
2382 | *((__u32 *)skb->cb) = ++card->seqno.pkt_seqno; | ||
2390 | return vlan_id; | 2383 | return vlan_id; |
2391 | } | 2384 | } |
2392 | 2385 | ||
@@ -3014,7 +3007,7 @@ qeth_alloc_buffer_pool(struct qeth_card *card) | |||
3014 | return -ENOMEM; | 3007 | return -ENOMEM; |
3015 | } | 3008 | } |
3016 | for(j = 0; j < QETH_MAX_BUFFER_ELEMENTS(card); ++j){ | 3009 | for(j = 0; j < QETH_MAX_BUFFER_ELEMENTS(card); ++j){ |
3017 | ptr = (void *) __get_free_page(GFP_KERNEL); | 3010 | ptr = (void *) __get_free_page(GFP_KERNEL|GFP_DMA); |
3018 | if (!ptr) { | 3011 | if (!ptr) { |
3019 | while (j > 0) | 3012 | while (j > 0) |
3020 | free_page((unsigned long) | 3013 | free_page((unsigned long) |
@@ -3058,7 +3051,8 @@ qeth_alloc_qdio_buffers(struct qeth_card *card) | |||
3058 | if (card->qdio.state == QETH_QDIO_ALLOCATED) | 3051 | if (card->qdio.state == QETH_QDIO_ALLOCATED) |
3059 | return 0; | 3052 | return 0; |
3060 | 3053 | ||
3061 | card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), GFP_KERNEL); | 3054 | card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), |
3055 | GFP_KERNEL|GFP_DMA); | ||
3062 | if (!card->qdio.in_q) | 3056 | if (!card->qdio.in_q) |
3063 | return - ENOMEM; | 3057 | return - ENOMEM; |
3064 | QETH_DBF_TEXT(setup, 2, "inq"); | 3058 | QETH_DBF_TEXT(setup, 2, "inq"); |
@@ -3083,7 +3077,7 @@ qeth_alloc_qdio_buffers(struct qeth_card *card) | |||
3083 | } | 3077 | } |
3084 | for (i = 0; i < card->qdio.no_out_queues; ++i){ | 3078 | for (i = 0; i < card->qdio.no_out_queues; ++i){ |
3085 | card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q), | 3079 | card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q), |
3086 | GFP_KERNEL); | 3080 | GFP_KERNEL|GFP_DMA); |
3087 | if (!card->qdio.out_qs[i]){ | 3081 | if (!card->qdio.out_qs[i]){ |
3088 | while (i > 0) | 3082 | while (i > 0) |
3089 | kfree(card->qdio.out_qs[--i]); | 3083 | kfree(card->qdio.out_qs[--i]); |
@@ -5200,7 +5194,7 @@ qeth_free_vlan_addresses4(struct qeth_card *card, unsigned short vid) | |||
5200 | if (!card->vlangrp) | 5194 | if (!card->vlangrp) |
5201 | return; | 5195 | return; |
5202 | rcu_read_lock(); | 5196 | rcu_read_lock(); |
5203 | in_dev = __in_dev_get(card->vlangrp->vlan_devices[vid]); | 5197 | in_dev = __in_dev_get_rcu(card->vlangrp->vlan_devices[vid]); |
5204 | if (!in_dev) | 5198 | if (!in_dev) |
5205 | goto out; | 5199 | goto out; |
5206 | for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { | 5200 | for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { |
@@ -6470,6 +6464,9 @@ qeth_query_ipassists_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
6470 | if (cmd->hdr.prot_version == QETH_PROT_IPV4) { | 6464 | if (cmd->hdr.prot_version == QETH_PROT_IPV4) { |
6471 | card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported; | 6465 | card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported; |
6472 | card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled; | 6466 | card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled; |
6467 | /* Disable IPV6 support hard coded for Hipersockets */ | ||
6468 | if(card->info.type == QETH_CARD_TYPE_IQD) | ||
6469 | card->options.ipa4.supported_funcs &= ~IPA_IPV6; | ||
6473 | } else { | 6470 | } else { |
6474 | #ifdef CONFIG_QETH_IPV6 | 6471 | #ifdef CONFIG_QETH_IPV6 |
6475 | card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported; | 6472 | card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported; |
@@ -7725,7 +7722,7 @@ qeth_arp_constructor(struct neighbour *neigh) | |||
7725 | goto out; | 7722 | goto out; |
7726 | 7723 | ||
7727 | rcu_read_lock(); | 7724 | rcu_read_lock(); |
7728 | in_dev = rcu_dereference(__in_dev_get(dev)); | 7725 | in_dev = __in_dev_get_rcu(dev); |
7729 | if (in_dev == NULL) { | 7726 | if (in_dev == NULL) { |
7730 | rcu_read_unlock(); | 7727 | rcu_read_unlock(); |
7731 | return -EINVAL; | 7728 | return -EINVAL; |