]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agotcp: Fix bug in tcp socket early demux
Vijay Subramanian [Sat, 23 Jun 2012 17:38:10 +0000 (17:38 +0000)]
tcp: Fix bug in tcp socket early demux

The dest port for the call to __inet_lookup_established() in TCP early demux
code is passed with the wrong endian-ness. This causes the lookup to fail
leading to early demux not being used.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://1984.lsi.us.es/nf-next
David S. Miller [Sun, 24 Jun 2012 00:10:10 +0000 (17:10 -0700)]
Merge branch 'master' of git://1984.lsi.us.es/nf-next

Pablo says:

====================
The following four patches provide Netfilter fixes for the cthelper
infrastructure that was recently merged mainstream, they are:

* two fixes for compilation breakage with two different configurations:

  - CONFIG_NF_NAT=m and CONFIG_NF_CT_NETLINK=y
  - NF_CONNTRACK_EVENTS=n and CONFIG_NETFILTER_NETLINK_QUEUE_CT=y

* two fixes for sparse warnings.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Don't add deprecated new binary sysctl value.
David S. Miller [Sat, 23 Jun 2012 06:02:22 +0000 (23:02 -0700)]
ipv4: Don't add deprecated new binary sysctl value.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: tcp: dont cache output dst for syncookies
Eric Dumazet [Wed, 20 Jun 2012 05:02:19 +0000 (05:02 +0000)]
ipv4: tcp: dont cache output dst for syncookies

Don't cache output dst for syncookies, as this adds pressure on IP route
cache and rcu subsystem for no gain.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: link module eeprom
Yuval Mintz [Wed, 20 Jun 2012 19:05:23 +0000 (19:05 +0000)]
bnx2x: link module eeprom

Add the ethtool functionality of accessing optic modules'
information and eeprom to the bnx2x driver.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: 1G sfp+ module handling
Yuval Mintz [Wed, 20 Jun 2012 19:05:22 +0000 (19:05 +0000)]
bnx2x: 1G sfp+ module handling

Automatically lower requested link speed to 1G in case 1G SFP+
module is detected.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: revised link register access
Yuval Mintz [Wed, 20 Jun 2012 19:05:21 +0000 (19:05 +0000)]
bnx2x: revised link register access

This is a semantic change, cleaning some sections in which the bnx2x
handles the phy's registers.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: treat 0 speed as link down (copper)
Yuval Mintz [Wed, 20 Jun 2012 19:05:20 +0000 (19:05 +0000)]
bnx2x: treat 0 speed as link down (copper)

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: link cleanup
Yuval Mintz [Wed, 20 Jun 2012 19:05:19 +0000 (19:05 +0000)]
bnx2x: link cleanup

This patch does several things:
 1. Add static to function when possible.
 2. Correct comments.
 3. Change msleep(small) --> usleep_range(small, small*2).
    Also correct existing calls to usleep_range.
 4. Remove dead code.
 5. Change 'if(rc != 0)' --> if(rc)

Most of these changes are purely semantic.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: sfp+ Tx fault detection added
Yuval Mintz [Wed, 20 Jun 2012 19:05:18 +0000 (19:05 +0000)]
bnx2x: sfp+ Tx fault detection added

Adds the ability to identify sfp+ modules' Tx fault, and when such
occur shut down the link.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: ctnetlink: fix compilation with NF_CONNTRACK_EVENTS=n
Pablo Neira Ayuso [Fri, 22 Jun 2012 23:43:51 +0000 (01:43 +0200)]
netfilter: ctnetlink: fix compilation with NF_CONNTRACK_EVENTS=n

This patch fixes compilation with NF_CONNTRACK_EVENTS=n and
NETFILTER_NETLINK_QUEUE_CT=y.

I'm leaving all those static inline functions that calculate the size
of the event message out of the ifdef area of NF_CONNTRACK_EVENTS since
they will not be included by gcc in case they are unused.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agonetfilter: nfnetlink_queue: fix sparse warning due to missing include
Pablo Neira Ayuso [Fri, 22 Jun 2012 09:25:33 +0000 (11:25 +0200)]
netfilter: nfnetlink_queue: fix sparse warning due to missing include

