openwrt/staging/blogic.git
11 years agoigb: don't allow SR-IOV without MSI-X
Mitch A Williams [Thu, 20 Jun 2013 06:03:36 +0000 (06:03 +0000)]
igb: don't allow SR-IOV without MSI-X

MSI-X interrupts are required for SR-IOV operation. Check to make sure
they're enabled before allowing the user to turn on VFs.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoigb: Added rcu_lock to avoid race
Akeem G Abodunrin [Thu, 27 Jun 2013 09:10:23 +0000 (09:10 +0000)]
igb: Added rcu_lock to avoid race

This patch adds rcu_lock to avoid possible race condition with igb_update_stats
function accessing the rings in free_ q_vector.

CC: Eric Dumazet <edumazet@google.com>
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoigb: Read register for latch_on without return value
Akeem G Abodunrin [Thu, 6 Jun 2013 01:31:09 +0000 (01:31 +0000)]
igb: Read register for latch_on without return value

This patch changes register read to "just-read" without returning a value
for hardware to accurately latch the register value.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoigb: Reset the link when EEE setting changed
Akeem G Abodunrin [Fri, 24 May 2013 07:20:57 +0000 (07:20 +0000)]
igb: Reset the link when EEE setting changed

This patch resets the link, if link is up - whenever users enable or disable EEE

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agonet: phy: mdio-octeon: use platform_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 10:15:15 +0000 (18:15 +0800)]
net: phy: mdio-octeon: use platform_set_drvdata()

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

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: irda: pxaficp_ir: use platform_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 10:15:11 +0000 (18:15 +0800)]
net: irda: pxaficp_ir: use platform_set_drvdata()

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

Signed-off-by: Libo Chen <libo.chen@huawei.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 [Thu, 22 Aug 2013 03:46:16 +0000 (20:46 -0700)]
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next

Marc Kleine-Budde says:

====================
this pull-request for net-next consists of a series by Alexander
Shiyan, he cleans up the mcp251x driver. As the first patch touches
arch/arm/mach-pxa, it's acked by Haojian Zhuang.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agostmmac: remove useless csum flag
Giuseppe CAVALLARO [Wed, 21 Aug 2013 07:11:14 +0000 (09:11 +0200)]
stmmac: remove useless csum flag

This patch removes the no_csum_insertion private parameter that is not used anymore
and, also,  the "likely" annotation from the condition that is not in a critical path.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: emac: remove unnecessary dev_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 07:02:45 +0000 (15:02 +0800)]
net: emac: remove unnecessary dev_set_drvdata()

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: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: davinci_mdio: remove unnecessary dev_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 07:02:41 +0000 (15:02 +0800)]
net: davinci_mdio: remove unnecessary dev_set_drvdata()

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: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: xilinx_emaclite: remove unnecessary dev_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 07:02:36 +0000 (15:02 +0800)]
net: xilinx_emaclite: remove unnecessary dev_set_drvdata()

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: Libo Chen <libo.chen@huawei.com>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: sunhme: remove unnecessary dev_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 07:02:31 +0000 (15:02 +0800)]
net: sunhme: remove unnecessary dev_set_drvdata()

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: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: sunbmac: remove unnecessary dev_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 07:02:27 +0000 (15:02 +0800)]
net: sunbmac: remove unnecessary dev_set_drvdata()

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: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fec_mpc52xx_phy: remove unnecessary dev_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 07:02:22 +0000 (15:02 +0800)]
net: fec_mpc52xx_phy: remove unnecessary dev_set_drvdata()

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: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ucc_geth: remove unnecessary dev_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 07:02:18 +0000 (15:02 +0800)]
net: ucc_geth: remove unnecessary dev_set_drvdata()

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: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fsl_pq_mdio: remove unnecessary dev_set_drvdata()
Libo Chen [Wed, 21 Aug 2013 07:02:13 +0000 (15:02 +0800)]
net: fsl_pq_mdio: remove unnecessary dev_set_drvdata()

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: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'tuntap'
David S. Miller [Wed, 21 Aug 2013 19:21:50 +0000 (12:21 -0700)]
Merge branch 'tuntap'

Pavel Emelyanov says:

====================
tun: Some bits required for tun's checkpoint-restore (v2)

After taking a closer look on tun checkpoint-restore I've found several
issues with the tun's API that make it impossible to dump and restore
the state of tun device and attached tun-files.

The proposed API changes are all about extending the existing ioctl-based
stuff. Patches fit today's net-next.

This v2 has David's comments about patch #1 fixed. All the rest is the same.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotun: Get skfilter layout
Pavel Emelyanov [Wed, 21 Aug 2013 10:32:39 +0000 (14:32 +0400)]
tun: Get skfilter layout

The only thing we may have from tun device is the fprog, whic contains
the number of filter elements and a pointer to (user-space) memory
where the elements are. The program itself may not be available if the
device is persistent and detached.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotun: Allow to skip filter on attach
Pavel Emelyanov [Wed, 21 Aug 2013 10:32:21 +0000 (14:32 +0400)]
tun: Allow to skip filter on attach

