platform/kernel/linux-stable.git
13 years agobonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
Jiri Pirko [Wed, 16 Mar 2011 08:46:43 +0000 (08:46 +0000)]
bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag

Since bond-related code was moved from net/core/dev.c into bonding,
IFF_SLAVE_INACTIVE is no longer needed. Replace is with flag "inactive"
stored in slave structure

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: wrap slave state work
Jiri Pirko [Sat, 12 Mar 2011 03:14:37 +0000 (03:14 +0000)]
bonding: wrap slave state work

transfers slave->state into slave->backup (that it's going to transfer
into bitfield. Introduce wrapper inlines to do the work with it.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: get rid of multiple bond-related netdevice->priv_flags
Jiri Pirko [Wed, 16 Mar 2011 08:45:23 +0000 (08:45 +0000)]
net: get rid of multiple bond-related netdevice->priv_flags

Now when bond-related code is moved from net/core/dev.c into bonding
code, multiple priv_flags are not needed anymore. So let them rot.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: register slave pointer for rx_handler
Jiri Pirko [Sat, 12 Mar 2011 03:14:35 +0000 (03:14 +0000)]
bonding: register slave pointer for rx_handler

Register slave pointer as rx_handler data. That would eventually prevent
need to loop over slave devices to find the right slave.

Use synchronize_net to ensure that bond_handle_frame does not get slave
structure freed when working with that.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Bump up the version number
Ajit Khaparde [Wed, 16 Mar 2011 08:21:00 +0000 (08:21 +0000)]
be2net: Bump up the version number

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Copyright notice change. Update to Emulex instead of ServerEngines
Ajit Khaparde [Wed, 16 Mar 2011 08:20:46 +0000 (08:20 +0000)]
be2net: Copyright notice change. Update to Emulex instead of ServerEngines

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoe1000e: fix kconfig for crc32 dependency
Eric Dumazet [Wed, 16 Mar 2011 05:16:57 +0000 (05:16 +0000)]
e1000e: fix kconfig for crc32 dependency

ERROR: "crc32_le" [drivers/net/e1000e/e1000e.ko] undefined!

Reported-by: Frank Peters <frank.peters@comcast.net>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Bruce Allan <bruce.w.allan@intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Wed, 16 Mar 2011 18:12:57 +0000 (11:12 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-next-2.6

13 years agonetfilter ebtables: fix xt_AUDIT to work with ebtables
Thomas Graf [Wed, 16 Mar 2011 17:32:13 +0000 (18:32 +0100)]
netfilter ebtables: fix xt_AUDIT to work with ebtables

Even though ebtables uses xtables it still requires targets to
return EBT_CONTINUE instead of XT_CONTINUE. This prevented
xt_AUDIT to work as ebt module.

Upon Jan's suggestion, use a separate struct xt_target for
NFPROTO_BRIDGE having its own target callback returning
EBT_CONTINUE instead of cloning the module.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agoxen network backend driver
Ian Campbell [Tue, 15 Mar 2011 00:06:18 +0000 (00:06 +0000)]
xen network backend driver

netback is the host side counterpart to the frontend driver in
drivers/net/xen-netfront.c. The PV protocol is also implemented by
frontend drivers in other OSes too, such as the BSDs and even Windows.

The patch is based on the driver from the xen.git pvops kernel tree but
has been put through the checkpatch.pl wringer plus several manual
cleanup passes and review iterations. The driver has been moved from
drivers/xen/netback to drivers/net/xen-netback.

One major change from xen.git is that the guest transmit path (i.e. what
looks like receive to netback) has been significantly reworked to remove
the dependency on the out of tree PageForeign page flag (a core kernel
patch which enables a per page destructor callback on the final
put_page). This page flag was used in order to implement a grant map
based transmit path (where guest pages are mapped directly into SKB
frags). Instead this version of netback uses grant copy operations into
regular memory belonging to the backend domain. Reinstating the grant
map functionality is something which I would like to revisit in the
future.

Note that this driver depends on 2e820f58f7ad "xen/irq: implement
bind_interdomain_evtchn_to_irqhandler for backend drivers" which is in
linux next via the "xen-two" tree and is intended for the 2.6.39 merge
window:
        git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/backends
this branch has only that single commit since 2.6.38-rc2 and is safe for
cross merging into the net branch.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'stable/backends' of git://git.kernel.org/pub/scm/linux/kernel/git/konra...
David S. Miller [Wed, 16 Mar 2011 02:37:10 +0000 (19:37 -0700)]
Merge branch 'stable/backends' of git://git./linux/kernel/git/konrad/xen

13 years agobonding: Improve syslog message at device creation time
Phil Oester [Mon, 14 Mar 2011 06:22:06 +0000 (06:22 +0000)]
bonding: Improve syslog message at device creation time

When the bonding module is loaded, it creates bond0 by default.
Then, when attempting to create bond0, the following messages
are printed to syslog:

    kernel: bonding: bond0 is being created...
    kernel: bonding: Bond creation failed.

Which seems to indicate a problem, when in reality there is no
problem.  Since the actual error code is passed down from bond_create,
make use of it to print a bit less ominous message:

    kernel: bonding: bond0 is being created...
    kernel: bond0 already exists.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: Call netif_carrier_off after register_netdevice
Phil Oester [Mon, 14 Mar 2011 06:22:05 +0000 (06:22 +0000)]
bonding: Call netif_carrier_off after register_netdevice

Bringing up a bond interface with all network cables disconnected
does not properly set the interface as DOWN because the call to
netif_carrier_off occurs too early in bond_init.  The call needs
to occur after register_netdevice has set dev->reg_state to
NETREG_REGISTERED, so that netif_carrier_off will trigger the
call to linkwatch_fire_event.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: Incorrect TX queue offset
Phil Oester [Mon, 14 Mar 2011 06:22:04 +0000 (06:22 +0000)]
bonding: Incorrect TX queue offset

When packets come in from a device with >= 16 receive queues
headed out a bonding interface, syslog gets filled with this:

    kernel: bond0 selects TX queue 16, but real number of TX queues is 16

because queue_mapping is offset by 1.  Adjust return value
to account for the offset.

This is a revision of my earlier patch (which did not use the
skb_rx_queue_* helpers - thanks to Ben for the suggestion).
Andy submitted a similar patch which emits a pr_warning on
invalid queue selection, but I believe the log spew is
not useful.  We can revisit that question in the future,
but in the interim I believe fixing the core problem is
worthwhile.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 16 Mar 2011 01:55:20 +0000 (18:55 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

13 years agonet_sched: fix ip_tos2prio
Dan Siemon [Tue, 15 Mar 2011 13:56:07 +0000 (13:56 +0000)]
net_sched: fix ip_tos2prio

ECN support incorrectly maps ECN BESTEFFORT packets to TC_PRIO_FILLER
(1) instead of TC_PRIO_BESTEFFORT (0)

This means ECN enabled flows are placed in pfifo_fast/prio low priority
band, giving ECN enabled flows [ECT(0) and CE codepoints] higher drop
probabilities.

This is rather unfortunate, given we would like ECN being more widely
used.

Ref : http://www.coverfire.com/archives/2011/03/13/pfifo_fast-and-ecn/

Signed-off-by: Dan Siemon <dan@coverfire.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Dave Täht <d@taht.net>
Cc: Jonathan Morton <chromatix99@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: fix __xfrm_route_forward()
Eric Dumazet [Tue, 15 Mar 2011 22:26:43 +0000 (15:26 -0700)]
xfrm: fix __xfrm_route_forward()

This function should return 0 in case of error, 1 if OK
commit 452edd598f60522 (xfrm: Return dst directly from xfrm_lookup())
got it wrong.

Reported-and-bisected-by: Michael Smith <msmith@cbnco.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 15 Mar 2011 22:15:17 +0000 (15:15 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

13 years agoMerge branch 'irq/numa' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux...
David S. Miller [Tue, 15 Mar 2011 22:06:35 +0000 (15:06 -0700)]
Merge branch 'irq/numa' of git://git./linux/kernel/git/tip/linux-2.6-tip

13 years agobe2net: Fix UDP packet detected status in RX compl
Padmanabh Ratnakar [Tue, 15 Mar 2011 21:57:09 +0000 (14:57 -0700)]
be2net: Fix UDP packet detected status in RX compl

Status of UDP packet detection not getting populated in RX completion
structure. This is required in csum_passed() routine.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoPhonet: fix aligned-mode pipe socket buffer header reserve
Rémi Denis-Courmont [Tue, 15 Mar 2011 21:55:49 +0000 (14:55 -0700)]
Phonet: fix aligned-mode pipe socket buffer header reserve

When the pipe uses aligned-mode data packets, we must reserve 4 bytes
instead of 3 for the pipe protocol header. Otherwise the Phonet header
would not be aligned, resulting in potentially corrupted headers with
later unaligned memory writes.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetxen: support for GbE port settings
Sony Chacko [Tue, 15 Mar 2011 21:54:55 +0000 (14:54 -0700)]
netxen: support for GbE port settings

o Enable setting speed and auto negotiation parameters for GbE ports.
o Hardware do not support half duplex setting currently.

David Miller:
Amit please update your patch to silently reject link setting
attempts that are unsupported by the device.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosmsc911x: Fix build error when SMSC_TRACE() used
Jeongtae Park [Tue, 15 Mar 2011 21:52:48 +0000 (14:52 -0700)]
smsc911x: Fix build error when SMSC_TRACE() used

This patch fixes build error when SMSC_TRACE() used.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Tue, 15 Mar 2011 21:50:09 +0000 (14:50 -0700)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6

13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Tue, 15 Mar 2011 20:57:18 +0000 (13:57 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Tue, 15 Mar 2011 20:03:27 +0000 (13:03 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-next-2.6

Conflicts:
Documentation/feature-removal-schedule.txt

13 years agonetfilter: xt_addrtype: ipv6 support
Florian Westphal [Tue, 15 Mar 2011 19:17:44 +0000 (20:17 +0100)]
netfilter: xt_addrtype: ipv6 support

The kernel will refuse certain types that do not work in ipv6 mode.
We can then add these features incrementally without risk of userspace
breakage.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: ipt_addrtype: rename to xt_addrtype
Florian Westphal [Tue, 15 Mar 2011 19:16:20 +0000 (20:16 +0100)]
netfilter: ipt_addrtype: rename to xt_addrtype

Followup patch will add ipv6 support.

ipt_addrtype.h is retained for compatibility reasons, but no longer used
by the kernel.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 15 Mar 2011 18:16:48 +0000 (14:16 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem

13 years agoipv6: netfilter: ip6_tables: fix infoleak to userspace
Vasiliy Kulikov [Tue, 15 Mar 2011 12:37:13 +0000 (13:37 +0100)]
ipv6: netfilter: ip6_tables: fix infoleak to userspace

Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are
copied from userspace.  Fields of these structs that are
zero-terminated strings are not checked.  When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
information is leaked to userspace via argument of spawned modprobe
process.

The first bug was introduced before the git epoch;  the second was
introduced in 3bc3fe5e (v2.6.25-rc1);  the third is introduced by
6b7d31fc (v2.6.15-rc1).  To trigger the bug one should have
CAP_NET_ADMIN.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: ip_tables: fix infoleak to userspace
Vasiliy Kulikov [Tue, 15 Mar 2011 12:36:05 +0000 (13:36 +0100)]
netfilter: ip_tables: fix infoleak to userspace

Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace.  Fields of these structs that are
zero-terminated strings are not checked.  When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
information is leaked to userspace via argument of spawned modprobe
process.

The first and the third bugs were introduced before the git epoch; the
second was introduced in 2722971c (v2.6.17-rc1).  To trigger the bug
one should have CAP_NET_ADMIN.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: arp_tables: fix infoleak to userspace
Vasiliy Kulikov [Tue, 15 Mar 2011 12:35:21 +0000 (13:35 +0100)]
netfilter: arp_tables: fix infoleak to userspace

Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace.  Fields of these structs that are
zero-terminated strings are not checked.  When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
information is leaked to userspace via argument of spawned modprobe
process.

The first bug was introduced before the git epoch;  the second is
introduced by 6b7d31fc (v2.6.15-rc1);  the third is introduced by
6b7d31fc (v2.6.15-rc1).  To trigger the bug one should have
CAP_NET_ADMIN.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: xt_connlimit: remove connlimit_rnd_inited
Changli Gao [Tue, 15 Mar 2011 12:26:32 +0000 (13:26 +0100)]
netfilter: xt_connlimit: remove connlimit_rnd_inited

A potential race condition when generating connlimit_rnd is also fixed.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: xt_connlimit: use hlist instead
Changli Gao [Tue, 15 Mar 2011 12:25:42 +0000 (13:25 +0100)]
netfilter: xt_connlimit: use hlist instead

The header of hlist is smaller than list.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: xt_connlimit: use kmalloc() instead of kzalloc()
Changli Gao [Tue, 15 Mar 2011 12:24:56 +0000 (13:24 +0100)]
netfilter: xt_connlimit: use kmalloc() instead of kzalloc()

All the members are initialized after kzalloc().

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: xt_connlimit: fix daddr connlimit in SNAT scenario
Changli Gao [Tue, 15 Mar 2011 12:23:28 +0000 (13:23 +0100)]
netfilter: xt_connlimit: fix daddr connlimit in SNAT scenario

We use the reply tuples when limiting the connections by the destination
addresses, however, in SNAT scenario, the final reply tuples won't be
ready until SNAT is done in POSTROUING or INPUT chain, and the following
nf_conntrack_find_get() in count_tem() will get nothing, so connlimit
can't work as expected.

In this patch, the original tuples are always used, and an additional
member addr is appended to save the address in either end.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agoigb: Add messaging for thermal sensor events on i350 devices
Carolyn Wyborny [Sat, 12 Mar 2011 08:59:47 +0000 (08:59 +0000)]
igb: Add messaging for thermal sensor events on i350 devices

This feature adds messaging to the link status change to notify
the user if the device returned from a downshift or power off
event due to the Thermal Sensor feature in i350 parts. Feature
is only available on internal copper ports.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: fix hw timestamping
Anders Berggren [Fri, 4 Feb 2011 07:32:32 +0000 (07:32 +0000)]
igb: fix hw timestamping

Hardware timestamping for Intel 82580 didn't work in either 2.6.36 or
2.6.37. Comparing it to Intel's igb-2.4.12 I found that the
timecounter_init clock/counter initialization was done too early.

Signed-off-by: Anders Berggren <andfers@halon.se>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoxen: netfront: fix xennet_get_ethtool_stats()
Eric Dumazet [Tue, 15 Mar 2011 04:05:40 +0000 (21:05 -0700)]
xen: netfront: fix xennet_get_ethtool_stats()

commit e9a799ea4a5551d2 (xen: netfront: ethtool stats fields should be
unsigned long) made rx_gso_checksum_fixup an unsigned long.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoIPVS: Conditionally include sysctl members of struct netns_ipvs
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Conditionally include sysctl members of struct netns_ipvs

There is now no need to include sysctl members of struct netns_ipvs
unless CONFIG_SYSCTL is defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add __ip_vs_control_{init,cleanup}_sysctl()
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Add __ip_vs_control_{init,cleanup}_sysctl()

Break out the portions of __ip_vs_control_init() and
__ip_vs_control_cleanup() where aren't necessary when
CONFIG_SYSCTL is undefined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Conditionally define and use ip_vs_lblc{r}_table
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Conditionally define and use ip_vs_lblc{r}_table

ip_vs_lblc_table and ip_vs_lblcr_table, and code that uses them
are unnecessary when CONFIG_SYSCTL is undefined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Minimise ip_vs_leave when CONFIG_SYSCTL is undefined
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Minimise ip_vs_leave when CONFIG_SYSCTL is undefined

Much of ip_vs_leave() is unnecessary if CONFIG_SYSCTL is undefined.

I tried an approach of breaking the now #ifdef'ed portions out
into a separate function. However this appeared to grow the
compiled code on x86_64 by about 200 bytes in the case where
CONFIG_SYSCTL is defined. So I have gone with the simpler though
less elegant #ifdef'ed solution for now.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Conditional ip_vs_conntrack_enabled()
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Conditional ip_vs_conntrack_enabled()

ip_vs_conntrack_enabled() becomes a noop when CONFIG_SYSCTL is undefined.

In preparation for not including sysctl_conntrack in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: ip_vs_todrop() becomes a noop when CONFIG_SYSCTL is undefined
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: ip_vs_todrop() becomes a noop when CONFIG_SYSCTL is undefined

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Conditinally use sysctl_lblc{r}_expiration
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Conditinally use sysctl_lblc{r}_expiration

In preparation for not including sysctl_lblc{r}_expiration in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add expire_quiescent_template()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add expire_quiescent_template()

In preparation for not including sysctl_expire_quiescent_template in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add sysctl_expire_nodest_conn()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add sysctl_expire_nodest_conn()

In preparation for not including sysctl_expire_nodest_conn in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add sysctl_sync_ver()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add sysctl_sync_ver()

In preparation for not including sysctl_sync_ver in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add {sysctl_sync_threshold,period}()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add {sysctl_sync_threshold,period}()

In preparation for not including sysctl_sync_threshold in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add sysctl_nat_icmp_send()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add sysctl_nat_icmp_send()

In preparation for not including sysctl_nat_icmp_send in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add sysctl_snat_reroute()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add sysctl_snat_reroute()

In preparation for not including sysctl_snat_reroute in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add ip_vs_route_me_harder()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add ip_vs_route_me_harder()

Add ip_vs_route_me_harder() to avoid repeating the same code twice.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: rename estimator functions
Julian Anastasov [Sun, 13 Mar 2011 23:44:28 +0000 (01:44 +0200)]
ipvs: rename estimator functions

  Rename ip_vs_new_estimator to ip_vs_start_estimator
and ip_vs_kill_estimator to ip_vs_stop_estimator to better
match their logic.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: optimize rates reading
Julian Anastasov [Sun, 13 Mar 2011 23:41:54 +0000 (01:41 +0200)]
ipvs: optimize rates reading

  Move the estimator reading from estimation_timer to user
context. ip_vs_read_estimator() will be used to decode the rate
values. As the decoded rates are not set by estimation timer
there is no need to reset them in ip_vs_zero_stats.

  There is no need ip_vs_new_estimator() to encode stats
to rates, if the destination is in trash both the stats and the
rates are inactive.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: remove unused seqcount stats
Julian Anastasov [Sun, 13 Mar 2011 23:39:18 +0000 (01:39 +0200)]
ipvs: remove unused seqcount stats

  Remove ustats_seq, IPVS_STAT_INC and IPVS_STAT_ADD
because they are not used. They were replaced with u64_stats.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: properly zero stats and rates
Julian Anastasov [Sun, 13 Mar 2011 23:37:49 +0000 (01:37 +0200)]
ipvs: properly zero stats and rates

  Currently, the new percpu counters are not zeroed and
the zero commands do not work as expected, we still show the old
sum of percpu values. OTOH, we can not reset the percpu counters
from user context without causing the incrementing to use old
and bogus values.

  So, as Eric Dumazet suggested fix that by moving all overhead
to stats reading in user context. Do not introduce overhead in
timer context (estimator) and incrementing (packet handling in
softirqs).

  The new ustats0 field holds the zero point for all
counter values, the rates always use 0 as base value as before.
When showing the values to user space just give the difference
between counters and the base values. The only drawback is that
percpu stats are not zeroed, they are accessible only from /proc
and are new interface, so it should not be a compatibility problem
as long as the sum stats are correct after zeroing.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: reorganize tot_stats
Julian Anastasov [Fri, 4 Mar 2011 10:20:35 +0000 (12:20 +0200)]
ipvs: reorganize tot_stats

  The global tot_stats contains cpustats field just like the
stats for dest and svc, so better use it to simplify the usage
in estimation_timer. As tot_stats is registered as estimator
we can remove the special ip_vs_read_cpu_stats call for
tot_stats. Fix ip_vs_read_cpu_stats to be called under
stats lock because it is still used as synchronization between
estimation timer and user context (the stats readers).

  Also, make sure ip_vs_stats_percpu_show reads properly
the u64 stats from user context.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: move struct netns_ipvs
Julian Anastasov [Fri, 4 Mar 2011 10:18:07 +0000 (12:18 +0200)]
ipvs: move struct netns_ipvs

  Remove include/net/netns/ip_vs.h because it depends on
structures from include/net/ip_vs.h. As ipvs is pointer in
struct net it is better to move struct netns_ipvs into
include/net/ip_vs.h, so that we can easily use other structures
in struct netns_ipvs.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Fix variable assignment in ip_vs_notrack
Jesper Juhl [Wed, 9 Mar 2011 21:55:05 +0000 (22:55 +0100)]
IPVS: Fix variable assignment in ip_vs_notrack

There's no sense to 'ct = ct = ' in ip_vs_notrack(). Just assign
nf_ct_get()'s return value directly to the pointer variable 'ct' once.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agonetfilter:ipvs: use kmemdup
Shan Wei [Mon, 7 Mar 2011 02:11:34 +0000 (10:11 +0800)]
netfilter:ipvs: use kmemdup

The semantic patch that makes this output is available
in scripts/coccinelle/api/memdup.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: remove _bh from percpu stats reading
Julian Anastasov [Fri, 4 Mar 2011 10:28:20 +0000 (12:28 +0200)]
ipvs: remove _bh from percpu stats reading

  ip_vs_read_cpu_stats is called only from timer, so
no need for _bh locks.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: avoid lookup for fwmark 0
Julian Anastasov [Fri, 4 Mar 2011 10:26:17 +0000 (12:26 +0200)]
ipvs: avoid lookup for fwmark 0

  Restore the previous behaviour to lookup for fwmark
service only when fwmark is non-null. This saves only CPU.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agonet: dcbnl: Add IEEE app selector value definitions
Mark Rustad [Mon, 14 Mar 2011 09:01:15 +0000 (09:01 +0000)]
net: dcbnl: Add IEEE app selector value definitions

This adds defines for the app selector values currently
defined in the IEEE 802.1Qaz specification.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: dcbnl: Fix misspellings
Mark Rustad [Mon, 14 Mar 2011 09:01:08 +0000 (09:01 +0000)]
net: dcbnl: Fix misspellings

Fix a few spelling errors in dcbnl.h.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: dcbnl: Update copyright dates
Mark Rustad [Mon, 14 Mar 2011 09:01:02 +0000 (09:01 +0000)]
net: dcbnl: Update copyright dates

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomacvlan : fix checksums error when we are in bridge mode
Daniel Lezcano [Mon, 14 Mar 2011 06:08:07 +0000 (06:08 +0000)]
macvlan : fix checksums error when we are in bridge mode

When the lower device has offloading capabilities, the packets checksums
are not computed. That leads to have any macvlan port in bridge mode to
not work because the packets are dropped due to a bad checksum.

If the macvlan is in bridge mode, the packet is forwarded to another
macvlan port and reach the network stack where it looks for a checksum
but this one was not computed due to the offloading of the lower device.
In this case, we have to set the packet with CHECKSUM_UNNECESSARY
when it is forwarded to a bridged port and restore the previous value of
ip_summed when the packet goes to the lowerdev.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Andrian Nord <nightnord@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofcoe: correct checking for bonding
Jiri Pirko [Tue, 1 Mar 2011 20:05:35 +0000 (20:05 +0000)]
fcoe: correct checking for bonding

Check for bonding master and refuse to use that.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Robert Love <robert.w.love@intel.com>
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoCS89x0: Add networking support for QQ2440
Domenico Andreoli [Mon, 14 Mar 2011 03:47:07 +0000 (03:47 +0000)]
CS89x0: Add networking support for QQ2440

QQ2440 is only another non-ISA board using CS89x0. This patch adds the
minimum bits required to make QQ2440 work with CS89x0.

Signed-off-by: Domenico Andreoli <cavokz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoCS89x0: Finish transition to CS89x0_NONISA_IRQ
Domenico Andreoli [Mon, 14 Mar 2011 03:46:53 +0000 (03:46 +0000)]
CS89x0: Finish transition to CS89x0_NONISA_IRQ

CS89x0_NONISA_IRQ is selected by all those non-ISA boards which use
CS89x0. This patch only cleans the last bits left after its introduction.

Signed-off-by: Domenico Andreoli <cavokz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: fix low utilization of CUBIC with HyStart
Sangtae Ha [Mon, 14 Mar 2011 07:52:18 +0000 (07:52 +0000)]
tcp_cubic: fix low utilization of CUBIC with HyStart

HyStart sets the initial exit point of slow start.
Suppose that HyStart exits at 0.5BDP in a BDP network and no history exists.
If the BDP of a network is large, CUBIC's initial cwnd growth may be
too conservative to utilize the link.
CUBIC increases the cwnd 20% per RTT in this case.

Signed-off-by: Sangtae Ha <sangtae.ha@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: make the delay threshold of HyStart less sensitive
Sangtae Ha [Mon, 14 Mar 2011 07:52:17 +0000 (07:52 +0000)]
tcp_cubic: make the delay threshold of HyStart less sensitive

Make HyStart less sensitive to abrupt delay variations due to buffer bloat.

Signed-off-by: Sangtae Ha <sangtae.ha@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Lucas Nussbaum <lucas.nussbaum@loria.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: enable high resolution ack time if needed
stephen hemminger [Mon, 14 Mar 2011 07:52:16 +0000 (07:52 +0000)]
tcp_cubic: enable high resolution ack time if needed

This is a refined version of an earlier patch by Lucas Nussbaum.
Cubic needs RTT values in milliseconds. If HZ < 1000 then
the values will be too coarse.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Lucas Nussbaum <lucas.nussbaum@loria.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: fix clock dependency
stephen hemminger [Mon, 14 Mar 2011 07:52:15 +0000 (07:52 +0000)]
tcp_cubic: fix clock dependency

The hystart code was written with assumption that HZ=1000.
Replace the use of jiffies with bictcp_clock as a millisecond
real time clock.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Lucas Nussbaum <lucas.nussbaum@loria.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: make ack train delta value a parameter
stephen hemminger [Mon, 14 Mar 2011 07:52:14 +0000 (07:52 +0000)]
tcp_cubic: make ack train delta value a parameter

Make the spacing between ACK's that indicates a train a tuneable
value like other hystart values.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: fix comparison of jiffies
stephen hemminger [Mon, 14 Mar 2011 07:52:13 +0000 (07:52 +0000)]
tcp_cubic: fix comparison of jiffies

Jiffies wraps around therefore the correct way to compare is
to use cast to signed value.

Note: cubic is not using full jiffies value on 64 bit arch
because using full unsigned long makes struct bictcp grow too
large for the available ca_priv area.

Includes correction from Sangtae Ha to improve ack train detection.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: fix RTT for quick packets in congestion control
stephen hemminger [Mon, 14 Mar 2011 07:52:12 +0000 (07:52 +0000)]
tcp: fix RTT for quick packets in congestion control

In the congestion control interface, the callback for each ACK
includes an estimated round trip time in microseconds.
Some algorithms need high resolution (Vegas style) but most only
need jiffie resolution.  If RTT is not accurate (like a retransmission)
-1 is used as a flag value.

When doing coarse resolution if RTT is less than a a jiffie
then 0 should be returned rather than no estimate. Otherwise algorithms
that expect good ack's to trigger slow start (like CUBIC Hystart)
will be confused.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoftmac100: use GFP_ATOMIC allocations where needed
Eric Dumazet [Mon, 14 Mar 2011 22:40:39 +0000 (15:40 -0700)]
ftmac100: use GFP_ATOMIC allocations where needed

When running in softirq context, we should use GFP_ATOMIC allocations
instead of GFP_KERNEL ones.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Acked-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: change some configurations defaults
Frank Blaschka [Mon, 14 Mar 2011 22:39:47 +0000 (15:39 -0700)]
qeth: change some configurations defaults

This patch turns on RX checksum and GRO by default. To improve
receiving performance and reduce congestion in case of network
bursts we also increase the default number of inbound buffers.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: documentation update: mailing lists.
Nicolas de Pesloüan [Sun, 13 Mar 2011 10:34:22 +0000 (10:34 +0000)]
bonding: documentation update: mailing lists.

In commit a6c36ee677607b02d8ecc88e8a12785418b88107 ("bonding: change list
contact to netdev@vger.kernel.org"), the mailing list for bonding
developpement was changed from bonding-devel to netdev.

Update the bonding documentation to reflect this change:

- bonding-devel is used for usage discussions (despite the name).
- netdev is used for developpement discussions.

Also remove the reference to the sourceforge bonding page, which is
deprecated.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaf_unix: update locking comment
Daniel Baluta [Mon, 14 Mar 2011 22:25:33 +0000 (15:25 -0700)]
af_unix: update locking comment

We latch our state using a spinlock not a r/w kind of lock.

Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoNET: cdc-phonet, handle empty phonet header
Jiri Slaby [Sun, 13 Mar 2011 06:54:31 +0000 (06:54 +0000)]
NET: cdc-phonet, handle empty phonet header

Currently, for N 5800 XM I get:
cdc_phonet: probe of 1-6:1.10 failed with error -22

It's because phonet_header is empty. Extra altsetting looks like
there:
E 05 24 00 01 10 03 24 ab 05 24 06 0a 0b 04 24 fd  .$....$..$....$.
E 00                                               .

I don't see the header used anywhere so just check if the phonet
descriptor is there, not the structure itself.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoNET: cdc-phonet, fix stop-queue handling
Jiri Slaby [Sun, 13 Mar 2011 06:54:30 +0000 (06:54 +0000)]
NET: cdc-phonet, fix stop-queue handling

Currently there is a warning emitted by the cdc-phonet driver:
WARNING: at include/linux/netdevice.h:1557 usbpn_probe+0x3bb/0x3f0 [cdc_phonet]()
Modules linked in: ...
Pid: 5877, comm: insmod Not tainted 2.6.37.3-16-desktop #1
Call Trace:
 [<ffffffff810059b9>] dump_trace+0x79/0x340
 [<ffffffff81520fdc>] dump_stack+0x69/0x6f
 [<ffffffff810580eb>] warn_slowpath_common+0x7b/0xc0
 [<ffffffffa00254fb>] usbpn_probe+0x3bb/0x3f0 [cdc_phonet]
...
---[ end trace f5d3e02908603ab4 ]---
netif_stop_queue() cannot be called before register_netdev()

So remove netif_stop_queue from the probe funtction to avoid that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: changes for BE3 native mode support
Sathya Perla [Fri, 11 Mar 2011 02:49:26 +0000 (02:49 +0000)]
be2net: changes for BE3 native mode support

So far be2net has been using BE3 in legacy mode. It now checks for native
 mode capability and if available it sets it. In native mode, the RX_COMPL
 structure is different from that in legacy mode.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetxen: Notify firmware of Flex-10 interface down
Sony Chacko [Thu, 10 Mar 2011 23:50:02 +0000 (23:50 +0000)]
netxen: Notify firmware of Flex-10 interface down

Notify firmware when a Flex-10 interface is brought down
so that virtual connect manager can display the correct link status.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxen: netfront: ethtool stats fields should be unsigned long
Ian Campbell [Thu, 10 Mar 2011 07:04:18 +0000 (07:04 +0000)]
xen: netfront: ethtool stats fields should be unsigned long

Fixup the rx_gso_checksum_fixup field added in e0ce4af920eb to be
unsigned long as suggested by Ben Hutchings in
<1298919198.2569.14.camel@bwh-desktop>

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: skip forwarding delay if not using STP
stephen hemminger [Thu, 10 Mar 2011 05:57:04 +0000 (05:57 +0000)]
bridge: skip forwarding delay if not using STP

If Spanning Tree Protocol is not enabled, there is no good reason for
the bridge code to wait for the forwarding delay period before enabling
the link. The purpose of the forwarding delay is to allow STP to
learn about other bridges before nominating itself.

The only possible impact is that when starting up a new port
the bridge may flood a packet now, where previously it might have
seen traffic from the other host and preseeded the forwarding table.

Includes change for local variable br already available in that func.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoDavinci: Do not reset EMAC TX overruns counter on read
Thomas Lange [Wed, 9 Mar 2011 04:41:16 +0000 (04:41 +0000)]
Davinci: Do not reset EMAC TX overruns counter on read

Don't reset tx_fifo_errors when reading out current EMAC stats.
  (tx_fifo_errors shows up as TX overruns in netdev stats.)

Without this correction, the old counter value is lost every time
stats are read out.

Signed-off-by: Thomas Lange <thomas@corelatus.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophylib: SIOCGMIIREG/SIOCSMIIREG: allow access to all mdio addresses
Peter Korsgaard [Thu, 10 Mar 2011 06:52:13 +0000 (06:52 +0000)]
phylib: SIOCGMIIREG/SIOCSMIIREG: allow access to all mdio addresses

phylib would silently ignore the phy_id argument to these ioctls and
perform the read/write with the active phydev address, whereas most
non-phylib drivers seem to allow access to all mdio addresses
(E.G. pcnet_cs).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Update firmware and version
Michael Chan [Mon, 14 Mar 2011 22:00:12 +0000 (15:00 -0700)]
bnx2: Update firmware and version

Update 5709 mips firmware to 6.2.1a to fix iSCSI performance
regression.  There was an unnecessary context read in the fast path
affecting performance.

Update bnx2 to 2.1.6.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Support newer version of firmware devcmd CMD_MCPU_FW_INFO
Vasanthy Kolluri [Tue, 8 Mar 2011 15:35:30 +0000 (15:35 +0000)]
enic: Support newer version of firmware devcmd CMD_MCPU_FW_INFO

This patch provides support to the newer version of firmware devcmd CMD_MCPU_FW_INFO
that returns additional information (ASIC type and revision) about the underlying hardware.
This knowledge is required by the driver to implement any hardware specific features.

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocan: wrong index used in inner loop
roel kluin [Tue, 8 Mar 2011 09:52:55 +0000 (09:52 +0000)]
can: wrong index used in inner loop

Index i was already used in the outer loop.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: control carrier based on ports online
stephen hemminger [Mon, 7 Mar 2011 08:34:06 +0000 (08:34 +0000)]
bridge: control carrier based on ports online

This makes the bridge device behave like a physical device.
In earlier releases the bridge always asserted carrier. This
changes the behavior so that bridge device carrier is on only
if one or more ports are in the forwarding state. This
should help IPv6 autoconfiguration, DHCP, and routing daemons.

I did brief testing with Network and Virt manager and they
seem fine, but since this changes behavior of bridge, it should
wait until net-next (2.6.39).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Tested-By: Adam Majer <adamm@zombino.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net: fix build warnings with CONFIG_PM_SLEEP disabled
Michel Lespinasse [Sun, 6 Mar 2011 16:14:50 +0000 (16:14 +0000)]
drivers/net: fix build warnings with CONFIG_PM_SLEEP disabled

This fixes a couple of build warnings when CONFIG_PM is enabled but
CONFIG_PM_SLEEP is disabled. Applies on top of v2.6.38-rc7 - I know it's
late, but it would be great if v2.6.38 could compile without warnings!

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: add set_mdio_gate in bb_info
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:55 +0000 (21:59 +0000)]
net: sh_eth: add set_mdio_gate in bb_info

The SH7757's ETHER and GETHER use common MDIO pin. The MDIO pin is
selected by specific register. So this patch adds new interface in
bb_info, and when the sh_eth driver use the mdio, the register can
be changed by the function.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: add support for SH7757's GETHER
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:49 +0000 (21:59 +0000)]
net: sh_eth: add support for SH7757's GETHER

The SH7757 have GETHER and ETHER both. This patch supports them.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: modify the PHY_INTERFACE_MODE
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:45 +0000 (21:59 +0000)]
net: sh_eth: modify the PHY_INTERFACE_MODE

The previous code had hardcoded the PHY_INTERFACE_MODE_MII of phy_connect.
So some Gigabit PHYs will not behave correctly.
The patch adds the phy_interface in sh_eth_plat_data, so we can select
the phy interface.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: remove almost #ifdef of SH7763
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:38 +0000 (21:59 +0000)]
net: sh_eth: remove almost #ifdef of SH7763

The SH7763 has GETHER. So the specification of some registers differs than
other CPUs. This patch removes almost #ifdef of CONFIG_CPU_SUBTYPE_SH7763.
Then we are able to add other CPU's GETHER easily.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: remove the SH_TSU_ADDR
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:34 +0000 (21:59 +0000)]
net: sh_eth: remove the SH_TSU_ADDR

The defination is hardcoded in this driver for some CPUs. This patch
modifies to get resource of TSU address from platform_device.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: modify the definitions of register
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:26 +0000 (21:59 +0000)]
net: sh_eth: modify the definitions of register

The previous code cannot handle the ETHER and GETHER both as same time
because the definitions of register was hardcoded.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>