platform/kernel/linux-exynos.git
11 years agomlx4: use __netdev_pick_tx instead of __skb_tx_hash in mlx4_en_select_queue
govindarajulu.v [Mon, 3 Jun 2013 08:07:42 +0000 (08:07 +0000)]
mlx4: use __netdev_pick_tx instead of __skb_tx_hash in mlx4_en_select_queue

mlx4_en_select_queue() uses __skb_tx_hash to select the transmit queue.
XPS settings are ignored by this. Instead, we can use __netdev_pick_tx
to select the transmit queue.

Compile test only.

Signed-off-by: govindarajulu.v <govindarajulu90@gmail.com>
Acked-By: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/mlx4: use one page fragment per incoming frame
Eric Dumazet [Mon, 3 Jun 2013 07:54:55 +0000 (07:54 +0000)]
net/mlx4: use one page fragment per incoming frame

mlx4 driver has a suboptimal memory allocation strategy for regular
MTU=1500 frames, as it uses two page fragments :

One of 512 bytes and one of 1024 bytes.

This makes GRO less effective, as each GSO packet contains 8 MSS instead
of 16 MSS.

Performance of a single TCP flow gains 25 % increase with the following
patch.

Before patch :

A:~# netperf -H 192.168.0.2 -Cc
MIGRATED TCP STREAM TEST ...
Recv   Send    Send                          Utilization       Service Demand
Socket Socket  Message  Elapsed              Send     Recv     Send    Recv
Size   Size    Size     Time     Throughput  local    remote   local   remote
bytes  bytes   bytes    secs.    10^6bits/s  % S      % S      us/KB   us/KB

 87380  16384  16384    10.00      13798.47   3.06     4.20     0.436   0.598

After patch :

A:~# netperf -H 192.68.0.2 -Cc
MIGRATED TCP STREAM TEST ...
Recv   Send    Send                          Utilization       Service Demand
Socket Socket  Message  Elapsed              Send     Recv     Send    Recv
Size   Size    Size     Time     Throughput  local    remote   local   remote
bytes  bytes   bytes    secs.    10^6bits/s  % S      % S      us/KB   us/KB

 87380  16384  16384    10.00      17273.80   3.44     4.19     0.391   0.477

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Amir Vadai <amirv@mellanox.com>
Acked-By: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: mvneta: read MAC address from hardware when available
Thomas Petazzoni [Tue, 4 Jun 2013 04:52:23 +0000 (04:52 +0000)]
net: mvneta: read MAC address from hardware when available

This patch improves the logic used by the mvneta driver to find a MAC
address for a particular interface. Until now, it was only looking at
the Device Tree, and if no address was found, was falling back to
generating a random MAC address.

This patch adds the intermediate solution of reading the MAC address
from the hardware registers, in case it has been set by the
bootloader. So the order is now:

 1) MAC address from the Device Tree
 2) MAC address from the hardware registers
 3) Random MAC address

This requires moving the MAC address initialization a little bit later
in the ->probe() code, because it now requires the hardware registers
to be remapped.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: sun4i-emac: fix a typo in emac_probe()
Wei Yongjun [Mon, 3 Jun 2013 03:36:52 +0000 (03:36 +0000)]
net: sun4i-emac: fix a typo in emac_probe()

Just fixed a typo in emac_probe().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: mv643xx_eth: add missing semicolon
Arnd Bergmann [Mon, 3 Jun 2013 03:11:24 +0000 (03:11 +0000)]
net: mv643xx_eth: add missing semicolon

76723bca28 "net: mv643xx_eth: add DT parsing support" added a
dummy mv643xx_eth_shared_of_probe() fallback function with a
typo.

This adds the missing semicolon so we can build without CONFIG_OF
again, and changes both dummy functions to the more conventional
"static inline" syntax, which can avoid potential problems with
the empty macro.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
David S. Miller [Wed, 5 Jun 2013 00:15:19 +0000 (17:15 -0700)]
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next

Marc Kleine-Budde says:

====================
this is a pull-request for net-next/master. It consists of two patches
by Fabio Estevam, cleaning up the flexcan driver (remove default
pinctrl and switch to SIMPLE_DEV_PM_OPS). A patch by me to simplify the
Kconfig [1] handling for flexcan. And a patch by Jingoo Han that
converts the can drivers to use platform_{get,set}_drvdata().

[1] My patch touches arch/{arm,powerpc}, so I collected Acked-bys from
Arnd Bergmann, Shawn Guo and Benjamin Herrenschmidt.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/ethtool: Fix comment regarding location of dev_ethtool() call
Yan Burman [Mon, 3 Jun 2013 02:03:34 +0000 (02:03 +0000)]
net/ethtool: Fix comment regarding location of dev_ethtool() call

Signed-off-by: Yan Burman <yanb@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoping: always initialize ->sin6_scope_id and ->sin6_flowinfo
Cong Wang [Sun, 2 Jun 2013 22:43:52 +0000 (22:43 +0000)]
ping: always initialize ->sin6_scope_id and ->sin6_flowinfo

If we don't need scope id, we should initialize it to zero.
Same for ->sin6_flowinfo.

Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: mark netdev_create_hash __net_init
Baruch Siach [Sun, 2 Jun 2013 20:43:55 +0000 (20:43 +0000)]
net: mark netdev_create_hash __net_init