There's a small problem with sk-filters on tun devices. Consider
an application doing this sequence of steps:

fd = open("/dev/net/tun");
ioctl(fd, TUNSETIFF, { .ifr_name = "tun0" });
ioctl(fd, TUNATTACHFILTER, &my_filter);
ioctl(fd, TUNSETPERSIST, 1);
close(fd);

At that point the tun0 will remain in the system and will keep in
mind that there should be a socket filter at address '&my_filter'.

If after that we do

fd = open("/dev/net/tun");
ioctl(fd, TUNSETIFF, { .ifr_name = "tun0" });

we most likely receive the -EFAULT error, since tun_attach() would
try to connect the filter back. But (!) if we provide a filter at
address &my_filter, then tun0 will be created and the "new" filter
would be attached, but application may not know about that.

This may create certain problems to anyone using tun-s, but it's
critical problem for c/r -- if we meet a persistent tun device
with a filter in mind, we will not be able to attach to it to dump
its state (flags, owner, address, vnethdr size, etc.).

The proposal is to allow to attach to tun device (with TUNSETIFF)
w/o attaching the filter to the tun-file's socket. After this
attach app may e.g clean the device by dropping the filter, it
doesn't want to have one, or (in case of c/r) get information
about the device with tun ioctls.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotun: Report whether the queue is attached or not
Pavel Emelyanov [Wed, 21 Aug 2013 10:32:00 +0000 (14:32 +0400)]
tun: Report whether the queue is attached or not

Multiqueue tun devices allow to attach and detach from its queues
while keeping the interface itself set on file.

Knowing this is critical for the checkpoint part of criu project.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotun: Add ability to create tun device with given index
Pavel Emelyanov [Wed, 21 Aug 2013 10:31:38 +0000 (14:31 +0400)]
tun: Add ability to create tun device with given index

Tun devices cannot be created with ifidex user wants, but it's
required by checkpoint-restore project.

Long time ago such ability was implemented for rtnl_ops-based
interface for creating links (9c7dafbf net: Allow to create links
with given ifindex), but the only API for creating and managing
tuntap devices is ioctl-based and is evolving with adding new ones
(cde8b15f tuntap: add ioctl to attach or detach a file form tuntap
device).

Following that trend, here's how a new ioctl that sets the ifindex
for device, that _will_ be created by TUNSETIFF ioctl looks like.
So those who want a tuntap device with the ifindex N, should open
the tun device, call ioctl(fd, TUNSETIFINDEX, &N), then call TUNSETIFF.
If the index N is busy, then the register_netdev will find this out
and the ioctl would be failed with -EBUSY.

If setifindex is not called, then it will be generated as before.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/mlx4_en: Reduce scope of local variables in mlx4_en_xmit
Amir Vadai [Wed, 21 Aug 2013 07:08:59 +0000 (10:08 +0300)]
net/mlx4_en: Reduce scope of local variables in mlx4_en_xmit

Some variables could have their scope reduced.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/mlx4_en: Fix handling of dma_map failure
Amir Vadai [Wed, 21 Aug 2013 07:08:58 +0000 (10:08 +0300)]
net/mlx4_en: Fix handling of dma_map failure

Result of skb_frag_dma_map() and dma_map_single() wasn't checked.
Added a check and proper handling in case of failure.
Moved the mapping to the beginning of mlx4_en_xmit(), before updating
the ring data structure to make error handling easier.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/mlx4_en: Notify user when TX ring in error state
Amir Vadai [Wed, 21 Aug 2013 07:08:57 +0000 (10:08 +0300)]
net/mlx4_en: Notify user when TX ring in error state

When hardware gets into error state, must notify user about it.
When QP in error state no traffic will be tx'ed from the attached
tx_ring.

Driver should know how to recover from this unexpected state. I will send later
on the recovery flow, but having the print shouldn't be delayed.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/mlx4_en: Disable global flow control when PFC enabled
Eugenia Emantayev [Wed, 21 Aug 2013 07:08:56 +0000 (10:08 +0300)]
net/mlx4_en: Disable global flow control when PFC enabled

Fix a bug when FC and PFC are enabled/disabled at the same time.
According to ConnectX-3 Programmer Manual these two features are mutial
exclusive.  So make sure when enabling PFC to turn off global FC and
vise versa.  Otherwise it hurts the performance.

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/mlx4_en: Coding style cleanup in mlx4_en_dcbnl_ieee_setpfc()
Amir Vadai [Wed, 21 Aug 2013 07:08:55 +0000 (10:08 +0300)]
net/mlx4_en: Coding style cleanup in mlx4_en_dcbnl_ieee_setpfc()

Fix some coding style issues in this function.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Update version to 5.3.48
Himanshu Madhani [Wed, 21 Aug 2013 15:24:14 +0000 (11:24 -0400)]
qlcnic: Update version to 5.3.48

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Implement ndo_get_phys_port_id for 82xx adapter
Shahed Shaikh [Wed, 21 Aug 2013 15:24:13 +0000 (11:24 -0400)]
qlcnic: Implement ndo_get_phys_port_id for 82xx adapter

