diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-22 01:37:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-22 01:37:27 -0400 |
commit | 8aaa51b63cc3c5f3b2e72d2f0e193d9c2e00fe46 (patch) | |
tree | 25d068f3d666791cc1c44ad4c2afe03b24059f53 /drivers/net | |
parent | f614c8178b0696d070b23f36a2a27b5128f6c372 (diff) | |
parent | fab9adfb71fc8690e20c3c280d39d49c8f4a3f0a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
"Just a few fixes trickling in at this point.
1) If we see an attached socket on an skb in the ipv4 forwarding path,
bail. This can happen due to races with FIB rule addition, and
deletion, and we should just drop such frames. From Sebastian
Pöhn.
2) pppoe receive should only accept packets destined for this hosts's
MAC address. From Joakim Tjernlund.
3) Handle checksum unwrapping properly in ppp receive properly when
it's encapsulated in UDP in some way, fix from Tom Herbert.
4) Fix some bugs in mv88e6xxx DSA driver resulting from the conversion
from register offset constants to mnenomic macros. From Vivien
Didelot.
5) Fix handling of HCA max message size in mlx4 adapters, from Eran
Ben ELisha"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
net/mlx4_core: Fix reading HCA max message size in mlx4_QUERY_DEV_CAP
tcp: add memory barriers to write space paths
altera tse: Error-Bit on tx-avalon-stream always set.
net: dsa: mv88e6xxx: use PORT_DEFAULT_VLAN
net: dsa: mv88e6xxx: fix setup of port control 1
ppp: call skb_checksum_complete_unset in ppp_receive_frame
net: add skb_checksum_complete_unset
pppoe: Lacks DST MAC address check
ip_forward: Drop frames with attached skb->sk
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/altera/altera_msgdmahw.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 2 | ||||
-rw-r--r-- | drivers/net/ppp/ppp_generic.c | 1 | ||||
-rw-r--r-- | drivers/net/ppp/pppoe.c | 3 |
5 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index 9f0c2b9d58ae..af639ab4c55b 100644 --- a/drivers/net/dsa/mv88e6xxx.c +++ b/drivers/net/dsa/mv88e6xxx.c | |||
@@ -1251,8 +1251,7 @@ int mv88e6xxx_setup_port_common(struct dsa_switch *ds, int port) | |||
1251 | /* Port Control 1: disable trunking, disable sending | 1251 | /* Port Control 1: disable trunking, disable sending |
1252 | * learning messages to this port. | 1252 | * learning messages to this port. |
1253 | */ | 1253 | */ |
1254 | ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_DEFAULT_VLAN, | 1254 | ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_CONTROL_1, 0x0000); |
1255 | 0x0000); | ||
1256 | if (ret) | 1255 | if (ret) |
1257 | goto abort; | 1256 | goto abort; |
1258 | 1257 | ||
@@ -1275,7 +1274,8 @@ int mv88e6xxx_setup_port_common(struct dsa_switch *ds, int port) | |||
1275 | /* Default VLAN ID and priority: don't set a default VLAN | 1274 | /* Default VLAN ID and priority: don't set a default VLAN |
1276 | * ID, and set the default packet priority to zero. | 1275 | * ID, and set the default packet priority to zero. |
1277 | */ | 1276 | */ |
1278 | ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), 0x07, 0x0000); | 1277 | ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_DEFAULT_VLAN, |
1278 | 0x0000); | ||
1279 | abort: | 1279 | abort: |
1280 | mutex_unlock(&ps->smi_mutex); | 1280 | mutex_unlock(&ps->smi_mutex); |
1281 | return ret; | 1281 | return ret; |
diff --git a/drivers/net/ethernet/altera/altera_msgdmahw.h b/drivers/net/ethernet/altera/altera_msgdmahw.h index e335626e1b6b..eba070f16782 100644 --- a/drivers/net/ethernet/altera/altera_msgdmahw.h +++ b/drivers/net/ethernet/altera/altera_msgdmahw.h | |||
@@ -72,7 +72,6 @@ struct msgdma_extended_desc { | |||
72 | #define MSGDMA_DESC_CTL_TX_SINGLE (MSGDMA_DESC_CTL_GEN_SOP | \ | 72 | #define MSGDMA_DESC_CTL_TX_SINGLE (MSGDMA_DESC_CTL_GEN_SOP | \ |
73 | MSGDMA_DESC_CTL_GEN_EOP | \ | 73 | MSGDMA_DESC_CTL_GEN_EOP | \ |
74 | MSGDMA_DESC_CTL_TR_COMP_IRQ | \ | 74 | MSGDMA_DESC_CTL_TR_COMP_IRQ | \ |
75 | MSGDMA_DESC_CTL_TR_ERR_IRQ | \ | ||
76 | MSGDMA_DESC_CTL_GO) | 75 | MSGDMA_DESC_CTL_GO) |
77 | 76 | ||
78 | #define MSGDMA_DESC_CTL_RX_SINGLE (MSGDMA_DESC_CTL_END_ON_EOP | \ | 77 | #define MSGDMA_DESC_CTL_RX_SINGLE (MSGDMA_DESC_CTL_END_ON_EOP | \ |
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index b9881fc1252f..a4079811b176 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c | |||
@@ -781,10 +781,10 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) | |||
781 | MLX4_GET(field, outbox, QUERY_DEV_CAP_VL_PORT_OFFSET); | 781 | MLX4_GET(field, outbox, QUERY_DEV_CAP_VL_PORT_OFFSET); |
782 | dev_cap->num_ports = field & 0xf; | 782 | dev_cap->num_ports = field & 0xf; |
783 | MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MSG_SZ_OFFSET); | 783 | MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MSG_SZ_OFFSET); |
784 | dev_cap->max_msg_sz = 1 << (field & 0x1f); | ||
784 | MLX4_GET(field, outbox, QUERY_DEV_CAP_PORT_FLOWSTATS_COUNTERS_OFFSET); | 785 | MLX4_GET(field, outbox, QUERY_DEV_CAP_PORT_FLOWSTATS_COUNTERS_OFFSET); |
785 | if (field & 0x10) | 786 | if (field & 0x10) |
786 | dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN; | 787 | dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN; |
787 | dev_cap->max_msg_sz = 1 << (field & 0x1f); | ||
788 | MLX4_GET(field, outbox, QUERY_DEV_CAP_FLOW_STEERING_RANGE_EN_OFFSET); | 788 | MLX4_GET(field, outbox, QUERY_DEV_CAP_FLOW_STEERING_RANGE_EN_OFFSET); |
789 | if (field & 0x80) | 789 | if (field & 0x80) |
790 | dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_FS_EN; | 790 | dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_FS_EN; |
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index af034dba9bd6..9d15566521a7 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c | |||
@@ -1716,6 +1716,7 @@ ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) | |||
1716 | { | 1716 | { |
1717 | /* note: a 0-length skb is used as an error indication */ | 1717 | /* note: a 0-length skb is used as an error indication */ |
1718 | if (skb->len > 0) { | 1718 | if (skb->len > 0) { |
1719 | skb_checksum_complete_unset(skb); | ||
1719 | #ifdef CONFIG_PPP_MULTILINK | 1720 | #ifdef CONFIG_PPP_MULTILINK |
1720 | /* XXX do channel-level decompression here */ | 1721 | /* XXX do channel-level decompression here */ |
1721 | if (PPP_PROTO(skb) == PPP_MP) | 1722 | if (PPP_PROTO(skb) == PPP_MP) |
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index ff059e1d8ac6..aa1dd926623a 100644 --- a/drivers/net/ppp/pppoe.c +++ b/drivers/net/ppp/pppoe.c | |||
@@ -380,6 +380,9 @@ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb) | |||
380 | * can't change. | 380 | * can't change. |
381 | */ | 381 | */ |
382 | 382 | ||
383 | if (skb->pkt_type == PACKET_OTHERHOST) | ||
384 | goto abort_kfree; | ||
385 | |||
383 | if (sk->sk_state & PPPOX_BOUND) { | 386 | if (sk->sk_state & PPPOX_BOUND) { |
384 | ppp_input(&po->chan, skb); | 387 | ppp_input(&po->chan, skb); |
385 | } else if (sk->sk_state & PPPOX_RELAY) { | 388 | } else if (sk->sk_state & PPPOX_RELAY) { |