8 years agotipc: Remove obsolete native API files and exports
Allan Stephens [Tue, 30 Nov 2010 12:00:53 +0000]
tipc: Remove obsolete native API files and exports

As part of the removal of TIPC's native API support it is no longer
necessary for TIPC to export symbols for routines that can be called
by kernel-based applications, nor for it to have header files that
kernel-based applications can include to access the declarations for
those routines. This commit eliminates the exporting of symbols by
TIPC and migrates the contents of each obsolete native API include
file into its corresponding non-native API equivalent.

The code which was migrated in this commit was migrated intact, in
that there are no technical changes combined with the relocation.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agonet: kill unused macros from head file
Shan Wei [Wed, 1 Dec 2010 18:05:17 +0000]
net: kill unused macros from head file

These macros have been defined for several years since v2.6.12-rc2(tracing by git),
but never be used. So remove them.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoipv6: use ND_REACHABLE_TIME and ND_RETRANS_TIMER instead of magic number
Shan Wei [Wed, 1 Dec 2010 18:05:12 +0000]
ipv6: use ND_REACHABLE_TIME and ND_RETRANS_TIMER instead of magic number

ND_REACHABLE_TIME and ND_RETRANS_TIMER have defined
since v2.6.12-rc2, but never been used.
So use them instead of magic number.

This patch also changes original code style to read comfortably .

Thank YOSHIFUJI Hideaki for pointing it out.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agotcp: use TCP_BASE_MSS to set basic mss value
Shan Wei [Wed, 1 Dec 2010 18:04:50 +0000]
tcp: use TCP_BASE_MSS to set basic mss value

TCP_BASE_MSS is defined, but not used.
commit 5d424d5a introduce this macro, so use
it to initial sysctl_tcp_base_mss.

commit 5d424d5a674f782d0659a3b66d951f412901faee
Author: John Heffner <jheffner@psc.edu>
Date:   Mon Mar 20 17:53:41 2006 -0800

    [TCP]: MTU probing

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agonet: snmp: fix the wrong ICMP_MIB_MAX value
Shan Wei [Wed, 1 Dec 2010 18:04:43 +0000]
net: snmp: fix the wrong ICMP_MIB_MAX value

__ICMP_MIB_MAX is equal to the total number of icmp mib,
So no need to add 1. This wastes 4/8 bytes memory.

Change it to be same as ICMP6_MIB_MAX, TCP_MIB_MAX, UDP_MIB_MAX.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agocan: EG20T PCH: Delete unnecessary spin_lock
Tomoya [Mon, 29 Nov 2010 18:19:52 +0000]
can: EG20T PCH: Delete unnecessary spin_lock

Delete unnecessary spin_lock for accessing Message Object.
Since all message objects are divided into tx/rx area completely,
spin_lock processing is unnecessary.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agocan: EG20T PCH: Enumerate LEC macros
Tomoya [Mon, 29 Nov 2010 18:16:15 +0000]
can: EG20T PCH: Enumerate LEC macros

For easy to readable, LEC #define macros are replaced to enums.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agocan: EG20T PCH: Change Message Object Index
Tomoya [Mon, 29 Nov 2010 18:15:02 +0000]
can: EG20T PCH: Change Message Object Index

For easy to readable, add Message Object index like below.
PCH_RX_OBJ_START
PCH_RX_OBJ_END
PCH_TX_OBJ_START
PCH_TX_OBJ_END

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agocan: EG20T PCH: Separate Interface Register(IF1/IF2)
Tomoya [Mon, 29 Nov 2010 18:11:52 +0000]
can: EG20T PCH: Separate Interface Register(IF1/IF2)

CAN register of Intel PCH EG20T has 2 sets of interface register.
To reduce whole of code size, separate interface register.
As a result, the number of function also can be reduced.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agotcp: Implement ipv6 ->get_peer() and ->tw_get_peer().
David S. Miller [Thu, 2 Dec 2010 19:52:07 +0000]
tcp: Implement ipv6 ->get_peer() and ->tw_get_peer().

Now ipv6 timewait recycling is fully implemented and
enabled.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agotcp: Add timewait recycling bits to ipv6 connect code.
David S. Miller [Thu, 2 Dec 2010 20:14:29 +0000]
tcp: Add timewait recycling bits to ipv6 connect code.