Each function driver instance uses the MAC address of the
lowest function belonging to that physical port as a unique
port identifier. This port identifier is read and cached in
driver during probe and provided to user space through
ndo_get_phys_port_id()

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Enable diagnostic test for multiple Tx queues.
Himanshu Madhani [Wed, 21 Aug 2013 15:24:12 +0000 (11:24 -0400)]
qlcnic: Enable diagnostic test for multiple Tx queues.

o Enable diagnostic test via ethtool and QConvergeConsole
  application when Multiple Tx queues are enabled on 82xx
  series adapters.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Enable Tx queue changes using ethtool for 82xx Series adapter.
Himanshu Madhani [Wed, 21 Aug 2013 15:24:11 +0000 (11:24 -0400)]
qlcnic: Enable Tx queue changes using ethtool for 82xx Series adapter.

o using ethtool {set|get}_channel option, user can change number
  of Tx queues for 82xx Series adapter.
o updated ethtool -S <ethX> option to display stats from each Tx queue.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Multi Tx queue support for 82xx Series adapter.
Himanshu Madhani [Wed, 21 Aug 2013 15:24:10 +0000 (11:24 -0400)]
qlcnic: Multi Tx queue support for 82xx Series adapter.

o  82xx firmware allows support for multiple Tx queues. This
   patch will enable multi Tx queue support for 82xx series
   adapter. Max number of Tx queues supported will be 8.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocan: mcp251x: Allow tuning SPI mode and limit maximal SPI speed
Alexander Shiyan [Mon, 19 Aug 2013 11:39:21 +0000 (15:39 +0400)]
can: mcp251x: Allow tuning SPI mode and limit maximal SPI speed

Patch allow to use different mode settings for SPI (MODE3 for example)
and limit maximal speed according to IC datasheet.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agocan: mcp251x: Eliminate irq_flags from driver platform_data
Alexander Shiyan [Mon, 19 Aug 2013 11:39:20 +0000 (15:39 +0400)]
can: mcp251x: Eliminate irq_flags from driver platform_data

Flags is not used by boards, so remove this field from the driver
platform_data.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agocan: mcp251x: Replace power callbacks with regulator API
Alexander Shiyan [Mon, 19 Aug 2013 11:39:19 +0000 (15:39 +0400)]
can: mcp251x: Replace power callbacks with regulator API

This patch replaces power callbacks to the regulator API. To improve
the readability of the code, helper for the regulator enable/disable
was added.

Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agonet/phy: micrel: Add OF configuration support for ksz9021
Sean Cross [Wed, 21 Aug 2013 01:46:12 +0000 (01:46 +0000)]
net/phy: micrel: Add OF configuration support for ksz9021

Some boards require custom PHY configuration, for example due to trace
length differences.  Add the ability to configure these registers in
order to get the PHY to function on boards that need it.

Because PHYs are auto-detected based on MDIO device IDs, allow PHY
configuration to be specified in the parent Ethernet device node if no
PHY device node is present.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ipv6: mcast: minor: use defines for rfc3810/8.1 lengths
Daniel Borkmann [Tue, 20 Aug 2013 10:22:02 +0000 (12:22 +0200)]
net: ipv6: mcast: minor: use defines for rfc3810/8.1 lengths

Instead of hard-coding length values, use a define to make it clear
where those lengths come from.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ipv6: minor: *_start_timer: rather use unsigned long
Daniel Borkmann [Tue, 20 Aug 2013 10:22:01 +0000 (12:22 +0200)]
net: ipv6: minor: *_start_timer: rather use unsigned long

For the functions mld_gq_start_timer(), mld_ifc_start_timer(),
and mld_dad_start_timer(), rather use unsigned long than int
as we operate only on unsigned values anyway. This seems more
appropriate as there is no good reason to do type conversions
to int, that could lead to future errors.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ipv6: igmp6_event_query: use msecs_to_jiffies
Daniel Borkmann [Tue, 20 Aug 2013 10:22:00 +0000 (12:22 +0200)]
net: ipv6: igmp6_event_query: use msecs_to_jiffies

Use proper API functions to calculate jiffies from milliseconds and
not the crude method of dividing HZ by a value. This ensures more
accurate values even in the case of strange HZ values. While at it,
also simplify code in the mlh2 case by using max().

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: cpsw: Add support for wake-on-lan for cpsw
Matus Ujhelyi [Tue, 20 Aug 2013 05:59:38 +0000 (07:59 +0200)]
net: cpsw: Add support for wake-on-lan for cpsw

Some phy's can be configured to enable wake on lan (e.g. at803x or marvell 88E1318S).
There is no way how to enable wol on CPSW with such connected phys. This patch
adds this support. It is provided by calling the phy's related code.

Tested on board with at8030x connected phy. Wol interrupt line is
connected to GPIO0 on am335x.