netdev_create_hash() is only called from netdev_init() which is marked
__net_init.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: emaclite: Fix typo in error message
Jens Renner \(EFE\) [Sun, 2 Jun 2013 05:19:06 +0000 (05:19 +0000)]
net: emaclite: Fix typo in error message

s/allocal/allocate/

Signed-off-by: Jens Renner <renner@efe-gmbh.de>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotransp_v6.h: style neatening
Joe Perches [Sun, 2 Jun 2013 07:04:26 +0000 (07:04 +0000)]
transp_v6.h: style neatening

Use a more current code style.

Remove extern from function prototypes.
Align function arguments and reflow to 80 cols.
Use network comment styles.

Signed-off-by: Joe Perches <joe@perches.com>
cc: Lorenzo Colitti <lorenzo@google.com>,
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoKconfig: remove dangling references to the deleted file
Jean Sacren [Sat, 1 Jun 2013 16:23:17 +0000 (16:23 +0000)]
Kconfig: remove dangling references to the deleted file

Commit 202dc3fc599c1dded235d3b448d9ca924252e354 (Documentation: remove
obsolete networking/multicast.txt file) deleted the obsolete file. After
the file has been removed, clean up a couple of places where references
to the deleted file were made so that users wouldn't be confused when
they consult the Help menu.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: do not manually initialize enumerators
Jean Sacren [Sat, 1 Jun 2013 16:23:16 +0000 (16:23 +0000)]
net: do not manually initialize enumerators

Clean up unnecessary initialization of enumerators as the compiler takes
care of that.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoxfrm: simplify the exit path of xfrm_output_one()
Jean Sacren [Sat, 1 Jun 2013 16:23:15 +0000 (16:23 +0000)]
xfrm: simplify the exit path of xfrm_output_one()

Clean up unnecessary assignment and jump. While there, fix up the label
name.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: dts: AM33XX: Add phy-mode to CPSW node
Mugunthan V N [Mon, 3 Jun 2013 20:10:11 +0000 (20:10 +0000)]
ARM: dts: AM33XX: Add phy-mode to CPSW node

Adding phy-mode to CPSW node for beaglebone, EVM and EVMsk.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers: net: ethernet: cpsw: add phy-mode support to cpsw driver
Mugunthan V N [Mon, 3 Jun 2013 20:10:10 +0000 (20:10 +0000)]
drivers: net: ethernet: cpsw: add phy-mode support to cpsw driver

Adding phy-mode support to cpsw driver and updating the cpsw binding
documentation.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: dts: AM33XX: Add CPSW phy_id device tree data to am335x-evmsk
Mugunthan V N [Mon, 3 Jun 2013 20:10:09 +0000 (20:10 +0000)]
ARM: dts: AM33XX: Add CPSW phy_id device tree data to am335x-evmsk

Add phy_id device tree data to am335x-evmsk device to bring up CPSW
ethernet present on am335x starter kit.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: OMAP2+: omap2plus_defconfig: Enable Atheros support
Mugunthan V N [Mon, 3 Jun 2013 20:10:08 +0000 (20:10 +0000)]
ARM: OMAP2+: omap2plus_defconfig: Enable Atheros support

Enable Atheros 803X phy driver support in defconfig which is present in
AM335x EVM and EVM Starter Kit.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers: net: phy: at803x: add support for AT8031
Mugunthan V N [Mon, 3 Jun 2013 20:10:07 +0000 (20:10 +0000)]
drivers: net: phy: at803x: add support for AT8031

This patch adds support for Atheros 8031 phy driver.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers: net: phy: at803x: add interface mode support
Mugunthan V N [Mon, 3 Jun 2013 20:10:06 +0000 (20:10 +0000)]
drivers: net: phy: at803x: add interface mode support

This patch adds support for RGMII TX delay configuration on Atheros 803X,
this can be enabled in debug registers. With this patch,
PHY_INTERFACE_MODE_RGMII_TXID modes are now supported.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers: net: phy: at803x: seperate wol specific code to wol standard apis
Mugunthan V N [Mon, 3 Jun 2013 20:10:05 +0000 (20:10 +0000)]
drivers: net: phy: at803x: seperate wol specific code to wol standard apis

WOL is initilized in phy config_init, but there are standard apis
(set_wol/get_wol) for WOL in phy frame work. So this patch moves
WOL specific code from config_init to wol standard apis.

Cc: Matus Ujhelyi <ujhelyi.m@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers: net: phy: at803x code cleanup on register and unregister driver
Mugunthan V N [Mon, 3 Jun 2013 20:10:04 +0000 (20:10 +0000)]
drivers: net: phy: at803x code cleanup on register and unregister driver

Make use of phy_drivers_register/phy_drivers_unregister to register/unregister
multiple phy drivers in a single module.

Cc: Matus Ujhelyi <ujhelyi.m@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ipv6: Implement /proc/net/icmp6.
Lorenzo Colitti [Fri, 31 May 2013 15:05:50 +0000 (15:05 +0000)]
net: ipv6: Implement /proc/net/icmp6.

The format is based on /proc/net/icmp and /proc/net/{udp,raw}6.

Compiles and displays reasonable results with CONFIG_IPV6={n,m,y}
Couldn't figure out how to test without CONFIG_PROC_FS enabled.

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ipv4: make the ping /proc code AF-independent
Lorenzo Colitti [Fri, 31 May 2013 15:05:49 +0000 (15:05 +0000)]
net: ipv4: make the ping /proc code AF-independent