This will also improve handling of ipv6 tcp socket request
backlog when syncookies are not enabled.  When backlog
becomes very deep, last quarter of backlog is limited to
validated destinations.  Previously only ipv4 implemented
this logic, but now ipv6 does too.

Now we are only one step away from enabling timewait
recycling for ipv6, and that step is simply filling in
the implementation of tcp_v6_get_peer() and
tcp_v6_tw_get_peer().

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoipv6: Create inet6_csk_route_req().
David S. Miller [Thu, 2 Dec 2010 18:59:22 +0000]
ipv6: Create inet6_csk_route_req().

Brother of ipv4's inet_csk_route_req().

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoipv6: Add rt6_get_peer() helper.
David S. Miller [Thu, 2 Dec 2010 18:16:06 +0000]
ipv6: Add rt6_get_peer() helper.

To go along side ipv4's rt_get_peer().

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agotimewait_sock: Create and use getpeer op.
David S. Miller [Thu, 2 Dec 2010 02:09:13 +0000]
timewait_sock: Create and use getpeer op.

The only thing AF-specific about remembering the timestamp
for a time-wait TCP socket is getting the peer.

Abstract that behind a new timewait_sock_ops vector.

Support for real IPV6 sockets is not filled in yet, but
curiously this makes timewait recycling start to work
for v4-mapped ipv6 sockets.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoinetpeer: Fix incorrect comment about inetpeer struct size.
David S. Miller [Thu, 2 Dec 2010 01:29:08 +0000]
inetpeer: Fix incorrect comment about inetpeer struct size.

Now with ipv6 support it is no longer less than 64 bytes.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoinetpeer: Kill use of inet_peer_address_t typedef.
David S. Miller [Thu, 2 Dec 2010 01:28:18 +0000]
inetpeer: Kill use of inet_peer_address_t typedef.

They are verboten these days.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agovxge: update driver version
Jon Mason [Mon, 29 Nov 2010 18:02:47 +0000]
vxge: update driver version

Update vxge driver version

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agovxge: use strcpy for strings
Jon Mason [Mon, 29 Nov 2010 18:02:46 +0000]
vxge: use strcpy for strings

Use strncpy instead of memcpy when working on strings

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agovxge: remove unnecessary printks
Jon Mason [Mon, 29 Nov 2010 18:02:45 +0000]
vxge: remove unnecessary printks

Remove printks for ring blocks, fifo blocks, and rx doorbell mode as
they clutter the dmesg output during modprobe and provide no useful
information.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoipip: add module alias for tunl0 tunnel device
stephen hemminger [Mon, 29 Nov 2010 09:47:49 +0000]
ipip: add module alias for tunl0 tunnel device

If ipip is built as a module the 'ip tunnel add' command would fail because
the ipip module was not being autoloaded.  Adding an alias for
the tunl0 device name cause dev_load() to autoload it when needed.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agogre: add module alias for gre0 tunnel device
stephen hemminger [Mon, 29 Nov 2010 09:47:48 +0000]
gre: add module alias for gre0 tunnel device

If gre is built as a module the 'ip tunnel add' command would fail because
the ip_gre module was not being autoloaded.  Adding an alias for
the gre0 device name cause dev_load() to autoload it when needed.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agogre: minor cleanups
stephen hemminger [Mon, 29 Nov 2010 09:47:47 +0000]
gre: minor cleanups

Use strcpy() rather the sprintf() for the case where name is getting
generated.  Fix indentation.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agonet sched: use xps information for qdisc NUMA affinity
Eric Dumazet [Mon, 29 Nov 2010 08:14:37 +0000]
net sched: use xps information for qdisc NUMA affinity

Allocate qdisc memory according to NUMA properties of cpus included in
xps map.

To be effective, qdisc should be (re)setup after changes
of /sys/class/net/eth<n>/queues/tx-<n>/xps_cpus

I added a numa_node field in struct netdev_queue, containing NUMA node
if all cpus included in xps_cpus share same node, else -1.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agobnx2x: Add Nic partitioning mode (57712 devices)
Dmitry Kravkov [Wed, 1 Dec 2010 20:39:28 +0000]
bnx2x: Add Nic partitioning mode (57712 devices)

NIC partitioning is another flavor of multi function - having few
PCI functions share the same physical port. Unlike the currently
supported mode of multi-function which depends on the switch
configuration and uses outer-VLAN, the NPAR mode is switch independent
and uses the MAC addresses to distribute incoming packets to the different
functions. This patch adds the specific HW setting of the NPAR mode
and some distinctions between switch dependent (SD) and
switch independent (SI) multi-function (MF) modes where the configuration
is not the same.

