diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 17:27:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 17:27:40 -0400 |
commit | f9da455b93f6ba076935b4ef4589f61e529ae046 (patch) | |
tree | 3c4e69ce1ba1d6bf65915b97a76ca2172105b278 /drivers/s390/net | |
parent | 0e04c641b199435f3779454055f6a7de258ecdfc (diff) | |
parent | e5eca6d41f53db48edd8cf88a3f59d2c30227f8e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov.
2) Multiqueue support in xen-netback and xen-netfront, from Andrew J
Benniston.
3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn
Mork.
4) BPF now has a "random" opcode, from Chema Gonzalez.
5) Add more BPF documentation and improve test framework, from Daniel
Borkmann.
6) Support TCP fastopen over ipv6, from Daniel Lee.
7) Add software TSO helper functions and use them to support software
TSO in mvneta and mv643xx_eth drivers. From Ezequiel Garcia.
8) Support software TSO in fec driver too, from Nimrod Andy.
9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli.
10) Handle broadcasts more gracefully over macvlan when there are large
numbers of interfaces configured, from Herbert Xu.
11) Allow more control over fwmark used for non-socket based responses,
from Lorenzo Colitti.
12) Do TCP congestion window limiting based upon measurements, from Neal
Cardwell.
13) Support busy polling in SCTP, from Neal Horman.
14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru.
15) Bridge promisc mode handling improvements from Vlad Yasevich.
16) Don't use inetpeer entries to implement ID generation any more, it
performs poorly, from Eric Dumazet.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits)
rtnetlink: fix userspace API breakage for iproute2 < v3.9.0
tcp: fixing TLP's FIN recovery
net: fec: Add software TSO support
net: fec: Add Scatter/gather support
net: fec: Increase buffer descriptor entry number
net: fec: Factorize feature setting
net: fec: Enable IP header hardware checksum
net: fec: Factorize the .xmit transmit function
bridge: fix compile error when compiling without IPv6 support
bridge: fix smatch warning / potential null pointer dereference
via-rhine: fix full-duplex with autoneg disable
bnx2x: Enlarge the dorq threshold for VFs
bnx2x: Check for UNDI in uncommon branch
bnx2x: Fix 1G-baseT link
bnx2x: Fix link for KR with swapped polarity lane
sctp: Fix sk_ack_backlog wrap-around problem
net/core: Add VF link state control policy
net/fsl: xgmac_mdio is dependent on OF_MDIO
net/fsl: Make xgmac_mdio read error message useful
net_sched: drr: warn when qdisc is not work conserving
...
Diffstat (limited to 'drivers/s390/net')
-rw-r--r-- | drivers/s390/net/claw.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/ctcm_main.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/ctcm_sysfs.c | 14 | ||||
-rw-r--r-- | drivers/s390/net/lcs.c | 15 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core.h | 6 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 100 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_sys.c | 22 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 18 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 21 |
9 files changed, 124 insertions, 76 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index fd7b3bd80789..d837c3c5330f 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -3348,7 +3348,7 @@ static int __init claw_init(void) | |||
3348 | } | 3348 | } |
3349 | CLAW_DBF_TEXT(2, setup, "init_mod"); | 3349 | CLAW_DBF_TEXT(2, setup, "init_mod"); |
3350 | claw_root_dev = root_device_register("claw"); | 3350 | claw_root_dev = root_device_register("claw"); |
3351 | ret = PTR_RET(claw_root_dev); | 3351 | ret = PTR_ERR_OR_ZERO(claw_root_dev); |
3352 | if (ret) | 3352 | if (ret) |
3353 | goto register_err; | 3353 | goto register_err; |
3354 | ret = ccw_driver_register(&claw_ccw_driver); | 3354 | ret = ccw_driver_register(&claw_ccw_driver); |
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c index 70b3a023100e..03b6ad035577 100644 --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c | |||
@@ -1837,7 +1837,7 @@ static int __init ctcm_init(void) | |||
1837 | if (ret) | 1837 | if (ret) |
1838 | goto out_err; | 1838 | goto out_err; |
1839 | ctcm_root_dev = root_device_register("ctcm"); | 1839 | ctcm_root_dev = root_device_register("ctcm"); |
1840 | ret = PTR_RET(ctcm_root_dev); | 1840 | ret = PTR_ERR_OR_ZERO(ctcm_root_dev); |
1841 | if (ret) | 1841 | if (ret) |
1842 | goto register_err; | 1842 | goto register_err; |
1843 | ret = ccw_driver_register(&ctcm_ccw_driver); | 1843 | ret = ccw_driver_register(&ctcm_ccw_driver); |
diff --git a/drivers/s390/net/ctcm_sysfs.c b/drivers/s390/net/ctcm_sysfs.c index 985b5dcbdac8..6bcfbbb20f04 100644 --- a/drivers/s390/net/ctcm_sysfs.c +++ b/drivers/s390/net/ctcm_sysfs.c | |||
@@ -34,8 +34,9 @@ static ssize_t ctcm_buffer_write(struct device *dev, | |||
34 | struct device_attribute *attr, const char *buf, size_t count) | 34 | struct device_attribute *attr, const char *buf, size_t count) |
35 | { | 35 | { |
36 | struct net_device *ndev; | 36 | struct net_device *ndev; |
37 | int bs1; | 37 | unsigned int bs1; |
38 | struct ctcm_priv *priv = dev_get_drvdata(dev); | 38 | struct ctcm_priv *priv = dev_get_drvdata(dev); |
39 | int rc; | ||
39 | 40 | ||
40 | ndev = priv->channel[CTCM_READ]->netdev; | 41 | ndev = priv->channel[CTCM_READ]->netdev; |
41 | if (!(priv && priv->channel[CTCM_READ] && ndev)) { | 42 | if (!(priv && priv->channel[CTCM_READ] && ndev)) { |
@@ -43,7 +44,9 @@ static ssize_t ctcm_buffer_write(struct device *dev, | |||
43 | return -ENODEV; | 44 | return -ENODEV; |
44 | } | 45 | } |
45 | 46 | ||
46 | sscanf(buf, "%u", &bs1); | 47 | rc = sscanf(buf, "%u", &bs1); |
48 | if (rc != 1) | ||
49 | goto einval; | ||
47 | if (bs1 > CTCM_BUFSIZE_LIMIT) | 50 | if (bs1 > CTCM_BUFSIZE_LIMIT) |
48 | goto einval; | 51 | goto einval; |
49 | if (bs1 < (576 + LL_HEADER_LENGTH + 2)) | 52 | if (bs1 < (576 + LL_HEADER_LENGTH + 2)) |
@@ -143,13 +146,14 @@ static ssize_t ctcm_proto_show(struct device *dev, | |||
143 | static ssize_t ctcm_proto_store(struct device *dev, | 146 | static ssize_t ctcm_proto_store(struct device *dev, |
144 | struct device_attribute *attr, const char *buf, size_t count) | 147 | struct device_attribute *attr, const char *buf, size_t count) |
145 | { | 148 | { |
146 | int value; | 149 | int value, rc; |
147 | struct ctcm_priv *priv = dev_get_drvdata(dev); | 150 | struct ctcm_priv *priv = dev_get_drvdata(dev); |
148 | 151 | ||
149 | if (!priv) | 152 | if (!priv) |
150 | return -ENODEV; | 153 | return -ENODEV; |
151 | sscanf(buf, "%u", &value); | 154 | rc = sscanf(buf, "%d", &value); |
152 | if (!((value == CTCM_PROTO_S390) || | 155 | if ((rc != 1) || |
156 | !((value == CTCM_PROTO_S390) || | ||
153 | (value == CTCM_PROTO_LINUX) || | 157 | (value == CTCM_PROTO_LINUX) || |
154 | (value == CTCM_PROTO_MPC) || | 158 | (value == CTCM_PROTO_MPC) || |
155 | (value == CTCM_PROTO_OS390))) | 159 | (value == CTCM_PROTO_OS390))) |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index c461f2aac610..0a7d87c372b8 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -1943,14 +1943,16 @@ static ssize_t | |||
1943 | lcs_portno_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 1943 | lcs_portno_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1944 | { | 1944 | { |
1945 | struct lcs_card *card; | 1945 | struct lcs_card *card; |
1946 | int value; | 1946 | int value, rc; |
1947 | 1947 | ||
1948 | card = dev_get_drvdata(dev); | 1948 | card = dev_get_drvdata(dev); |
1949 | 1949 | ||
1950 | if (!card) | 1950 | if (!card) |
1951 | return 0; | 1951 | return 0; |
1952 | 1952 | ||
1953 | sscanf(buf, "%u", &value); | 1953 | rc = sscanf(buf, "%d", &value); |
1954 | if (rc != 1) | ||
1955 | return -EINVAL; | ||
1954 | /* TODO: sanity checks */ | 1956 | /* TODO: sanity checks */ |
1955 | card->portno = value; | 1957 | card->portno = value; |
1956 | 1958 | ||
@@ -1997,14 +1999,17 @@ static ssize_t | |||
1997 | lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 1999 | lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1998 | { | 2000 | { |
1999 | struct lcs_card *card; | 2001 | struct lcs_card *card; |
2000 | int value; | 2002 | unsigned int value; |
2003 | int rc; | ||
2001 | 2004 | ||
2002 | card = dev_get_drvdata(dev); | 2005 | card = dev_get_drvdata(dev); |
2003 | 2006 | ||
2004 | if (!card) | 2007 | if (!card) |
2005 | return 0; | 2008 | return 0; |
2006 | 2009 | ||
2007 | sscanf(buf, "%u", &value); | 2010 | rc = sscanf(buf, "%u", &value); |
2011 | if (rc != 1) | ||
2012 | return -EINVAL; | ||
2008 | /* TODO: sanity checks */ | 2013 | /* TODO: sanity checks */ |
2009 | card->lancmd_timeout = value; | 2014 | card->lancmd_timeout = value; |
2010 | 2015 | ||
@@ -2442,7 +2447,7 @@ __init lcs_init_module(void) | |||
2442 | if (rc) | 2447 | if (rc) |
2443 | goto out_err; | 2448 | goto out_err; |
2444 | lcs_root_dev = root_device_register("lcs"); | 2449 | lcs_root_dev = root_device_register("lcs"); |
2445 | rc = PTR_RET(lcs_root_dev); | 2450 | rc = PTR_ERR_OR_ZERO(lcs_root_dev); |
2446 | if (rc) | 2451 | if (rc) |
2447 | goto register_err; | 2452 | goto register_err; |
2448 | rc = ccw_driver_register(&lcs_ccw_driver); | 2453 | rc = ccw_driver_register(&lcs_ccw_driver); |
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 5333b2c018e7..a2088af51cc5 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -268,10 +268,8 @@ static inline int qeth_is_ipa_enabled(struct qeth_ipa_info *ipa, | |||
268 | #define QETH_NO_PRIO_QUEUEING 0 | 268 | #define QETH_NO_PRIO_QUEUEING 0 |
269 | #define QETH_PRIO_Q_ING_PREC 1 | 269 | #define QETH_PRIO_Q_ING_PREC 1 |
270 | #define QETH_PRIO_Q_ING_TOS 2 | 270 | #define QETH_PRIO_Q_ING_TOS 2 |
271 | #define IP_TOS_LOWDELAY 0x10 | 271 | #define QETH_PRIO_Q_ING_SKB 3 |
272 | #define IP_TOS_HIGHTHROUGHPUT 0x08 | 272 | #define QETH_PRIO_Q_ING_VLAN 4 |
273 | #define IP_TOS_HIGHRELIABILITY 0x04 | ||
274 | #define IP_TOS_NOTIMPORTANT 0x02 | ||
275 | 273 | ||
276 | /* Packing */ | 274 | /* Packing */ |
277 | #define QETH_LOW_WATERMARK_PACK 2 | 275 | #define QETH_LOW_WATERMARK_PACK 2 |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index e89f38c31176..f54bec54d677 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/kthread.h> | 20 | #include <linux/kthread.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <net/iucv/af_iucv.h> | 22 | #include <net/iucv/af_iucv.h> |
23 | #include <net/dsfield.h> | ||
23 | 24 | ||
24 | #include <asm/ebcdic.h> | 25 | #include <asm/ebcdic.h> |
25 | #include <asm/chpid.h> | 26 | #include <asm/chpid.h> |
@@ -1013,7 +1014,7 @@ static long __qeth_check_irb_error(struct ccw_device *cdev, | |||
1013 | 1014 | ||
1014 | card = CARD_FROM_CDEV(cdev); | 1015 | card = CARD_FROM_CDEV(cdev); |
1015 | 1016 | ||
1016 | if (!IS_ERR(irb)) | 1017 | if (!card || !IS_ERR(irb)) |
1017 | return 0; | 1018 | return 0; |
1018 | 1019 | ||
1019 | switch (PTR_ERR(irb)) { | 1020 | switch (PTR_ERR(irb)) { |
@@ -1029,7 +1030,7 @@ static long __qeth_check_irb_error(struct ccw_device *cdev, | |||
1029 | QETH_CARD_TEXT(card, 2, "ckirberr"); | 1030 | QETH_CARD_TEXT(card, 2, "ckirberr"); |
1030 | QETH_CARD_TEXT_(card, 2, " rc%d", -ETIMEDOUT); | 1031 | QETH_CARD_TEXT_(card, 2, " rc%d", -ETIMEDOUT); |
1031 | if (intparm == QETH_RCD_PARM) { | 1032 | if (intparm == QETH_RCD_PARM) { |
1032 | if (card && (card->data.ccwdev == cdev)) { | 1033 | if (card->data.ccwdev == cdev) { |
1033 | card->data.state = CH_STATE_DOWN; | 1034 | card->data.state = CH_STATE_DOWN; |
1034 | wake_up(&card->wait_q); | 1035 | wake_up(&card->wait_q); |
1035 | } | 1036 | } |
@@ -3662,42 +3663,56 @@ void qeth_qdio_output_handler(struct ccw_device *ccwdev, | |||
3662 | } | 3663 | } |
3663 | EXPORT_SYMBOL_GPL(qeth_qdio_output_handler); | 3664 | EXPORT_SYMBOL_GPL(qeth_qdio_output_handler); |
3664 | 3665 | ||
3666 | /** | ||
3667 | * Note: Function assumes that we have 4 outbound queues. | ||
3668 | */ | ||
3665 | int qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb, | 3669 | int qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb, |
3666 | int ipv, int cast_type) | 3670 | int ipv, int cast_type) |
3667 | { | 3671 | { |
3668 | if (!ipv && (card->info.type == QETH_CARD_TYPE_OSD || | 3672 | __be16 *tci; |
3669 | card->info.type == QETH_CARD_TYPE_OSX)) | 3673 | u8 tos; |
3670 | return card->qdio.default_out_queue; | 3674 | |
3671 | switch (card->qdio.no_out_queues) { | 3675 | if (cast_type && card->info.is_multicast_different) |
3672 | case 4: | 3676 | return card->info.is_multicast_different & |
3673 | if (cast_type && card->info.is_multicast_different) | 3677 | (card->qdio.no_out_queues - 1); |
3674 | return card->info.is_multicast_different & | 3678 | |
3675 | (card->qdio.no_out_queues - 1); | 3679 | switch (card->qdio.do_prio_queueing) { |
3676 | if (card->qdio.do_prio_queueing && (ipv == 4)) { | 3680 | case QETH_PRIO_Q_ING_TOS: |
3677 | const u8 tos = ip_hdr(skb)->tos; | 3681 | case QETH_PRIO_Q_ING_PREC: |
3678 | 3682 | switch (ipv) { | |
3679 | if (card->qdio.do_prio_queueing == | 3683 | case 4: |
3680 | QETH_PRIO_Q_ING_TOS) { | 3684 | tos = ipv4_get_dsfield(ip_hdr(skb)); |
3681 | if (tos & IP_TOS_NOTIMPORTANT) | 3685 | break; |
3682 | return 3; | 3686 | case 6: |
3683 | if (tos & IP_TOS_HIGHRELIABILITY) | 3687 | tos = ipv6_get_dsfield(ipv6_hdr(skb)); |
3684 | return 2; | 3688 | break; |
3685 | if (tos & IP_TOS_HIGHTHROUGHPUT) | 3689 | default: |
3686 | return 1; | 3690 | return card->qdio.default_out_queue; |
3687 | if (tos & IP_TOS_LOWDELAY) | ||
3688 | return 0; | ||
3689 | } | ||
3690 | if (card->qdio.do_prio_queueing == | ||
3691 | QETH_PRIO_Q_ING_PREC) | ||
3692 | return 3 - (tos >> 6); | ||
3693 | } else if (card->qdio.do_prio_queueing && (ipv == 6)) { | ||
3694 | /* TODO: IPv6!!! */ | ||
3695 | } | 3691 | } |
3696 | return card->qdio.default_out_queue; | 3692 | if (card->qdio.do_prio_queueing == QETH_PRIO_Q_ING_PREC) |
3697 | case 1: /* fallthrough for single-out-queue 1920-device */ | 3693 | return ~tos >> 6 & 3; |
3694 | if (tos & IPTOS_MINCOST) | ||
3695 | return 3; | ||
3696 | if (tos & IPTOS_RELIABILITY) | ||
3697 | return 2; | ||
3698 | if (tos & IPTOS_THROUGHPUT) | ||
3699 | return 1; | ||
3700 | if (tos & IPTOS_LOWDELAY) | ||
3701 | return 0; | ||
3702 | break; | ||
3703 | case QETH_PRIO_Q_ING_SKB: | ||
3704 | if (skb->priority > 5) | ||
3705 | return 0; | ||
3706 | return ~skb->priority >> 1 & 3; | ||
3707 | case QETH_PRIO_Q_ING_VLAN: | ||
3708 | tci = &((struct ethhdr *)skb->data)->h_proto; | ||
3709 | if (*tci == ETH_P_8021Q) | ||
3710 | return ~*(tci + 1) >> (VLAN_PRIO_SHIFT + 1) & 3; | ||
3711 | break; | ||
3698 | default: | 3712 | default: |
3699 | return card->qdio.default_out_queue; | 3713 | break; |
3700 | } | 3714 | } |
3715 | return card->qdio.default_out_queue; | ||
3701 | } | 3716 | } |
3702 | EXPORT_SYMBOL_GPL(qeth_get_priority_queue); | 3717 | EXPORT_SYMBOL_GPL(qeth_get_priority_queue); |
3703 | 3718 | ||
@@ -5703,6 +5718,7 @@ int qeth_core_ethtool_get_settings(struct net_device *netdev, | |||
5703 | struct qeth_card *card = netdev->ml_priv; | 5718 | struct qeth_card *card = netdev->ml_priv; |
5704 | enum qeth_link_types link_type; | 5719 | enum qeth_link_types link_type; |
5705 | struct carrier_info carrier_info; | 5720 | struct carrier_info carrier_info; |
5721 | u32 speed; | ||
5706 | 5722 | ||
5707 | if ((card->info.type == QETH_CARD_TYPE_IQD) || (card->info.guestlan)) | 5723 | if ((card->info.type == QETH_CARD_TYPE_IQD) || (card->info.guestlan)) |
5708 | link_type = QETH_LINK_TYPE_10GBIT_ETH; | 5724 | link_type = QETH_LINK_TYPE_10GBIT_ETH; |
@@ -5717,28 +5733,29 @@ int qeth_core_ethtool_get_settings(struct net_device *netdev, | |||
5717 | case QETH_LINK_TYPE_FAST_ETH: | 5733 | case QETH_LINK_TYPE_FAST_ETH: |
5718 | case QETH_LINK_TYPE_LANE_ETH100: | 5734 | case QETH_LINK_TYPE_LANE_ETH100: |
5719 | qeth_set_ecmd_adv_sup(ecmd, SPEED_100, PORT_TP); | 5735 | qeth_set_ecmd_adv_sup(ecmd, SPEED_100, PORT_TP); |
5720 | ecmd->speed = SPEED_100; | 5736 | speed = SPEED_100; |
5721 | ecmd->port = PORT_TP; | 5737 | ecmd->port = PORT_TP; |
5722 | break; | 5738 | break; |
5723 | 5739 | ||
5724 | case QETH_LINK_TYPE_GBIT_ETH: | 5740 | case QETH_LINK_TYPE_GBIT_ETH: |
5725 | case QETH_LINK_TYPE_LANE_ETH1000: | 5741 | case QETH_LINK_TYPE_LANE_ETH1000: |
5726 | qeth_set_ecmd_adv_sup(ecmd, SPEED_1000, PORT_FIBRE); | 5742 | qeth_set_ecmd_adv_sup(ecmd, SPEED_1000, PORT_FIBRE); |
5727 | ecmd->speed = SPEED_1000; | 5743 | speed = SPEED_1000; |
5728 | ecmd->port = PORT_FIBRE; | 5744 | ecmd->port = PORT_FIBRE; |
5729 | break; | 5745 | break; |
5730 | 5746 | ||
5731 | case QETH_LINK_TYPE_10GBIT_ETH: | 5747 | case QETH_LINK_TYPE_10GBIT_ETH: |
5732 | qeth_set_ecmd_adv_sup(ecmd, SPEED_10000, PORT_FIBRE); | 5748 | qeth_set_ecmd_adv_sup(ecmd, SPEED_10000, PORT_FIBRE); |
5733 | ecmd->speed = SPEED_10000; | 5749 | speed = SPEED_10000; |
5734 | ecmd->port = PORT_FIBRE; | 5750 | ecmd->port = PORT_FIBRE; |
5735 | break; | 5751 | break; |
5736 | 5752 | ||
5737 | default: | 5753 | default: |
5738 | qeth_set_ecmd_adv_sup(ecmd, SPEED_10, PORT_TP); | 5754 | qeth_set_ecmd_adv_sup(ecmd, SPEED_10, PORT_TP); |
5739 | ecmd->speed = SPEED_10; | 5755 | speed = SPEED_10; |
5740 | ecmd->port = PORT_TP; | 5756 | ecmd->port = PORT_TP; |
5741 | } | 5757 | } |
5758 | ethtool_cmd_speed_set(ecmd, speed); | ||
5742 | 5759 | ||
5743 | /* Check if we can obtain more accurate information. */ | 5760 | /* Check if we can obtain more accurate information. */ |
5744 | /* If QUERY_CARD_INFO command is not supported or fails, */ | 5761 | /* If QUERY_CARD_INFO command is not supported or fails, */ |
@@ -5783,18 +5800,19 @@ int qeth_core_ethtool_get_settings(struct net_device *netdev, | |||
5783 | 5800 | ||
5784 | switch (carrier_info.port_speed) { | 5801 | switch (carrier_info.port_speed) { |
5785 | case CARD_INFO_PORTS_10M: | 5802 | case CARD_INFO_PORTS_10M: |
5786 | ecmd->speed = SPEED_10; | 5803 | speed = SPEED_10; |
5787 | break; | 5804 | break; |
5788 | case CARD_INFO_PORTS_100M: | 5805 | case CARD_INFO_PORTS_100M: |
5789 | ecmd->speed = SPEED_100; | 5806 | speed = SPEED_100; |
5790 | break; | 5807 | break; |
5791 | case CARD_INFO_PORTS_1G: | 5808 | case CARD_INFO_PORTS_1G: |
5792 | ecmd->speed = SPEED_1000; | 5809 | speed = SPEED_1000; |
5793 | break; | 5810 | break; |
5794 | case CARD_INFO_PORTS_10G: | 5811 | case CARD_INFO_PORTS_10G: |
5795 | ecmd->speed = SPEED_10000; | 5812 | speed = SPEED_10000; |
5796 | break; | 5813 | break; |
5797 | } | 5814 | } |
5815 | ethtool_cmd_speed_set(ecmd, speed); | ||
5798 | 5816 | ||
5799 | return 0; | 5817 | return 0; |
5800 | } | 5818 | } |
@@ -5816,7 +5834,7 @@ static int __init qeth_core_init(void) | |||
5816 | if (rc) | 5834 | if (rc) |
5817 | goto out_err; | 5835 | goto out_err; |
5818 | qeth_core_root_dev = root_device_register("qeth"); | 5836 | qeth_core_root_dev = root_device_register("qeth"); |
5819 | rc = PTR_RET(qeth_core_root_dev); | 5837 | rc = PTR_ERR_OR_ZERO(qeth_core_root_dev); |
5820 | if (rc) | 5838 | if (rc) |
5821 | goto register_err; | 5839 | goto register_err; |
5822 | qeth_core_header_cache = kmem_cache_create("qeth_hdr", | 5840 | qeth_core_header_cache = kmem_cache_create("qeth_hdr", |
diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c index 425c0ecf1f3b..8a25a2be9890 100644 --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c | |||
@@ -217,6 +217,10 @@ static ssize_t qeth_dev_prioqing_show(struct device *dev, | |||
217 | return sprintf(buf, "%s\n", "by precedence"); | 217 | return sprintf(buf, "%s\n", "by precedence"); |
218 | case QETH_PRIO_Q_ING_TOS: | 218 | case QETH_PRIO_Q_ING_TOS: |
219 | return sprintf(buf, "%s\n", "by type of service"); | 219 | return sprintf(buf, "%s\n", "by type of service"); |
220 | case QETH_PRIO_Q_ING_SKB: | ||
221 | return sprintf(buf, "%s\n", "by skb-priority"); | ||
222 | case QETH_PRIO_Q_ING_VLAN: | ||
223 | return sprintf(buf, "%s\n", "by VLAN headers"); | ||
220 | default: | 224 | default: |
221 | return sprintf(buf, "always queue %i\n", | 225 | return sprintf(buf, "always queue %i\n", |
222 | card->qdio.default_out_queue); | 226 | card->qdio.default_out_queue); |
@@ -250,11 +254,23 @@ static ssize_t qeth_dev_prioqing_store(struct device *dev, | |||
250 | } | 254 | } |
251 | 255 | ||
252 | tmp = strsep((char **) &buf, "\n"); | 256 | tmp = strsep((char **) &buf, "\n"); |
253 | if (!strcmp(tmp, "prio_queueing_prec")) | 257 | if (!strcmp(tmp, "prio_queueing_prec")) { |
254 | card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_PREC; | 258 | card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_PREC; |
255 | else if (!strcmp(tmp, "prio_queueing_tos")) | 259 | card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; |
260 | } else if (!strcmp(tmp, "prio_queueing_skb")) { | ||
261 | card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_SKB; | ||
262 | card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; | ||
263 | } else if (!strcmp(tmp, "prio_queueing_tos")) { | ||
256 | card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_TOS; | 264 | card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_TOS; |
257 | else if (!strcmp(tmp, "no_prio_queueing:0")) { | 265 | card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; |
266 | } else if (!strcmp(tmp, "prio_queueing_vlan")) { | ||
267 | if (!card->options.layer2) { | ||
268 | rc = -ENOTSUPP; | ||
269 | goto out; | ||
270 | } | ||
271 | card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_VLAN; | ||
272 | card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; | ||
273 | } else if (!strcmp(tmp, "no_prio_queueing:0")) { | ||
258 | card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING; | 274 | card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING; |
259 | card->qdio.default_out_queue = 0; | 275 | card->qdio.default_out_queue = 0; |
260 | } else if (!strcmp(tmp, "no_prio_queueing:1")) { | 276 | } else if (!strcmp(tmp, "no_prio_queueing:1")) { |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 8dea3f12ccc1..5ef5b4f45758 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -725,15 +725,20 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
725 | int elements = 0; | 725 | int elements = 0; |
726 | struct qeth_card *card = dev->ml_priv; | 726 | struct qeth_card *card = dev->ml_priv; |
727 | struct sk_buff *new_skb = skb; | 727 | struct sk_buff *new_skb = skb; |
728 | int ipv = qeth_get_ip_version(skb); | ||
729 | int cast_type = qeth_l2_get_cast_type(card, skb); | 728 | int cast_type = qeth_l2_get_cast_type(card, skb); |
730 | struct qeth_qdio_out_q *queue = card->qdio.out_qs | 729 | struct qeth_qdio_out_q *queue; |
731 | [qeth_get_priority_queue(card, skb, ipv, cast_type)]; | ||
732 | int tx_bytes = skb->len; | 730 | int tx_bytes = skb->len; |
733 | int data_offset = -1; | 731 | int data_offset = -1; |
734 | int elements_needed = 0; | 732 | int elements_needed = 0; |
735 | int hd_len = 0; | 733 | int hd_len = 0; |
736 | 734 | ||
735 | if (card->qdio.do_prio_queueing || (cast_type && | ||
736 | card->info.is_multicast_different)) | ||
737 | queue = card->qdio.out_qs[qeth_get_priority_queue(card, skb, | ||
738 | qeth_get_ip_version(skb), cast_type)]; | ||
739 | else | ||
740 | queue = card->qdio.out_qs[card->qdio.default_out_queue]; | ||
741 | |||
737 | if ((card->state != CARD_STATE_UP) || !card->lan_online) { | 742 | if ((card->state != CARD_STATE_UP) || !card->lan_online) { |
738 | card->stats.tx_carrier_errors++; | 743 | card->stats.tx_carrier_errors++; |
739 | goto tx_drop; | 744 | goto tx_drop; |
@@ -964,10 +969,9 @@ static int qeth_l2_setup_netdev(struct qeth_card *card) | |||
964 | card->dev->watchdog_timeo = QETH_TX_TIMEOUT; | 969 | card->dev->watchdog_timeo = QETH_TX_TIMEOUT; |
965 | card->dev->mtu = card->info.initial_mtu; | 970 | card->dev->mtu = card->info.initial_mtu; |
966 | card->dev->netdev_ops = &qeth_l2_netdev_ops; | 971 | card->dev->netdev_ops = &qeth_l2_netdev_ops; |
967 | if (card->info.type != QETH_CARD_TYPE_OSN) | 972 | card->dev->ethtool_ops = |
968 | SET_ETHTOOL_OPS(card->dev, &qeth_l2_ethtool_ops); | 973 | (card->info.type != QETH_CARD_TYPE_OSN) ? |
969 | else | 974 | &qeth_l2_ethtool_ops : &qeth_l2_osn_ops; |
970 | SET_ETHTOOL_OPS(card->dev, &qeth_l2_osn_ops); | ||
971 | card->dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; | 975 | card->dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; |
972 | card->info.broadcast_capable = 1; | 976 | card->info.broadcast_capable = 1; |
973 | qeth_l2_request_initial_mac(card); | 977 | qeth_l2_request_initial_mac(card); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 3524d34ff694..14e0b5810e8c 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -63,7 +63,7 @@ void qeth_l3_ipaddr4_to_string(const __u8 *addr, char *buf) | |||
63 | int qeth_l3_string_to_ipaddr4(const char *buf, __u8 *addr) | 63 | int qeth_l3_string_to_ipaddr4(const char *buf, __u8 *addr) |
64 | { | 64 | { |
65 | int count = 0, rc = 0; | 65 | int count = 0, rc = 0; |
66 | int in[4]; | 66 | unsigned int in[4]; |
67 | char c; | 67 | char c; |
68 | 68 | ||
69 | rc = sscanf(buf, "%u.%u.%u.%u%c", | 69 | rc = sscanf(buf, "%u.%u.%u.%u%c", |
@@ -1659,7 +1659,7 @@ static void qeth_l3_add_vlan_mc(struct qeth_card *card) | |||
1659 | for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) { | 1659 | for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) { |
1660 | struct net_device *netdev; | 1660 | struct net_device *netdev; |
1661 | 1661 | ||
1662 | netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q), | 1662 | netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q), |
1663 | vid); | 1663 | vid); |
1664 | if (netdev == NULL || | 1664 | if (netdev == NULL || |
1665 | !(netdev->flags & IFF_UP)) | 1665 | !(netdev->flags & IFF_UP)) |
@@ -1721,7 +1721,7 @@ static void qeth_l3_add_vlan_mc6(struct qeth_card *card) | |||
1721 | for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) { | 1721 | for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) { |
1722 | struct net_device *netdev; | 1722 | struct net_device *netdev; |
1723 | 1723 | ||
1724 | netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q), | 1724 | netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q), |
1725 | vid); | 1725 | vid); |
1726 | if (netdev == NULL || | 1726 | if (netdev == NULL || |
1727 | !(netdev->flags & IFF_UP)) | 1727 | !(netdev->flags & IFF_UP)) |
@@ -1766,7 +1766,7 @@ static void qeth_l3_free_vlan_addresses4(struct qeth_card *card, | |||
1766 | 1766 | ||
1767 | QETH_CARD_TEXT(card, 4, "frvaddr4"); | 1767 | QETH_CARD_TEXT(card, 4, "frvaddr4"); |
1768 | 1768 | ||
1769 | netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q), vid); | 1769 | netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q), vid); |
1770 | if (!netdev) | 1770 | if (!netdev) |
1771 | return; | 1771 | return; |
1772 | in_dev = in_dev_get(netdev); | 1772 | in_dev = in_dev_get(netdev); |
@@ -1796,7 +1796,7 @@ static void qeth_l3_free_vlan_addresses6(struct qeth_card *card, | |||
1796 | 1796 | ||
1797 | QETH_CARD_TEXT(card, 4, "frvaddr6"); | 1797 | QETH_CARD_TEXT(card, 4, "frvaddr6"); |
1798 | 1798 | ||
1799 | netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q), vid); | 1799 | netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q), vid); |
1800 | if (!netdev) | 1800 | if (!netdev) |
1801 | return; | 1801 | return; |
1802 | in6_dev = in6_dev_get(netdev); | 1802 | in6_dev = in6_dev_get(netdev); |
@@ -2089,7 +2089,7 @@ static int qeth_l3_verify_vlan_dev(struct net_device *dev, | |||
2089 | struct net_device *netdev; | 2089 | struct net_device *netdev; |
2090 | 2090 | ||
2091 | rcu_read_lock(); | 2091 | rcu_read_lock(); |
2092 | netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q), | 2092 | netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q), |
2093 | vid); | 2093 | vid); |
2094 | rcu_read_unlock(); | 2094 | rcu_read_unlock(); |
2095 | if (netdev == dev) { | 2095 | if (netdev == dev) { |
@@ -2926,8 +2926,11 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2926 | struct sk_buff *new_skb = NULL; | 2926 | struct sk_buff *new_skb = NULL; |
2927 | int ipv = qeth_get_ip_version(skb); | 2927 | int ipv = qeth_get_ip_version(skb); |
2928 | int cast_type = qeth_l3_get_cast_type(card, skb); | 2928 | int cast_type = qeth_l3_get_cast_type(card, skb); |
2929 | struct qeth_qdio_out_q *queue = card->qdio.out_qs | 2929 | struct qeth_qdio_out_q *queue = |
2930 | [qeth_get_priority_queue(card, skb, ipv, cast_type)]; | 2930 | card->qdio.out_qs[card->qdio.do_prio_queueing |
2931 | || (cast_type && card->info.is_multicast_different) ? | ||
2932 | qeth_get_priority_queue(card, skb, ipv, cast_type) : | ||
2933 | card->qdio.default_out_queue]; | ||
2931 | int tx_bytes = skb->len; | 2934 | int tx_bytes = skb->len; |
2932 | bool large_send; | 2935 | bool large_send; |
2933 | int data_offset = -1; | 2936 | int data_offset = -1; |
@@ -3298,7 +3301,7 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) | |||
3298 | card->dev->ml_priv = card; | 3301 | card->dev->ml_priv = card; |
3299 | card->dev->watchdog_timeo = QETH_TX_TIMEOUT; | 3302 | card->dev->watchdog_timeo = QETH_TX_TIMEOUT; |
3300 | card->dev->mtu = card->info.initial_mtu; | 3303 | card->dev->mtu = card->info.initial_mtu; |
3301 | SET_ETHTOOL_OPS(card->dev, &qeth_l3_ethtool_ops); | 3304 | card->dev->ethtool_ops = &qeth_l3_ethtool_ops; |
3302 | card->dev->features |= NETIF_F_HW_VLAN_CTAG_TX | | 3305 | card->dev->features |= NETIF_F_HW_VLAN_CTAG_TX | |
3303 | NETIF_F_HW_VLAN_CTAG_RX | | 3306 | NETIF_F_HW_VLAN_CTAG_RX | |
3304 | NETIF_F_HW_VLAN_CTAG_FILTER; | 3307 | NETIF_F_HW_VLAN_CTAG_FILTER; |