Introduce a ping_seq_afinfo structure (similar to its UDP
equivalent) and use it to make some of the ping /proc functions
address-family independent. Rename the remaining ping /proc
functions from ping_* to ping_v4_*.

Compiles and displays reasonable results with CONFIG_IPV6={n,m,y}

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ipv6: Unify {raw,udp}6_sock_seq_show.
Lorenzo Colitti [Fri, 31 May 2013 15:05:48 +0000 (15:05 +0000)]
net: ipv6: Unify {raw,udp}6_sock_seq_show.

udp6_sock_seq_show and raw6_sock_seq_show are identical, except
the UDP version displays ports and the raw version displays the
protocol. Refactor most of the code in these two functions into
a new common ip6_dgram_sock_seq_show function, in preparation
for using it to display ICMPv6 sockets as well.

Also reduce the indentation in parts of include/net/transp_v6.h
to improve readability.

Compiles and displays reasonable results with CONFIG_IPV6={n,m,y}

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoClean up indentation in net/ipv6/transp_v6.h
Lorenzo Colitti [Fri, 31 May 2013 15:05:47 +0000 (15:05 +0000)]
Clean up indentation in net/ipv6/transp_v6.h

Reduce the indentation of most of the functions and make it a
bit more consistent. This allows longer function and arg names
to be consistently indented without wrapping.

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: can: use platform_{get,set}_drvdata()
Jingoo Han [Thu, 23 May 2013 10:47:58 +0000 (19:47 +0900)]
net: can: use platform_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Also, unnecessary dev_set_drvdata() is removed, because the driver core
clears the driver data to NULL after device_release or on probe failure.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agocan: flexcan: remove HAVE_CAN_FLEXCAN Kconfig symbol
Marc Kleine-Budde [Wed, 15 May 2013 07:32:36 +0000 (09:32 +0200)]
can: flexcan: remove HAVE_CAN_FLEXCAN Kconfig symbol

This patch removes the Kconfig symbol HAVE_CAN_FLEXCAN from arch/{arm,powerpc}
and allowing compilation unconditionally on all arm and powerpc platforms.

This brings a bigger compile time coverage and removes the following dependency
warning found by Arnd Bergmann:

    warning: (SOC_IMX28 && SOC_IMX25 && SOC_IMX35 && IMX_HAVE_PLATFORM_FLEXCAN &&
        SOC_IMX53 && SOC_IMX6Q) selects HAVE_CAN_FLEXCAN
    which has unmet direct dependencies (NET && CAN && CAN_DEV)

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agocan: flexcan: Use SIMPLE_DEV_PM_OPS
Fabio Estevam [Mon, 20 May 2013 18:43:43 +0000 (15:43 -0300)]
can: flexcan: Use SIMPLE_DEV_PM_OPS

Using SIMPLE_DEV_PM_OPS can make the code smaller and simpler.

Also change CONFIG_PM to CONFIG_PM_SLEEP.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agocan: flexcan: Let device core handle pinctrl
Fabio Estevam [Mon, 20 May 2013 13:06:18 +0000 (10:06 -0300)]
can: flexcan: Let device core handle pinctrl

Since commit ab78029 (drivers/pinctrl: grab default handles from device core)
we can rely on device core for handling pinctrl, so remove
devm_pinctrl_get_select_default() from the driver.

Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: <linux-can@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agotg3: remove redundant pm init code
Yijing Wang [Sun, 2 Jun 2013 21:36:21 +0000 (21:36 +0000)]
tg3: remove redundant pm init code

Pci_enable_device() will set device pm state to D0, so
it's no need to do it again in tg3_init_one().

Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agossb: sprom: replace strict_strtoul() with kstrtoul()
Jingoo Han [Fri, 31 May 2013 21:35:23 +0000 (21:35 +0000)]
ssb: sprom: replace strict_strtoul() with kstrtoul()

The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: wireless: replace strict_strtoul() with kstrtoul()
Jingoo Han [Fri, 31 May 2013 21:24:06 +0000 (21:24 +0000)]
net: wireless: replace strict_strtoul() with kstrtoul()

The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ethernet: replace strict_strtoul() with kstrtoul()
Jingoo Han [Fri, 31 May 2013 21:21:35 +0000 (21:21 +0000)]
net: ethernet: replace strict_strtoul() with kstrtoul()

The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: can: replace strict_strtoul() with kstrtoul()
Jingoo Han [Fri, 31 May 2013 21:18:55 +0000 (21:18 +0000)]
net: can: replace strict_strtoul() with kstrtoul()

The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoicmp: avoid allocating large struct on stack
Cong Wang [Sun, 2 Jun 2013 15:00:52 +0000 (15:00 +0000)]
icmp: avoid allocating large struct on stack

struct icmp_bxm is a large struct, reduce stack usage
by allocating it on heap.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago] icmp: fix icmp_unreach() comment.
Rami Rosen [Mon, 3 Jun 2013 00:23:25 +0000 (00:23 +0000)]
] icmp: fix icmp_unreach() comment.

ICMP_PARAMETERPROB is handled by icmp_unreach(); This patch adds
ICMP_PARAMETERPROB to the list of ICMP message types handled by icmp_unreach().

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoibm-ethernet: delete stale MCA and duplicate PSERIES dependency
Paul Gortmaker [Wed, 29 May 2013 04:13:54 +0000 (04:13 +0000)]
ibm-ethernet: delete stale MCA and duplicate PSERIES dependency