This patch fixes a sparse warning due to missing include header file.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoipv4: Add sysctl knob to control early socket demux
Alexander Duyck [Thu, 21 Jun 2012 13:58:31 +0000 (13:58 +0000)]
ipv4: Add sysctl knob to control early socket demux

This change is meant to add a control for disabling early socket demux.
The main motivation behind this patch is to provide an option to disable
the feature as it adds an additional cost to routing that reduces overall
throughput by up to 5%.  For example one of my systems went from 12.1Mpps
to 11.6 after the early socket demux was added.  It looks like the reason
for the regression is that we are now having to perform two lookups, first
the one for an established socket, and then the one for the routing table.

By adding this patch and toggling the value for ip_early_demux to 0 I am
able to get back to the 12.1Mpps I was previously seeing.

[ Move local variables in ip_rcv_finish() down into the basic
  block in which they are actually used.  -DaveM ]

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosmsc911x.c: encapsulate enable irq calls
Matthias Brugger [Fri, 22 Jun 2012 01:10:15 +0000 (01:10 +0000)]
smsc911x.c: encapsulate enable irq calls

We encapsulate enbale irq functionality in a function call.
As on probe the interrupts will be disabled twice, we delete
one.

Signed-off-by: Matthias Brugger <mbrugger@iseebcn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: nfnetlink_queue: fix compilation with CONFIG_NF_NAT=m and CONFIG_NF_CT_NET...
Pablo Neira Ayuso [Wed, 20 Jun 2012 18:52:31 +0000 (20:52 +0200)]
netfilter: nfnetlink_queue: fix compilation with CONFIG_NF_NAT=m and CONFIG_NF_CT_NETLINK=y

  LD      init/built-in.o