Signed-off-by: Matus Ujhelyi <ujhelyi.m@gmail.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers: net: cpsw: remove platform data header file of cpsw
Mugunthan V N [Mon, 19 Aug 2013 12:17:40 +0000 (17:47 +0530)]
drivers: net: cpsw: remove platform data header file of cpsw

CPSW driver no longer supports platform register as all the SoCs which has CPSW
are supporting DT only booting, so moving cpsw.h header file from platform
include to drivers/net/ethernet/ti

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoip6_tunnel: ensure to always have a link local address
Nicolas Dichtel [Tue, 20 Aug 2013 10:16:06 +0000 (12:16 +0200)]
ip6_tunnel: ensure to always have a link local address

When an Xin6 tunnel is set up, we check other netdevices to inherit the link-
local address. If none is available, the interface will not have any link-local
address. RFC4862 expects that each interface has a link local address.

Now than this kind of tunnels supports x-netns, it's easy to fall in this case
(by creating the tunnel in a netns where ethernet interfaces stand and then
moving it to a other netns where no ethernet interface is available).

RFC4291, Appendix A suggests two methods: the first is the one currently
implemented, the second is to generate a unique identifier, so that we can
always generate the link-local address. Let's use eth_random_addr() to generate
this interface indentifier.

I remove completly the previous method, hence for the whole life of the
interface, the link-local address remains the same (previously, it depends on
which ethernet interfaces were up when the tunnel interface was set up).

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoRevert "ipv6: fix checkpatch errors in net/ipv6/addrconf.c"
David S. Miller [Wed, 21 Aug 2013 06:44:39 +0000 (23:44 -0700)]
Revert "ipv6: fix checkpatch errors in net/ipv6/addrconf.c"

This reverts commit df8372ca747f6da9e8590775721d9363c1dfc87e.

These changes are buggy and make unintended semantic changes
to ip6_tnl_add_linklocal().

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobcm63xx_enet: replace devm_request_and_ioremap by devm_ioremap_resource
Julia Lawall [Mon, 19 Aug 2013 11:20:39 +0000 (13:20 +0200)]
bcm63xx_enet: replace devm_request_and_ioremap by devm_ioremap_resource

Use devm_ioremap_resource instead of devm_request_and_ioremap.

This was done using the semantic patch
scripts/coccinelle/api/devm_ioremap_resource.cocci

The relevant call to platform_get_resource was manually moved down to the
call to devm_ioremap_resource.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: davinci_mdio: use platform_{get,set}_drvdata()
Libo Chen [Mon, 19 Aug 2013 12:00:37 +0000 (20:00 +0800)]
net: davinci_mdio: 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.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: xilinx_emaclite: use platform_{get,set}_drvdata()
Libo Chen [Mon, 19 Aug 2013 12:00:25 +0000 (20:00 +0800)]
net: xilinx_emaclite: 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 &of_dev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: sunhme: use platform_{get,set}_drvdata()
Libo Chen [Mon, 19 Aug 2013 11:59:36 +0000 (19:59 +0800)]
net: sunhme: 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 &of->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: sunbmac: use platform_{get,set}_drvdata()
Libo Chen [Mon, 19 Aug 2013 11:59:25 +0000 (19:59 +0800)]
net: sunbmac: 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 &of->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fec_mpc52xx_phy: use platform_{get,set}_drvdata()
Libo Chen [Mon, 19 Aug 2013 11:59:16 +0000 (19:59 +0800)]
net: fec_mpc52xx_phy: 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 &of->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ucc_geth: use platform_{get,set}_drvdata()
Libo Chen [Mon, 19 Aug 2013 11:59:09 +0000 (19:59 +0800)]
net: ucc_geth: 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 &ofdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fsl_pq_mdio: use platform_{get,set}_drvdata()
Libo Chen [Mon, 19 Aug 2013 11:58:40 +0000 (19:58 +0800)]
net: fsl_pq_mdio: 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.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: remove 'register_type' field from 'struct sh_eth_plat_data'
Sergei Shtylyov [Sat, 17 Aug 2013 23:13:26 +0000 (03:13 +0400)]
sh_eth: remove 'register_type' field from 'struct sh_eth_plat_data'

Now that the 'register_type' field of the 'sh_eth' driver's platform data is not
used by the driver anymore, it's time to remove it and  its initializers from
the SH platform code. Also  move *enum* declaring values for this  field from
<linux/sh_eth.h>  to  the  local driver's  header file as they're only needed
by the driver itself  now...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: get register layout from 'struct sh_eth_cpu_data'
Sergei Shtylyov [Sat, 17 Aug 2013 23:11:28 +0000 (03:11 +0400)]
sh_eth: get register layout from 'struct sh_eth_cpu_data'

The register layout is a SoC characteristic, so it's wrong that it's stored
in the otherwise board specific platform data. Add 'register_type' field to
'struct sh_eth_cpu_data', initialize it properly for each SoC, and read  it
from this structure instead of the platfrom data from now on...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoSolutionEngine7724: fix Ether support
Sergei Shtylyov [Sat, 17 Aug 2013 22:19:09 +0000 (02:19 +0400)]
SolutionEngine7724: fix Ether support