MCA support has been removed but this dependency escaped removal.
Also, there is a duplicate PPC_PSERIES dependency that appeared
when the ethernet drivers were separated into vendor/model
specific directories, so we remove that here as well.

Reported-by: Robert de Rooy <robert.de.rooy@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: use separate genid for next hop exceptions
Timo Teräs [Mon, 27 May 2013 20:46:33 +0000 (20:46 +0000)]
ipv4: use separate genid for next hop exceptions

commit 13d82bf5 (ipv4: Fix flushing of cached routing informations)
added the support to flush learned pmtu information.

However, using rt_genid is quite heavy as it is bumped on route
add/change and multicast events amongst other places. These can
happen quite often, especially if using dynamic routing protocols.

While this is ok with routes (as they are just recreated locally),
the pmtu information is learned from remote systems and the icmp
notification can come with long delays. It is worthy to have separate
genid to avoid excessive pmtu resets.

Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: rate limit updating of next hop exceptions with same pmtu
Timo Teräs [Mon, 27 May 2013 20:46:32 +0000 (20:46 +0000)]
ipv4: rate limit updating of next hop exceptions with same pmtu

The tunnel devices call update_pmtu for each packet sent, this causes
contention on the fnhe_lock. Ignore the pmtu update if pmtu is not
actually changed, and there is still plenty of time before the entry
expires.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: properly refresh rtable entries on pmtu/redirect events
Timo Teräs [Mon, 27 May 2013 20:46:31 +0000 (20:46 +0000)]
ipv4: properly refresh rtable entries on pmtu/redirect events

This reverts commit 05ab86c5 (xfrm4: Invalidate all ipv4 routes on
IPsec pmtu events). Flushing all cached entries is not needed.

Instead, invalidate only the related next hop dsts to recheck for
the added next hop exception where needed. This also fixes a subtle
race due to bumping generation id's before updating the pmtu.

Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: fix a power state test
Yuval Mintz [Sat, 1 Jun 2013 23:02:26 +0000 (23:02 +0000)]
bnx2x: fix a power state test

If PCIe supports PM capabilities, bnx2x will always claim eeprom is accessible
as PCI_D0 is zero.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: semi-Semantic changes
Yuval Mintz [Sun, 2 Jun 2013 00:06:21 +0000 (00:06 +0000)]
bnx2x: semi-Semantic changes

This patch includes a few changes that change the driver's flow without truly
changing anything in its functionality - use usleep_range for short sleeps
instead of msleep and initialize Tx consumer during initialization for better
information during errors.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Revise prints
Yuval Mintz [Sun, 2 Jun 2013 00:06:20 +0000 (00:06 +0000)]
bnx2x: Revise prints

This patch revises many bnx2x prints - mainly fixing print typos and
adding some new debug prints (mostly for parity issues).

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Semantic removal and beautification
Yuval Mintz [Sun, 2 Jun 2013 00:06:19 +0000 (00:06 +0000)]
bnx2x: Semantic removal and beautification

This patch introduces several small  changes to the driver, none which actually
change any flow:
 1. Removes prototypes of unexisting functions and unused defines.
 2. Fixes alignment and spacing issues.
 3. Changes numeric usage into constants.
 4. Remove unnecessary parenthesis.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Revise comments and alignment
Yuval Mintz [Sun, 2 Jun 2013 00:06:18 +0000 (00:06 +0000)]
bnx2x: Revise comments and alignment

This patch correct various typos, fix comments conventions and
adds/removes a few comments.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Semantic change of empty lines
Yuval Mintz [Sun, 2 Jun 2013 00:06:17 +0000 (00:06 +0000)]
bnx2x: Semantic change of empty lines

This patch removes unnecessary blank lines and adds a few where such are needed
(between variable declarations and code)

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash
Eric Dumazet [Fri, 31 May 2013 14:32:55 +0000 (14:32 +0000)]
bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash

The bnx2x_select_queue() was using __skb_tx_hash() to select the
transmit queue, totally ignoring XPS settings, while XPS can help
performance quite significantly, so change the bnx2x_select_queue()
to use __dev_pick_tx() instead which will use XPS if configured.

Based on patches from Ying Cai and Havard Skinnemoen

Reported-by: govindarajulu.v <govindarajulu90@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Havard Skinnemoen <hskinnemoen@google.com>
Cc: Ying Cai <ycai@google.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Acked-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocxgb4: Force uninitialized state if FW_ON_ADAPTER is < FW_VERSION and we're the MASTER_PF
Jay Hernandez [Thu, 30 May 2013 03:24:14 +0000 (03:24 +0000)]
cxgb4: Force uninitialized state if FW_ON_ADAPTER is < FW_VERSION and we're the MASTER_PF

Forcing uninitialized state allows us to upgrade and reinitialize the adapter.

FW_VERSION_T4 = 1.4.0.0
FW_VERSION_T5 = 0.0.0.0
At this point driver supports above and greater than above version of firmware.
If it doesn't find the required firmware version than it forces the adapter to
be reinitialized as shown below.