Advance driver version to 1.60.00-6

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoinet: Turn ->remember_stamp into ->get_peer in connection AF ops.
David S. Miller [Mon, 29 Nov 2010 21:37:14 +0000]
inet: Turn ->remember_stamp into ->get_peer in connection AF ops.

Then we can make a completely generic tcp_remember_stamp()
that uses ->get_peer() as a helper, minimizing the AF specific
code and minimizing the eventual code duplication when we implement
the ipv6 side of TW recycling.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoipv6: Add infrastructure to bind inet_peer objects to routes.
David S. Miller [Tue, 30 Nov 2010 20:27:11 +0000]
ipv6: Add infrastructure to bind inet_peer objects to routes.

They are only allowed on cached ipv6 routes.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoinetpeer: Add inet_getpeer_v6()
David S. Miller [Tue, 30 Nov 2010 20:20:00 +0000]
inetpeer: Add inet_getpeer_v6()

Now that all of the infrastructure is in place, we can add
the ipv6 shorthand for peer creation.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoinetpeer: Add v6 peers tree, abstract root properly.
David S. Miller [Tue, 30 Nov 2010 20:12:23 +0000]
inetpeer: Add v6 peers tree, abstract root properly.

Add the ipv6 peer tree instance, and adapt remaining
direct references to 'v4_peers' as needed.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoinetpeer: Abstract address comparisons.
David S. Miller [Tue, 30 Nov 2010 20:08:53 +0000]
inetpeer: Abstract address comparisons.

Now v4 and v6 addresses will both work properly.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoinetpeer: Make inet_getpeer() take an inet_peer_adress_t pointer.
David S. Miller [Tue, 30 Nov 2010 19:54:19 +0000]
inetpeer: Make inet_getpeer() take an inet_peer_adress_t pointer.

And make an inet_getpeer_v4() helper, update callers.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoinetpeer: Introduce inet_peer_address_t.
David S. Miller [Tue, 30 Nov 2010 19:53:55 +0000]
inetpeer: Introduce inet_peer_address_t.

Currently only the v4 aspect is used, but this will change.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoinetpeer: Abstract out the tree root accesses.
David S. Miller [Tue, 30 Nov 2010 19:41:59 +0000]
inetpeer: Abstract out the tree root accesses.

Instead of directly accessing "peer", change to code to
operate using a "struct inet_peer_base *" pointer.

