platform/kernel/linux-rpi.git
14 years agoxfrm: avoid spinlock in get_acqseq() used by xfrm user
jamal [Tue, 16 Feb 2010 02:01:22 +0000 (02:01 +0000)]
xfrm: avoid spinlock in get_acqseq() used by xfrm user

Eric's version fixed it for pfkey. This one is for xfrm user.
I thought about amortizing those two get_acqseq()s but it seems
reasonable to have two of these sequence spaces for the two different
interfaces.

cheers,
jamal
commit d5168d5addbc999c94aacda8f28a4a173756a72b
Author: Jamal Hadi Salim <hadi@cyberus.ca>
Date:   Tue Feb 16 06:51:22 2010 -0500

    xfrm: avoid spinlock in get_acqseq() used by xfrm user

    This is in the same spirit as commit 28aecb9d7728dc26bf03ce7925fe622023a83a2a
    by Eric Dumazet.
    Use atomic_inc_return() in get_acqseq() to avoid taking a spinlock

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetdev: bfin_mac: drop experimental markings on RMII support
Mike Frysinger [Mon, 15 Feb 2010 14:32:50 +0000 (14:32 +0000)]
netdev: bfin_mac: drop experimental markings on RMII support

The code has been around for a long time now and is known to work on a
bunch of different parts/boards.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Remove experimental tag from middleware feature
Jan Kiszka [Mon, 8 Feb 2010 10:12:45 +0000 (10:12 +0000)]
CAPI: Remove experimental tag from middleware feature

Despite all its bugs, the middleware support of our CAPI stack was
already in use for many, many moons. And after going through its code,
fixing all issues I found, I feel it deserves to officially become a
non-experimental feature.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Schedule capifs for removal
Jan Kiszka [Mon, 8 Feb 2010 10:12:44 +0000 (10:12 +0000)]
CAPI: Schedule capifs for removal

With dynamic TTY nodes and the help of udev, we no longer need this
special filesystem. Schedule it for removal in one year from now.

As a last duty to this feature, move its help to right option so that
users can read the rationale.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop special controller lookup from capi20_put_message
Jan Kiszka [Mon, 8 Feb 2010 10:12:43 +0000 (10:12 +0000)]
CAPI: Drop special controller lookup from capi20_put_message

This strange special rule to fall back to controller 1 cannot be derived
from the CAPI specs and looks a lot like it was once dedicated to some
out-of-tree driver, probably AVM's broken fcdsl2 (FRITZ!Card DSL v2.0).
I found no in-tree user that needs this check, and I'm now taking care
of the fcdsl2. So drop these bits from our stack.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop return value of handle_minor_send
Jan Kiszka [Mon, 8 Feb 2010 10:12:42 +0000 (10:12 +0000)]
CAPI: Drop return value of handle_minor_send

We did not evaluate handle_minor_send's return value, just (void)'ed it
away. Time for a cleanup.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Clean up capiminor_*_ack
Jan Kiszka [Mon, 8 Feb 2010 10:12:41 +0000 (10:12 +0000)]
CAPI: Clean up capiminor_*_ack

No need for irqsave acquisition of acklock, bh-safe is sufficient.
Moverover, move kfree out of the lock and do not take acklock at all
in capiminor_del_all_ack as we are the last user of the list here.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Fix locking around capiminor's output queue and drop workaround_lock
Jan Kiszka [Mon, 8 Feb 2010 10:12:40 +0000 (10:12 +0000)]
CAPI: Fix locking around capiminor's output queue and drop workaround_lock

Introduce outlock as a spin lock that protects capiminor's outqueue,
outbytes and outskb (formerly known as ttyskb). outlock can be acquired
from soft-IRQ context via capinc_write, so make it bh-safe.

This finally removes the last reason for keeping the workaround lock
around (which was incomplete and partly broken anyway). And as we no
longer call handle_recv_skb in atomic context, gen_data_b3_resp_for can
use non-atomic allocation now.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop capiminor's unused inbytes counter
Jan Kiszka [Mon, 8 Feb 2010 10:12:39 +0000 (10:12 +0000)]
CAPI: Drop capiminor's unused inbytes counter

The inbytes counter was only updated but never read.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Use atomics for capiminor's datahandle and msgid
Jan Kiszka [Mon, 8 Feb 2010 10:12:38 +0000 (10:12 +0000)]
CAPI: Use atomics for capiminor's datahandle and msgid

The capiminor members datahandle and msgid are incremented outside any
lock, so better do this atomically.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Rename datahandle_queue -> ackqueue_entry
Jan Kiszka [Mon, 8 Feb 2010 10:12:37 +0000 (10:12 +0000)]
CAPI: Rename datahandle_queue -> ackqueue_entry

This struct is describing a queue entry, not the queue itself.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Rework capiminor RX handler
Jan Kiszka [Mon, 8 Feb 2010 10:12:36 +0000 (10:12 +0000)]
CAPI: Rework capiminor RX handler