1) If FW_ON_ADAPTER < FW_VERSION and we're the MASTER_PF force uninitialized
   state and a FW upgrade if available.

       - If FW_ON_ADAPTER < /lib/firmware/cxgb4/t*fw.bin we will update the
         adapters FW.
       - If FW_ON_ADAPTER >= /lib/firmware/cxgb4/t*fw.bin don't upgrade FW.
       - If upgrade_fw() fails force reinitialization of the adapter anyways,
         it might still work.

   Either way forcing the uninitialized state allows cxgb4 reinitialize FW.

2) If FW_ON_ADAPTER >= FW_VERSION driver follows normal path.

Signed-off-by: Jay Hernandez <jay@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: Implement initiate FW dump feature for Lancer
Somnath Kotur [Thu, 30 May 2013 02:52:23 +0000 (02:52 +0000)]
be2net: Implement initiate FW dump feature for Lancer

Added code to initiate FW dump via ethtool. Driver checks if the previous dump
has been cleared before initiating the dump. It doesn't initiate the dump
if it is not cleared.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers: net: davinci_cpdma: remove CRC bytes from skb added by CPDMA
Mugunthan V N [Wed, 29 May 2013 20:22:01 +0000 (20:22 +0000)]
drivers: net: davinci_cpdma: remove CRC bytes from skb added by CPDMA

Additional 4 bytes found in the skb is the CRC calculated by the
CPDMA hardware, check the CRC bit in CPDMA status field of
Descriptor and remove the CRC length from the skb. This extra
4 byte can be seen when capturing packets using tcpdump.
This has been tested in TI816x platform.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: sunxi: Add EMAC Controller to Hackberry dt
Maxime Ripard [Thu, 30 May 2013 03:49:25 +0000 (03:49 +0000)]
ARM: sunxi: Add EMAC Controller to Hackberry dt

The Hackberry has a PHY that needs to be powered up through a GPIO, so
we need to use a fixed regulator here.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: cubieboard: Enable ethernet (EMAC) support in dts
Stefan Roese [Thu, 30 May 2013 03:49:24 +0000 (03:49 +0000)]
ARM: cubieboard: Enable ethernet (EMAC) support in dts

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: sunxi: Add EMAC controller node to sun4i DTSI
Maxime Ripard [Thu, 30 May 2013 03:49:23 +0000 (03:49 +0000)]
ARM: sunxi: Add EMAC controller node to sun4i DTSI

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: sun4i: Add muxing options for the ethernet controller
Maxime Ripard [Thu, 30 May 2013 03:49:22 +0000 (03:49 +0000)]
ARM: sun4i: Add muxing options for the ethernet controller

The EMAC only has one pinset available for muxing, so hopefully, we
cover all cases.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Add MDIO bus driver for the Allwinner EMAC
Maxime Ripard [Thu, 30 May 2013 03:49:21 +0000 (03:49 +0000)]
net: Add MDIO bus driver for the Allwinner EMAC

This patch adds a separate driver for the MDIO interface of the
Allwinner ethernet controllers.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Add EMAC ethernet driver found on Allwinner A10 SoC's
Stefan Roese [Thu, 30 May 2013 03:49:20 +0000 (03:49 +0000)]
net: Add EMAC ethernet driver found on Allwinner A10 SoC's

The Allwinner A10 has an ethernet controller that seem to be developped
internally by them.

The exact feature set of this controller is unknown, since there is no
public documentation for this IP, and this driver is mostly the one
published by Allwinner that has been heavily cleaned up.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agophy: add reverse MII PHY connection type
Florian Fainelli [Tue, 28 May 2013 04:07:21 +0000 (04:07 +0000)]
phy: add reverse MII PHY connection type

The PHY library currently does not know about the the reverse MII
connection type. Add it to the list of supported PHY modes and update
of_get_phy_mode() to support it and look for the string "rev-mii".

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosit: add IPv4 over IPv4 support
Nicolas Dichtel [Mon, 27 May 2013 23:48:16 +0000 (23:48 +0000)]
sit: add IPv4 over IPv4 support

This patch adds the support of IPv4 over Ipv4 for the module sit. The gain of
this feature is to be able to have 4in4 and 6in4 over the same interface
instead of having one interface for 6in4 and another for 4in4 even if
encapsulation addresses are the same.

To avoid conflicting with ipip module, sit IPv4 over IPv4 protocol is
registered with a smaller priority.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoiptunnel: specify protocol outside IP header
Nicolas Dichtel [Mon, 27 May 2013 23:48:15 +0000 (23:48 +0000)]
iptunnel: specify protocol outside IP header

Before this patch, ip_tunnel_xmit() was using the field protocol from the IP
header passed into argument.
There is no functional change, this patch prepares the support of IPv4 over
IPv4 for module sit.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: clean up skb headers code
Cong Wang [Wed, 29 May 2013 07:16:05 +0000 (15:16 +0800)]
net: clean up skb headers code

commit 1a37e412a0225fcba5587 (net: Use 16bits for *_headers
fields of struct skbuff) converts skb->*_header to u16,
some #if NET_SKBUFF_DATA_USES_OFFSET are now useless,
and to be safe, we could just use "X = (typeof(X)) ~0U;"
as suggested by David.

Cc: David S. Miller <davem@davemloft.net>
Cc: Simon Horman <horms@verge.net.au>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetfilter: Correct calculation using skb->tail and skb-network_header
Simon Horman [Thu, 30 May 2013 16:39:29 +0000 (16:39 +0000)]
netfilter: Correct calculation using skb->tail and skb-network_header

