Skip to content

Commit 16e5a2e

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking updates from David Miller: 1) Fix flexcan build on big endian, from Arnd Bergmann 2) Correctly attach cpsw to GPIO bitbang MDIO drive, from Stefan Roese 3) udp_add_offload has to use GFP_ATOMIC since it can be invoked from non-sleepable contexts. From Or Gerlitz 4) vxlan_gro_receive() does not iterate over all possible flows properly, fix also from Or Gerlitz 5) CAN core doesn't use a proper SKB destructor when it hooks up sockets to SKBs. Fix from Oliver Hartkopp 6) ip_tunnel_xmit() can use an uninitialized route pointer, fix from Eric Dumazet 7) Fix address family assignment in IPVS, from Michal Kubecek 8) Fix ath9k build on ARM, from Sujith Manoharan 9) Make sure fail_over_mac only applies for the correct bonding modes, from Ding Tianhong 10) The udp offload code doesn't use RCU correctly, from Shlomo Pongratz 11) Handle gigabit features properly in generic PHY code, from Florian Fainelli 12) Don't blindly invoke link operations in rtnl_link_get_slave_info_data_size, they are optional. Fix from Fernando Luis Vazquez Cao 13) Add USB IDs for Netgear Aircard 340U, from Bjørn Mork 14) Handle netlink packet padding properly in openvswitch, from Thomas Graf 15) Fix oops when deleting chains in nf_tables, from Patrick McHardy 16) Fix RX stalls in xen-netback driver, from Zoltan Kiss 17) Fix deadlock in mac80211 stack, from Emmanuel Grumbach 18) inet_nlmsg_size() forgets to consider ifa_cacheinfo, fix from Geert Uytterhoeven 19) tg3_change_mtu() can deadlock, fix from Nithin Sujir 20) Fix regression in setting SCTP local source addresses on accepted sockets, caused by some generic ipv6 socket changes. Fix from Matija Glavinic Pecotic 21) IPPROTO_* must be pure defines, otherwise module aliases don't get constructed properly. Fix from Jan Moskyto 22) IPV6 netconsole setup doesn't work properly unless an explicit source address is specified, fix from Sabrina Dubroca 23) Use __GFP_NORETRY for high order skb page allocations in sock_alloc_send_pskb and skb_page_frag_refill. From Eric Dumazet 24) Fix a regression added in netconsole over bridging, from Cong Wang 25) TCP uses an artificial offset of 1ms for SRTT, but this doesn't jive well with TCP pacing which needs the SRTT to be accurate. Fix from Eric Dumazet 26) Several cases of missing header file includes from Rashika Kheria 27) Add ZTE MF667 device ID to qmi_wwan driver, from Raymond Wanyoike 28) TCP Small Queues doesn't handle nonagle properly in some corner cases, fix from Eric Dumazet 29) Remove extraneous read_unlock in bond_enslave, whoops. From Ding Tianhong 30) Fix 9p trans_virtio handling of vmalloc buffers, from Richard Yao * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (136 commits) 6lowpan: fix lockdep splats alx: add missing stats_lock spinlock init 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers bonding: remove unwanted bond lock for enslave processing USB2NET : SR9800 : One chip USB2.0 USB2NET SR9800 Device Driver Support tcp: tsq: fix nonagle handling bridge: Prevent possible race condition in br_fdb_change_mac_address bridge: Properly check if local fdb entry can be deleted when deleting vlan bridge: Properly check if local fdb entry can be deleted in br_fdb_delete_by_port bridge: Properly check if local fdb entry can be deleted in br_fdb_change_mac_address bridge: Fix the way to check if a local fdb entry can be deleted bridge: Change local fdb entries whenever mac address of bridge device changes bridge: Fix the way to find old local fdb entries in br_fdb_change_mac_address bridge: Fix the way to insert new local fdb entries in br_fdb_changeaddr bridge: Fix the way to find old local fdb entries in br_fdb_changeaddr tcp: correct code comment stating 3 min timeout for FIN_WAIT2, we only do 1 min net: vxge: Remove unused device pointer net: qmi_wwan: add ZTE MF667 3c59x: Remove unused pointer in vortex_eisa_cleanup() net: fix 'ip rule' iif/oif device rename ...
2 parents 6792dfe + 20e7c4e commit 16e5a2e

File tree

144 files changed

+2454
-799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+2454
-799
lines changed

Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
* Allwinner EMAC ethernet controller
22