This will facilitate the addition of a seperate tree for
ipv6 peer entries.

Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Use netdev_dbg for printk(KERN_DEBUG
Joe Perches [Mon, 29 Nov 2010 07:42:02 +0000]
forcedeth: Use netdev_dbg for printk(KERN_DEBUG

Use the normal debugging functions.
Print mac address when using random_ether_addr.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Remove netdev_dbg uses
Joe Perches [Mon, 29 Nov 2010 07:42:01 +0000]
forcedeth: Remove netdev_dbg uses

These were probably just for initial driver debugging
and have not been enabled in builds in git history.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Convert dev_printk(<level> to dev_<level>(
Joe Perches [Mon, 29 Nov 2010 07:42:00 +0000]
forcedeth: Convert dev_printk(<level> to dev_<level>(

Use vsprintf extension %pM for a mac address in one instance.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Separate vendor specific initializations into functions
Joe Perches [Mon, 29 Nov 2010 07:41:59 +0000]
forcedeth: Separate vendor specific initializations into functions

Neaten the phy_init function by adding and calling vendor
specific functions.

object size is reduced by ~1kb:

$ size drivers/net/forcedeth.o.*
   text    data     bss     dec     hex filename
  83475    1848   19304  104627   198b3 drivers/net/forcedeth.o.new
  84459    1848   19544  105851   19d7b drivers/net/forcedeth.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Add function init_realtek_8211b
Joe Perches [Mon, 29 Nov 2010 07:41:58 +0000]
forcedeth: Add function init_realtek_8211b

Deduplicate the code use for the init/reset of this device.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Convert pr_<level> to netdev_<level>
Joe Perches [Mon, 29 Nov 2010 07:41:57 +0000]
forcedeth: Convert pr_<level> to netdev_<level>

Use netdev_<level> when a struct net_device * is available.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Use pr_fmt and pr_<level>
Joe Perches [Mon, 29 Nov 2010 07:41:56 +0000]
forcedeth: Use pr_fmt and pr_<level>

Convert printks to pr_<level>.
Remove "forcedeth: " from some calls as it's now added by pr_fmt.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Convert remaining dprintk to netdev_dbg
Joe Perches [Mon, 29 Nov 2010 07:41:55 +0000]
forcedeth: Convert remaining dprintk to netdev_dbg

The remaining dprintk uses are emitted as KERN_INFO.
Change these dprintk uses to netdev_dbg.
Remove the now unused dprintk macros.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Use print_hex_dump
Joe Perches [Mon, 29 Nov 2010 07:41:54 +0000]
forcedeth: Use print_hex_dump

Use the standard code to emit hex dumps.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: convert dprintk(KERN_DEBUG to netdev_dbg
Joe Perches [Mon, 29 Nov 2010 07:41:53 +0000]
forcedeth: convert dprintk(KERN_DEBUG to netdev_dbg

Use the more standard macro to preface netdev->name.
Fix casting on resource use.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: Change reg_delay arguments and use
Joe Perches [Mon, 29 Nov 2010 07:41:52 +0000]
forcedeth: Change reg_delay arguments and use

Move the printk out of reg_delay and make
the callers emit a message on error.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Mon, 29 Nov 2010 19:19:09 +0000]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

8 years agoxps: add __rcu annotations
Eric Dumazet [Sun, 28 Nov 2010 21:43:02 +0000]
xps: add __rcu annotations

Avoid sparse warnings : add __rcu annotations and use
rcu_dereference_protected() where necessary.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoxps: NUMA allocations for per cpu data
Eric Dumazet [Sun, 28 Nov 2010 05:43:24 +0000]
xps: NUMA allocations for per cpu data

store_xps_map() allocates maps that are used by single cpu, it makes
sense to use NUMA allocations.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agosctp: kill unused macros in head file
Shan Wei [Mon, 29 Nov 2010 00:14:58 +0000]
sctp: kill unused macros in head file

1. SCTP_CMD_NUM_VERBS,SCTP_CMD_MAX
These two macros have never been used for several years since v2.6.12-rc2.

2.sctp_port_rover,sctp_port_alloc_lock
The commit 063930 abandoned global variables of port_rover and port_alloc_lock,
but still keep two macros to refer to them.
So, remove them now.

commit 06393009000779b00a558fd2f280882cc7dc2008
Author: Stephen Hemminger <shemminger@linux-foundation.org>
Date:   Wed Oct 10 17:30:18 2007 -0700

    [SCTP]: port randomization

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agovmxnet3: fix compilation when RSS is disabled
Scott J. Goldman [Sat, 27 Nov 2010 10:33:55 +0000]
vmxnet3: fix compilation when RSS is disabled

If RSS is disabled, we can ifdef out some RSS specific code. This fixes
the compile error found by Randy Dunlap.

Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Reviewed-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoxps: Add CONFIG_XPS
Tom Herbert [Fri, 26 Nov 2010 08:36:09 +0000]
xps: Add CONFIG_XPS

This patch adds XPS_CONFIG option to enable and disable XPS.  This is
done in the same manner as RPS_CONFIG.  This is also fixes build
failure in XPS code when SMP is not enabled.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoqeth: l3 fix len in tso hdr
Frank Blaschka [Fri, 26 Nov 2010 02:41:20 +0000]
qeth: l3 fix len in tso hdr

The tso hdr is longer then the regular l3 hdr. Fix the calculation
of the total len by accounting the size of the tso hdr.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoqeth: enable interface setup if LAN is offline
Ursula Braun [Fri, 26 Nov 2010 02:41:19 +0000]
qeth: enable interface setup if LAN is offline

Device initialization of a qeth device contains a STARTLAN step.
This step may fail, if cable is not yet plugged in. The qeth device
stays in state HARDSETUP until cable is plugged in. This prevents
further preparational initialization steps of the qeth device and
its network interface. This patch makes sure initialization of qeth
device continues, even though cable is not yet plugged in.
Once carrier is available, qeth is notified, triggers a recovery
which results in a working network interface.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agodrivers/s390/net: Remove unnecessary semicolons
Joe Perches [Fri, 26 Nov 2010 02:41:18 +0000]
drivers/s390/net: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoqeth lcs: convert mc rwlock to RCU
Sachin Sant [Fri, 26 Nov 2010 02:41:17 +0000]
qeth lcs: convert mc rwlock to RCU

Commit 1d7138de878d1d4210727c1200193e69596f93b3
igmp: RCU conversion of in_dev->mc_list

converted rwlock to RCU.

Update the s390 network drivers(qeth & lcs) code to adapt to this change.
V2 : Changes based on suggestions given by Eric Dumazet

Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agostmmac: fix stmmac_resume removing not yet used shutdown flag
Giuseppe Cavallaro [Mon, 29 Nov 2010 02:10:53 +0000]
stmmac: fix stmmac_resume removing not yet used shutdown flag

The commit to convert to use the dev_pm_ops struct
introduces a bug. The shutdown flag is not yet used
because the hibernation on memory is done by using
the freeze callback.
Thanks to Vlad for having reported it.

Reported-by: Vlad Lungu <vlad.lungu@windriver.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: use usleep_range not msleep for small sleeps
Szymon Janc [Sat, 27 Nov 2010 08:39:48 +0000]
forcedeth: use usleep_range not msleep for small sleeps

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: do not use assignment in if conditions
Szymon Janc [Sat, 27 Nov 2010 08:39:46 +0000]
forcedeth: do not use assignment in if conditions

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: include <linux/io.h> and <linux/uaccess.h> instead of <asm/io.h> and ...
Szymon Janc [Sat, 27 Nov 2010 08:39:45 +0000]
forcedeth: include <linux/io.h> and <linux/uaccess.h> instead of <asm/io.h> and <asm/uaccess.h> as suggested by checkpatch

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: remove unnecessary checks before kfree
Szymon Janc [Sat, 27 Nov 2010 08:39:44 +0000]
forcedeth: remove unnecessary checks before kfree

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoforcedeth: fix multiple code style issues
Szymon Janc [Sat, 27 Nov 2010 08:39:43 +0000]
forcedeth: fix multiple code style issues

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agozd1211rw: document need for kmalloc cast
Joe Perches [Sun, 28 Nov 2010 00:02:59 +0000]
zd1211rw: document need for kmalloc cast

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agovxge: remove unnecessary [kv][mcz]alloc casts
Joe Perches [Sat, 27 Nov 2010 23:05:45 +0000]
vxge: remove unnecessary [kv][mcz]alloc casts

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoqlcnic: remove unnecessary [kv][mcz]alloc casts
Joe Perches [Sat, 27 Nov 2010 23:05:44 +0000]
qlcnic: remove unnecessary [kv][mcz]alloc casts

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agonetxen: remove unnecessary [kv][mcz]alloc casts
Joe Perches [Sat, 27 Nov 2010 23:05:43 +0000]
netxen: remove unnecessary [kv][mcz]alloc casts

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agocxgb3: Removing unused return variable
Breno Leitao [Thu, 25 Nov 2010 07:53:55 +0000]
cxgb3: Removing unused return variable

Currently the ret variable is not used for anything other than
receive the value of the t3_adapter_error(), which will always be 0,
because the reset parameter is 0.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoipv6: Prepare the tree for un-inlined jhash.
Jozsef Kadlecsik [Thu, 25 Nov 2010 03:15:07 +0000]
ipv6: Prepare the tree for un-inlined jhash.

jhash is widely used in the kernel and because the functions
are inlined, the cost in size is significant. Also, the new jhash
functions are slightly larger than the previous ones so better un-inline.
As a preparation step, the calls to the internal macros are replaced
with the plain jhash function calls.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoxfrm: fix gre key endianess
Timo Teräs [Tue, 23 Nov 2010 04:03:45 +0000]
xfrm: fix gre key endianess

fl->fl_gre_key is network byte order contrary to fl->fl_icmp_*.
Make xfrm_flowi_{s|d}port return network byte order values for gre
key too.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoethoc: remove division from loops
Jonas Bonn [Thu, 25 Nov 2010 02:30:32 +0000]
ethoc: remove division from loops

Calculating the BD entry using a modulus operation isn't optimal, especially
inside the loop.  This patch removes the modulus operations in favour of:

i)  simply checking for wrapping in the case of cur_rx
ii) forcing num_tx to be a power of two and using it to mask out the
    entry from cur_tx

The also prevents possible issues related overflow of the cur_rx and cur_tx
counters.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoethoc: fix function return type
Jonas Bonn [Thu, 25 Nov 2010 02:30:31 +0000]
ethoc: fix function return type

update_ethoc_tx_stats doesn't need to return anything so make its return
type void in order to avoid an unnecessary cast when the function is called.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoethoc: rework mdio read/write
Jonas Bonn [Thu, 25 Nov 2010 02:30:30 +0000]
ethoc: rework mdio read/write

MDIO read and write were checking whether a timeout had expired to determine
whether to recheck the result of the MDIO operation.  Under heavy CPU usage,
however, it was possible for the timeout to expire before the routine got
around to be able to check a second time even, thus erroneousy returning an
-EBUSY.

This patch changes the the MDIO IO routines to try up to five times to complete
the operation before giving up, thus lessening the dependency on CPU load.

This resolves a problem whereby a ping flood would keep the CPU so busy that
the above problem would manifest itself; the MDIO command to check link status
would fail and the interface would erroneously be shut down.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoethoc: rework interrupt handling
Jonas Bonn [Thu, 25 Nov 2010 02:30:29 +0000]
ethoc: rework interrupt handling

The old interrupt handling was incorrect in that it did not account for the
fact that the interrupt source bits get set irregardless of whether or not
their corresponding mask is set.  This patch fixes that by masking off the
source bits for masked interrupts.

Furthermore, the handling of transmission events is moved to the NAPI polling
handler alongside the reception handler, thus preventing a whole bunch of
interrupts during heavy traffic.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoethoc: Double check pending RX packet
Jonas Bonn [Thu, 25 Nov 2010 02:30:28 +0000]
ethoc: Double check pending RX packet

An interrupt may occur between checking bd.stat and clearing the
interrupt source register which would result in the packet going totally
unnoticed as the interrupt will be missed.  Double check bd.stat after
clearing the interrupt source register to guard against such an
occurrence.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoethoc: enable interrupts after napi_complete
Adam Edvardsson [Thu, 25 Nov 2010 02:30:27 +0000]
ethoc: enable interrupts after napi_complete

Occasionally, it seems that some race is causing the interrupts to not be
reenabled otherwise with the end result that networking just stops working.
Enabling interrupts after calling napi_complete is more in line with what
other drivers do.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoethoc: remove unused spinlock
Jonas Bonn [Thu, 25 Nov 2010 02:30:26 +0000]
ethoc: remove unused spinlock

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoethoc: Add device tree configuration
Jonas Bonn [Thu, 25 Nov 2010 02:30:25 +0000]
ethoc: Add device tree configuration

This patch adds the ability to describe ethernet devices via a flattened
device tree.  As device tree remains an optional feature, these bits all
need to be guarded by CONFIG_OF ifdefs.

MAC address is settable via the device tree parameter "local-mac-address";
however, the selection of the phy id is limited to probing, for now.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoX25 remove bkl in call user data length ioctl
andrew hendry [Thu, 25 Nov 2010 02:18:45 +0000]
X25 remove bkl in call user data length ioctl

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoX25 remove bkl from causediag ioctls
andrew hendry [Thu, 25 Nov 2010 02:18:43 +0000]
X25 remove bkl from causediag ioctls

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoX25 remove bkl from calluserdata ioctls
andrew hendry [Thu, 25 Nov 2010 02:18:40 +0000]
X25 remove bkl from calluserdata ioctls

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoX25 remove bkl in facility ioctls
andrew hendry [Thu, 25 Nov 2010 02:18:35 +0000]
X25 remove bkl in facility ioctls

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoX25 remove bkl in subscription ioctls
andrew hendry [Thu, 25 Nov 2010 02:18:15 +0000]
X25 remove bkl in subscription ioctls

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agobnx2x: Use helpers instead of direct access to the shinfo(skb) fields
Vladislav Zolotarov [Sun, 28 Nov 2010 00:23:35 +0000]
bnx2x: Use helpers instead of direct access to the shinfo(skb) fields

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agobnx2: Remove config access to non-standard registers
Michael Chan [Wed, 24 Nov 2010 13:48:55 +0000]
bnx2: Remove config access to non-standard registers

In KVM passthrough mode, the driver may not have config access to
non-standard registers.  The BNX2_PCICFG_MISC_CONFIG config register
access to setup mailbox swapping can be done using MMIO.

Update version to 2.0.20.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agobnx2: Fix reset bug on 5709
Eddie Wai [Wed, 24 Nov 2010 13:48:54 +0000]
bnx2: Fix reset bug on 5709

The 5709 chip requires the BNX2_MISC_NEW_CORE_CTL_DMA_ENABLE bit to be
cleared and polling for pending DMAs to complete before chip reset.
Without this step, we've seen NMIs during repeated resets of the chip.

Signed-off-by: Eddie Wai <waie@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years ago8021q: vlan device is lockless do not transfer real_num_{tx|rx}_queues
John Fastabend [Wed, 24 Nov 2010 13:14:50 +0000]
8021q: vlan device is lockless do not transfer real_num_{tx|rx}_queues

Now that the vlan device is lockless and single queue do not
transfer the real num queues. This is causing a BUG_ON to occur.

kernel BUG at net/8021q/vlan.c:345!
Call Trace:
[<ffffffff813fd6e8>] ? fib_rules_event+0x28/0x1b0
[<ffffffff814ad2b5>] notifier_call_chain+0x55/0x80
[<ffffffff81089156>] raw_notifier_call_chain+0x16/0x20
[<ffffffff813e5af7>] call_netdevice_notifiers+0x37/0x70
[<ffffffff813e6756>] netdev_features_change+0x16/0x20
[<ffffffffa02995be>] ixgbe_fcoe_enable+0xae/0x100 [ixgbe]
[<ffffffffa01da06a>] vlan_dev_fcoe_enable+0x2a/0x30 [8021q]
[<ffffffffa02d08c3>] fcoe_create+0x163/0x630 [fcoe]
[<ffffffff811244d5>] ? mmap_region+0x255/0x5a0
[<ffffffff81080ef0>] param_attr_store+0x50/0x80
[<ffffffff810809b6>] module_attr_store+0x26/0x30
[<ffffffff811b9db2>] sysfs_write_file+0xf2/0x180
[<ffffffff8114fc88>] vfs_write+0xc8/0x190
[<ffffffff81150621>] sys_write+0x51/0x90
[<ffffffff8100c0b2>] system_call_fastpath+0x16/0x1b

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agonet: add netif_tx_queue_frozen_or_stopped
Eric Dumazet [Tue, 23 Nov 2010 10:42:02 +0000]
net: add netif_tx_queue_frozen_or_stopped

When testing struct netdev_queue state against FROZEN bit, we also test
XOFF bit. We can test both bits at once and save some cycles.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoipv6: kill two unused macro definition
Shan Wei [Wed, 24 Nov 2010 21:47:56 +0000]
ipv6: kill two unused macro definition

1. IPV6_TLV_TEL_DST_SIZE
This has not been using for several years since created.

2. RT6_INFO_LEN
commit 33120b30 kill all RT6_INFO_LEN's references, but only this definition remained.

commit 33120b30cc3b8665204d4fcde7288638b0dd04d5
Author: Alexey Dobriyan <adobriyan@sw.ru>
Date:   Tue Nov 6 05:27:11 2007 -0800

    [IPV6]: Convert /proc/net/ipv6_route to seq_file interface

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agonet: add some KERN_CONT markers to continuation lines
Uwe Kleine-König [Tue, 23 Nov 2010 22:57:47 +0000]
net: add some KERN_CONT markers to continuation lines

Cc: netdev@vger.kernel.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agonetxen: avoid using reset_devices as it may become obsolete
Rajesh Borundia [Tue, 23 Nov 2010 03:08:27 +0000]
netxen: avoid using reset_devices as it may become obsolete

In kdump environment do not depend on reset_devices
parameter to reset the device as the parameter may become obsolete.
Instead use an adapter specific mechanism to determine if the device
needs a reset.

Driver maintains a count of number of pci functions probed
and decrements the count when remove handler of that pci function
is called. If the first probe, probe of function 0,
detects the count as non zero then reset the device.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agoqlcnic: avoid using reset_devices as it may become obsolete.
Rajesh Borundia [Tue, 23 Nov 2010 01:25:21 +0000]
qlcnic: avoid using reset_devices as it may become obsolete.

In kdump environment do not depend upon reset_devices parameter
to reset the pci function as this parameter may become obsolete.
Instead use an adapter specific mechanism to determine if the pci
function needs to be reset.

Per function refcount is maintained in driver, which is set in probe
and reset in remove handler of adapter. If the probe detects the count
as non zero then reset the function.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agosctp: kill unused macro definition
Shan Wei [Mon, 22 Nov 2010 23:00:42 +0000]
sctp: kill unused macro definition

These macros have been existed for several years since v2.6.12-rc2.
But they never be used. So remove them now.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agortnl: make link af-specific updates atomic
Thomas Graf [Mon, 22 Nov 2010 01:31:54 +0000]
rtnl: make link af-specific updates atomic

As David pointed out correctly, updates to af-specific attributes
are currently not atomic. If multiple changes are requested and
one of them fails, previous updates may have been applied already
leaving the link behind in a undefined state.

This patch splits the function parse_link_af() into two functions
validate_link_af() and set_link_at(). validate_link_af() is placed
to validate_linkmsg() check for errors as early as possible before
any changes to the link have been made. set_link_af() is called to
commit the changes later.

This method is not fail proof, while it is currently sufficient
to make set_link_af() inerrable and thus 100% atomic, the
validation function method will not be able to detect all error
scenarios in the future, there will likely always be errors
depending on states which are f.e. not protected by rtnl_mutex
and thus may change between validation and setting.

Also, instead of silently ignoring unknown address families and
config blocks for address families which did not register a set
function the errors EAFNOSUPPORT respectively EOPNOSUPPORT are
returned to avoid comitting 4 out of 5 update requests without
notifying the user.

Signed-off-by: Thomas Graf <tgraf@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agodrivers/net: use vzalloc()
Eric Dumazet [Mon, 22 Nov 2010 00:15:06 +0000]
drivers/net: use vzalloc()

Use vzalloc() and vzalloc_node() in net drivers

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

8 years agobe2net: adding support for Lancer family of CNAs
Sathya Perla [Sun, 21 Nov 2010 23:25:50 +0000]
be2net: adding support for Lancer family of CNAs

Key changes are:
- EQ ids are not assigned consecutively in Lancer. So, fix mapping of MSIx
  vector to EQ-id.
- BAR mapping and some req locations different for Lancer.
- TCP,UDP,IP checksum fields must be compulsorily set in TX wrb for TSO in
  Lancer.
- CEV_IST reg not present in Lancer; so, peek into event queue to check for
  new entries
- cq_create and mcc_create cmd interface is different for Lancer; handle
  accordingly

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>

8 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Wed, 24 Nov 2010 21:49:20 +0000]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem

8 years agoath9k_hw: remove ath9k_hw_stoppcurecv
Felix Fietkau [Sat, 20 Nov 2010 02:08:48 +0000]
ath9k_hw: remove ath9k_hw_stoppcurecv

It is no longer used anywhere

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

8 years agoath9k_htc: Identify devices using driver_info
Rajkumar Manoharan [Fri, 19 Nov 2010 11:23:22 +0000]
ath9k_htc: Identify devices using driver_info

Categorize AR7010 & AR9287 devices based on driver_info
of usb_device_id, instead of PIDs. This avoids per-device cases
and minimize code changes for new device addition.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

8 years agoath9k_hw: Fix eeprom offset for AR9287 devices (PCI/USB)
Rajkumar Manoharan [Fri, 19 Nov 2010 11:23:21 +0000]
ath9k_hw: Fix eeprom offset for AR9287 devices (PCI/USB)

AR9287 devices (PCI/USB) use different eeprom start location
to read nvram. New devices might endup with same devid. So use
driver_info to set offset, instead of devid. driver_info is
valid for HTC devices alone which is filled in usb_device_id.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

8 years agoath9k_htc: Add driver_info in usb device list
Rajkumar Manoharan [Fri, 19 Nov 2010 11:23:20 +0000]
ath9k_htc: Add driver_info in usb device list

Added driver_info to identify AR7010, R9287 HTC devices.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

8 years agoath: Add a driver_info bitmask field
Rajkumar Manoharan [Fri, 19 Nov 2010 11:23:19 +0000]
ath: Add a driver_info bitmask field

The driver_info stores the device category information which
is used to load appropriate device firmware, select firmware offset
and eeprom starting location. The driver_info is accessed across
ath9k_htc and ath9k_hw. Hence placed under common structure.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

8 years agoiwlwifi: advance power management support
Wey-Yi Guy [Tue, 23 Nov 2010 18:58:56 +0000]
iwlwifi: advance power management support

For 6000g2b and up, adding advance power management support
for better power consumption

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

8 years agoiwlwifi: power management checking for shadow register
Wey-Yi Guy [Tue, 23 Nov 2010 18:58:55 +0000]
iwlwifi: power management checking for shadow register

If shadow register is enable, modify the power management
command to inform uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>