This corrects an regression introduced by "net: Use 16bits for *_headers
fields of struct skbuff" when NET_SKBUFF_DATA_USES_OFFSET is not set. In
that case skb->tail will be a pointer whereas skb->network_header
will be an offset from head. This is corrected by using wrappers that
ensure that calculations are always made using pointers.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agogro: should aggregate frames without DF
Eric Dumazet [Fri, 31 May 2013 11:18:10 +0000 (11:18 +0000)]
gro: should aggregate frames without DF

GRO on IPv4 doesn't aggregate frames if they don't have DF bit set.

Some servers use IP_MTU_DISCOVER/IP_PMTUDISC_PROBE, so linux receivers
are unable to aggregate this kind of traffic.

The right thing to do is to allow aggregation as long as the DF bit has
same value on all segments.

bnx2x LRO does this correctly.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jerry Chu <hkchu@google.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Update RFS target at poll for tcp/udp
David Majnemer [Fri, 31 May 2013 13:15:38 +0000 (13:15 +0000)]
net: Update RFS target at poll for tcp/udp

The current state of affairs is that read()/write() will setup
RFS (Receive Flow Steering) for internet protocol sockets while
poll()/epoll() does not.

When poll() gets called with a TCP or UDP socket, we should update
the flow target.

This permits to RFS (if enabled) to select the appropriate CPU for
following incoming packets.

Note: Only connected UDP sockets can benefit from RFS.

Signed-off-by: David Majnemer <majnemer@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Paul Turner <pjt@google.com>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosctp: Correct byte order of access to skb->{network, transport}_header
Simon Horman [Thu, 30 May 2013 20:36:11 +0000 (20:36 +0000)]
sctp: Correct byte order of access to skb->{network, transport}_header

Corrects an byte order conflict introduced by "sctp: Correct access to
skb->{network, transport}_header". All the values in question are host
byte order.

Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotulip: remove redundant D0 power state set
Yijing Wang [Thu, 30 May 2013 00:27:06 +0000 (00:27 +0000)]
tulip: remove redundant D0 power state set

pci_enable_device() will set device power state to D0,
so it's no need to do it again in tulip_init_one().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: remove redundant D0 power state set
Yijing Wang [Thu, 30 May 2013 00:26:09 +0000 (00:26 +0000)]
qlcnic: remove redundant D0 power state set

pci_enable_device() will set device power state to D0,
so it's no need to do it again in qlcnic_attach_func().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet, jme: remove redundant D0 power state set
Yijing Wang [Thu, 30 May 2013 00:22:43 +0000 (00:22 +0000)]
net, jme: remove redundant D0 power state set

pci_enable_device() will set device power state to D0,
so it's no need to do it again in jme_init_one().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agophy: Add Marvell 88E1510 phy ID
Michal Simek [Thu, 30 May 2013 20:08:27 +0000 (20:08 +0000)]
phy: Add Marvell 88E1510 phy ID

Add support for this new phy ID.

Signed-off-by: Rick Hoover <RHoover@digilentinc.com>
Signed-off-by: Steven Wang <steven.wang@digilentinc.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agophy: Add Marvell 88E1116R phy ID
Michal Simek [Thu, 30 May 2013 20:08:26 +0000 (20:08 +0000)]
phy: Add Marvell 88E1116R phy ID

This phy is on Xilinx ZC702 zynq development board.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agophy: Use macros instead of hardcoded values in marvell phy driver
Michal Simek [Thu, 30 May 2013 20:08:25 +0000 (20:08 +0000)]
phy: Use macros instead of hardcoded values in marvell phy driver

Use macros from linux/marvell_phy.h instead of duplicate
magic phy ID in the driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agophy: Add Vitesse 8211 phy ID
Michal Simek [Thu, 30 May 2013 20:08:24 +0000 (20:08 +0000)]
phy: Add Vitesse 8211 phy ID

Phy is compatible with Vitesse 8221.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agophy: Clean coding style in vitesse phy
Michal Simek [Thu, 30 May 2013 20:08:23 +0000 (20:08 +0000)]
phy: Clean coding style in vitesse phy

- Remove trailing white space
- Remove spaces before tag
- Fix comments

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp: undo on DSACK during recovery
Yuchung Cheng [Wed, 29 May 2013 14:20:14 +0000 (14:20 +0000)]
tcp: undo on DSACK during recovery

If the receiver supports DSACK, sender can detect false recoveries and
revert cwnd reductions triggered by either severe network reordering or
concurrent reordering and loss event.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp: fix undo on partial ack in recovery
Yuchung Cheng [Wed, 29 May 2013 14:20:13 +0000 (14:20 +0000)]
tcp: fix undo on partial ack in recovery

Upon detecting spurious fast retransmit via timestamps during recovery,
use PRR to clock out new data packet instead of retransmission. Once
all retransmission are proven spurious, the sender then reverts the
cwnd reduction and congestion state to open or disorder.

The current code does the opposite: it undoes cwnd as soon as any
retransmission is spurious and continues to retransmit until all
data are acked. This nullifies the point to undo the cwnd because
the sender is still retransmistting spuriously. This patch fixes
it. The undo_ssthresh argument of tcp_undo_cwnd_reductiuon() is no
longer needed and is removed.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp: refactor undo functions
Yuchung Cheng [Wed, 29 May 2013 14:20:12 +0000 (14:20 +0000)]
tcp: refactor undo functions