33
Required properties:
4-
- compatible: should be "allwinner,sun4i-emac".
4+
- compatible: should be "allwinner,sun4i-a10-emac" (Deprecated:
5+
"allwinner,sun4i-emac")
56
- reg: address and length of the register set for the device.
67
- interrupts: interrupt for the device
78
- phy: A phandle to a phy node defining the PHY address (as the reg
@@ -14,7 +15,7 @@ Optional properties:
1415
Example:
1516

1617
emac: ethernet@01c0b000 {
17-
compatible = "allwinner,sun4i-emac";
18+
compatible = "allwinner,sun4i-a10-emac";
1819
reg = <0x01c0b000 0x1000>;
1920
interrupts = <55>;
2021
clocks = <&ahb_gates 17>;

Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
* Allwinner A10 MDIO Ethernet Controller interface
22

33
Required properties:
4-
- compatible: should be "allwinner,sun4i-mdio".
4+
- compatible: should be "allwinner,sun4i-a10-mdio"
5+
(Deprecated: "allwinner,sun4i-mdio").
56
- reg: address and length of the register set for the device.
67

78
Optional properties:
89
- phy-supply: phandle to a regulator if the PHY needs one
910

1011
Example at the SoC level:
1112
mdio@01c0b080 {
12-
compatible = "allwinner,sun4i-mdio";
13+
compatible = "allwinner,sun4i-a10-mdio";
1314
reg = <0x01c0b080 0x14>;
1415
#address-cells = <1>;
1516
#size-cells = <0>;

Documentation/ptp/testptp.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ static void usage(char *progname)
117117
" -f val adjust the ptp clock frequency by 'val' ppb\n"
118118
" -g get the ptp clock time\n"
119119
" -h prints this message\n"
120+
" -i val index for event/trigger\n"
120121
" -k val measure the time offset between system and phc clock\n"
121122
" for 'val' times (Maximum 25)\n"
122123
" -p val enable output with a period of 'val' nanoseconds\n"
@@ -154,6 +155,7 @@ int main(int argc, char *argv[])
154155
int capabilities = 0;
155156
int extts = 0;
156157
int gettime = 0;
158+
int index = 0;
157159
int oneshot = 0;
158160
int pct_offset = 0;
159161
int n_samples = 0;
@@ -167,7 +169,7 @@ int main(int argc, char *argv[])
167169

168170
progname = strrchr(argv[0], '/');
169171
progname = progname ? 1+progname : argv[0];
170-
while (EOF != (c = getopt(argc, argv, "a:A:cd:e:f:ghk:p:P:sSt:v"))) {
172+
while (EOF != (c = getopt(argc, argv, "a:A:cd:e:f:ghi:k:p:P:sSt:v"))) {
171173
switch (c) {
172174
case 'a':
173175
oneshot = atoi(optarg);
@@ -190,6 +192,9 @@ int main(int argc, char *argv[])
190192
case 'g':
191193
gettime = 1;
192194
break;
195+
case 'i':
196+
index = atoi(optarg);
197+
break;
193198
case 'k':
194199
pct_offset = 1;
195200
n_samples = atoi(optarg);
@@ -301,7 +306,7 @@ int main(int argc, char *argv[])
301306

302307
if (extts) {
303308
memset(&extts_request, 0, sizeof(extts_request));
304-
extts_request.index = 0;
309+
extts_request.index = index;
305310
extts_request.flags = PTP_ENABLE_FEATURE;
306311
if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) {
307312
perror("PTP_EXTTS_REQUEST");
@@ -375,7 +380,7 @@ int main(int argc, char *argv[])
375380
return -1;
376381
}
377382
memset(&perout_request, 0, sizeof(perout_request));
378-
perout_request.index = 0;
383+
perout_request.index = index;
379384
perout_request.start.sec = ts.tv_sec + 2;
380385
perout_request.start.nsec = 0;
381386
perout_request.period.sec = 0;

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7196,7 +7196,7 @@ S: Maintained
71967196
F: drivers/net/ethernet/rdc/r6040.c
71977197

71987198
RDS - RELIABLE DATAGRAM SOCKETS
7199-
M: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
7199+
M: Chien Yen <chien.yen@oracle.com>
72007200
L: [email protected] (moderated for non-subscribers)
72017201
S: Supported
72027202
F: net/rds/

arch/arm/boot/dts/sun4i-a10.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,15 +315,15 @@
315315
ranges;
316316

317317
emac: ethernet@01c0b000 {
318-
compatible = "allwinner,sun4i-emac";
318+
compatible = "allwinner,sun4i-a10-emac";
319319
reg = <0x01c0b000 0x1000>;
320320
interrupts = <55>;
321321
clocks = <&ahb_gates 17>;
322322
status = "disabled";
323323
};
324324

325325
mdio@01c0b080 {
326-
compatible = "allwinner,sun4i-mdio";
326+
compatible = "allwinner,sun4i-a10-mdio";
327327
reg = <0x01c0b080 0x14>;
328328
status = "disabled";
329329
#address-cells = <1>;

arch/arm/boot/dts/sun5i-a10s.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,15 @@
278278
ranges;
279279

280280
emac: ethernet@01c0b000 {
281-
compatible = "allwinner,sun4i-emac";
281+
compatible = "allwinner,sun4i-a10-emac";
282282
reg = <0x01c0b000 0x1000>;
283283
interrupts = <55>;
284284
clocks = <&ahb_gates 17>;
285285
status = "disabled";
286286
};
287287

288288
mdio@01c0b080 {
289-
compatible = "allwinner,sun4i-mdio";
289+
compatible = "allwinner,sun4i-a10-mdio";
290290
reg = <0x01c0b080 0x14>;
291291
status = "disabled";
292292
#address-cells = <1>;

arch/arm/boot/dts/sun7i-a20.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,15 @@
340340
ranges;
341341

342342
emac: ethernet@01c0b000 {
343-
compatible = "allwinner,sun4i-emac";
343+
compatible = "allwinner,sun4i-a10-emac";
344344
reg = <0x01c0b000 0x1000>;
345345
interrupts = <0 55 4>;
346346
clocks = <&ahb_gates 17>;
347347
status = "disabled";
348348
};
349349

350350
mdio@01c0b080 {
351-
compatible = "allwinner,sun4i-mdio";
351+
compatible = "allwinner,sun4i-a10-mdio";
352352
reg = <0x01c0b080 0x14>;
353353
status = "disabled";
354354
#address-cells = <1>;

drivers/isdn/hisax/q931.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ prfeatureind(char *dest, u_char *p)
810810
dp += sprintf(dp, " octet 3 ");
811811
dp += prbits(dp, *p, 8, 8);
812812
*dp++ = '\n';
813-
if (!(*p++ & 80)) {
813+
if (!(*p++ & 0x80)) {
814814
dp += sprintf(dp, " octet 4 ");
815815
dp += prbits(dp, *p++, 8, 8);
816816
*dp++ = '\n';

drivers/net/bonding/bond_main.c

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,9 +1270,13 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
12701270

12711271
if (slave_ops->ndo_set_mac_address == NULL) {
12721272
if (!bond_has_slaves(bond)) {
1273-
pr_warning("%s: Warning: The first slave device specified does not support setting the MAC address. Setting fail_over_mac to active.",
1274-
bond_dev->name);
1275-
bond->params.fail_over_mac = BOND_FOM_ACTIVE;
1273+
pr_warn("%s: Warning: The first slave device specified does not support setting the MAC address.\n",
1274+
bond_dev->name);
1275+
if (bond->params.mode == BOND_MODE_ACTIVEBACKUP) {
1276+
bond->params.fail_over_mac = BOND_FOM_ACTIVE;
1277+
pr_warn("%s: Setting fail_over_mac to active for active-backup mode.\n",
1278+
bond_dev->name);
1279+
}
12761280
} else if (bond->params.fail_over_mac != BOND_FOM_ACTIVE) {
12771281
pr_err("%s: Error: The slave device specified does not support setting the MAC address, but fail_over_mac is not set to active.\n",
12781282
bond_dev->name);
@@ -1315,7 +1319,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
13151319
*/
13161320
memcpy(new_slave->perm_hwaddr, slave_dev->dev_addr, ETH_ALEN);
13171321

1318-
if (!bond->params.fail_over_mac) {
1322+
if (!bond->params.fail_over_mac ||
1323+
bond->params.mode != BOND_MODE_ACTIVEBACKUP) {
13191324
/*
13201325
* Set slave to master's mac address. The application already
13211326
* set the master's mac address to that of the first slave
@@ -1505,7 +1510,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
15051510
slave_dev->npinfo = bond->dev->npinfo;
15061511
if (slave_dev->npinfo) {
15071512
if (slave_enable_netpoll(new_slave)) {
1508-
read_unlock(&bond->lock);
15091513
pr_info("Error, %s: master_dev is using netpoll, "
15101514
"but new slave device does not support netpoll.\n",
15111515
bond_dev->name);
@@ -1579,7 +1583,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
15791583
dev_close(slave_dev);
15801584

15811585
err_restore_mac:
1582-
if (!bond->params.fail_over_mac) {
1586+
if (!bond->params.fail_over_mac ||
1587+
bond->params.mode != BOND_MODE_ACTIVEBACKUP) {
15831588
/* XXX TODO - fom follow mode needs to change master's
15841589
* MAC if this slave's MAC is in use by the bond, or at
15851590
* least print a warning.
@@ -1672,7 +1677,8 @@ static int __bond_release_one(struct net_device *bond_dev,
16721677

16731678
bond->current_arp_slave = NULL;
16741679

1675-
if (!all && !bond->params.fail_over_mac) {
1680+
if (!all && (!bond->params.fail_over_mac ||
1681+
bond->params.mode != BOND_MODE_ACTIVEBACKUP)) {
16761682
if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) &&
16771683
bond_has_slaves(bond))
16781684
pr_warn("%s: Warning: the permanent HWaddr of %s - %pM - is still in use by %s. Set the HWaddr of %s to a different address to avoid conflicts.\n",
@@ -1769,7 +1775,8 @@ static int __bond_release_one(struct net_device *bond_dev,
17691775
/* close slave before restoring its mac address */
17701776
dev_close(slave_dev);
17711777

1772-
if (bond->params.fail_over_mac != BOND_FOM_ACTIVE) {
1778+
if (bond->params.fail_over_mac != BOND_FOM_ACTIVE ||
1779+
bond->params.mode != BOND_MODE_ACTIVEBACKUP) {
17731780
/* restore original ("permanent") mac address */
17741781
memcpy(addr.sa_data, slave->perm_hwaddr, ETH_ALEN);
17751782
addr.sa_family = slave_dev->type;
@@ -3431,7 +3438,8 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
34313438
/* If fail_over_mac is enabled, do nothing and return success.
34323439
* Returning an error causes ifenslave to fail.
34333440
*/
3434-
if (bond->params.fail_over_mac)
3441+
if (bond->params.fail_over_mac &&
3442+
bond->params.mode == BOND_MODE_ACTIVEBACKUP)
34353443
return 0;
34363444

34373445
if (!is_valid_ether_addr(sa->sa_data))

drivers/net/can/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ config CAN_JANZ_ICAN3
104104

105105
config CAN_FLEXCAN
106106
tristate "Support for Freescale FLEXCAN based chips"
107-
depends on (ARM && CPU_LITTLE_ENDIAN) || PPC
107+
depends on ARM || PPC
108108
---help---
109109
Say Y here if you want to support for Freescale FlexCAN.
110110

drivers/net/can/dev.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -323,19 +323,10 @@ void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
323323
}
324324

325325
if (!priv->echo_skb[idx]) {
326-
struct sock *srcsk = skb->sk;
327326

328-
if (atomic_read(&skb->users) != 1) {
329-
struct sk_buff *old_skb = skb;
330-
331-
skb = skb_clone(old_skb, GFP_ATOMIC);
332-
kfree_skb(old_skb);
333-
if (!skb)
334-
return;
335-
} else
336-
skb_orphan(skb);
337-
338-
skb->sk = srcsk;
327+
skb = can_create_echo_skb(skb);
328+
if (!skb)
329+
return;
339330

340331
/* make settings for echo to reduce code in irq context */
341332
skb->protocol = htons(ETH_P_CAN);

drivers/net/can/flexcan.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,12 @@ static const struct can_bittiming_const flexcan_bittiming_const = {
235235
};
236236

237237
/*
238-
* Abstract off the read/write for arm versus ppc.
238+
* Abstract off the read/write for arm versus ppc. This
239+
* assumes that PPC uses big-endian registers and everything
240+
* else uses little-endian registers, independent of CPU
241+
* endianess.
239242
*/
240-
#if defined(__BIG_ENDIAN)
243+
#if defined(CONFIG_PPC)
241244
static inline u32 flexcan_read(void __iomem *addr)
242245
{
243246
return in_be32(addr);

drivers/net/can/janz-ican3.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/netdevice.h>
1919
#include <linux/can.h>
2020
#include <linux/can/dev.h>
21+
#include <linux/can/skb.h>
2122
#include <linux/can/error.h>
2223

2324
#include <linux/mfd/janz.h>
@@ -1133,20 +1134,9 @@ static void ican3_handle_message(struct ican3_dev *mod, struct ican3_msg *msg)
11331134
*/
11341135
static void ican3_put_echo_skb(struct ican3_dev *mod, struct sk_buff *skb)
11351136
{
1136-
struct sock *srcsk = skb->sk;
1137-
1138-
if (atomic_read(&skb->users) != 1) {
1139-
struct sk_buff *old_skb = skb;
1140-
1141-
skb = skb_clone(old_skb, GFP_ATOMIC);
1142-
kfree_skb(old_skb);
1143-
if (!skb)
1144-
return;
1145-
} else {
1146-
skb_orphan(skb);
1147-
}
1148-
1149-
skb->sk = srcsk;
1137+
skb = can_create_echo_skb(skb);
1138+
if (!skb)
1139+
return;
11501140

11511141
/* save this skb for tx interrupt echo handling */
11521142
skb_queue_tail(&mod->echoq, skb);
@@ -1322,7 +1312,7 @@ static int ican3_napi(struct napi_struct *napi, int budget)
13221312

13231313
/* process all communication messages */
13241314
while (true) {
1325-
struct ican3_msg msg;
1315+
struct ican3_msg uninitialized_var(msg);
13261316
ret = ican3_recv_msg(mod, &msg);
13271317
if (ret)
13281318
break;

drivers/net/can/vcan.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <linux/if_ether.h>
4747
#include <linux/can.h>
4848
#include <linux/can/dev.h>
49+
#include <linux/can/skb.h>
4950
#include <linux/slab.h>
5051
#include <net/rtnetlink.h>
5152

@@ -109,25 +110,23 @@ static netdev_tx_t vcan_tx(struct sk_buff *skb, struct net_device *dev)
109110
stats->rx_packets++;
110111
stats->rx_bytes += cfd->len;
111112
}
112-
kfree_skb(skb);
113+
consume_skb(skb);
113114
return NETDEV_TX_OK;
114115
}
115116

116117
/* perform standard echo handling for CAN network interfaces */
117118

118119
if (loop) {
119-
struct sock *srcsk = skb->sk;
120120

121-
skb = skb_share_check(skb, GFP_ATOMIC);
121+
skb = can_create_echo_skb(skb);
122122
if (!skb)
123123
return NETDEV_TX_OK;
124124

125125
/* receive with packet counting */
126-
skb->sk = srcsk;
127126
vcan_rx(skb, dev);
128127
} else {
129128
/* no looped packets => no counting */
130-
kfree_skb(skb);
129+
consume_skb(skb);
131130
}
132131
return NETDEV_TX_OK;
133132
}

drivers/net/ethernet/3com/3c59x.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,7 +3294,6 @@ static int __init vortex_init(void)
32943294

32953295
static void __exit vortex_eisa_cleanup(void)
32963296
{
3297-
struct vortex_private *vp;
32983297
void __iomem *ioaddr;
32993298

33003299
#ifdef CONFIG_EISA
@@ -3303,7 +3302,6 @@ static void __exit vortex_eisa_cleanup(void)
33033302
#endif
33043303

33053304
if (compaq_net_device) {
3306-
vp = netdev_priv(compaq_net_device);
33073305
ioaddr = ioport_map(compaq_net_device->base_addr,
33083306
VORTEX_TOTAL_SIZE);
33093307

drivers/net/ethernet/allwinner/sun4i-emac.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,9 @@ static int emac_resume(struct platform_device *dev)
929929
}
930930

931931
static const struct of_device_id emac_of_match[] = {
932+
{.compatible = "allwinner,sun4i-a10-emac",},
933+
934+
/* Deprecated */
932935
{.compatible = "allwinner,sun4i-emac",},
933936
{},
934937
};

drivers/net/ethernet/atheros/alx/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
12921292
alx = netdev_priv(netdev);
12931293
spin_lock_init(&alx->hw.mdio_lock);
12941294
spin_lock_init(&alx->irq_lock);
1295+
spin_lock_init(&alx->stats_lock);
12951296
alx->dev = netdev;
12961297
alx->hw.pdev = pdev;
12971298
alx->msg_enable = NETIF_MSG_LINK | NETIF_MSG_HW | NETIF_MSG_IFUP |

0 commit comments

Comments
 (0)