net/built-in.o:(.data+0x4408): undefined reference to `nf_nat_tcp_seq_adjust'
make: *** [vmlinux] Error 1

This patch adds a new pointer hook (nfq_ct_nat_hook) similar to other existing
in Netfilter to solve our complicated configuration dependencies.

Reported-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agonet: dcb: fix small regression in __dcbnl_pg_setcfg()
John Fastabend [Wed, 20 Jun 2012 19:56:21 +0000 (19:56 +0000)]
net: dcb: fix small regression in __dcbnl_pg_setcfg()

A small regression was introduced in the reply command of
dcbnl_pg_setcfg(). User space apps may be expecting the
DCB_ATTR_PG_CFG attribute to be returned with the patch
below TX or RX variants are returned.

commit 7be994138b188387691322921c08e19bddf6d3c5
Author: Thomas Graf <tgraf@suug.ch>
Date:   Wed Jun 13 02:54:55 2012 +0000

    dcbnl: Shorten all command handling functions

This patch reverts this behavior and returns DCB_ATTR_PG_CFG

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoixgbe: simplify padding and length checks
Stephen Hemminger [Thu, 21 Jun 2012 02:15:10 +0000 (02:15 +0000)]
ixgbe: simplify padding and length checks

The check for length <= 0 is bogus because length is unsigned, and network
stack never sends zero length packets (unless it is totally broken).

The check for really small packets can be optimized (using unlikely)
and calling skb_pad directly.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: Validate route interface in early demux.
David S. Miller [Thu, 21 Jun 2012 21:58:10 +0000 (14:58 -0700)]
tcp: Validate route interface in early demux.

Otherwise we might violate reverse path filtering.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Thu, 21 Jun 2012 20:34:09 +0000 (13:34 -0700)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:
- first set of patches that add the batadv_ prefix to all the exported symbols
- restyling of comments

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Wed, 20 Jun 2012 22:09:47 +0000 (15:09 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next

12 years agoinetpeer: inetpeer_invalidate_tree() cleanup
Eric Dumazet [Wed, 20 Jun 2012 04:02:10 +0000 (04:02 +0000)]
inetpeer: inetpeer_invalidate_tree() cleanup

No need to use cmpxchg() in inetpeer_invalidate_tree() since we hold
base lock.

Also use correct rcu annotations to remove sparse errors
(CONFIG_SPARSE_RCU_POINTER=y)

net/ipv4/inetpeer.c:144:19: error: incompatible types in comparison
expression (different address spaces)
net/ipv4/inetpeer.c:149:20: error: incompatible types in comparison
expression (different address spaces)
net/ipv4/inetpeer.c:595:10: error: incompatible types in comparison
expression (different address spaces)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: do RCU update path fixups
Jiri Pirko [Wed, 20 Jun 2012 08:39:39 +0000 (08:39 +0000)]
team: do RCU update path fixups

Use rcu_access_pointer and rcu_dereference_protected
to access RCU pointer by updater.
Use RCU_INIT_POINTER for NULL assignment of RCU pointer.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: Revert previous two changes.
David S. Miller [Wed, 20 Jun 2012 21:28:58 +0000 (14:28 -0700)]
team: Revert previous two changes.

I didn't notice that these were superceded by a more uptodate
version of the changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: use RCU_INIT_POINTER for NULL assignment of RCU pointer
Jiri Pirko [Wed, 20 Jun 2012 05:32:01 +0000 (05:32 +0000)]
team: use RCU_INIT_POINTER for NULL assignment of RCU pointer

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: use rcu_access_pointer to access RCU pointer by writer
Jiri Pirko [Wed, 20 Jun 2012 05:32:00 +0000 (05:32 +0000)]
team: use rcu_access_pointer to access RCU pointer by writer

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocan: c_can_pci: fix compilation on non HAVE_CLK archs
Marc Kleine-Budde [Wed, 20 Jun 2012 06:04:26 +0000 (06:04 +0000)]
can: c_can_pci: fix compilation on non HAVE_CLK archs

In commit:

  5b92da0 c_can_pci: generic module for C_CAN/D_CAN on PCI

the c_can_pci driver has been added. It uses clk_*() functions
resulting in a link error on archs without clock support. This
patch removed these clk_() functions as these parts of the driver
are not tested.

Cc: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobatman-adv: Reformat multiline comments to consistent style
Sven Eckelmann [Sat, 12 May 2012 00:09:43 +0000 (02:09 +0200)]
batman-adv: Reformat multiline comments to consistent style

batman-adv doesn't follow the style for multiline comments that David S. Miller
prefers. All comments should be reformatted to follow this consistent style to
make the code slightly more readable.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix main non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:42 +0000 (02:09 +0200)]
batman-adv: Prefix main non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix vis non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:41 +0000 (02:09 +0200)]
batman-adv: Prefix vis non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix unicast non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:40 +0000 (02:09 +0200)]
batman-adv: Prefix unicast non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix translation-table non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:39 +0000 (02:09 +0200)]
batman-adv: Prefix translation-table non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix soft-interface non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:38 +0000 (02:09 +0200)]
batman-adv: Prefix soft-interface non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix send non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:37 +0000 (02:09 +0200)]
batman-adv: Prefix send non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix routing non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:36 +0000 (02:09 +0200)]
batman-adv: Prefix routing non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix ring_buffer non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:35 +0000 (02:09 +0200)]
batman-adv: Prefix ring_buffer non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix originator non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:34 +0000 (02:09 +0200)]
batman-adv: Prefix originator non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix icmp-socket non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:33 +0000 (02:09 +0200)]
batman-adv: Prefix icmp-socket non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix hash non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:32 +0000 (02:09 +0200)]
batman-adv: Prefix hash non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix hard-interface non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:31 +0000 (02:09 +0200)]
batman-adv: Prefix hard-interface non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix gateway-common non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:30 +0000 (02:09 +0200)]
batman-adv: Prefix gateway-common non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix gateway-client non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:29 +0000 (02:09 +0200)]
batman-adv: Prefix gateway-client non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bridge_loop_avoidance non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 11:38:47 +0000 (13:38 +0200)]
batman-adv: Prefix bridge_loop_avoidance non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bitarray non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:25 +0000 (02:09 +0200)]
batman-adv: Prefix bitarray non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bat_sysfs non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:24 +0000 (02:09 +0200)]
batman-adv: Prefix bat_sysfs non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bat_debugfs non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:23 +0000 (02:09 +0200)]
batman-adv: Prefix bat_debugfs non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bat_algo non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:22 +0000 (02:09 +0200)]
batman-adv: Prefix bat_algo non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agonetfilter: nfq_ct_hook needs __rcu and __read_mostly
Pablo Neira Ayuso [Wed, 20 Jun 2012 18:50:31 +0000 (20:50 +0200)]
netfilter: nfq_ct_hook needs __rcu and __read_mostly

This removes some sparse warnings.

Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoixgbe: clean up ixgbe_get_settings ethtool function
Jacob Keller [Fri, 8 Jun 2012 06:59:17 +0000 (06:59 +0000)]
ixgbe: clean up ixgbe_get_settings ethtool function

This patch cleans up the method used for determining the link speed of
devices. The old method re-wrote some logic already existing in a mac.ops
function which should be used instead. The result is much simpler to
understand and removes a strange double-check of logic, as well as reducing
code redundancy.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: add support for 1G SX modules
Jacob Keller [Fri, 8 Jun 2012 06:59:09 +0000 (06:59 +0000)]
ixgbe: add support for 1G SX modules

This patch adds support for 1G Fiber PHY modules (SFP+ modules). This support
comes along side support for 1G Copper PHY modules, but uses a different PHY
type (ixgbe_sfp_type_1g_sx_core).

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Version bump
Carolyn Wyborny [Thu, 31 May 2012 23:39:30 +0000 (23:39 +0000)]
igb: Version bump

This patch updates the igb version to 4.0.1.

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>
12 years agoigb: Update firmware info output
Carolyn Wyborny [Thu, 14 Jun 2012 16:04:19 +0000 (16:04 +0000)]
igb: Update firmware info output

Our NVM image creation tools have evolved over the years and there are
multiple versions contained in them, depending on the tool used to create
them.  This patch outputs the NVM versions available in ethtool -i output.

rc2: (not sure why others show in log but not in the message)
     Added additional call to igb_set_fw_version per Community feedback.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Streamline RSS queue and queue pairing assignment logic.
Matthew Vick [Fri, 18 May 2012 04:54:58 +0000 (04:54 +0000)]
igb: Streamline RSS queue and queue pairing assignment logic.

Rather than spread out the complexity of the RSS queue and queue pairing
assignment logic, place it all in one location for simplicity and
readability.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Support the get_ts_info ethtool method.
Carolyn Wyborny [Wed, 4 Apr 2012 17:43:59 +0000 (17:43 +0000)]
igb: Support the get_ts_info ethtool method.

Based on original patch from Richard Cochran <richardcochran@gmail.com>

Original patch caused build errors without CONFIG_IGB_1588_CLOCK and
CONFIG_PPS enabled, since the added code was not properly wrapped.

CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Add switch case for supported hardware to igb_ptp_remove.
Carolyn Wyborny [Wed, 16 May 2012 01:46:00 +0000 (01:46 +0000)]
igb: Add switch case for supported hardware to igb_ptp_remove.

PTP initialization is only done on supported parts, so remove needs
same checks or it will cause crashes on systems with igb devices that
don't support PTP.  This patch adds those checks to the exit function.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: A fix to VF TX rate limit
Lior Levy [Sat, 4 Jun 2011 06:05:03 +0000 (06:05 +0000)]
igb: A fix to VF TX rate limit

There is a need to configure MMW_SIZE in register RTTBCNRM with a correct
value. For 82576 device, the value should be 0x14.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000: Combining Bitwise OR in one expression.
Tushar Dave [Tue, 12 Jun 2012 13:03:29 +0000 (13:03 +0000)]
e1000: Combining Bitwise OR in one expression.

Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoipv4: Early TCP socket demux.
David S. Miller [Wed, 20 Jun 2012 04:22:05 +0000 (21:22 -0700)]
ipv4: Early TCP socket demux.

Input packet processing for local sockets involves two major demuxes.
One for the route and one for the socket.

But we can optimize this down to one demux for certain kinds of local
sockets.

Currently we only do this for established TCP sockets, but it could
at least in theory be expanded to other kinds of connections.

If a TCP socket is established then it's identity is fully specified.

This means that whatever input route was used during the three-way
handshake must work equally well for the rest of the connection since
the keys will not change.

Once we move to established state, we cache the receive packet's input
route to use later.

Like the existing cached route in sk->sk_dst_cache used for output
packets, we have to check for route invalidations using dst->obsolete
and dst->ops->check().

Early demux occurs outside of a socket locked section, so when a route
invalidation occurs we defer the fixup of sk->sk_rx_dst until we are
actually inside of established state packet processing and thus have
the socket locked.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoinet: Sanitize inet{,6} protocol demux.
David S. Miller [Wed, 20 Jun 2012 01:56:21 +0000 (18:56 -0700)]
inet: Sanitize inet{,6} protocol demux.

Don't pretend that inet_protos[] and inet6_protos[] are hashes, thay
are just a straight arrays.  Remove all unnecessary hash masking.

Document MAX_INET_PROTOS.

Use RAW_HTABLE_SIZE when appropriate.

Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: use module_usb_driver macro
Bjørn Mork [Tue, 19 Jun 2012 00:42:03 +0000 (00:42 +0000)]
net: qmi_wwan: use module_usb_driver macro

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: shorten driver description
Bjørn Mork [Tue, 19 Jun 2012 00:42:02 +0000 (00:42 +0000)]
net: qmi_wwan: shorten driver description

The description is used in ethtool fixed length fields.  Make
it shorter to avoid truncation.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: bind to both control and data interface
Bjørn Mork [Tue, 19 Jun 2012 00:42:01 +0000 (00:42 +0000)]
net: qmi_wwan: bind to both control and data interface

Always bind to control interface regardless of whether
it is a shared interface or not.

A QMI/wwan function is required to provide both a control
interface (QMI) and a data interface (wwan).  All devices
supported by this driver do so.  But the vendors may
choose to use different USB descriptor layouts, and some
vendors even allow the same device to present different
layouts.

Most of these devices use a USB descriptor layout with a
single USB interface for both control and data.  But some
split control and data into two interfaces, bound together
by a CDC Union descriptor on the control interface. Before
the cdc-wdm subdriver support was added, this split was
used to let cdc-wdm drive the QMI control interface and
qmi_wwan drive the wwna data interface.

This split driver model has a number of issues:
 - qmi_wwan must match on the data interface descriptor,
   which often are indistiguishable from data interfaces
   belonging to other CDC (like) functions like ACM
 - supporting a single QMI/wwan function requires adding
   the device to two drivers
 - syncronizing the probes among a number of drivers, to
   ensure selecting the correct driver, is difficult unless
   all drivers match on the same interface

This patch resolves these problems by using the same
probing mechanism as cdc-ether for devices with a two-
interface USB descriptor layout.  This makes the driver
behave consistently, supporting both the control and data
part of the QMI/wwan function, regardless of the USB
descriptors.

Cc: Thomas Schäfer <tschaefer@t-online.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: rearranging to prepare for code sharing
Bjørn Mork [Tue, 19 Jun 2012 00:42:00 +0000 (00:42 +0000)]
net: qmi_wwan: rearranging to prepare for code sharing

Most of the subdriver registration code can be reused for devices
with separate control and data interfaces.  Move the code a bit
around to prepare for such reuse.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: define a structure for driver specific state
Bjørn Mork [Tue, 19 Jun 2012 00:41:59 +0000 (00:41 +0000)]
net: qmi_wwan: define a structure for driver specific state

usbnet allocates a fixed size array for minidriver specific
state.  Naming the fields and taking advantage of type checking
is a bit more failsafe than casting array elements each time
they are referenced.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: use rcu_dereference_bh() in tx path
Jiri Pirko [Tue, 19 Jun 2012 05:54:21 +0000 (05:54 +0000)]
team: use rcu_dereference_bh() in tx path

Should be used instead of rcu_dereference, since rcu_read_lock_bh is
held.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: allow to send multiple set events in one message
Jiri Pirko [Tue, 19 Jun 2012 05:54:20 +0000 (05:54 +0000)]
team: allow to send multiple set events in one message

When multiple sets are done, event message is generated for each. This
patch accumulates these messages into one.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: ensure correct order of netlink messages delivery
Jiri Pirko [Tue, 19 Jun 2012 05:54:19 +0000 (05:54 +0000)]
team: ensure correct order of netlink messages delivery

currently, when port is created and per-port options are present, there
options are sent to userspace with ifindex of port which userspace does
not know about. Port add message goes right after.

This patch corrects message ordering so userspace would not be confused.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: implement multipart netlink messages for options transfers
Jiri Pirko [Tue, 19 Jun 2012 05:54:18 +0000 (05:54 +0000)]
team: implement multipart netlink messages for options transfers

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: lb: introduce infrastructure for userspace driven tx loadbalancing
Jiri Pirko [Tue, 19 Jun 2012 05:54:17 +0000 (05:54 +0000)]
team: lb: introduce infrastructure for userspace driven tx loadbalancing

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: add port_[enabled/disabled] mode callbacks
Jiri Pirko [Tue, 19 Jun 2012 05:54:16 +0000 (05:54 +0000)]
team: add port_[enabled/disabled] mode callbacks

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: pass NULL to __team_option_inst_add() instead of 0
Jiri Pirko [Tue, 19 Jun 2012 05:54:15 +0000 (05:54 +0000)]
team: pass NULL to __team_option_inst_add() instead of 0

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: allow to specify one option instance to be send to userspace
Jiri Pirko [Tue, 19 Jun 2012 05:54:14 +0000 (05:54 +0000)]
team: allow to specify one option instance to be send to userspace

No need to walk through option instance list and look for ->changed ==
true when called knows exactly what one option instance changed.

Also use lists to pass option instances needed to be present in netlink
message.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: fix error path in team_nl_fill_port_list_get()
Jiri Pirko [Tue, 19 Jun 2012 05:54:13 +0000 (05:54 +0000)]
team: fix error path in team_nl_fill_port_list_get()

genlmsg_cancel() needs to be called in case nest fails

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: fix error path in team_nl_fill_options_get()
Jiri Pirko [Tue, 19 Jun 2012 05:54:12 +0000 (05:54 +0000)]
team: fix error path in team_nl_fill_options_get()

genlmsg_cancel() needs to be called in case nest fails

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: allow async option changes
Jiri Pirko [Tue, 19 Jun 2012 05:54:11 +0000 (05:54 +0000)]
team: allow async option changes

This patch adds two exported functions. One allows to mark option
instance as changed and the second processes change check and does
transfer of changed options to userspace.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: push array_index and port into separate structure
Jiri Pirko [Tue, 19 Jun 2012 05:54:10 +0000 (05:54 +0000)]
team: push array_index and port into separate structure

Introduce struct team_option_inst_info and push option instance info
there. It can be then easily passed to gsetter context and used for
feature async option changes.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: comments: s/net\/drivers\/team/drivers\/net\/team/
Jiri Pirko [Tue, 19 Jun 2012 05:54:09 +0000 (05:54 +0000)]
team: comments: s/net\/drivers\/team/drivers\/net\/team/

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: introduce array options
Jiri Pirko [Tue, 19 Jun 2012 05:54:08 +0000 (05:54 +0000)]
team: introduce array options

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: allow read/write-only options
Jiri Pirko [Tue, 19 Jun 2012 05:54:07 +0000 (05:54 +0000)]
team: allow read/write-only options

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: lb: push hash counting into separate function
Jiri Pirko [Tue, 19 Jun 2012 05:54:06 +0000 (05:54 +0000)]
team: lb: push hash counting into separate function

Also squash hash into one byte

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: add mode priv to port
Jiri Pirko [Tue, 19 Jun 2012 05:54:05 +0000 (05:54 +0000)]
team: add mode priv to port

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: for nomode use dummy struct team_mode
Jiri Pirko [Tue, 19 Jun 2012 05:54:04 +0000 (05:54 +0000)]
team: for nomode use dummy struct team_mode

That leaves team->mode and all its values valid so no checks would be
needed (for example in team_mode_option_get()).

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: make team_mode struct const
Jiri Pirko [Tue, 19 Jun 2012 05:54:03 +0000 (05:54 +0000)]
team: make team_mode struct const

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://gitorious.org/linux-can/linux-can-next
David S. Miller [Tue, 19 Jun 2012 21:47:13 +0000 (14:47 -0700)]
Merge branch 'master' of git://gitorious.org/linux-can/linux-can-next

Marc Kleine-Budde says:

====================
here is our second pull request for net-next. In this series Federico
Vaga adds a pci driver for c_can/d_can hardware using the existing
generic c_can driver. The remaining 6 patches are by Oliver Hartkopp.
He adds CANFD support to the CAN stack while keeping binary
compatibility for existing applications. CANFD is an extension to the
existing CAN standard, it allows longer CAN frames and/or higher data
rates. There's no real hardware available yet, but this series adds
CANFD support to the vcan driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Tue, 19 Jun 2012 21:37:15 +0000 (14:37 -0700)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next

John Linville says:

====================
This is a sizeable batch of updates intended for 3.6...

The bulk of the changes here are Bluetooth.  Gustavo says:

Here goes the first Bluetooth pull request for 3.6, we have
queued quite a lot of work. Andrei Emeltchenko added the AMP
Manager code, a lot of work is needed, but the first bit are
already there. This code is disabled by default.  Mat Martineau
changed the whole L2CAP ERTM state machine code, replacing
the old one with a new implementation. Besides that we had
lot of coding style fixes (to follow net rules), more l2cap
core separation from socket and many clean ups and fixed all
over the tree.

Along with the above, there is a healthy dose of ath9k, iwlwifi,
and other driver updates.  There is also another pull from the
wireless tree to resolve some merge issues.  I also fixed-up some
merge discrepencies between net-next and wireless-next.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Change date and version to 1.72.51-0
Merav Sicron [Tue, 19 Jun 2012 07:48:32 +0000 (07:48 +0000)]
bnx2x: Change date and version to 1.72.51-0

This change updates the date and version of the bnx2x driver.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Support DCBX for all functions
Barak Witkowski [Tue, 19 Jun 2012 07:48:31 +0000 (07:48 +0000)]
bnx2x: Support DCBX for all functions

In multi-function device, allow configuring dcbx admin params from all drivers
on a single physical port.

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Add support for ethtool -L
Merav Sicron [Tue, 19 Jun 2012 07:48:30 +0000 (07:48 +0000)]
bnx2x: Add support for ethtool -L

Add support for ethtool -L/-l for setting and getting the number of RSS queues.
The 'combined' field is used as we don't support separate IRQ for Rx and Tx.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Allow up to 63 RSS queues
Merav Sicron [Tue, 19 Jun 2012 07:48:29 +0000 (07:48 +0000)]
bnx2x: Allow up to 63 RSS queues

This patch removed the limitation in the code for 16 RSS queues.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Split the FP structure
Barak Witkowski [Tue, 19 Jun 2012 07:48:28 +0000 (07:48 +0000)]
bnx2x: Split the FP structure

This patch moves some fields out of the FP structure to different structures, in
order to minimize size of contigiuous memory allocated.

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Move the CNIC L2 CIDs to be right after the RSS CIDs
Merav Sicron [Tue, 19 Jun 2012 07:48:27 +0000 (07:48 +0000)]
bnx2x: Move the CNIC L2 CIDs to be right after the RSS CIDs

Currently the CNIC-related L2 CIDs (for sending control FCoE / iSCSI packets)
were at fixed position, according to the maximal number of RSS queues multiplied
by the number of traffic-classes. This change makes the CIDs dynamic, as they
are defined to be right after the highest RSS CID. This decreases the memory
allocated for the context.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Make the transmission queues adjacent
Merav Sicron [Tue, 19 Jun 2012 07:48:26 +0000 (07:48 +0000)]
bnx2x: Make the transmission queues adjacent

In the current scheme the transmission queues of traffic-class 0 were 0-15, the
transmission queues of traffic-class 1 were 16-31 and so on. If the number of
RSS queues was smaller than 16, there were gaps in transmission queues
numbering, as well as in CIDs numbering. This is both a waste (especially when
16 is increased to 64), and may causes problems with flushing queues when
reducing the number of RSS queues (using ethtool -L). The new scheme eliminates
the gaps.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Allow more than 64 L2 CIDs
Merav Sicron [Tue, 19 Jun 2012 07:48:25 +0000 (07:48 +0000)]
bnx2x: Allow more than 64 L2 CIDs

With increased number of RSS queues, each multiplied by the number of traffic-
classes, we may have up to 64*3=192 CIDs. The current driver scheme with regard
to context allocation supports only 64 CIDs. The new scheme enables scatter-
gatehr list of pages for the context.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Add support for 4-tupple UDP RSS
Merav Sicron [Tue, 19 Jun 2012 07:48:24 +0000 (07:48 +0000)]
bnx2x: Add support for 4-tupple UDP RSS

This change enables to control via ethtool whether to do UDP RSS on 2-tupple
(IP source / destination only) or on 4-tupple (include UDP source / destination
port). It also enables to read back the RSS configuration.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Return only online tests for MF
Merav Sicron [Tue, 19 Jun 2012 07:48:23 +0000 (07:48 +0000)]
bnx2x: Return only online tests for MF

1. In multi-function device, show only the online tests in self-test results as
   only these test are performed (offline tests cannot be performed as they may
   corrupt the traffic of other functions on the same physical port). Note that
   multi-function mode cannot change while the driver is up.
2. Check result code in NIC load and act accordingly.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Add support for external LB
Merav Sicron [Tue, 19 Jun 2012 07:48:22 +0000 (07:48 +0000)]
bnx2x: Add support for external LB

This change enables to do self-test with external loopback via ethtool.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocanfd: update documentation according to CAN FD extensions
Oliver Hartkopp [Sat, 16 Jun 2012 10:01:58 +0000 (12:01 +0200)]
canfd: update documentation according to CAN FD extensions

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agovcan: add CAN FD support
Oliver Hartkopp [Wed, 13 Jun 2012 18:56:59 +0000 (20:56 +0200)]
vcan: add CAN FD support

- move the length calculation from dlc to real length (using canfd_frame)
- allow to switch the driver between CAN and CAN FD (change of MTU)

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocandev: add/update helpers for CAN FD
Oliver Hartkopp [Wed, 13 Jun 2012 18:48:21 +0000 (20:48 +0200)]
candev: add/update helpers for CAN FD

- update sanity checks
- add DLC to length conversion helpers
  - can_dlc2len() - get data length from can_dlc with sanitized can_dlc
  - can_len2dlc() - map the sanitized data length to an appropriate DLC

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocanfd: add support for CAN FD in CAN_RAW sockets
Oliver Hartkopp [Wed, 13 Jun 2012 18:41:31 +0000 (20:41 +0200)]
canfd: add support for CAN FD in CAN_RAW sockets

- introduce a new sockopt CAN_RAW_FD_FRAMES to allow CAN FD frames
- handle CAN frames and CAN FD frames simultaneously when enabled

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocanfd: add support for CAN FD in PF_CAN core
Oliver Hartkopp [Wed, 13 Jun 2012 18:33:02 +0000 (20:33 +0200)]
canfd: add support for CAN FD in PF_CAN core

- handle ETH_P_CAN and ETH_P_CANFD skbuffs
- update sanity checks for CAN and CAN FD
- make sure the CAN frame can pass the selected CAN netdevice on send
- bump core version and abi version to indicate the new CAN FD support

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>