The Ether platform data is behind the declaration of 'struct sh_eth_plat_data'
as it's lacking the initializers for the 'register_type' and 'phy_interface'
fields -- it means they'll be implicitly and wrongly set to SH_ETH_REG_GIGABIT
and PHY_INTERFACE_MODE_NA. Initialize the fields explicitly and fix off-by-one
error in the Ether memory resource end, while at it...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoSH7619: fix Ether support
Sergei Shtylyov [Sat, 17 Aug 2013 22:15:42 +0000 (02:15 +0400)]
SH7619: fix Ether support

The 'sh_eth' driver's probe will crash as the platform code is hopelessly behind
the platform data -- it passes PHY ID instead of 'struct sh_eth_plat_data *'.
Strangely, both commit d88a3ea6fa4c (SH7619 add ethernet controler support) that
added the platform code and commit 71557a37adb5 ([netdrvr] sh_eth: Add  SH7619
support)  were done  in about  the same time, yet the latter one added 'struct
sh_eth_plat_data' and the platform code didn't ever get updated...

Add the proper platform data and fix off-by-one memory resource end error, while
at it...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipip: dereferencing an ERR_PTR in ip_tunnel_init_net()
Dan Carpenter [Mon, 19 Aug 2013 07:05:10 +0000 (10:05 +0300)]
ipip: dereferencing an ERR_PTR in ip_tunnel_init_net()

We need to move the derefernce after the IS_ERR() check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomyri10ge: Add support for ndo_busy_poll
Hyong-Youb Kim [Mon, 19 Aug 2013 09:02:19 +0000 (02:02 -0700)]
myri10ge: Add support for ndo_busy_poll

Add the ndo_busy_poll handler. Use skb_mark_napi_id to mark receive
packets with the napi id. For each slice, use per-slice spinlock and
state variable to ensure that only one handler processes receive
pacekts.

Locking, statistics counters, and the ndo_busy_poll handler follow
those in the ixgbe driver. So, credit goes to that driver's authors.

Signed-off-by: Hyong-Youb Kim <hykim@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: raise IP_MAX_MTU to theoretical limit
Eric Dumazet [Mon, 19 Aug 2013 02:08:07 +0000 (19:08 -0700)]
ipv4: raise IP_MAX_MTU to theoretical limit

As discussed last year [1], there is no compelling reason
to limit IPv4 MTU to 0xFFF0, while real limit is 0xFFFF

[1] : http://marc.info/?l=linux-netdev&m=135607247609434&w=2

Willem raised this issue again because some of our internal
regression tests broke after lo mtu being set to 65536.

IP_MTU reports 0xFFF0, and the test attempts to send a RAW datagram of
mtu + 1 bytes, expecting the send() to fail, but it does not.

Alexey raised interesting points about TCP MSS, that should be addressed
in follow-up patches in TCP stack if needed, as someone could also set
an odd mtu anyway.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovhost: Include linux/uio.h instead of linux/socket.h
Asias He [Mon, 19 Aug 2013 01:23:19 +0000 (09:23 +0800)]
vhost: Include linux/uio.h instead of linux/socket.h

memcpy_fromiovec is moved from net/core/iovec.c to lib/iovec.c.
linux/uio.h provides the declaration for memcpy_fromiovec.

Include linux/uio.h instead of inux/socket.h for it.

Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp: trivial: Remove nocache argument from tcp_v4_send_synack
Christoph Paasch [Sun, 18 Aug 2013 15:34:38 +0000 (17:34 +0200)]
tcp: trivial: Remove nocache argument from tcp_v4_send_synack

The nocache-argument was used in tcp_v4_send_synack as an argument to
inet_csk_route_req. However, since ba3f7f04ef2b (ipv4: Kill
FLOWI_FLAG_RT_NOCACHE and associated code.) this is no more used.

This patch removes the unsued argument from tcp_v4_send_synack.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agopch_gbe: ethtool cannot change parameters when link is down
Anders Larsen [Sun, 18 Aug 2013 09:54:40 +0000 (11:54 +0200)]
pch_gbe: ethtool cannot change parameters when link is down

When attempting to change e.g. the advertising mask when the link is down
ecmd->speed is -1 causing mii_ethtool_sset() to bail out.

This bug bit when connecting to a gigabit switch through a 4-pin (industrial)
cable, since link negotiation would not complete (both endpoints claimed to
be gigabit-capable, but this is not possible with only 4 pins).
Any attempt to fix this by setting autonegation to not offer 1000Mbps
failed as the setting would not be accepted while the link was still down...

Set ecmd->speed to SPEED_1000 to satisfy mii_ethtool_sset()
(the actual value of ecmd->speed doesn't matter as long as it is valid,
since a re-negotation is forced afterwards).

Signed-off-by: Anders Larsen <al@alarsen.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomoxa: fix missing unlock on error in moxart_mac_start_xmit()
Wei Yongjun [Sun, 18 Aug 2013 08:09:30 +0000 (16:09 +0800)]
moxa: fix missing unlock on error in moxart_mac_start_xmit()