Refactor and relocate various functions or variables to prepare the
undo fix.  Remove some unused function arguments. Rename tcp_undo_cwr
to tcp_undo_cwnd_reduction to be consistent with the rest of
CWR related function names.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp: consolidate PRR packet accounting
Yuchung Cheng [Wed, 29 May 2013 14:20:11 +0000 (14:20 +0000)]
tcp: consolidate PRR packet accounting

This patch series fixes an undo bug in fast recovery: the sender
mistakenly undos the cwnd too early but continues fast retransmits
until all pending data are acked. This also multiplies the SNMP
stat PARTIALUNDO events by the degree of the network reordering.

The first patch prepares the fix by consolidating the accounting
of newly_acked_sacked in tcp_cwnd_reduction(), instead of updating
newly_acked_sacked everytime sacked_out is adjusted.  Also pass
acked and prior_unsacked as const type because they are readonly
in the rest of recovery processing.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: mv643xx_eth: add DT parsing support
Sebastian Hesselbarth [Wed, 29 May 2013 09:32:48 +0000 (09:32 +0000)]
net: mv643xx_eth: add DT parsing support

This adds device tree parsing support for the shared driver of mv643xx_eth.
As the bindings are slightly different from current PPC bindings new binding
documentation is also added. Following PPC-style device setup, the shared
driver now also adds port platform_devices and sets up port platform_data.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: mv643xx_eth: proper initialization for Kirkwood SoCs
Sebastian Hesselbarth [Wed, 29 May 2013 09:32:47 +0000 (09:32 +0000)]
net: mv643xx_eth: proper initialization for Kirkwood SoCs

Ethernet controllers found on Kirkwood SoCs not only suffer from loosing
MAC address register contents on clock gating but also some important
registers are reset to values that would break ethernet. This patch
clears the CLK125_BYPASS_EN bit for DT enabled Kirkwood only by using
of_device_is_compatible() instead of #ifdefs. Non-DT Kirkwood is not
affected as it installs a clock gating workaround because of the MAC
address issue above. Other Orion SoCs do not suffer from register reset,
do not have the bit in question, or do not have the register at all.
Moreover, system controllers on PPC using this driver should also be
protected from clearing that bit.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: mv643xx_eth: use of_phy_connect if phy_node present
Sebastian Hesselbarth [Wed, 29 May 2013 09:32:46 +0000 (09:32 +0000)]
net: mv643xx_eth: use of_phy_connect if phy_node present

This connects to a phy node passed to the port device instead of probing
the phy by phy_addr.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: mv643xx_eth: add phy_node to platform_data struct
Sebastian Hesselbarth [Wed, 29 May 2013 09:32:45 +0000 (09:32 +0000)]
net: mv643xx_eth: add phy_node to platform_data struct

This adds a struct device_node pointer for a phy passed by phandle
to mv643xx_eth node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: mv643xx_eth: use managed devm_ioremap for port registers
Sebastian Hesselbarth [Wed, 29 May 2013 09:32:44 +0000 (09:32 +0000)]
net: mv643xx_eth: use managed devm_ioremap for port registers

Make use of managed devm_ioremap and remove corresponding iounmap.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: mv643xx_eth: use phy_disconnect instead of phy_detach
Sebastian Hesselbarth [Wed, 29 May 2013 09:32:43 +0000 (09:32 +0000)]
net: mv643xx_eth: use phy_disconnect instead of phy_detach

Using a separated mdio bus driver with mvmdio, phy_detach on network device
removal will not stop the phy and finally lead to NULL pointer dereference
in mvmdio due to non-existent network device. Use phy_disconnect instead
to properly stop phy device from accessing network device prior removal of
the network device.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: emaclite: Update driver header
Michal Simek [Thu, 30 May 2013 00:28:08 +0000 (00:28 +0000)]
net: emaclite: Update driver header

Correct email address and years.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: emaclite: Enable emaclite for Xilinx Arm Zynq platform
Michal Simek [Thu, 30 May 2013 00:28:07 +0000 (00:28 +0000)]
net: emaclite: Enable emaclite for Xilinx Arm Zynq platform

Enable emaclite for Xilinx ARM Zynq platform.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: emaclite: Do not use microblaze and ppc IO functions
Michal Simek [Thu, 30 May 2013 00:28:06 +0000 (00:28 +0000)]
net: emaclite: Do not use microblaze and ppc IO functions

Emaclite can be used on ARM zynq where in_be32/out_be32 IO
functions are not present. Use standard __raw_readl/__raw_writel
IO functions instead.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: emaclite: Let's make xemaclite_adjust_link static
Michal Simek [Thu, 30 May 2013 00:28:05 +0000 (00:28 +0000)]
net: emaclite: Let's make xemaclite_adjust_link static

xemaclite_adjust_link is used locally.
It removes sparse warning:
drivers/net/ethernet/xilinx/xilinx_emaclite.c:916:6: warning:
symbol 'xemaclite_adjust_link' was not declared. Should it be static?

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: emaclite: Support multiple phys connected to one MDIO bus
Michal Simek [Thu, 30 May 2013 00:28:04 +0000 (00:28 +0000)]
net: emaclite: Support multiple phys connected to one MDIO bus

For system which contains at least two ethernet IP where
one IP manage MDIO bus with several PHYs.

