diff options
Diffstat (limited to 'drivers/s390/net/qeth_l3_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 82 |
1 files changed, 40 insertions, 42 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 5475834ab916..b3b6e872d806 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -1691,39 +1691,43 @@ qeth_diags_trace_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
1691 | 1691 | ||
1692 | cmd = (struct qeth_ipa_cmd *)data; | 1692 | cmd = (struct qeth_ipa_cmd *)data; |
1693 | rc = cmd->hdr.return_code; | 1693 | rc = cmd->hdr.return_code; |
1694 | if (rc) { | 1694 | if (rc) |
1695 | QETH_DBF_TEXT_(TRACE, 2, "dxter%x", rc); | 1695 | QETH_DBF_TEXT_(TRACE, 2, "dxter%x", rc); |
1696 | if (cmd->data.diagass.action == QETH_DIAGS_CMD_TRACE_ENABLE) { | ||
1697 | switch (rc) { | ||
1698 | case IPA_RC_HARDWARE_AUTH_ERROR: | ||
1699 | dev_warn(&card->gdev->dev, "The device is not " | ||
1700 | "authorized to run as a HiperSockets " | ||
1701 | "network traffic analyzer\n"); | ||
1702 | break; | ||
1703 | case IPA_RC_TRACE_ALREADY_ACTIVE: | ||
1704 | dev_warn(&card->gdev->dev, "A HiperSockets " | ||
1705 | "network traffic analyzer is already " | ||
1706 | "active in the HiperSockets LAN\n"); | ||
1707 | break; | ||
1708 | default: | ||
1709 | break; | ||
1710 | } | ||
1711 | } | ||
1712 | return 0; | ||
1713 | } | ||
1714 | |||
1715 | switch (cmd->data.diagass.action) { | 1696 | switch (cmd->data.diagass.action) { |
1716 | case QETH_DIAGS_CMD_TRACE_QUERY: | 1697 | case QETH_DIAGS_CMD_TRACE_QUERY: |
1717 | break; | 1698 | break; |
1718 | case QETH_DIAGS_CMD_TRACE_DISABLE: | 1699 | case QETH_DIAGS_CMD_TRACE_DISABLE: |
1719 | card->info.promisc_mode = SET_PROMISC_MODE_OFF; | 1700 | switch (rc) { |
1720 | dev_info(&card->gdev->dev, "The HiperSockets network traffic " | 1701 | case 0: |
1721 | "analyzer is deactivated\n"); | 1702 | case IPA_RC_INVALID_SUBCMD: |
1703 | card->info.promisc_mode = SET_PROMISC_MODE_OFF; | ||
1704 | dev_info(&card->gdev->dev, "The HiperSockets network " | ||
1705 | "traffic analyzer is deactivated\n"); | ||
1706 | break; | ||
1707 | default: | ||
1708 | break; | ||
1709 | } | ||
1722 | break; | 1710 | break; |
1723 | case QETH_DIAGS_CMD_TRACE_ENABLE: | 1711 | case QETH_DIAGS_CMD_TRACE_ENABLE: |
1724 | card->info.promisc_mode = SET_PROMISC_MODE_ON; | 1712 | switch (rc) { |
1725 | dev_info(&card->gdev->dev, "The HiperSockets network traffic " | 1713 | case 0: |
1726 | "analyzer is activated\n"); | 1714 | card->info.promisc_mode = SET_PROMISC_MODE_ON; |
1715 | dev_info(&card->gdev->dev, "The HiperSockets network " | ||
1716 | "traffic analyzer is activated\n"); | ||
1717 | break; | ||
1718 | case IPA_RC_HARDWARE_AUTH_ERROR: | ||
1719 | dev_warn(&card->gdev->dev, "The device is not " | ||
1720 | "authorized to run as a HiperSockets network " | ||
1721 | "traffic analyzer\n"); | ||
1722 | break; | ||
1723 | case IPA_RC_TRACE_ALREADY_ACTIVE: | ||
1724 | dev_warn(&card->gdev->dev, "A HiperSockets " | ||
1725 | "network traffic analyzer is already " | ||
1726 | "active in the HiperSockets LAN\n"); | ||
1727 | break; | ||
1728 | default: | ||
1729 | break; | ||
1730 | } | ||
1727 | break; | 1731 | break; |
1728 | default: | 1732 | default: |
1729 | QETH_DBF_MESSAGE(2, "Unknown sniffer action (0x%04x) on %s\n", | 1733 | QETH_DBF_MESSAGE(2, "Unknown sniffer action (0x%04x) on %s\n", |
@@ -2215,11 +2219,9 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode) | |||
2215 | if (recovery_mode) | 2219 | if (recovery_mode) |
2216 | qeth_l3_stop(card->dev); | 2220 | qeth_l3_stop(card->dev); |
2217 | else { | 2221 | else { |
2218 | if (card->dev) { | 2222 | rtnl_lock(); |
2219 | rtnl_lock(); | 2223 | dev_close(card->dev); |
2220 | dev_close(card->dev); | 2224 | rtnl_unlock(); |
2221 | rtnl_unlock(); | ||
2222 | } | ||
2223 | } | 2225 | } |
2224 | if (!card->use_hard_stop) { | 2226 | if (!card->use_hard_stop) { |
2225 | rc = qeth_send_stoplan(card); | 2227 | rc = qeth_send_stoplan(card); |
@@ -2900,10 +2902,8 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2900 | int data_offset = -1; | 2902 | int data_offset = -1; |
2901 | int nr_frags; | 2903 | int nr_frags; |
2902 | 2904 | ||
2903 | if ((card->info.type == QETH_CARD_TYPE_IQD) && | 2905 | if (((card->info.type == QETH_CARD_TYPE_IQD) && (!ipv)) || |
2904 | (((skb->protocol != htons(ETH_P_IPV6)) && | 2906 | card->options.sniffer) |
2905 | (skb->protocol != htons(ETH_P_IP))) || | ||
2906 | card->options.sniffer)) | ||
2907 | goto tx_drop; | 2907 | goto tx_drop; |
2908 | 2908 | ||
2909 | if ((card->state != CARD_STATE_UP) || !card->lan_online) { | 2909 | if ((card->state != CARD_STATE_UP) || !card->lan_online) { |
@@ -2949,14 +2949,14 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2949 | if (data_offset < 0) | 2949 | if (data_offset < 0) |
2950 | skb_pull(new_skb, ETH_HLEN); | 2950 | skb_pull(new_skb, ETH_HLEN); |
2951 | } else { | 2951 | } else { |
2952 | if (new_skb->protocol == htons(ETH_P_IP)) { | 2952 | if (ipv == 4) { |
2953 | if (card->dev->type == ARPHRD_IEEE802_TR) | 2953 | if (card->dev->type == ARPHRD_IEEE802_TR) |
2954 | skb_pull(new_skb, TR_HLEN); | 2954 | skb_pull(new_skb, TR_HLEN); |
2955 | else | 2955 | else |
2956 | skb_pull(new_skb, ETH_HLEN); | 2956 | skb_pull(new_skb, ETH_HLEN); |
2957 | } | 2957 | } |
2958 | 2958 | ||
2959 | if (new_skb->protocol == ETH_P_IPV6 && card->vlangrp && | 2959 | if (ipv == 6 && card->vlangrp && |
2960 | vlan_tx_tag_present(new_skb)) { | 2960 | vlan_tx_tag_present(new_skb)) { |
2961 | skb_push(new_skb, VLAN_HLEN); | 2961 | skb_push(new_skb, VLAN_HLEN); |
2962 | skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4); | 2962 | skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4); |
@@ -3534,11 +3534,9 @@ static int qeth_l3_pm_resume(struct ccwgroup_device *gdev) | |||
3534 | if (card->state == CARD_STATE_RECOVER) { | 3534 | if (card->state == CARD_STATE_RECOVER) { |
3535 | rc = __qeth_l3_set_online(card->gdev, 1); | 3535 | rc = __qeth_l3_set_online(card->gdev, 1); |
3536 | if (rc) { | 3536 | if (rc) { |
3537 | if (card->dev) { | 3537 | rtnl_lock(); |
3538 | rtnl_lock(); | 3538 | dev_close(card->dev); |
3539 | dev_close(card->dev); | 3539 | rtnl_unlock(); |
3540 | rtnl_unlock(); | ||
3541 | } | ||
3542 | } | 3540 | } |
3543 | } else | 3541 | } else |
3544 | rc = __qeth_l3_set_online(card->gdev, 0); | 3542 | rc = __qeth_l3_set_online(card->gdev, 0); |