Add the missing unlock before return from function moxart_mac_start_xmit()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosundance: Add myself as a maintainer
Denis Kirjanov [Sat, 17 Aug 2013 05:08:49 +0000 (09:08 +0400)]
sundance: Add myself as a maintainer

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosundance: Add netpoll support
Denis Kirjanov [Sat, 17 Aug 2013 05:08:48 +0000 (09:08 +0400)]
sundance: Add netpoll support

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: fix checkpatch errors in net/ipv6/addrconf.c
dingtianhong [Sat, 17 Aug 2013 02:27:15 +0000 (10:27 +0800)]
ipv6: fix checkpatch errors in net/ipv6/addrconf.c

ERROR: code indent should use tabs where possible: fix 2.
ERROR: do not use assignment in if condition: fix 5.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: convert the uses of ADBG and remove the superfluous parentheses
dingtianhong [Sat, 17 Aug 2013 02:27:04 +0000 (10:27 +0800)]
ipv6: convert the uses of ADBG and remove the superfluous parentheses

Just follow the Joe Perches's opinion, it is a better way to fix the
style errors.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: using kfree_rcu() to simplify the code
Wei Yongjun [Fri, 16 Aug 2013 23:32:09 +0000 (07:32 +0800)]
vxlan: using kfree_rcu() to simplify the code

The callback function of call_rcu() just calls a kfree(), so we
can use kfree_rcu() instead of call_rcu() + callback function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agor8169,sis190: remove unnecessary length check
Peter Wu [Fri, 16 Aug 2013 23:07:53 +0000 (01:07 +0200)]
r8169,sis190: remove unnecessary length check

The ethtool core will lower the requested length to the one returned by
get_regs_len, therefore no additional check is needed in the get_regs
function.

Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers/net: enic: Generate notification of hardware crash
Neel Patel [Fri, 16 Aug 2013 22:47:41 +0000 (15:47 -0700)]
drivers/net: enic: Generate notification of hardware crash

This patch generates a hardware crash notification (NETDEV_REBOOT)
during reset. After a hardware crash, ENIC resets all its resources
including queue pair filters programmed by USNIC. USNIC registers for
this notification, and on receiving it, reprograms the queue pair
filters.

Signed-off-by: Neel Patel <neepatel@cisco.com>
Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers/net: enic: Add an interface for USNIC to interact with firmware
Neel Patel [Fri, 16 Aug 2013 22:47:40 +0000 (15:47 -0700)]
drivers/net: enic: Add an interface for USNIC to interact with firmware

This patch adds an interface for USNIC to proxy firmware commands
through ENIC.

Signed-off-by: Neel Patel <neepatel@cisco.com>
Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers/net: enic: Adding support for Cisco Low Latency NIC
Neel Patel [Fri, 16 Aug 2013 22:47:39 +0000 (15:47 -0700)]
drivers/net: enic: Adding support for Cisco Low Latency NIC

This patch,
    - Adds new firmware commands for the new Cisco Low Latency NIC
      (aka. USNIC).

Signed-off-by: Neel Patel <neepatel@cisco.com>
Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
David S. Miller [Tue, 20 Aug 2013 20:30:54 +0000 (13:30 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/pablo/nf-next

Conflicts:
net/netfilter/nf_conntrack_proto_tcp.c

The conflict had to do with overlapping changes dealing with
fixing the use of an "s32" to hold the value returned by
NAT_OFFSET().

Pablo Neira Ayuso says:

====================
The following batch contains Netfilter/IPVS updates for your net-next tree.
More specifically, they are:

* Trivial typo fix in xt_addrtype, from Phil Oester.

* Remove net_ratelimit in the conntrack logging for consistency with other
  logging subsystem, from Patrick McHardy.

* Remove unneeded includes from the recently added xt_connlabel support, from
  Florian Westphal.

* Allow to update conntracks via nfqueue, don't need NFQA_CFG_F_CONNTRACK for
  this, from Florian Westphal.

* Remove tproxy core, now that we have socket early demux, from Florian
  Westphal.

* A couple of patches to refactor conntrack event reporting to save a good
  bunch of lines, from Florian Westphal.

* Fix missing locking in NAT sequence adjustment, it did not manifested in
  any known bug so far, from Patrick McHardy.

* Change sequence number adjustment variable to 32 bits, to delay the
  possible early overflow in long standing connections, also from Patrick.

* Comestic cleanups for IPVS, from Dragos Foianu.

* Fix possible null dereference in IPVS in the SH scheduler, from Daniel
  Borkmann.

* Allow to attach conntrack expectations via nfqueue. Before this patch, you
  had to use ctnetlink instead, thus, we save the conntrack lookup.

* Export xt_rpfilter and xt_HMARK header files, from Nicolas Dichtel.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch '6lowpan'
David S. Miller [Tue, 20 Aug 2013 20:23:29 +0000 (13:23 -0700)]
Merge branch '6lowpan'

Alexander Aring says:

====================
6lowpan: address uncompression fixes

The current implementation to uncompress addresses in a 6lowpan header
is completely broken.

This patch series fixes the parsing of addresses in a 6lowpan header.
It contains a major rewrite of the uncompress address function to parse
the address in a correct way.

Tested with the ravenusbstick(contiki 6LoWPAN stack) and beaglebone
(linux 6LoWPAN Stack) on the other side. The linux side contains all
possible addresses for the uncompression cases. Then I type a ping6 for
each case and lookup in wireshark and dmesg the correct reconstruction.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago6lowpan: handle context based source address
Alexander Aring [Fri, 16 Aug 2013 19:59:59 +0000 (21:59 +0200)]
6lowpan: handle context based source address

Handle context based address when an unspecified address is given.
For other context based address we print a warning and drop the packet
because we don't support it right now.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago6lowpan: lowpan_uncompress_addr with address_mode
Alexander Aring [Fri, 16 Aug 2013 19:59:58 +0000 (21:59 +0200)]
6lowpan: lowpan_uncompress_addr with address_mode

This patch drops the pre and postcount calculation from the
lowpan_uncompress_addr function.We use instead a switch/case
over address_mode value. The original implementation has several
bugs in this function and it was hard to decrypt how it works.
To make it maintainable and fix these bugs this patch basically
reimplements lowpan_uncompress_addr from scratch.

A list of bugs we found in the current implementation:

1) Properly support uncompression of short-address based IPv6 addresses
   (instead of basically copying garbage)

2) Fix use and uncompression of long-addresses based IPv6 addresses

