Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Browse files Browse the repository at this point in the history
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
  ...
  • Loading branch information
torvalds committed Feb 11, 2014
2 parents 6792dfe + 20e7c4e commit 16e5a2e
Show file tree
Hide file tree
Showing 144 changed files with 2,454 additions and 799 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
* Allwinner EMAC ethernet controller

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

emac: ethernet@01c0b000 {
compatible = "allwinner,sun4i-emac";
compatible = "allwinner,sun4i-a10-emac";
reg = <0x01c0b000 0x1000>;
interrupts = <55>;
clocks = <&ahb_gates 17>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
* Allwinner A10 MDIO Ethernet Controller interface

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

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

Example at the SoC level:
mdio@01c0b080 {
compatible = "allwinner,sun4i-mdio";
compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>;
#address-cells = <1>;
#size-cells = <0>;
Expand Down
11 changes: 8 additions & 3 deletions Documentation/ptp/testptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ static void usage(char *progname)
" -f val adjust the ptp clock frequency by 'val' ppb\n"
" -g get the ptp clock time\n"
" -h prints this message\n"
" -i val index for event/trigger\n"
" -k val measure the time offset between system and phc clock\n"
" for 'val' times (Maximum 25)\n"
" -p val enable output with a period of 'val' nanoseconds\n"
Expand Down Expand Up @@ -154,6 +155,7 @@ int main(int argc, char *argv[])
int capabilities = 0;
int extts = 0;
int gettime = 0;
int index = 0;
int oneshot = 0;
int pct_offset = 0;
int n_samples = 0;
Expand All @@ -167,7 +169,7 @@ int main(int argc, char *argv[])

progname = strrchr(argv[0], '/');
progname = progname ? 1+progname : argv[0];
while (EOF != (c = getopt(argc, argv, "a:A:cd:e:f:ghk:p:P:sSt:v"))) {
while (EOF != (c = getopt(argc, argv, "a:A:cd:e:f:ghi:k:p:P:sSt:v"))) {
switch (c) {
case 'a':
oneshot = atoi(optarg);
Expand All @@ -190,6 +192,9 @@ int main(int argc, char *argv[])
case 'g':
gettime = 1;
break;
case 'i':
index = atoi(optarg);
break;
case 'k':
pct_offset = 1;
n_samples = atoi(optarg);
Expand Down Expand Up @@ -301,7 +306,7 @@ int main(int argc, char *argv[])

if (extts) {
memset(&extts_request, 0, sizeof(extts_request));
extts_request.index = 0;
extts_request.index = index;
extts_request.flags = PTP_ENABLE_FEATURE;
if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) {
perror("PTP_EXTTS_REQUEST");
Expand Down Expand Up @@ -375,7 +380,7 @@ int main(int argc, char *argv[])
return -1;
}
memset(&perout_request, 0, sizeof(perout_request));
perout_request.index = 0;
perout_request.index = index;
perout_request.start.sec = ts.tv_sec + 2;
perout_request.start.nsec = 0;
perout_request.period.sec = 0;
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7196,7 +7196,7 @@ S: Maintained
F: drivers/net/ethernet/rdc/r6040.c

RDS - RELIABLE DATAGRAM SOCKETS
M: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
M: Chien Yen <chien.yen@oracle.com>
L: [email protected] (moderated for non-subscribers)
S: Supported
F: net/rds/
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/sun4i-a10.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,15 @@
ranges;

emac: ethernet@01c0b000 {
compatible = "allwinner,sun4i-emac";
compatible = "allwinner,sun4i-a10-emac";
reg = <0x01c0b000 0x1000>;
interrupts = <55>;
clocks = <&ahb_gates 17>;
status = "disabled";
};

mdio@01c0b080 {
compatible = "allwinner,sun4i-mdio";
compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>;
status = "disabled";
#address-cells = <1>;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/sun5i-a10s.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,15 @@
ranges;

emac: ethernet@01c0b000 {
compatible = "allwinner,sun4i-emac";
compatible = "allwinner,sun4i-a10-emac";
reg = <0x01c0b000 0x1000>;
interrupts = <55>;
clocks = <&ahb_gates 17>;
status = "disabled";
};

mdio@01c0b080 {
compatible = "allwinner,sun4i-mdio";
compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>;
status = "disabled";
#address-cells = <1>;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/sun7i-a20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,15 @@
ranges;

emac: ethernet@01c0b000 {
compatible = "allwinner,sun4i-emac";
compatible = "allwinner,sun4i-a10-emac";
reg = <0x01c0b000 0x1000>;
interrupts = <0 55 4>;
clocks = <&ahb_gates 17>;
status = "disabled";
};

mdio@01c0b080 {
compatible = "allwinner,sun4i-mdio";
compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>;
status = "disabled";
#address-cells = <1>;
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/hisax/q931.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ prfeatureind(char *dest, u_char *p)
dp += sprintf(dp, " octet 3 ");
dp += prbits(dp, *p, 8, 8);
*dp++ = '\n';
if (!(*p++ & 80)) {
if (!(*p++ & 0x80)) {
dp += sprintf(dp, " octet 4 ");
dp += prbits(dp, *p++, 8, 8);
*dp++ = '\n';
Expand Down
26 changes: 17 additions & 9 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,9 +1270,13 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)

if (slave_ops->ndo_set_mac_address == NULL) {
if (!bond_has_slaves(bond)) {
pr_warning("%s: Warning: The first slave device specified does not support setting the MAC address. Setting fail_over_mac to active.",
bond_dev->name);
bond->params.fail_over_mac = BOND_FOM_ACTIVE;
pr_warn("%s: Warning: The first slave device specified does not support setting the MAC address.\n",
bond_dev->name);
if (bond->params.mode == BOND_MODE_ACTIVEBACKUP) {
bond->params.fail_over_mac = BOND_FOM_ACTIVE;
pr_warn("%s: Setting fail_over_mac to active for active-backup mode.\n",
bond_dev->name);
}
} else if (bond->params.fail_over_mac != BOND_FOM_ACTIVE) {
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",
bond_dev->name);
Expand Down Expand Up @@ -1315,7 +1319,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
*/
memcpy(new_slave->perm_hwaddr, slave_dev->dev_addr, ETH_ALEN);

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

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

bond->current_arp_slave = NULL;

if (!all && !bond->params.fail_over_mac) {
if (!all && (!bond->params.fail_over_mac ||
bond->params.mode != BOND_MODE_ACTIVEBACKUP)) {
if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) &&
bond_has_slaves(bond))
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",
Expand Down Expand Up @@ -1769,7 +1775,8 @@ static int __bond_release_one(struct net_device *bond_dev,
/* close slave before restoring its mac address */
dev_close(slave_dev);

if (bond->params.fail_over_mac != BOND_FOM_ACTIVE) {
if (bond->params.fail_over_mac != BOND_FOM_ACTIVE ||
bond->params.mode != BOND_MODE_ACTIVEBACKUP) {
/* restore original ("permanent") mac address */
memcpy(addr.sa_data, slave->perm_hwaddr, ETH_ALEN);
addr.sa_family = slave_dev->type;
Expand Down Expand Up @@ -3431,7 +3438,8 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
/* If fail_over_mac is enabled, do nothing and return success.
* Returning an error causes ifenslave to fail.
*/
if (bond->params.fail_over_mac)
if (bond->params.fail_over_mac &&
bond->params.mode == BOND_MODE_ACTIVEBACKUP)
return 0;

if (!is_valid_ether_addr(sa->sa_data))
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ config CAN_JANZ_ICAN3

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

Expand Down
15 changes: 3 additions & 12 deletions drivers/net/can/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,19 +323,10 @@ void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
}

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

if (atomic_read(&skb->users) != 1) {
struct sk_buff *old_skb = skb;

skb = skb_clone(old_skb, GFP_ATOMIC);
kfree_skb(old_skb);
if (!skb)
return;
} else
skb_orphan(skb);

skb->sk = srcsk;
skb = can_create_echo_skb(skb);
if (!skb)
return;

/* make settings for echo to reduce code in irq context */
skb->protocol = htons(ETH_P_CAN);
Expand Down
7 changes: 5 additions & 2 deletions drivers/net/can/flexcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,12 @@ static const struct can_bittiming_const flexcan_bittiming_const = {
};

/*
* Abstract off the read/write for arm versus ppc.
* Abstract off the read/write for arm versus ppc. This
* assumes that PPC uses big-endian registers and everything
* else uses little-endian registers, independent of CPU
* endianess.
*/
#if defined(__BIG_ENDIAN)
#if defined(CONFIG_PPC)
static inline u32 flexcan_read(void __iomem *addr)
{
return in_be32(addr);
Expand Down
20 changes: 5 additions & 15 deletions drivers/net/can/janz-ican3.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/netdevice.h>
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/skb.h>
#include <linux/can/error.h>

#include <linux/mfd/janz.h>
Expand Down Expand Up @@ -1133,20 +1134,9 @@ static void ican3_handle_message(struct ican3_dev *mod, struct ican3_msg *msg)
*/
static void ican3_put_echo_skb(struct ican3_dev *mod, struct sk_buff *skb)
{
struct sock *srcsk = skb->sk;

if (atomic_read(&skb->users) != 1) {
struct sk_buff *old_skb = skb;

skb = skb_clone(old_skb, GFP_ATOMIC);
kfree_skb(old_skb);
if (!skb)
return;
} else {
skb_orphan(skb);
}

skb->sk = srcsk;
skb = can_create_echo_skb(skb);
if (!skb)
return;

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

/* process all communication messages */
while (true) {
struct ican3_msg msg;
struct ican3_msg uninitialized_var(msg);
ret = ican3_recv_msg(mod, &msg);
if (ret)
break;
Expand Down
9 changes: 4 additions & 5 deletions drivers/net/can/vcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <linux/if_ether.h>
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/skb.h>
#include <linux/slab.h>
#include <net/rtnetlink.h>

Expand Down Expand Up @@ -109,25 +110,23 @@ static netdev_tx_t vcan_tx(struct sk_buff *skb, struct net_device *dev)
stats->rx_packets++;
stats->rx_bytes += cfd->len;
}
kfree_skb(skb);
consume_skb(skb);
return NETDEV_TX_OK;
}

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

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

skb = skb_share_check(skb, GFP_ATOMIC);
skb = can_create_echo_skb(skb);
if (!skb)
return NETDEV_TX_OK;

/* receive with packet counting */
skb->sk = srcsk;
vcan_rx(skb, dev);
} else {
/* no looped packets => no counting */
kfree_skb(skb);
consume_skb(skb);
}
return NETDEV_TX_OK;
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/3com/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3294,7 +3294,6 @@ static int __init vortex_init(void)

static void __exit vortex_eisa_cleanup(void)
{
struct vortex_private *vp;
void __iomem *ioaddr;

#ifdef CONFIG_EISA
Expand All @@ -3303,7 +3302,6 @@ static void __exit vortex_eisa_cleanup(void)
#endif

if (compaq_net_device) {
vp = netdev_priv(compaq_net_device);
ioaddr = ioport_map(compaq_net_device->base_addr,
VORTEX_TOTAL_SIZE);

Expand Down
3 changes: 3 additions & 0 deletions drivers/net/ethernet/allwinner/sun4i-emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,9 @@ static int emac_resume(struct platform_device *dev)
}

static const struct of_device_id emac_of_match[] = {
{.compatible = "allwinner,sun4i-a10-emac",},

/* Deprecated */
{.compatible = "allwinner,sun4i-emac",},
{},
};
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/atheros/alx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
alx = netdev_priv(netdev);
spin_lock_init(&alx->hw.mdio_lock);
spin_lock_init(&alx->irq_lock);
spin_lock_init(&alx->stats_lock);
alx->dev = netdev;
alx->hw.pdev = pdev;
alx->msg_enable = NETIF_MSG_LINK | NETIF_MSG_HW | NETIF_MSG_IFUP |
Expand Down
Loading

0 comments on commit 16e5a2e

Please sign in to comment.