Example dts node:
ethernet_mac0: ethernet@81000000 {
compatible = "xlnx,xps-ethernetlite-1.00.a";
device_type = "network";
interrupt-parent = <&xps_intc_0>;
interrupts = < 1 0 >;
local-mac-address = [ 00 0a 35 00 db bb ];
phy-handle = <&ethernet_mac0_phy0>;
reg = < 0x81000000 0x10000 >;
xlnx,duplex = <0x1>;
xlnx,family = "spartan3e";
xlnx,include-internal-loopback = <0x0>;
xlnx,include-mdio = <0x1>;
xlnx,rx-ping-pong = <0x0>;
xlnx,tx-ping-pong = <0x0>;
ethernet_mac0_mdio {
#address-cells = <1>;
#size-cells = <0>;
ethernet_mac0_phy0: phy@1 {
reg = <0x1>;
} ;
ethernet_mac0_phy1: phy@3 {
reg = <0x3>;
} ;
} ;
} ;
ethernet_mac2: ethernet@81040000 {
compatible = "xlnx,xps-ethernetlite-1.00.a";
device_type = "network";
interrupt-parent = <&xps_intc_0>;
interrupts = < 11 0 >;
local-mac-address = [ 00 0a 35 00 db bb ];
phy-handle = <&ethernet_mac0_phy1>;
reg = < 0x81040000 0x10000 >;
xlnx,duplex = <0x1>;
xlnx,family = "spartan3e";
xlnx,include-internal-loopback = <0x0>;
xlnx,include-mdio = <0x0>;
xlnx,rx-ping-pong = <0x0>;
xlnx,tx-ping-pong = <0x0>;
} ;

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: emaclite: Report failures in mdio setup
Michal Simek [Thu, 30 May 2013 00:28:03 +0000 (00:28 +0000)]
net: emaclite: Report failures in mdio setup

Be more verbose when any problem happens.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'netxen_nic'
David S. Miller [Thu, 30 May 2013 23:52:47 +0000 (16:52 -0700)]
Merge branch 'netxen_nic'

Manish Chopra says:

====================
This patch series includes following changes:

* Log driver version information with firmware version information.
* Log "Unknown" adapter name and serial number in case of
  mismatched adapter type.
* netxen_setup_intr() function code cleanup and changes to avoid attaching
  of multiple pci functions on an adapter with mixed interrupts mode
  [MSI-X/MSI + INTx].
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetxen_nic: Update version to 4.0.81
Manish Chopra [Thu, 30 May 2013 09:51:38 +0000 (09:51 +0000)]
netxen_nic: Update version to 4.0.81

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetxen_nic: Avoid mixed mode interrupts
Manish Chopra [Thu, 30 May 2013 09:51:37 +0000 (09:51 +0000)]
netxen_nic: Avoid mixed mode interrupts

o Adapters do not support co-existence of INTx Interrupt with
  MSI-X or MSI among multiple functions. Prevent attaching
  of a function during normal load, if adapter gets into mixed
  mode of interrupts

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetxen_nic: netxen_setup_intr() function code cleanup
Manish Chopra [Thu, 30 May 2013 09:51:36 +0000 (09:51 +0000)]
netxen_nic: netxen_setup_intr() function code cleanup

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetxen_nic: Log proper error message in case of mismatched adapter type
Manish Chopra [Thu, 30 May 2013 09:51:35 +0000 (09:51 +0000)]
netxen_nic: Log proper error message in case of mismatched adapter type

o log "Unknown" board name and "Unknown" serial number in case
  of mismatched adapter type found. This will avoid weird characters
  logs when an adapter is in bad state or corrupted.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetxen_nic: Log driver version with firmware version
Manish Chopra [Thu, 30 May 2013 09:51:34 +0000 (09:51 +0000)]
netxen_nic: Log driver version with firmware version

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Thu, 30 May 2013 22:53:18 +0000 (15:53 -0700)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:
- reduce broadcast overhead on non-lossy wired links
- fix typos in kernel doc
- use eth_hdr() when possible
- use netdev_allock_skb_ip_align() and don't deal with NET_IP_ALIGN
- change VID semantic in the BLA component
- other minor cleanups and code refactoring

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/usb/kalmia: use %*phC to dump small buffers
Andy Shevchenko [Wed, 29 May 2013 07:22:30 +0000 (10:22 +0300)]
net/usb/kalmia: use %*phC to dump small buffers

Instead of dereferencing pointer and put values on stack we could use nice
%*phC specifier.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: trivial: update the comments to reflect the reality
Veaceslav Falico [Tue, 28 May 2013 01:26:13 +0000 (01:26 +0000)]
bonding: trivial: update the comments to reflect the reality

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: trivial: remove unused parameter from alb_swap_mac_addr()
Veaceslav Falico [Mon, 27 May 2013 23:14:51 +0000 (23:14 +0000)]
bonding: trivial: remove unused parameter from alb_swap_mac_addr()

After b924551 ("bonding: fix enslaving in alb mode when link down") we
don't need the bond parameter in alb_swap_mac_addr(), so remove it.

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: defer vxlan init as late as possible
Cong Wang [Mon, 27 May 2013 22:35:53 +0000 (22:35 +0000)]
vxlan: defer vxlan init as late as possible

When vxlan is compiled as builtin, its init code
runs before IPv6 init, this could cause problems
if we create IPv6 socket in the latter patch.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>