Avoid re-queuing skbs unless the error detected in handle_recv_skb is
expected to be recoverable such as lacking memory, a full CAPI queue, a
full TTY input buffer, or a not yet existing TTY.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop handle_minor_recv from capinc_tty_write
Jan Kiszka [Mon, 8 Feb 2010 10:12:35 +0000 (10:12 +0000)]
CAPI: Drop handle_minor_recv from capinc_tty_write

Sending a message down the CAPI stack may trigger the reception of an
answer, but this will go through capi_recv_message and call
handle_minor_recv from there. There is no need to walk the receive queue
on capinc_tty_write.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop atomic ttyopencount
Jan Kiszka [Mon, 8 Feb 2010 10:12:34 +0000 (10:12 +0000)]
CAPI: Drop atomic ttyopencount

Not needed, tty->count keeps track of this information. At this chance,
drop traces of ancient attempts to debug this logic via _DEBUG_REFCOUNT.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Clean up capiminors_lock
Jan Kiszka [Mon, 8 Feb 2010 10:12:33 +0000 (10:12 +0000)]
CAPI: Clean up capiminors_lock

Use a plain spin lock for capiminors_lock, drop inconsistent irqsafe
acquisitions (it's only used in process context anyway).

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop obsolete nccip from capiminor struct
Jan Kiszka [Mon, 8 Feb 2010 10:12:32 +0000 (10:12 +0000)]
CAPI: Drop obsolete nccip from capiminor struct

The nccip in capiminor used to serve as an indicator that the NCCI was
close. But we don't need this, we issue a hangup on capincci_free_minor.
So drop this legacy.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Issue synchronous hangup on capincci_free_minor
Jan Kiszka [Mon, 8 Feb 2010 10:12:31 +0000 (10:12 +0000)]
CAPI: Issue synchronous hangup on capincci_free_minor

capincci_free and, thus, capincci_free_minor runs in process context, so
we can issue the hangup of the associated TTY synchronously.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop remaining NULL checks on tty->driver_data
Jan Kiszka [Mon, 8 Feb 2010 10:12:30 +0000 (10:12 +0000)]
CAPI: Drop remaining NULL checks on tty->driver_data

tty_struct's driver_data cannot be NULL, no need to test for it.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Use tty_port to keep track of capiminor's tty
Jan Kiszka [Mon, 8 Feb 2010 10:12:29 +0000 (10:12 +0000)]
CAPI: Use tty_port to keep track of capiminor's tty

Use the reference management features of tty_port to look up and drop
again the tty_struct associated with a capiminor.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Establish install/cleanup handlers for capiminor TTYs
Jan Kiszka [Mon, 8 Feb 2010 10:12:28 +0000 (10:12 +0000)]
CAPI: Establish install/cleanup handlers for capiminor TTYs

Properly associate/disassociate a capiminor object with its TTY via the
install/cleanup handlers instead of trying to guess first open and last
close.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Use kref on capiminor
Jan Kiszka [Mon, 8 Feb 2010 10:12:27 +0000 (10:12 +0000)]
CAPI: Use kref on capiminor

Install a reference counter for capiminor objects. Acquire it when
obtaining a capiminor from the array during capinc_tty_open, drop it
when closing the tty again. Another reference is held for the hook-up
with capincci.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Use dynamic major for NCCI TTYs by default
Jan Kiszka [Mon, 8 Feb 2010 10:12:26 +0000 (10:12 +0000)]
CAPI: Use dynamic major for NCCI TTYs by default

No need to allocate a fixed major for this TTY, both capifs and udev
make this transparent to the user.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Dynamically register minor devices
Jan Kiszka [Mon, 8 Feb 2010 10:12:25 +0000 (10:12 +0000)]
CAPI: Dynamically register minor devices

Register capiminors dynamically with the TTY core so that udev can make
them show up as the NCCIs appear or disappear. This removes the need to
check if the capiminor requested in capinc_tty_open actually exists.

And this completely obsoletes capifs which will be scheduled for removal
in a later patch.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Clean up capinc_tty_init/exit
Jan Kiszka [Mon, 8 Feb 2010 10:12:24 +0000 (10:12 +0000)]
CAPI: Clean up capinc_tty_init/exit

Return proper error code if tty_register_driver fails. In contrast,
tty_unregister_driver cannot practically fail, so drop that error
handling. Finally, mark capinc_tty_init/exit with __init/__exit.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Switch capiminor list to array
Jan Kiszka [Mon, 8 Feb 2010 10:12:23 +0000 (10:12 +0000)]
CAPI: Switch capiminor list to array

Using a plain array of pointers simplifies the management of capiminors.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Switch NCCI list to standard doubly linked list
Jan Kiszka [Mon, 8 Feb 2010 10:12:22 +0000 (10:12 +0000)]
CAPI: Switch NCCI list to standard doubly linked list

Replace open-coded NCCI list management with standard mechanisms.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Fix racy capi_read
Jan Kiszka [Mon, 8 Feb 2010 10:12:21 +0000 (10:12 +0000)]
CAPI: Fix racy capi_read

capi_read still used interruptible_sleep_on, risking to miss a wakeup
this way. Convert it to wait_event_interruptible.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Use non-atomic allocation during NCCI setup
Jan Kiszka [Mon, 8 Feb 2010 10:12:20 +0000 (10:12 +0000)]
CAPI: Use non-atomic allocation during NCCI setup

Both capincci_alloc and capiminor_alloc run in non-atomic context,
update their memory allocations accordingly.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Rework locking of capidev members
Jan Kiszka [Mon, 8 Feb 2010 10:12:19 +0000 (10:12 +0000)]
CAPI: Rework locking of capidev members

Rename 'ncci_list_mtx' to 'lock', expressing that it now protects a
larger set of capidev members: the NCCI list, ap.applid (ie. the
registration of the application), and modifications of userflags.

We do not need to protect each and every check for ap.applid because,
once an application is registered, it will stay for the whole lifetime
of the device.

Also, there is no need to apply the capidev mutex during release (if
there could be concurrent users, we would crash them anyway by freeing
the device at the end of capi_release).

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Clean up capi_open/release
Jan Kiszka [Mon, 8 Feb 2010 10:12:18 +0000 (10:12 +0000)]
CAPI: Clean up capi_open/release

Fold capidev_alloc and capidev_free into capi_open and capi_release -
there are no other users. Someone pushed a lock_kernel into capi_open.
Drop it, we don't need it. Also remove the useless test from open that
checks for private_data == NULL.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Convert capidev_list_lock into a mutex
Jan Kiszka [Mon, 8 Feb 2010 10:12:17 +0000 (10:12 +0000)]
CAPI: Convert capidev_list_lock into a mutex

No need for anything "harder" here (specifically no need for
irqsave...). Also, make the list removal the first operation of
capidev_free to avoid dumping half-released devices via /proc.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Reduce #ifdef mess around CONFIG_ISDN_CAPI_MIDDLEWARE
Jan Kiszka [Mon, 8 Feb 2010 10:12:16 +0000 (10:12 +0000)]
CAPI: Reduce #ifdef mess around CONFIG_ISDN_CAPI_MIDDLEWARE

Make the code a bit more readable be providing stub functions for the
!CONFIG_ISDN_CAPI_MIDDLEWARE case. Though a few lines are moved around,
this comes with no functional changes.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Rework application locking
Jan Kiszka [Mon, 8 Feb 2010 10:12:15 +0000 (10:12 +0000)]
CAPI: Rework application locking

Drop the application rw-lock in favour of RCU. This synchronizes
capi20_release against capi_ctr_handle_message which may dereference an
application from (soft-)IRQ context. Any other access to the application
list is now protected by the capi_controller_lock as well. This also
allows to safely inspect applications for /proc dumping by holding
capi_controller_lock.

At this chance, drop some useless release_in_progress checks where we
obtained the application pointer from the list (which becomes NULL on
release_in_progress).

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Rework locking of controller data structures
Jan Kiszka [Mon, 8 Feb 2010 10:12:14 +0000 (10:12 +0000)]
CAPI: Rework locking of controller data structures

This patch applies the mutex so far only protecting the controller list
to (almost) all accesses of controller data structures. It also reworks
waiting on state changes in old_capi_manufacturer so that it no longer
poll and holds a module reference to the controller owner while waiting
(the latter was partly done already). Modification and checking of the
blocked state remains racy by design, the caller is responsible for
dealing with this.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Rework controller state notifier
Jan Kiszka [Mon, 8 Feb 2010 10:12:13 +0000 (10:12 +0000)]
CAPI: Rework controller state notifier

Another step towards proper locking: Rework the callback provided to
capidrv for controller state changes. This is so far attached to an
application, which would require us to hold the corresponding lock
across notification calls.

But there is no direct relation between a controller up/down event and
an application, so let's decouple them and provide a notifier call chain
for those events instead. This notifier chain is first of all used
internally. Here we request the highest priority to unsure that
housekeeping work is done before any other notifications. The chain is
exported via [un]register_capictr_notifier to our only user, capidrv, to
replace the racy and unfixable capi20_set_callback.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Rework capi_ctr_ready/down
Jan Kiszka [Mon, 8 Feb 2010 10:12:12 +0000 (10:12 +0000)]
CAPI: Rework capi_ctr_ready/down

This step prepares the application of proper controller locking: Push
all state changing work into the notify handler that are called by
capi_ctr_ready and capi_ctr_down, switch detach_capi_ctr to issue a
synchronous ctr_down. Also ensure that we do not go through any action
if the state did not change.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Convert capi drivers rwlock into mutex
Jan Kiszka [Mon, 8 Feb 2010 10:12:11 +0000 (10:12 +0000)]
CAPI: Convert capi drivers rwlock into mutex

Turn the lock protecting registered capi drivers into a mutex and apply
it consistently.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Call a controller 'controller', not 'card'
Jan Kiszka [Mon, 8 Feb 2010 10:12:10 +0000 (10:12 +0000)]
CAPI: Call a controller 'controller', not 'card'

At least for our internal use, fix the misnomers that refer to a CAPI
controller as 'card'. No functional changes.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Reduce chattiness during module loading/removal
Jan Kiszka [Mon, 8 Feb 2010 10:12:09 +0000 (10:12 +0000)]
CAPI: Reduce chattiness during module loading/removal

The CVS revisions dumped by all CAPI modules are meaningless today. And
that some CAPI module is loaded or removed does not necessarily deserve
a message. Just keep the message of the central module, capi.ko, drop
the rest.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Pin capifs instead of mounting it
Jan Kiszka [Mon, 8 Feb 2010 10:12:08 +0000 (10:12 +0000)]
CAPI: Pin capifs instead of mounting it

Auto-mounting the capifs during module init prevents unloading its
module. Instead, pin the filesystem as long as some NCCI node exists.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Eliminate capifs_root variable
Jan Kiszka [Mon, 8 Feb 2010 10:12:07 +0000 (10:12 +0000)]
CAPI: Eliminate capifs_root variable

capifs_mnt->mnt_sb->s_root already contains what we need.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Sanitize capifs API
Jan Kiszka [Mon, 8 Feb 2010 10:12:06 +0000 (10:12 +0000)]
CAPI: Sanitize capifs API

Instead of looking up the dentry of an NCCI node again in
capifs_free_ncci pass the pointer via the capifs user.

This patch also reduces the #ifdef mess in capi.c a bit as far as capifs
was causing it.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Fix leaks in capifs_new_ncci
Jan Kiszka [Mon, 8 Feb 2010 10:12:05 +0000 (10:12 +0000)]
CAPI: Fix leaks in capifs_new_ncci

When something went wrong during capifs_new_ncci, the looked up dentry
was not properly released. Neither was the allocated inode. Refactor the
function to avoid leaks.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet neigh: Decouple per interface neighbour table controls from binary sysctls
Eric W. Biederman [Sun, 14 Feb 2010 03:27:03 +0000 (03:27 +0000)]
net neigh: Decouple per interface neighbour table controls from binary sysctls

Stop computing the number of neighbour table settings we have by
counting the number of binary sysctls.  This behaviour was silly
and meant that we could not add another neighbour table setting
without also adding another binary sysctl.

Don't pass the binary sysctl path for neighour table entries
into neigh_sysctl_register.  These parameters are no longer
used and so are just dead code.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet ipv4: Decouple ipv4 interface parameters from binary sysctl numbers
Eric W. Biederman [Sun, 14 Feb 2010 03:25:51 +0000 (03:25 +0000)]
net ipv4: Decouple ipv4 interface parameters from binary sysctl numbers

Stop using the binary sysctl enumeartion in sysctl.h as an index into
a per interface array.  This leads to unnecessary binary sysctl number
allocation, and a fragility in data structure and implementation
because of unnecessary coupling.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/pcnet32.c: Checkpatch cleaning
Joe Perches [Mon, 15 Feb 2010 08:34:26 +0000 (08:34 +0000)]
drivers/net/pcnet32.c: Checkpatch cleaning

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/pcnet32.c: Use (pr|netdev|netif)_<levels> macro helpers
Joe Perches [Mon, 15 Feb 2010 08:34:25 +0000 (08:34 +0000)]
drivers/net/pcnet32.c: Use (pr|netdev|netif)_<levels> macro helpers

Make the output logging messages a bit more consistent.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tehuti.c: trivial checkpatch cleanups
Joe Perches [Mon, 15 Feb 2010 08:34:24 +0000 (08:34 +0000)]
drivers/net/tehuti.c: trivial checkpatch cleanups

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tehuti.c: Hoist assigns out of ifs
Joe Perches [Mon, 15 Feb 2010 08:34:23 +0000 (08:34 +0000)]
drivers/net/tehuti.c: Hoist assigns out of ifs

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tehuti.c: Use (pr|netdev|netif)_<levels> macro helpers
Joe Perches [Mon, 15 Feb 2010 08:34:22 +0000 (08:34 +0000)]
drivers/net/tehuti.c: Use (pr|netdev|netif)_<levels> macro helpers

Make the output logging messages a bit more consistent.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/sky2: Convert to use netif_printk macros
Joe Perches [Mon, 15 Feb 2010 08:34:21 +0000 (08:34 +0000)]
drivers/net/sky2: Convert to use netif_printk macros

Some unlikely(netif_msg_<foo>(sky2)) tests are also
removed by this change.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/ixgb: Use netif_printk macros
Joe Perches [Mon, 15 Feb 2010 08:34:20 +0000 (08:34 +0000)]
drivers/net/ixgb: Use netif_printk macros

Convert private DPRINTK macro uses to netif_<level> equivalents
Remove #define DPRINTK

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Kill bogus ip_tables.h include.
David S. Miller [Tue, 16 Feb 2010 23:23:23 +0000 (15:23 -0800)]
sparc64: Kill bogus ip_tables.h include.

Fixes the following build failure:

  CC      arch/sparc/kernel/sys_sparc32.o
In file included from include/linux/netfilter_ipv4/ip_tables.h:28,
                 from arch/sparc/kernel/sys_sparc32.c:46:
include/linux/netfilter/x_tables.h:525: error: expected declaration specifiers or â€˜...’ before â€˜nf_hookfn’

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Update firmwares and update version to 2.0.8.
Michael Chan [Tue, 16 Feb 2010 23:19:42 +0000 (15:19 -0800)]
bnx2: Update firmwares and update version to 2.0.8.

- Increase FTQ depth to 256 to ehnabce performance.
- Fix RV2P context corruption on 5709 when flow control is enabled.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Fix bug when saving statistics.
Patrick Rabau [Mon, 15 Feb 2010 19:42:11 +0000 (19:42 +0000)]
bnx2: Fix bug when saving statistics.

This fixes the problem of dropping the carry when adding 2 32-bit values.
Switch to use array indexing for better readability.

Reported by and fix provided by Patrick Rabau.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Allow user-specified multiple advertisement speed values.
Michael Chan [Mon, 15 Feb 2010 19:42:10 +0000 (19:42 +0000)]
bnx2: Allow user-specified multiple advertisement speed values.

Remove unnecessary code that works around older versions of ethtool
that can pass down invalid advertisement speed values.  This old
code prevents the user from specifying multiple advertisement values.
The new code uses simple masking to mask out invalid advertisment bits.

Reported-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Adjust flow control water marks.
Michael Chan [Mon, 15 Feb 2010 19:42:09 +0000 (19:42 +0000)]
bnx2: Adjust flow control water marks.

The current water marks are too high and can cause unnecessary flow
control frames.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Need to call cnic_setup_cnic_irq_info() after MTU change.
Michael Chan [Mon, 15 Feb 2010 19:42:08 +0000 (19:42 +0000)]
bnx2: Need to call cnic_setup_cnic_irq_info() after MTU change.

New status blocks are allocated during MTU change so we need to
update this information for the cnic driver.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Check BNX2_FLAG_USING_MSIX flag when setting up MSIX.
Michael Chan [Mon, 15 Feb 2010 19:42:07 +0000 (19:42 +0000)]
bnx2: Check BNX2_FLAG_USING_MSIX flag when setting up MSIX.

Checking the flag is more correct than checking bp->irq_nvecs. By
accident it is not a problem because we always have more than 1
vectors when using MSIX mode.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatl1c: Add support for Atheros AR8152 and AR8152
Luis R. Rodriguez [Tue, 16 Feb 2010 23:16:45 +0000 (15:16 -0800)]
atl1c: Add support for Atheros AR8152 and AR8152

AR8151 is a Gigabit Ethernet device. AR8152 devices are
Fast Ethernet devices, there are two revisions, a 1.0
and a 2.0 revision.

This has been tested against these devices:

Driver Model-name vendor:device Type
atl1c  AR8131 1969:1063 Gigabit Ethernet
atl1c AR8132 1969:1062 Fast Ethernet
atl1c AR8151(v1.0) 1969:1073 Gigabit Ethernet
atl1c AR8152(v1.1) 1969:2060 Fast Ethernet

This device has no hardware available yet so it goes untested,
but it should work:

atl1c AR8152(v2.0) 1969:2062 Fast Ethernet

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotunnels: fix netns vs proto registration ordering
Alexey Dobriyan [Tue, 16 Feb 2010 09:05:04 +0000 (09:05 +0000)]
tunnels: fix netns vs proto registration ordering

Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogre: fix netns vs proto registration ordering
Alexey Dobriyan [Tue, 16 Feb 2010 07:57:44 +0000 (07:57 +0000)]
gre: fix netns vs proto registration ordering

GRE protocol receive hook can be called right after protocol addition is done.
If netns stuff is not yet initialized, we're going to oops in
net_generic().

This is remotely oopsable if ip_gre is compiled as module and packet
comes at unfortunate moment of module loading.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Tue, 16 Feb 2010 19:15:13 +0000 (11:15 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-next-2.6

14 years agoethtool: reduce stack usage
Eric Dumazet [Tue, 16 Feb 2010 05:51:33 +0000 (21:51 -0800)]
ethtool: reduce stack usage

dev_ethtool() is currently using 604 bytes of stack, even with gcc-4.4.2

objdump -d vmlinux | scripts/checkstack.pl
...
0xc04bbc33 dev_ethtool [vmlinux]: 604
...
Adding noinline attributes to selected functions can reduce stack usage.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: emaclite: adding MDIO and phy lib support
John Linn [Tue, 16 Feb 2010 05:51:00 +0000 (21:51 -0800)]
net: emaclite: adding MDIO and phy lib support

These changes add MDIO and phy lib support to the driver as the
IP core now supports the MDIO bus.

The MDIO bus and phy are added as a child to the emaclite in the device
tree as illustrated below.

mdio {
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@7 {
compatible = "marvell,88e1111";
reg = <7>;
} ;
}

Signed-off-by: Sadanand Mutyala <Sadanand.Mutyala@xilinx.com>
Signed-off-by: John Linn <john.linn@xilinx.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoX25: Dont let x25_bind use addresses containing characters
andrew hendry [Sun, 14 Feb 2010 02:00:45 +0000 (02:00 +0000)]
X25: Dont let x25_bind use addresses containing characters

Addresses should be all digits.
Stops x25_bind using addresses containing characters.

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoX25: Fix x25_create errors for bad protocol and ENOBUFS
andrew hendry [Sun, 14 Feb 2010 02:00:11 +0000 (02:00 +0000)]
X25: Fix x25_create errors for bad protocol and ENOBUFS

alloc_socket failures should return -ENOBUFS
a bad protocol should return -EINVAL

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: implement EEH pci error recovery handlers
Sathya Perla [Sun, 14 Feb 2010 21:22:01 +0000 (21:22 +0000)]
be2net: implement EEH pci error recovery handlers

The code has been tested on IBM pSeries server.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Flushing empty SPD generates false events
jamal [Thu, 11 Feb 2010 00:53:13 +0000 (00:53 +0000)]
xfrm: Flushing empty SPD generates false events

Observed similar behavior on SPD as previouly seen on SAD flushing..
This fixes it.

cheers,
jamal
commit 428b20432dc31bc2e01a94cd451cf5a2c00d2bf4
Author: Jamal Hadi Salim <hadi@cyberus.ca>
Date:   Thu Feb 11 05:49:38 2010 -0500

    xfrm: Flushing empty SPD generates false events

    To see the effect make sure you have an empty SPD.
    On window1 "ip xfrm mon" and on window2 issue "ip xfrm policy flush"
    You get prompt back in window1 and you see the flush event on window2.
    With this fix, you still get prompt on window1 but no event on window2.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Flushing empty SAD generates false events
jamal [Wed, 10 Feb 2010 23:51:27 +0000 (23:51 +0000)]
xfrm: Flushing empty SAD generates false events

To see the effect make sure you have an empty SAD.
-On window1 "ip xfrm mon"
-on window2 issue "ip xfrm state flush"
You get prompt back in window1
and you see the flush event on window2.
With this fix, you still get prompt on window1 but no
event on window2.

I was tempted to return -ESRCH on window1 (which would
show "RTNETLINK answers: No such process") but didnt want
to change current behavior.

cheers,
jamal
commit 5f3dd4a772326166e1bcf54acc2391df00dc7ab5
Author: Jamal Hadi Salim <hadi@cyberus.ca>
Date:   Thu Feb 11 04:41:36 2010 -0500

    xfrm: Flushing empty SAD generates false events

    To see the effect make sure you have an empty SAD.
    On window1 "ip xfrm mon" and on window2 issue "ip xfrm state flush"
    You get prompt back in window1 and you see the flush event on window2.
    With this fix, you still get prompt on window1 but no event on window2.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv6: Delete redundant counter of IPSTATS_MIB_REASMFAILS
Shan Wei [Thu, 11 Feb 2010 00:12:45 +0000 (00:12 +0000)]
IPv6: Delete redundant counter of IPSTATS_MIB_REASMFAILS

When no more memory can be allocated, fq_find() will return NULL and
increase the value of IPSTATS_MIB_REASMFAILS. In this case,
ipv6_frag_rcv() also increase the value of IPSTATS_MIB_REASMFAILS.

So, the patch deletes redundant counter of IPSTATS_MIB_REASMFAILS in fq_find().
and deletes the unused parameter of idev.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/macvtap: fix reference counting
Arnd Bergmann [Thu, 11 Feb 2010 05:55:39 +0000 (05:55 +0000)]
net/macvtap: fix reference counting

The RCU usage in the original code was broken because
there are cases where we possibly sleep with rcu_read_lock
held. As a fix, change the macvtap_file_get_queue to
get a reference on the socket and the netdev instead of
taking the full rcu_read_lock.

Also, change macvtap_file_get_queue failure case to
not require a subsequent macvtap_file_put_queue, as
pointed out by Ed Swierk.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ed Swierk <eswierk@aristanetworks.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb3: fix link flap
Divy Le Ray [Sat, 13 Feb 2010 09:44:35 +0000 (09:44 +0000)]
cxgb3: fix link flap

The driver is expected to report that the link is up
when the phy Rx signal is established and the mac
has not detected a link fault.
The code is however broken, the driver does not check the link fault
status when the phy link status changes.
The link fault status being checked within a short period of time,
it leads to link up/link down events.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb3: FIx VLAN over Jumbo frames
Divy Le Ray [Sat, 13 Feb 2010 09:44:30 +0000 (09:44 +0000)]
cxgb3: FIx VLAN over Jumbo frames

The mac is expected to auto-inflate the Maximum Frame size for VLAN
tagged frames. It however does not work with jumbo frames.
Work around the bug adding 4 to the Maximum Frame for MTUs
greater than 1536.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Cleanup incorrect header comments
Peter Waskiewicz [Fri, 12 Feb 2010 13:48:44 +0000 (13:48 +0000)]
ixgbe: Cleanup incorrect header comments

The recent n-tuple patches added some comments to the headers
of the Flow Director functions that aren't accurate.  This
cleans them up, and is a purely cosmetic patch.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: Move n-tuple capability check into set_flags
Peter Waskiewicz [Fri, 12 Feb 2010 13:48:25 +0000 (13:48 +0000)]
ethtool: Move n-tuple capability check into set_flags

set_flags should check if the underlying device supports
n-tuple filter programming before setting the device flags
on the netdevice.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: Fix filter addition when caching n-tuple filters
Peter Waskiewicz [Fri, 12 Feb 2010 13:48:05 +0000 (13:48 +0000)]
ethtool: Fix filter addition when caching n-tuple filters

We can allow a filter to be added successfully to the underlying
hardware, but still return an error if the cached list memory
allocation fails.  This patch fixes that condition.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetfilter: CONFIG_COMPAT: allow delta to exceed 32767
Florian Westphal [Mon, 15 Feb 2010 17:17:10 +0000 (18:17 +0100)]
netfilter: CONFIG_COMPAT: allow delta to exceed 32767

with 32 bit userland and 64 bit kernels, it is unlikely but possible
that insertion of new rules fails even tough there are only about 2000
iptables rules.

This happens because the compat delta is using a short int.
Easily reproducible via "iptables -m limit" ; after about 2050
rules inserting new ones fails with -ELOOP.

Note that compat_delta included 2 bytes of padding on x86_64, so
structure size remains the same.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: ebtables: avoid explicit XT_ALIGN() in match/targets
Florian Westphal [Mon, 15 Feb 2010 17:16:26 +0000 (18:16 +0100)]
netfilter: ebtables: avoid explicit XT_ALIGN() in match/targets

This will cause trouble once CONFIG_COMPAT support is added to ebtables.
xt_compat_*_offset() calculate the kernel/userland structure size delta
using:

XT_ALIGN(size) - COMPAT_XT_ALIGN(size)

If the match/target sizes are aligned at registration time,
delta is always zero.

Should have zero effect for existing systems: xtables uses
XT_ALIGN() whenever it deals with match/target sizes.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: ebtables: abort if next_offset is too small
Florian Westphal [Mon, 15 Feb 2010 17:15:55 +0000 (18:15 +0100)]
netfilter: ebtables: abort if next_offset is too small

next_offset must be > 0, otherwise this loops forever.
The offset also contains the size of the ebt_entry structure
itself, so anything smaller is invalid.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: ctnetlink: add zone support
Patrick McHardy [Mon, 15 Feb 2010 17:14:57 +0000 (18:14 +0100)]
netfilter: ctnetlink: add zone support

Parse and dump the conntrack zone in ctnetlink.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack: add support for "conntrack zones"
Patrick McHardy [Mon, 15 Feb 2010 17:13:33 +0000 (18:13 +0100)]
netfilter: nf_conntrack: add support for "conntrack zones"

Normally, each connection needs a unique identity. Conntrack zones allow
to specify a numerical zone using the CT target, connections in different
zones can use the same identity.

Example:

iptables -t raw -A PREROUTING -i veth0 -j CT --zone 1
iptables -t raw -A OUTPUT -o veth1 -j CT --zone 1

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack: pass template to l4proto ->error() handler
Patrick McHardy [Mon, 15 Feb 2010 16:45:08 +0000 (17:45 +0100)]
netfilter: nf_conntrack: pass template to l4proto ->error() handler

The error handlers might need the template to get the conntrack zone
introduced in the next patches to perform a conntrack lookup.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: xtables: add const qualifiers
Jan Engelhardt [Fri, 26 Jun 2009 05:51:59 +0000 (07:51 +0200)]
netfilter: xtables: add const qualifiers

This should make it easier to remove redundant arguments later.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: xtables: constify args in compat copying functions
Jan Engelhardt [Fri, 26 Jun 2009 06:23:19 +0000 (08:23 +0200)]
netfilter: xtables: constify args in compat copying functions

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: xtables: print details on size mismatch
Jan Engelhardt [Thu, 25 Jun 2009 16:32:12 +0000 (18:32 +0200)]
netfilter: xtables: print details on size mismatch

Print which revision has been used and which size are which
(kernel/user) for easier debugging.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: get rid of the grossness in netfilter.h
Jan Engelhardt [Sat, 13 Jun 2009 02:13:26 +0000 (04:13 +0200)]
netfilter: get rid of the grossness in netfilter.h

GCC is now smart enough to follow the inline trail correctly.
vmlinux size remain the same.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: reduce NF_HOOK by one argument
Jan Engelhardt [Fri, 5 Jun 2009 15:31:46 +0000 (17:31 +0200)]
netfilter: reduce NF_HOOK by one argument

No changes in vmlinux filesize.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: iptables: remove unused function arguments
Jan Engelhardt [Sat, 31 Oct 2009 23:36:40 +0000 (00:36 +0100)]
netfilter: iptables: remove unused function arguments

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: xt_recent: inform user when hitcount is too large
Jan Engelhardt [Mon, 15 Feb 2010 15:31:35 +0000 (16:31 +0100)]
netfilter: xt_recent: inform user when hitcount is too large

It is one of these things that iptables cannot catch and which can
cause "Invalid argument" to be printed. Without a hint in dmesg, it is
not going to be helpful.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoniu: Refinements to kernel logging.
David S. Miller [Mon, 15 Feb 2010 08:07:00 +0000 (00:07 -0800)]
niu: Refinements to kernel logging.

Fix unconditional empty kerne log message every interrupt.

Kill some informational log messages that are superfluous
and anyways occur before the netdev is registered.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: Fix error introduced in netdev_mc_count() changes.
David S. Miller [Mon, 15 Feb 2010 06:49:52 +0000 (22:49 -0800)]
mac80211: Fix error introduced in netdev_mc_count() changes.

Commit 4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5
("net: use netdev_mc_count and netdev_mc_empty when appropriate")
added this hunk to net/mac80211/iface.c:

  __dev_addr_unsync(&local->mc_list, &local->mc_count,
-   &dev->mc_list, &dev->mc_count);
+   &dev->mc_list, dev->mc_count);

which is definitely not correct, introduced a warning (reported
by Stephen Rothwell):

net/mac80211/iface.c: In function 'ieee80211_stop':
net/mac80211/iface.c:416: warning: passing argument 4 of '__dev_addr_unsync' makes pointer from integer without a cast
include/linux/netdevice.h:1967: note: expected 'int *' but argument is of type 'int'

and is thus reverted here.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovhost-net: switch to smp barriers
Michael S. Tsirkin [Mon, 1 Feb 2010 07:21:02 +0000 (07:21 +0000)]
vhost-net: switch to smp barriers

vhost-net only uses memory barriers to control SMP effects
(communication with userspace potentially running on a different CPU),
so it should use SMP barriers and not mandatory barriers for memory
access ordering, as suggested by Documentation/memory-barriers.txt

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoniu: Use pr_<level>, netdev_<level> and netif_<level> macros
Joe Perches [Mon, 15 Feb 2010 06:40:39 +0000 (22:40 -0800)]
niu: Use pr_<level>, netdev_<level> and netif_<level> macros

Remove #define PFX
Add pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Convert printks to pr_<level>
Convert printks without levels to pr_cont
Convert pr_<level> with np->dev to netdev_<level>
Convert dev_<level> to netdev_<level>
Convert niudbg to netif_printk
Convert niuinfo, niuwarn macros to netif_<level>(priv, type, dev...
Coalesce long formats
Convert embedded function names to "%s", __func__
Always use "%s()..." when __func__ is printed

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: Fix includes build break
David S. Miller [Mon, 15 Feb 2010 06:38:54 +0000 (22:38 -0800)]
ethtool: Fix includes build break

Based upon a patch by Oliver Hartkopp <oliver@hartkopp.net>.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Fix first line of kernel-doc for a few functions
Ben Hutchings [Mon, 15 Feb 2010 06:35:47 +0000 (22:35 -0800)]
net: Fix first line of kernel-doc for a few functions

The function name must be followed by a space, hypen, space, and a
short description.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Mon, 15 Feb 2010 06:30:54 +0000 (22:30 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
net/mac80211/rate.c

14 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Mon, 15 Feb 2010 01:45:59 +0000 (17:45 -0800)]
Merge branch 'master' of ssh:///linux/kernel/git/linville/wireless-next-2.6

14 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Sun, 14 Feb 2010 19:56:38 +0000 (11:56 -0800)]
Merge branch 'master' of ssh:///linux/kernel/git/linville/wireless-2.6

14 years agotg3: Update driver version to 3.107
Matt Carlson [Fri, 12 Feb 2010 14:47:13 +0000 (14:47 +0000)]
tg3: Update driver version to 3.107

This patch updates the tg3 version to 3.107.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>