aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net')
-rw-r--r--drivers/s390/net/ctcm_dbug.c1
-rw-r--r--drivers/s390/net/ctcm_sysfs.c1
-rw-r--r--drivers/s390/net/fsm.c1
-rw-r--r--drivers/s390/net/lcs.c1
-rw-r--r--drivers/s390/net/qeth_core.h3
-rw-r--r--drivers/s390/net/qeth_core_main.c6
-rw-r--r--drivers/s390/net/qeth_core_sys.c3
-rw-r--r--drivers/s390/net/qeth_l2_main.c17
-rw-r--r--drivers/s390/net/qeth_l3_main.c83
-rw-r--r--drivers/s390/net/qeth_l3_sys.c2
-rw-r--r--drivers/s390/net/smsgiucv.c1
-rw-r--r--drivers/s390/net/smsgiucv_app.c1
12 files changed, 63 insertions, 57 deletions
diff --git a/drivers/s390/net/ctcm_dbug.c b/drivers/s390/net/ctcm_dbug.c
index 1ca58f153470..d962fd741a23 100644
--- a/drivers/s390/net/ctcm_dbug.c
+++ b/drivers/s390/net/ctcm_dbug.c
@@ -10,7 +10,6 @@
10#include <linux/string.h> 10#include <linux/string.h>
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/slab.h>
14#include <linux/ctype.h> 13#include <linux/ctype.h>
15#include <linux/sysctl.h> 14#include <linux/sysctl.h>
16#include <linux/module.h> 15#include <linux/module.h>
diff --git a/drivers/s390/net/ctcm_sysfs.c b/drivers/s390/net/ctcm_sysfs.c
index 738ad26c74a7..2b24550e865e 100644
--- a/drivers/s390/net/ctcm_sysfs.c
+++ b/drivers/s390/net/ctcm_sysfs.c
@@ -14,6 +14,7 @@
14#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt 14#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
15 15
16#include <linux/sysfs.h> 16#include <linux/sysfs.h>
17#include <linux/slab.h>
17#include "ctcm_main.h" 18#include "ctcm_main.h"
18 19
19/* 20/*
diff --git a/drivers/s390/net/fsm.c b/drivers/s390/net/fsm.c
index cae48cbc5e96..e5dea67f902e 100644
--- a/drivers/s390/net/fsm.c
+++ b/drivers/s390/net/fsm.c
@@ -5,6 +5,7 @@
5 5
6#include "fsm.h" 6#include "fsm.h"
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/slab.h>
8#include <linux/timer.h> 9#include <linux/timer.h>
9 10
10MODULE_AUTHOR("(C) 2000 IBM Corp. by Fritz Elfert (felfert@millenux.com)"); 11MODULE_AUTHOR("(C) 2000 IBM Corp. by Fritz Elfert (felfert@millenux.com)");
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index f6cc46dc0501..9b19ea13b4d8 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -37,6 +37,7 @@
37#include <linux/igmp.h> 37#include <linux/igmp.h>
38#include <linux/delay.h> 38#include <linux/delay.h>
39#include <linux/kthread.h> 39#include <linux/kthread.h>
40#include <linux/slab.h>
40#include <net/arp.h> 41#include <net/arp.h>
41#include <net/ip.h> 42#include <net/ip.h>
42 43
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index a3ac4456e0b1..fcd005aad989 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -763,7 +763,8 @@ static inline int qeth_get_micros(void)
763 763
764static inline int qeth_get_ip_version(struct sk_buff *skb) 764static inline int qeth_get_ip_version(struct sk_buff *skb)
765{ 765{
766 switch (skb->protocol) { 766 struct ethhdr *ehdr = (struct ethhdr *)skb->data;
767 switch (ehdr->h_proto) {
767 case ETH_P_IPV6: 768 case ETH_P_IPV6:
768 return 6; 769 return 6;
769 case ETH_P_IP: 770 case ETH_P_IP:
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 7d25bdd443cd..3ba738b2e271 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -20,6 +20,7 @@
20#include <linux/tcp.h> 20#include <linux/tcp.h>
21#include <linux/mii.h> 21#include <linux/mii.h>
22#include <linux/kthread.h> 22#include <linux/kthread.h>
23#include <linux/slab.h>
23 24
24#include <asm/ebcdic.h> 25#include <asm/ebcdic.h>
25#include <asm/io.h> 26#include <asm/io.h>
@@ -537,7 +538,8 @@ static void qeth_send_control_data_cb(struct qeth_channel *channel,
537 dev_err(&card->gdev->dev, 538 dev_err(&card->gdev->dev,
538 "The qeth device is not configured " 539 "The qeth device is not configured "
539 "for the OSI layer required by z/VM\n"); 540 "for the OSI layer required by z/VM\n");
540 qeth_schedule_recovery(card); 541 else
542 qeth_schedule_recovery(card);
541 goto out; 543 goto out;
542 } 544 }
543 545
@@ -1113,8 +1115,6 @@ static int qeth_setup_card(struct qeth_card *card)
1113 card->ipato.enabled = 0; 1115 card->ipato.enabled = 0;
1114 card->ipato.invert4 = 0; 1116 card->ipato.invert4 = 0;
1115 card->ipato.invert6 = 0; 1117 card->ipato.invert6 = 0;
1116 if (card->info.type == QETH_CARD_TYPE_IQD)
1117 card->options.checksum_type = NO_CHECKSUMMING;
1118 /* init QDIO stuff */ 1118 /* init QDIO stuff */
1119 qeth_init_qdio_info(card); 1119 qeth_init_qdio_info(card);
1120 return 0; 1120 return 0;
diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c
index 88ae4357136a..25dfd5abd19b 100644
--- a/drivers/s390/net/qeth_core_sys.c
+++ b/drivers/s390/net/qeth_core_sys.c
@@ -8,6 +8,9 @@
8 * Frank Blaschka <frank.blaschka@de.ibm.com> 8 * Frank Blaschka <frank.blaschka@de.ibm.com>
9 */ 9 */
10 10
11#define KMSG_COMPONENT "qeth"
12#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
13
11#include <linux/list.h> 14#include <linux/list.h>
12#include <linux/rwsem.h> 15#include <linux/rwsem.h>
13#include <asm/ebcdic.h> 16#include <asm/ebcdic.h>
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 51fde6f2e0b8..6a801dc3bf8e 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -16,6 +16,7 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/slab.h>
19#include <linux/etherdevice.h> 20#include <linux/etherdevice.h>
20#include <linux/mii.h> 21#include <linux/mii.h>
21#include <linux/ip.h> 22#include <linux/ip.h>
@@ -1071,11 +1072,9 @@ static int qeth_l2_recover(void *ptr)
1071 dev_info(&card->gdev->dev, 1072 dev_info(&card->gdev->dev,
1072 "Device successfully recovered!\n"); 1073 "Device successfully recovered!\n");
1073 else { 1074 else {
1074 if (card->dev) { 1075 rtnl_lock();
1075 rtnl_lock(); 1076 dev_close(card->dev);
1076 dev_close(card->dev); 1077 rtnl_unlock();
1077 rtnl_unlock();
1078 }
1079 dev_warn(&card->gdev->dev, "The qeth device driver " 1078 dev_warn(&card->gdev->dev, "The qeth device driver "
1080 "failed to recover an error on the device\n"); 1079 "failed to recover an error on the device\n");
1081 } 1080 }
@@ -1129,11 +1128,9 @@ static int qeth_l2_pm_resume(struct ccwgroup_device *gdev)
1129 if (card->state == CARD_STATE_RECOVER) { 1128 if (card->state == CARD_STATE_RECOVER) {
1130 rc = __qeth_l2_set_online(card->gdev, 1); 1129 rc = __qeth_l2_set_online(card->gdev, 1);
1131 if (rc) { 1130 if (rc) {
1132 if (card->dev) { 1131 rtnl_lock();
1133 rtnl_lock(); 1132 dev_close(card->dev);
1134 dev_close(card->dev); 1133 rtnl_unlock();
1135 rtnl_unlock();
1136 }
1137 } 1134 }
1138 } else 1135 } else
1139 rc = __qeth_l2_set_online(card->gdev, 0); 1136 rc = __qeth_l2_set_online(card->gdev, 0);
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 5475834ab916..fc6ca1da8b98 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -22,6 +22,7 @@
22#include <linux/ipv6.h> 22#include <linux/ipv6.h>
23#include <linux/inetdevice.h> 23#include <linux/inetdevice.h>
24#include <linux/igmp.h> 24#include <linux/igmp.h>
25#include <linux/slab.h>
25 26
26#include <net/ip.h> 27#include <net/ip.h>
27#include <net/arp.h> 28#include <net/arp.h>
@@ -1691,39 +1692,43 @@ qeth_diags_trace_cb(struct qeth_card *card, struct qeth_reply *reply,
1691 1692
1692 cmd = (struct qeth_ipa_cmd *)data; 1693 cmd = (struct qeth_ipa_cmd *)data;
1693 rc = cmd->hdr.return_code; 1694 rc = cmd->hdr.return_code;
1694 if (rc) { 1695 if (rc)
1695 QETH_DBF_TEXT_(TRACE, 2, "dxter%x", rc); 1696 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) { 1697 switch (cmd->data.diagass.action) {
1716 case QETH_DIAGS_CMD_TRACE_QUERY: 1698 case QETH_DIAGS_CMD_TRACE_QUERY:
1717 break; 1699 break;
1718 case QETH_DIAGS_CMD_TRACE_DISABLE: 1700 case QETH_DIAGS_CMD_TRACE_DISABLE:
1719 card->info.promisc_mode = SET_PROMISC_MODE_OFF; 1701 switch (rc) {
1720 dev_info(&card->gdev->dev, "The HiperSockets network traffic " 1702 case 0:
1721 "analyzer is deactivated\n"); 1703 case IPA_RC_INVALID_SUBCMD:
1704 card->info.promisc_mode = SET_PROMISC_MODE_OFF;
1705 dev_info(&card->gdev->dev, "The HiperSockets network "
1706 "traffic analyzer is deactivated\n");
1707 break;
1708 default:
1709 break;
1710 }
1722 break; 1711 break;
1723 case QETH_DIAGS_CMD_TRACE_ENABLE: 1712 case QETH_DIAGS_CMD_TRACE_ENABLE:
1724 card->info.promisc_mode = SET_PROMISC_MODE_ON; 1713 switch (rc) {
1725 dev_info(&card->gdev->dev, "The HiperSockets network traffic " 1714 case 0:
1726 "analyzer is activated\n"); 1715 card->info.promisc_mode = SET_PROMISC_MODE_ON;
1716 dev_info(&card->gdev->dev, "The HiperSockets network "
1717 "traffic analyzer is activated\n");
1718 break;
1719 case IPA_RC_HARDWARE_AUTH_ERROR:
1720 dev_warn(&card->gdev->dev, "The device is not "
1721 "authorized to run as a HiperSockets network "
1722 "traffic analyzer\n");
1723 break;
1724 case IPA_RC_TRACE_ALREADY_ACTIVE:
1725 dev_warn(&card->gdev->dev, "A HiperSockets "
1726 "network traffic analyzer is already "
1727 "active in the HiperSockets LAN\n");
1728 break;
1729 default:
1730 break;
1731 }
1727 break; 1732 break;
1728 default: 1733 default:
1729 QETH_DBF_MESSAGE(2, "Unknown sniffer action (0x%04x) on %s\n", 1734 QETH_DBF_MESSAGE(2, "Unknown sniffer action (0x%04x) on %s\n",
@@ -2215,11 +2220,9 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
2215 if (recovery_mode) 2220 if (recovery_mode)
2216 qeth_l3_stop(card->dev); 2221 qeth_l3_stop(card->dev);
2217 else { 2222 else {
2218 if (card->dev) { 2223 rtnl_lock();
2219 rtnl_lock(); 2224 dev_close(card->dev);
2220 dev_close(card->dev); 2225 rtnl_unlock();
2221 rtnl_unlock();
2222 }
2223 } 2226 }
2224 if (!card->use_hard_stop) { 2227 if (!card->use_hard_stop) {
2225 rc = qeth_send_stoplan(card); 2228 rc = qeth_send_stoplan(card);
@@ -2900,10 +2903,8 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
2900 int data_offset = -1; 2903 int data_offset = -1;
2901 int nr_frags; 2904 int nr_frags;
2902 2905
2903 if ((card->info.type == QETH_CARD_TYPE_IQD) && 2906 if (((card->info.type == QETH_CARD_TYPE_IQD) && (!ipv)) ||
2904 (((skb->protocol != htons(ETH_P_IPV6)) && 2907 card->options.sniffer)
2905 (skb->protocol != htons(ETH_P_IP))) ||
2906 card->options.sniffer))
2907 goto tx_drop; 2908 goto tx_drop;
2908 2909
2909 if ((card->state != CARD_STATE_UP) || !card->lan_online) { 2910 if ((card->state != CARD_STATE_UP) || !card->lan_online) {
@@ -2949,14 +2950,14 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
2949 if (data_offset < 0) 2950 if (data_offset < 0)
2950 skb_pull(new_skb, ETH_HLEN); 2951 skb_pull(new_skb, ETH_HLEN);
2951 } else { 2952 } else {
2952 if (new_skb->protocol == htons(ETH_P_IP)) { 2953 if (ipv == 4) {
2953 if (card->dev->type == ARPHRD_IEEE802_TR) 2954 if (card->dev->type == ARPHRD_IEEE802_TR)
2954 skb_pull(new_skb, TR_HLEN); 2955 skb_pull(new_skb, TR_HLEN);
2955 else 2956 else
2956 skb_pull(new_skb, ETH_HLEN); 2957 skb_pull(new_skb, ETH_HLEN);
2957 } 2958 }
2958 2959
2959 if (new_skb->protocol == ETH_P_IPV6 && card->vlangrp && 2960 if (ipv == 6 && card->vlangrp &&
2960 vlan_tx_tag_present(new_skb)) { 2961 vlan_tx_tag_present(new_skb)) {
2961 skb_push(new_skb, VLAN_HLEN); 2962 skb_push(new_skb, VLAN_HLEN);
2962 skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4); 2963 skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4);
@@ -3534,11 +3535,9 @@ static int qeth_l3_pm_resume(struct ccwgroup_device *gdev)
3534 if (card->state == CARD_STATE_RECOVER) { 3535 if (card->state == CARD_STATE_RECOVER) {
3535 rc = __qeth_l3_set_online(card->gdev, 1); 3536 rc = __qeth_l3_set_online(card->gdev, 1);
3536 if (rc) { 3537 if (rc) {
3537 if (card->dev) { 3538 rtnl_lock();
3538 rtnl_lock(); 3539 dev_close(card->dev);
3539 dev_close(card->dev); 3540 rtnl_unlock();
3540 rtnl_unlock();
3541 }
3542 } 3541 }
3543 } else 3542 } else
3544 rc = __qeth_l3_set_online(card->gdev, 0); 3543 rc = __qeth_l3_set_online(card->gdev, 0);
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c
index 3f08b11274ae..25b3e7aae44f 100644
--- a/drivers/s390/net/qeth_l3_sys.c
+++ b/drivers/s390/net/qeth_l3_sys.c
@@ -8,6 +8,8 @@
8 * Frank Blaschka <frank.blaschka@de.ibm.com> 8 * Frank Blaschka <frank.blaschka@de.ibm.com>
9 */ 9 */
10 10
11#include <linux/slab.h>
12
11#include "qeth_l3.h" 13#include "qeth_l3.h"
12 14
13#define QETH_DEVICE_ATTR(_id, _name, _mode, _show, _store) \ 15#define QETH_DEVICE_ATTR(_id, _name, _mode, _show, _store) \
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c
index ecef1edee701..70491274da16 100644
--- a/drivers/s390/net/smsgiucv.c
+++ b/drivers/s390/net/smsgiucv.c
@@ -24,6 +24,7 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/errno.h> 25#include <linux/errno.h>
26#include <linux/device.h> 26#include <linux/device.h>
27#include <linux/slab.h>
27#include <net/iucv/iucv.h> 28#include <net/iucv/iucv.h>
28#include <asm/cpcmd.h> 29#include <asm/cpcmd.h>
29#include <asm/ebcdic.h> 30#include <asm/ebcdic.h>
diff --git a/drivers/s390/net/smsgiucv_app.c b/drivers/s390/net/smsgiucv_app.c
index 91579dc6a2b0..137688790207 100644
--- a/drivers/s390/net/smsgiucv_app.c
+++ b/drivers/s390/net/smsgiucv_app.c
@@ -18,6 +18,7 @@
18#include <linux/list.h> 18#include <linux/list.h>
19#include <linux/kobject.h> 19#include <linux/kobject.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/slab.h>
21#include <linux/spinlock.h> 22#include <linux/spinlock.h>
22#include <linux/workqueue.h> 23#include <linux/workqueue.h>
23#include <net/iucv/iucv.h> 24#include <net/iucv/iucv.h>