3) Add missing ff:fe00 in the case of SAM/DAM = 2 and M = 0

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago6lowpan: add function to uncompress multicast addr
Alexander Aring [Fri, 16 Aug 2013 19:59:57 +0000 (21:59 +0200)]
6lowpan: add function to uncompress multicast addr

Add function to uncompress multicast address.
This function split the uncompress function for a multicast address
in a seperate function.

To uncompress a multicast address is different than a other
non-multicasts addresses according to rfc6282.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago6lowpan: introduce lowpan_fetch_skb function
Alexander Aring [Fri, 16 Aug 2013 19:59:56 +0000 (21:59 +0200)]
6lowpan: introduce lowpan_fetch_skb function

This patch adds a helper function to parse the ipv6 header to a
6lowpan header in stream.

This function checks first if we can pull data with a specific
length from a skb. If this seems to be okay, we copy skb data to
a destination pointer and run skb_pull.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago6lowpan: Fix fragmentation with link-local compressed addresses
David Hauweele [Fri, 16 Aug 2013 19:59:55 +0000 (21:59 +0200)]
6lowpan: Fix fragmentation with link-local compressed addresses

When a new 6lowpan fragment is received, a skbuff is allocated for
the reassembled packet. However when a 6lowpan packet compresses
link-local addresses based on link-layer addresses, the processing
function relies on the skb mac control block to find the related
link-layer address.

This patch copies the control block from the first fragment into
the newly allocated skb to keep a trace of the link-layer addresses
in case of a link-local compressed address.

Edit: small changes on comment issue

Signed-off-by: David Hauweele <david@hauweele.net>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago6lowpan: init ipv6hdr buffer to zero
Alexander Aring [Fri, 16 Aug 2013 19:59:54 +0000 (21:59 +0200)]
6lowpan: init ipv6hdr buffer to zero

This patch simplify the handling to set fields inside of struct ipv6hdr
to zero. Instead of setting some memory regions with memset to zero we
initialize the whole ipv6hdr to zero.

This is a simplification for parsing the 6lowpan header for the upcomming
patches.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Update version to 5.3.47
Himanshu Madhani [Fri, 16 Aug 2013 23:07:17 +0000 (19:07 -0400)]
qlcnic: Update version to 5.3.47

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Add support for 84xx adapters to load firmware from file
Pratik Pujar [Fri, 16 Aug 2013 23:07:16 +0000 (19:07 -0400)]
qlcnic: Add support for 84xx adapters to load firmware from file

o Use appropriate firmware image file name based on device IDs.

Signed-off-by: Pratik Pujar <pratik.pujar@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Loopback Inter Driver Communication AEN handler
Manish Chopra [Fri, 16 Aug 2013 23:07:15 +0000 (19:07 -0400)]
qlcnic: Loopback Inter Driver Communication AEN handler

o Loopback initiator function drivers should process loopback time extend AEN.
  These AENs are triggered by the loopback time extend mailbox command
  issued by the target function drivers.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Add PVID support for 84xx adapters
Manish Chopra [Fri, 16 Aug 2013 23:07:14 +0000 (19:07 -0400)]
qlcnic: Add PVID support for 84xx adapters

o 84xx adapters support VLAN stripping for PVID. Packets don't have
  VLAN tag inserted in case of PVID. So packet should follow non vlan path.

o Use capability bit to set PVID mode.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Enable support for 844X adapter
Manish Chopra [Fri, 16 Aug 2013 23:07:13 +0000 (19:07 -0400)]
qlcnic: Enable support for 844X adapter

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'openvswitch_vxlan'
David S. Miller [Tue, 20 Aug 2013 07:16:47 +0000 (00:16 -0700)]
Merge branch 'openvswitch_vxlan'

Pravin B Shelar says:

====================
openvswitch: VXLAN tunneling.

First four vxlan patches extends vxlan so that openvswitch
can share vxlan recv code. Rest of patches refactors vxlan
data plane so that ovs can share that code with vxlan module.
Last patch adds vxlan-vport to openvswitch.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoopenvswitch: Add vxlan tunneling support.
Pravin B Shelar [Mon, 19 Aug 2013 18:23:34 +0000 (11:23 -0700)]
openvswitch: Add vxlan tunneling support.

Following patch adds vxlan vport type for openvswitch using
vxlan api. So now there is vxlan dependency for openvswitch.

CC: Jesse Gross <jesse@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: Add tx-vlan offload support.
Pravin B Shelar [Mon, 19 Aug 2013 18:23:29 +0000 (11:23 -0700)]
vxlan: Add tx-vlan offload support.

Following patch allows transmit side vlan offload for vxlan
devices.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: Improve vxlan headroom calculation.
Pravin B Shelar [Mon, 19 Aug 2013 18:23:22 +0000 (11:23 -0700)]
vxlan: Improve vxlan headroom calculation.

Rather than having static headroom calculation, adjust headroom
according to target device.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: Factor out vxlan send api.
Pravin B Shelar [Mon, 19 Aug 2013 18:23:17 +0000 (11:23 -0700)]
vxlan: Factor out vxlan send api.

Following patch allows more code sharing between vxlan and ovs-vxlan.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: Extend vxlan handlers for openvswitch.
Pravin B Shelar [Mon, 19 Aug 2013 18:23:07 +0000 (11:23 -0700)]
vxlan: Extend vxlan handlers for openvswitch.

Following patch adds data field to vxlan socket and export
vxlan handler api.
vh->data is required to store private data per vxlan handler.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: Add vxlan recv demux.
Pravin B Shelar [Mon, 19 Aug 2013 18:23:02 +0000 (11:23 -0700)]
vxlan: Add vxlan recv demux.

Once we have ovs-vxlan functionality, one UDP port can be assigned
to kernel-vxlan or ovs-vxlan port.  Therefore following patch adds
vxlan demux functionality, so that vxlan or ovs module can
register for particular port.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: Restructure vxlan receive.
Pravin B Shelar [Mon, 19 Aug 2013 18:22:54 +0000 (11:22 -0700)]
vxlan: Restructure vxlan receive.

Use iptunnel_pull_header() for better code sharing.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: Restructure vxlan socket apis.
Pravin B Shelar [Mon, 19 Aug 2013 18:22:48 +0000 (11:22 -0700)]
vxlan: Restructure vxlan socket apis.

Restructure vxlan-socket management APIs so that it can be
shared between vxlan and ovs modules.
This patch does not change any functionality.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
v6-v7:
 - get rid of zero refcnt vs from hashtable.
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agor8152: add comments
hayeswang [Fri, 16 Aug 2013 08:09:38 +0000 (16:09 +0800)]
r8152: add comments

Add comments.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agor8152: adjust tx_bottom function
hayeswang [Fri, 16 Aug 2013 08:09:37 +0000 (16:09 +0800)]
r8152: adjust tx_bottom function

Split some parts of code into another function to simplify
tx_bottom(). Use while loop to replace the goto loop.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agor8152: move some declearation of variables
hayeswang [Fri, 16 Aug 2013 08:09:36 +0000 (16:09 +0800)]
r8152: move some declearation of variables

Move some declearation of variables in rx_bottom().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agor8152: adjust some duplicated code
hayeswang [Fri, 16 Aug 2013 08:09:35 +0000 (16:09 +0800)]
r8152: adjust some duplicated code

- Use r8152_get_tx_agg for getting tx agg list
- Replace submit rx with goto submit

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agor8152: replace lockflags with flags
hayeswang [Fri, 16 Aug 2013 08:09:34 +0000 (16:09 +0800)]
r8152: replace lockflags with flags

Replace lockflags with flags.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agor8152: replace void * with struct r8152 *
hayeswang [Fri, 16 Aug 2013 08:09:33 +0000 (16:09 +0800)]
r8152: replace void * with struct r8152 *

Change the type of contex of tx_agg and rx_agg from void * to
staruc r8152 *.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agor8152: remove clearing the memory to zero for netdev priv
hayeswang [Fri, 16 Aug 2013 08:09:32 +0000 (16:09 +0800)]
r8152: remove clearing the memory to zero for netdev priv

Remove memset(tp, 0, sizeof(*tp));

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosis900: don't restart auto-negotiation each time after link resume.
Denis Kirjanov [Fri, 16 Aug 2013 07:20:07 +0000 (11:20 +0400)]
sis900: don't restart auto-negotiation each time after link resume.

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>