OSDN Git Service

uclinux-h8/linux.git
11 years agoMerge branch 'akpm' (Fixes from Andrew)
Linus Torvalds [Tue, 27 Nov 2012 02:33:33 +0000 (18:33 -0800)]
Merge branch 'akpm' (Fixes from Andrew)

Merge misc fixes from Andrew Morton:
 "8 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (8 patches)
  futex: avoid wake_futex() for a PI futex_q
  watchdog: using u64 in get_sample_period()
  writeback: put unused inodes to LRU after writeback completion
  mm: vmscan: check for fatal signals iff the process was throttled
  Revert "mm: remove __GFP_NO_KSWAPD"
  proc: check vma->vm_file before dereferencing
  UAPI: strip the _UAPI prefix from header guards during header installation
  include/linux/bug.h: fix sparse warning related to BUILD_BUG_ON_INVALID

11 years agoMerge tag 'tty-3.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Tue, 27 Nov 2012 01:46:36 +0000 (17:46 -0800)]
Merge tag 'tty-3.7-rc7' of git://git./linux/kernel/git/gregkh/tty

Pull TTY fix from Greg Kroah-Hartman:
 "Here is a single fix for a reported regression in 3.7-rc5 for the tty
  layer.  This fix has been in the linux-next tree and solves the
  reported problem.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'tty-3.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty vt: Fix a regression in command line edition

11 years agoMerge tag 'mfd-for-linus-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
Linus Torvalds [Tue, 27 Nov 2012 01:45:16 +0000 (17:45 -0800)]
Merge tag 'mfd-for-linus-3.7' of git://git./linux/kernel/git/sameo/mfd-2.6

Pull MFD fixes from Samuel Ortiz:

 - A twl fix preventing a buffer overflow.

 - A wm5102 register patch fix.

 - A wm5110 error misreport fix.

 - Arizona fixes: Use the right array size when adding subdevices,
   correctly report underclocked events, synchronize register cache
   after reset.

 - A twl4030 fix for preventing the system to hang from an interrupt
   flood.

* tag 'mfd-for-linus-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: twl4030: Fix chained irq handling on resume from suspend
  mfd: arizona: Sync regcache after reset
  mfd: arizona: Correctly report when AIF2/AIF1 is underclocked
  mfd: arizona: Use correct array for ARRAY_SIZE in mfd_add_devices call
  mfd: wm5110: Disable control interface error report for WM5110 rev B
  mfd: wm5102: Update register patch for latest evaluation
  mfd: twl-core: Fix chip ID for the twl6030-pwm module

11 years agoMerge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Linus Torvalds [Tue, 27 Nov 2012 01:43:10 +0000 (17:43 -0800)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm

Pull ARM fixes from Russell King:
 "Not much here, just a couple minor/cosmetic fixes and a patch for the
  decompressor which fixes problems with modern GCC and CPUs."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7583/1: decompressor: Enable unaligned memory access for v6 and above
  ARM: 7572/1: proc-v6.S: fix comment
  ARM: 7570/1: quiet down the non make -s output

11 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Linus Torvalds [Tue, 27 Nov 2012 01:42:07 +0000 (17:42 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-fs

Pull ext3 regression fix from Jan Kara:
 "Fix an ext3 regression introduced during 3.7 merge window.  It leads
  to deadlock if you stress the filesystem in the right way (luckily
  only if blocksize < pagesize)."

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  jbd: Fix lock ordering bug in journal_unmap_buffer()

11 years agofutex: avoid wake_futex() for a PI futex_q
Darren Hart [Tue, 27 Nov 2012 00:29:56 +0000 (16:29 -0800)]
futex: avoid wake_futex() for a PI futex_q

Dave Jones reported a bug with futex_lock_pi() that his trinity test
exposed.  Sometime between queue_me() and taking the q.lock_ptr, the
lock_ptr became NULL, resulting in a crash.

While futex_wake() is careful to not call wake_futex() on futex_q's with
a pi_state or an rt_waiter (which are either waiting for a
futex_unlock_pi() or a PI futex_requeue()), futex_wake_op() and
futex_requeue() do not perform the same test.

Update futex_wake_op() and futex_requeue() to test for q.pi_state and
q.rt_waiter and abort with -EINVAL if detected.  To ensure any future
breakage is caught, add a WARN() to wake_futex() if the same condition
is true.

This fix has seen 3 hours of testing with "trinity -c futex" on an
x86_64 VM with 4 CPUS.

[akpm@linux-foundation.org: tidy up the WARN()]
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-by: Dave Jones <davej@redat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: John Kacur <jkacur@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agowatchdog: using u64 in get_sample_period()
Chuansheng Liu [Tue, 27 Nov 2012 00:29:54 +0000 (16:29 -0800)]
watchdog: using u64 in get_sample_period()

In get_sample_period(), unsigned long is not enough:

  watchdog_thresh * 2 * (NSEC_PER_SEC / 5)

case1:
  watchdog_thresh is 10 by default, the sample value will be: 0xEE6B2800

case2:
 set watchdog_thresh is 20, the sample value will be: 0x1 DCD6 5000

In case2, we need use u64 to express the sample period.  Otherwise,
changing the threshold thru proc often can not be successful.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agowriteback: put unused inodes to LRU after writeback completion
Jan Kara [Tue, 27 Nov 2012 00:29:51 +0000 (16:29 -0800)]
writeback: put unused inodes to LRU after writeback completion

Commit 169ebd90131b ("writeback: Avoid iput() from flusher thread")
removed iget-iput pair from inode writeback.  As a side effect, inodes
that are dirty during iput_final() call won't be ever added to inode LRU
(iput_final() doesn't add dirty inodes to LRU and later when the inode
is cleaned there's noone to add the inode there).  Thus inodes are
effectively unreclaimable until someone looks them up again.

The practical effect of this bug is limited by the fact that inodes are
pinned by a dentry for long enough that the inode gets cleaned.  But
still the bug can have nasty consequences leading up to OOM conditions
under certain circumstances.  Following can easily reproduce the
problem:

  for (( i = 0; i < 1000; i++ )); do
    mkdir $i
    for (( j = 0; j < 1000; j++ )); do
      touch $i/$j
      echo 2 > /proc/sys/vm/drop_caches
    done
  done

then one needs to run 'sync; ls -lR' to make inodes reclaimable again.

We fix the issue by inserting unused clean inodes into the LRU after
writeback finishes in inode_sync_complete().

Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: <stable@vger.kernel.org> [3.5+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomm: vmscan: check for fatal signals iff the process was throttled
Mel Gorman [Tue, 27 Nov 2012 00:29:48 +0000 (16:29 -0800)]
mm: vmscan: check for fatal signals iff the process was throttled

Commit 5515061d22f0 ("mm: throttle direct reclaimers if PF_MEMALLOC
reserves are low and swap is backed by network storage") introduced a
check for fatal signals after a process gets throttled for network
storage.  The intention was that if a process was throttled and got
killed that it should not trigger the OOM killer.  As pointed out by
Minchan Kim and David Rientjes, this check is in the wrong place and too
broad.  If a system is in am OOM situation and a process is exiting, it
can loop in __alloc_pages_slowpath() and calling direct reclaim in a
loop.  As the fatal signal is pending it returns 1 as if it is making
forward progress and can effectively deadlock.

This patch moves the fatal_signal_pending() check after throttling to
throttle_direct_reclaim() where it belongs.  If the process is killed
while throttled, it will return immediately without direct reclaim
except now it will have TIF_MEMDIE set and will use the PFMEMALLOC
reserves.

Minchan pointed out that it may be better to direct reclaim before
returning to avoid using the reserves because there may be pages that
can easily reclaim that would avoid using the reserves.  However, we do
no such targetted reclaim and there is no guarantee that suitable pages
are available.  As it is expected that this throttling happens when
swap-over-NFS is used there is a possibility that the process will
instead swap which may allocate network buffers from the PFMEMALLOC
reserves.  Hence, in the swap-over-nfs case where a process can be
throtted and be killed it can use the reserves to exit or it can
potentially use reserves to swap a few pages and then exit.  This patch
takes the option of using the reserves if necessary to allow the process
exit quickly.

If this patch passes review it should be considered a -stable candidate
for 3.6.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Luigi Semenzato <semenzato@google.com>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Sonny Rao <sonnyrao@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoRevert "mm: remove __GFP_NO_KSWAPD"
Mel Gorman [Tue, 27 Nov 2012 00:29:45 +0000 (16:29 -0800)]
Revert "mm: remove __GFP_NO_KSWAPD"

With "mm: vmscan: scale number of pages reclaimed by reclaim/compaction
based on failures" reverted, Zdenek Kabelac reported the following

  Hmm,  so it's just took longer to hit the problem and observe
  kswapd0 spinning on my CPU again - it's not as endless like before -
  but still it easily eats minutes - it helps to turn off  Firefox
  or TB  (memory hungry apps) so kswapd0 stops soon - and restart
  those apps again.  (And I still have like >1GB of cached memory)

  kswapd0         R  running task        0    30      2 0x00000000
  Call Trace:
    preempt_schedule+0x42/0x60
    _raw_spin_unlock+0x55/0x60
    put_super+0x31/0x40
    drop_super+0x22/0x30
    prune_super+0x149/0x1b0
    shrink_slab+0xba/0x510

The sysrq+m indicates the system has no swap so it'll never reclaim
anonymous pages as part of reclaim/compaction.  That is one part of the
problem but not the root cause as file-backed pages could also be
reclaimed.

The likely underlying problem is that kswapd is woken up or kept awake
for each THP allocation request in the page allocator slow path.

If compaction fails for the requesting process then compaction will be
deferred for a time and direct reclaim is avoided.  However, if there
are a storm of THP requests that are simply rejected, it will still be
the the case that kswapd is awake for a prolonged period of time as
pgdat->kswapd_max_order is updated each time.  This is noticed by the
main kswapd() loop and it will not call kswapd_try_to_sleep().  Instead
it will loopp, shrinking a small number of pages and calling
shrink_slab() on each iteration.

The temptation is to supply a patch that checks if kswapd was woken for
THP and if so ignore pgdat->kswapd_max_order but it'll be a hack and not
backed up by proper testing.  As 3.7 is very close to release and this
is not a bug we should release with, a safer path is to revert "mm:
remove __GFP_NO_KSWAPD" for now and revisit it with the view to ironing
out the balance_pgdat() logic in general.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: Zdenek Kabelac <zkabelac@redhat.com>
Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoproc: check vma->vm_file before dereferencing
Stanislav Kinsbursky [Tue, 27 Nov 2012 00:29:42 +0000 (16:29 -0800)]
proc: check vma->vm_file before dereferencing

Commit 7b540d0646ce ("proc_map_files_readdir(): don't bother with
grabbing files") switched proc_map_files_readdir() to use @f_mode
directly instead of grabbing @file reference, but same time the test for
@vm_file presence was lost leading to nil dereference.  The patch brings
the test back.

The all proc_map_files feature is CONFIG_CHECKPOINT_RESTORE wrapped
(which is set to 'n' by default) so the bug doesn't affect regular
kernels.

The regression is 3.7-rc1 only as far as I can tell.

[gorcunov@openvz.org: provided changelog]
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoUAPI: strip the _UAPI prefix from header guards during header installation
David Howells [Tue, 27 Nov 2012 00:29:39 +0000 (16:29 -0800)]
UAPI: strip the _UAPI prefix from header guards during header installation

Strip the _UAPI prefix from header guards during header installation so
that any userspace dependencies aren't affected.  glibc, for example,
checks for linux/types.h, linux/kernel.h, linux/compiler.h and
linux/list.h by their guards - though the last two aren't actually
exported.

  libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -Wall -Werror -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fstack-protector -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c child.c  -fPIC -DPIC -o .libs/child.o
  In file included from cli.c:20:0:
  common.h:152:8: error: redefinition of 'struct sysinfo'
  In file included from /usr/include/linux/kernel.h:4:0,
    from /usr/include/linux/sysctl.h:25,
    from /usr/include/sys/sysctl.h:43,
    from common.h:50,
    from cli.c:20:
  /usr/include/linux/sysinfo.h:7:8: note: originally defined here

Reported-by: Tomasz Torcz <tomek@pipebreaker.pl>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoinclude/linux/bug.h: fix sparse warning related to BUILD_BUG_ON_INVALID
Tushar Behera [Tue, 27 Nov 2012 00:29:38 +0000 (16:29 -0800)]
include/linux/bug.h: fix sparse warning related to BUILD_BUG_ON_INVALID

Commit baf05aa9271b ("bug: introduce BUILD_BUG_ON_INVALID() macro")
introduces this macro only when _CHECKER_ is not defined.  Define a
silent macro in the else condition to fix following sparse warning:

  mm/filemap.c:395:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
  mm/filemap.c:396:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
  mm/filemap.c:397:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
  include/linux/mm.h:419:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
  include/linux/mm.h:419:9: error: not a function <noident>

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Acked-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agonet: ipmr: limit MRT_TABLE identifiers
Eric Dumazet [Sun, 25 Nov 2012 09:44:29 +0000 (09:44 +0000)]
net: ipmr: limit MRT_TABLE identifiers

Name of pimreg devices are built from following format :

char name[IFNAMSIZ]; // IFNAMSIZ == 16

sprintf(name, "pimreg%u", mrt->id);

We must therefore limit mrt->id to 9 decimal digits
or risk a buffer overflow and a crash.

Restrict table identifiers in [0 ... 999999999] interval.

Reported-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoip6mr: Add sizeof verification to MRT6_ASSERT and MT6_PIM
Joe Perches [Sun, 25 Nov 2012 18:26:34 +0000 (18:26 +0000)]
ip6mr: Add sizeof verification to MRT6_ASSERT and MT6_PIM

Verify the length of the user-space arguments.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: avoid passing NULL to inet_putpeer() in icmpv4_xrlim_allow()
Neal Cardwell [Sat, 24 Nov 2012 18:54:37 +0000 (18:54 +0000)]
ipv4: avoid passing NULL to inet_putpeer() in icmpv4_xrlim_allow()

inet_getpeer_v4() can return NULL under OOM conditions, and while
inet_peer_xrlim_allow() is OK with a NULL peer, inet_putpeer() will
crash.

This code path now uses the same idiom as the others from:
1d861aa4b3fb08822055345f480850205ffe6170 ("inet: Minimize use of
cached route inetpeer.").

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosockopt: Change getsockopt() of SO_BINDTODEVICE to return an interface name
Brian Haley [Mon, 26 Nov 2012 05:21:08 +0000 (05:21 +0000)]
sockopt: Change getsockopt() of SO_BINDTODEVICE to return an interface name

Instead of having the getsockopt() of SO_BINDTODEVICE return an index, which
will then require another call like if_indextoname() to get the actual interface
name, have it return the name directly.

This also matches the existing man page description on socket(7) which mentions
the argument being an interface name.

If the value has not been set, zero is returned and optlen will be set to zero
to indicate there is no interface name present.

Added a seqlock to protect this code path, and dev_ifname(), from someone
changing the device name via dev_change_name().

v2: Added seqlock protection while copying device name.

v3: Fixed word wrap in patch.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocpts: add missing kconfig dependency
Richard Cochran [Mon, 26 Nov 2012 02:07:18 +0000 (02:07 +0000)]
cpts: add missing kconfig dependency

The Common Platform Time Sync function of the CPSW does not depend the
CPSW configuration option as it should. This patch fixes the issue by
adding the dependency.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoptp: reduce stack usage when measuring the system time offset
Richard Cochran [Mon, 26 Nov 2012 01:44:35 +0000 (01:44 +0000)]
ptp: reduce stack usage when measuring the system time offset

This patch removes the large buffer from the stack of the system
offset ioctl and replaces it with a kmalloced buffer.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoptp: reduce stack usage when reading external time stamps
Richard Cochran [Mon, 26 Nov 2012 01:44:34 +0000 (01:44 +0000)]
ptp: reduce stack usage when reading external time stamps

This patch removes the large buffer from the stack of the read file
operation and replaces it with a kmalloced buffer.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agostmmac: update the driver version to Nov_2012
Giuseppe CAVALLARO [Sun, 25 Nov 2012 23:10:46 +0000 (23:10 +0000)]
stmmac: update the driver version to Nov_2012

Many new feauture have been introduced in the driver:
ethtool coalesce options, Rx HW watchdog... so this patch updates the
driver's version.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agostmmac: update the doc with new IRQ mitigation
Giuseppe CAVALLARO [Sun, 25 Nov 2012 23:10:45 +0000 (23:10 +0000)]
stmmac: update the doc with new IRQ mitigation

This patch updates the stmmac.txt adding some information
about the new rx/tx mitigation schema adopted in the driver.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agostmmac: get/set coalesce parameters via ethtool
Giuseppe CAVALLARO [Sun, 25 Nov 2012 23:10:44 +0000 (23:10 +0000)]
stmmac: get/set coalesce parameters via ethtool

This patch is to get/set the tx/rx coalesce parameters
via ethtool interface.

Tests have been done on several platform with different GMAC chips w/o and w/
RX watchdog feature.

V2: reject coalesce settings that are not supported.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agostmmac: add Rx watchdog support to mitigate the DMA irqs
Giuseppe CAVALLARO [Sun, 25 Nov 2012 23:10:43 +0000 (23:10 +0000)]
stmmac: add Rx watchdog support to mitigate the DMA irqs

GMAC devices newer than databook 3.40 has an embedded timer
that can be used for mitigating the number of interrupts.
So this patch adds this optimizations.

At any rate, the Rx watchdog can be disable (on bugged HW) by
passing from the platform the riwt_off field.

In this implementation the rx timer stored in the Reg9 is fixed
to the max value. This will be tuned by using ethtool.

V2: added a platform parameter to force to disable the rx-watchdog
for example on new core where it is bugged.

V3: do not disable NAPI when Rx watchdog is used.

V4: a new extra statistic field has been added to show the early
receive status in the interrupt handler.
This patch also adds an extra check to avoid to call
napi_schedule when the DMA_INTR_ENA_RIE bit is disabled in the
Interrupt Mask register.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agostmmac: add the initial tx coalesce schema
Giuseppe CAVALLARO [Sun, 25 Nov 2012 23:10:42 +0000 (23:10 +0000)]
stmmac: add the initial tx coalesce schema

This patch adds a new schema used for mitigating the
number of transmit interrupts.
It is based on a SW timer and a threshold value.
The timer is used to periodically call the stmmac_tx_clean
function; the threshold is used for setting the IC (Interrupt
on Completion bit). The ISR will then invoke the poll method.
Also the patch improves some ethtool stat fields.

V2: review the logic to manage the IC bit in the TDESC
that was bugged because it didn't take care about the
fragments. Also fix the tx_count_frames that has not to be
limited to TX DMA ring. Thanks to Ben Hutchings.

V3: removed the spin_lock irqsave/restore as D. Miller suggested.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agostmmac: remove dead code for STMMAC_TIMER support
Giuseppe CAVALLARO [Sun, 25 Nov 2012 23:10:41 +0000 (23:10 +0000)]
stmmac: remove dead code for STMMAC_TIMER support

The TIMER option is not longer supported and this
code can be considered dead for this driver in
the new kernel series.
In fact, It was not updated at all and never used.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotun: put correct method name in a debug message.
Rami Rosen [Sun, 25 Nov 2012 22:07:41 +0000 (22:07 +0000)]
tun: put correct method name in a debug message.

This patch puts the correct method name, tun_do_read, in a debug message.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovtun: fix typos.
Rami Rosen [Sun, 25 Nov 2012 22:07:40 +0000 (22:07 +0000)]
vtun: fix typos.

This patch fixes four typos in drivers/net/vtun.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoatm: br2684: Fix excessive queue bloat
David Woodhouse [Sun, 25 Nov 2012 12:06:52 +0000 (12:06 +0000)]
atm: br2684: Fix excessive queue bloat

There's really no excuse for an additional wmem_default of buffering
between the netdev queue and the ATM device. Two packets (one in-flight,
and one ready to send) ought to be fine. It's not as if it should take
long to get another from the netdev queue when we need it.

If necessary we can make the queue space configurable later, but I don't
think it's likely to be necessary.

cf. commit 9d02daf754238adac48fa075ee79e7edd3d79ed3 (pppoatm: Fix
excessive queue bloat) which did something very similar for PPPoATM.

Note that there is a tremendously unlikely race condition which may
result in qspace temporarily going negative. If a CPU running the
br2684_pop() function goes off into the weeds for a long period of time
after incrementing qspace to 1, but before calling netdev_wake_queue()...
and another CPU ends up calling br2684_start_xmit() and *stopping* the
queue again before the first CPU comes back, the netdev queue could
end up being woken when qspace has already reached zero.

An alternative approach to coping with this race would be to check in
br2684_start_xmit() for qspace==0 and return NETDEV_TX_BUSY, but just
using '> 0' and '< 1' for comparison instead of '== 0' and '!= 0' is
simpler. It just warranted a mention of *why* we do it that way...

Move the call to atmvcc->send() to happen *after* the accounting and
potentially stopping the netdev queue, in br2684_xmit_vcc(). This matters
if the ->send() call suffers an immediate failure, because it'll call
br2684_pop() with the offending skb before returning. We want that to
happen *after* we've done the initial accounting for the packet in
question. Also make it return an appropriate success/failure indication
while we're at it.

Tested by running 'ping -l 1000 bottomless.aaisp.net.uk' from within my
network, with only a single PPPoE-over-BR2684 link running. And after
setting txqueuelen on the nas0 interface to something low (5, in fact).
Before the patch, we'd see about 15 packets being queued and a resulting
latency of ~56ms being reached. After the patch, we see only about 8,
which is fairly much what we expect. And a max latency of ~36ms. On this
OpenWRT box, wmem_default is 163840.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Reviewed-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodsa: Hide core config options; make drivers select what they need
Ben Hutchings [Mon, 26 Nov 2012 09:16:10 +0000 (09:16 +0000)]
dsa: Hide core config options; make drivers select what they need

Commit 82167cb8c6b2f8166d5c7532e5ef4b5e0cc46a72 ('net: dsa/slave: Fix
compilation warnings') fixed one possible invalid configuration
(NET_DSA enabled with no trailer formats) but added others: drivers
can select NET_DSA without its dependencies being met.

It's not very useful to make either the DSA core or the tagging
formats manually selectable without a driver to use them, so:

1. Define a hidden HAVE_NET_DSA option and move the dependencies of
   NET_DSA to that.  While we're at it, drop the deprecated
   EXPERIMENTAL dependency.
2. Make NET_DSA and the drivers dependent on HAVE_NET_DSA.
3. Hide the tagging format options again.
4. Make drivers select both NET_DSA and the appropriate tagging format
   option.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocan: bcm: initialize ifindex for timeouts without previous frame reception
Oliver Hartkopp [Mon, 26 Nov 2012 21:24:23 +0000 (22:24 +0100)]
can: bcm: initialize ifindex for timeouts without previous frame reception

Set in the rx_ifindex to pass the correct interface index in the case of a
message timeout detection. Usually the rx_ifindex value is set at receive
time. But when no CAN frame has been received the RX_TIMEOUT notification
did not contain a valid value.

Cc: linux-stable <stable@vger.kernel.org>
Reported-by: Andre Naujoks <nautsch2@googlemail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agocan: peak_usb: fix hwtstamp assignment
Oliver Hartkopp [Wed, 21 Nov 2012 21:43:59 +0000 (22:43 +0100)]
can: peak_usb: fix hwtstamp assignment

The skb->tstamp is set to the hardware timestamp when available in the USB
urb message. This leads to user visible timestamps which contain the 'uptime'
of the USB adapter - and not the usual system generated timestamp.

Fix this wrong assignment by applying the available hardware timestamp to the
skb_shared_hwtstamps data structure - which is intended for this purpose.

Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agobcma: add more package IDs
Hauke Mehrtens [Sat, 24 Nov 2012 18:34:17 +0000 (19:34 +0100)]
bcma: add more package IDs

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agop54: improve TSF timestamp precision
Christian Lamparter [Sat, 24 Nov 2012 13:23:25 +0000 (14:23 +0100)]
p54: improve TSF timestamp precision

The LMAC API states that the TSF clock value of
every rx'ed frame is a "usec accurate timestamp
of the hardware clock at the end of frame
(before OFDM SIFS EOF padding)".

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoiwlwifi: initialize rx_status
Johannes Berg [Fri, 23 Nov 2012 22:46:19 +0000 (23:46 +0100)]
iwlwifi: initialize rx_status

The vendor radiotap patch added a few fields to
struct ieee80211_rx_status that need to be zero,
initialize the struct instead of using whatever
was left on the stack.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoiwlegacy: initialize rx_status
Johannes Berg [Thu, 22 Nov 2012 11:58:16 +0000 (12:58 +0100)]
iwlegacy: initialize rx_status

The vendor radiotap patch added a few fields to
struct ieee80211_rx_status that need to be zero,
initialize the struct instead of using whatever
was left on the stack.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add __printf verification to logging prototypes
Joe Perches [Wed, 21 Nov 2012 18:17:34 +0000 (10:17 -0800)]
brcmsmac: Add __printf verification to logging prototypes

Adding __printf helps spot format and argument mismatches.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Mon, 26 Nov 2012 19:46:41 +0000 (14:46 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

11 years agoopenvswitch: add skb mark matching and set action
Ansis Atteka [Mon, 26 Nov 2012 19:24:11 +0000 (11:24 -0800)]
openvswitch: add skb mark matching and set action

This patch adds support for skb mark matching and set action.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agocfg80211: fix some tracing output issues
Johannes Berg [Fri, 16 Nov 2012 16:22:28 +0000 (17:22 +0100)]
cfg80211: fix some tracing output issues

In some cases, e.g. probe_status, there were spaces
missing so the trace output was confusing. Also make
it more like mac80211 when printing netdevs/wiphys
to make reading a combined log easier.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211_hwsim: remove printing scan config
Johannes Berg [Tue, 20 Nov 2012 16:34:10 +0000 (17:34 +0100)]
mac80211_hwsim: remove printing scan config

The frequencies will be printed when actually
doing the scan, and the IEs can be captured
on the hwsim0 monitor.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211_hwsim: advertise VHT support
Johannes Berg [Mon, 12 Nov 2012 10:51:50 +0000 (11:51 +0100)]
mac80211_hwsim: advertise VHT support

If the number of channels is > 1, which means that
hwsim will use mac80211 channel contexts, it can
also advertise VHT support.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agowireless: add definitions for VHT MCS support
Johannes Berg [Mon, 12 Nov 2012 10:44:18 +0000 (11:44 +0100)]
wireless: add definitions for VHT MCS support

Add definitions for the VHT MCS support values that
are used to indicate, for each number of streams
(1 through 8) which MCSes are supported.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: support VHT rates in TX info
Johannes Berg [Fri, 9 Nov 2012 17:38:32 +0000 (18:38 +0100)]
mac80211: support VHT rates in TX info

To achieve this, limit the number of retries to
31 (instead of 255) and use the three bits that
are then free for VHT flags.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: support drivers reporting VHT RX
Johannes Berg [Fri, 9 Nov 2012 14:07:02 +0000 (15:07 +0100)]
mac80211: support drivers reporting VHT RX

Add support to mac80211 for having drivers report
received VHT MCS information.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonl80211/cfg80211: add VHT MCS support
Johannes Berg [Fri, 9 Nov 2012 13:56:41 +0000 (14:56 +0100)]
nl80211/cfg80211: add VHT MCS support

Add support for reporting and calculating VHT MCSes.

Note that I'm not completely sure that the bitrate
calculations are correct, nor that they can't be
simplified.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: convert to channel definition struct
Johannes Berg [Fri, 9 Nov 2012 10:39:59 +0000 (11:39 +0100)]
mac80211: convert to channel definition struct

Convert mac80211 (and where necessary, some drivers a
little bit) to the new channel definition struct.

This will allow extending mac80211 for VHT, which is
currently restricted to channel contexts since there
are no drivers using that which makes it easier. As
I also don't care about VHT for drivers not using the
channel context API, I won't convert the previous API
to VHT support.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonl80211/cfg80211: support VHT channel configuration
Johannes Berg [Thu, 8 Nov 2012 22:14:50 +0000 (23:14 +0100)]
nl80211/cfg80211: support VHT channel configuration

Change nl80211 to support specifying a VHT (or HT)
using the control channel frequency (as before) and
new attributes for the channel width and first and
second center frequency. The old channel type is of
course still supported for HT.

Also change the cfg80211 channel definition struct
to support these by adding the relevant fields to
it (and removing the _type field.)

This also adds new helper functions:
 - cfg80211_chandef_create to create a channel def
   struct given the control channel and channel type,
 - cfg80211_chandef_identical to check if two channel
   definitions are identical
 - cfg80211_chandef_compatible to check if the given
   channel definitions are compatible, and return the
   wider of the two

This isn't entirely complete, but that doesn't matter
until we have a driver using it. In particular, it's
missing
 - regulatory checks on the usable bandwidth (if that
   even makes sense)
 - regulatory TX power (database can't deal with it)
 - a proper channel compatibility calculation for the
   new channel types

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: pass a channel definition struct
Johannes Berg [Thu, 8 Nov 2012 20:25:48 +0000 (21:25 +0100)]
cfg80211: pass a channel definition struct

Instead of passing a channel pointer and channel type
to all functions and driver methods, pass a new channel
definition struct. Right now, this struct contains just
the control channel and channel type, but for VHT this
will change.

Also, add a small inline cfg80211_get_chandef_type() so
that drivers don't need to use the _type field of the
new structure all the time, which will change.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonl80211: add documentation for channel type
Johannes Berg [Thu, 8 Nov 2012 18:20:56 +0000 (19:20 +0100)]
nl80211: add documentation for channel type

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: remove remain-on-channel channel type
Johannes Berg [Thu, 8 Nov 2012 17:31:02 +0000 (18:31 +0100)]
cfg80211: remove remain-on-channel channel type

As mwifiex (and mac80211 in the software case) are the
only drivers actually implementing remain-on-channel
with channel type, userspace can't be relying on it.
This is the case, as it's used only for P2P operations
right now.

Rather than adding a flag to tell userspace whether or
not it can actually rely on it, simplify all the code
by removing the ability to use different channel types.
Leave only the validation of the attribute, so that if
we extend it again later (with the needed capability
flag), it can't break userspace sending invalid data.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: fix managed mode channel flags handling
Johannes Berg [Mon, 26 Nov 2012 10:57:41 +0000 (11:57 +0100)]
mac80211: fix managed mode channel flags handling

If ieee80211_prep_channel() decides that HT should be
disabled (because the HT IEs from the AP were invalid)
it will set the IEEE80211_STA_DISABLE_HT to not send
HT capabilities to the AP when associating. If this
happens during authentication, the flag will be lost
and we send HT frames, even if the channel config was
set up for non-HT. This can lead to issues.

Fix this by always resetting the ifmgd flags to zero
when the channel context is released so that the flag
resetting in ieee80211_mgd_assoc() isn't necessary.

To make the code a bit easier move the call to release
the channel in ieee80211_set_disassoc() to the end of
the function together with the flag resetting (which
needs to be at the end to avoid timers setting flags.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: remove mesh config macros from mesh_plink.c
Marco Porsch [Thu, 22 Nov 2012 02:40:32 +0000 (18:40 -0800)]
mac80211: remove mesh config macros from mesh_plink.c

Use shortcut pointer instead where it is appropriate.

Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: refactor ieee80211_set_qos_hdr
Marco Porsch [Thu, 22 Nov 2012 02:40:31 +0000 (18:40 -0800)]
mac80211: refactor ieee80211_set_qos_hdr

Return early if not a QoS Data frame.
Give proper documentation.

Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: move Mesh Capability field definition to ieee80211.h
Marco Porsch [Thu, 22 Nov 2012 02:40:30 +0000 (18:40 -0800)]
mac80211: move Mesh Capability field definition to ieee80211.h

Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de>
[prefix with IEEE80211_]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: in ADHOC print debug message for every Auth message
Antonio Quartulli [Sun, 25 Nov 2012 22:24:27 +0000 (23:24 +0100)]
mac80211: in ADHOC print debug message for every Auth message

The debug message has to be printed also for an Auth message with
auth_sequence != 1. This helps understanding whether the two Auth
messages are exchanged correctly or not.

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: in ADHOC don't update last_rx if sta is not authorized
Antonio Quartulli [Sun, 25 Nov 2012 22:13:42 +0000 (23:13 +0100)]
mac80211: in ADHOC don't update last_rx if sta is not authorized

It does not make sense to keep a station alive if it is not authorised
at all. If IBSS/RSN is used it could also be the case that something
went wrong during the keys exchange and the stations ended up in a not
recoverable state.

By not updating last_rx we are giving the station a chance to be
deleted and to start the key exchange once again from scratch.

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: change function signature of cfg80211_get_p2p_attr()
Arend van Spriel [Sun, 25 Nov 2012 18:13:28 +0000 (19:13 +0100)]
cfg80211: change function signature of cfg80211_get_p2p_attr()

The function cfg80211_get_p2p_attr() can fail and returns
a negative error code. However, the return type is unsigned
int. The largest positive number is determined by desired_len
variable in the function, which is u16. So changing the return
type to int to allow easy error checking. Also change the type
for the attribute to enum for improved type checking.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
[fix indentation, don't use u8 attr variable]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoLinux 3.7-rc7 tracking-mainline-llct-20121201.0 v3.7-rc7
Linus Torvalds [Mon, 26 Nov 2012 01:59:19 +0000 (17:59 -0800)]
Linux 3.7-rc7

11 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Mon, 26 Nov 2012 01:57:01 +0000 (17:57 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

Pull powerpc EEH bugfixes from Benjamin Herrenschmidt.

Two one-liner fixes for the new EEH code.

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/eeh: Do not invalidate PE properly
  powerpc/pseries: Fix oops with MSIs when missing EEH PEs

11 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Mon, 26 Nov 2012 01:55:04 +0000 (17:55 -0800)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "Three issues fixed accross the field:

   - Some functions that were recently outlined as part of a preemption
     fix were causing problems with function tracing.
   - The recently merged in-kernel MPI library uses very outdated
     headers that contain MIPS-specific code which won't build on with
     gcc 4.4 or newer.
   - The MIPS non-NUMA memory initialization was making only a very
     half-baked attempt at merging adjacent memory ranges.  This kept
     the code simple enough but is now causing issues with kexec."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MPI: Fix compilation on MIPS with GCC 4.4 and newer
  MIPS: Fix crash that occurs when function tracing is enabled
  MIPS: Merge overlapping bootmem ranges

11 years agopowerpc/eeh: Do not invalidate PE properly
Gavin Shan [Thu, 22 Nov 2012 21:58:26 +0000 (21:58 +0000)]
powerpc/eeh: Do not invalidate PE properly

While the EEH does recovery on the specific PE that has PCI errors,
the PCI devices belonging to the PE will be removed and the PE will
be marked as invalid since we still need the information stored in
the PE. We only invalidate the PE when it doesn't have associated
EEH devices and valid child PEs. However, the code used to check
that is wrong. The patch fixes that.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoipv4/ipmr and ipv6/ip6mr: Convert int mroute_do_<foo> to bool
Joe Perches [Sun, 25 Nov 2012 09:35:30 +0000 (09:35 +0000)]
ipv4/ipmr and ipv6/ip6mr: Convert int mroute_do_<foo> to bool

Save a few bytes per table by convert mroute_do_assert and
mroute_do_pim from int to bool.

Remove !! as the compiler does that when assigning int to bool.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: ipmr: various fixes and cleanups
Eric Dumazet [Sun, 25 Nov 2012 06:41:45 +0000 (06:41 +0000)]
ipv4: ipmr: various fixes and cleanups

1) ip_mroute_setsockopt() & ip_mroute_getsockopt() should not
   access/set raw_sk(sk)->ipmr_table before making sure the socket
   is a raw socket, and protocol is IGMP

2) MRT_INIT should return -EINVAL if optlen != sizeof(int), not
   -ENOPROTOOPT

3) MRT_ASSERT & MRT_PIM should validate optlen

4) " (v) ? 1 : 0 " can be written as " !!v "

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMAINTAINERS: Add Q: patchwork entries for net/ and drivers/net/
Joe Perches [Sat, 24 Nov 2012 11:18:25 +0000 (11:18 +0000)]
MAINTAINERS: Add Q: patchwork entries for net/ and drivers/net/

Add the netdev patchwork entries for networking drivers.
Change the W: entry to Q:for networking.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosmsc: Add logging message newlines
Joe Perches [Sat, 24 Nov 2012 01:27:49 +0000 (01:27 +0000)]
smsc: Add logging message newlines

Avoid any possible message logging interleaving by adding
missing newlines.

Align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: fix sparse check endian warnings
Shahed Shaikh [Fri, 23 Nov 2012 23:56:52 +0000 (23:56 +0000)]
qlcnic: fix sparse check endian warnings

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: dsa/slave: Fix compilation warnings
viresh kumar [Fri, 23 Nov 2012 19:53:54 +0000 (19:53 +0000)]
net: dsa/slave: Fix compilation warnings

Currently when none of CONFIG_NET_DSA_TAG_DSA, CONFIG_NET_DSA_TAG_EDSA and
CONFIG_NET_DSA_TAG_TRAILER is defined, we get following compilation warnings:

net/dsa/slave.c:51:12: warning: 'dsa_slave_init' defined but not used [-Wunused-function]
net/dsa/slave.c:60:12: warning: 'dsa_slave_open' defined but not used [-Wunused-function]
net/dsa/slave.c:98:12: warning: 'dsa_slave_close' defined but not used [-Wunused-function]
net/dsa/slave.c:116:13: warning: 'dsa_slave_change_rx_flags' defined but not used [-Wunused-function]
net/dsa/slave.c:127:13: warning: 'dsa_slave_set_rx_mode' defined but not used [-Wunused-function]
net/dsa/slave.c:136:12: warning: 'dsa_slave_set_mac_address' defined but not used [-Wunused-function]
net/dsa/slave.c:164:12: warning: 'dsa_slave_ioctl' defined but not used [-Wunused-function]

Earlier approach to fix this was discussed here:

lkml.org/lkml/2012/10/29/549

This is another approach to fix it. This is done by some changes in config
options, which make more sense than the earlier approach. As, atleast one
tagging option must always be selected for using net/dsa/ infrastructure, this
patch selects NET_DSA from tagging configs instead of having it as an selectable
config.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: sched: enable CAN Identifier to be build into kernel
Marc Kleine-Budde [Fri, 23 Nov 2012 00:44:57 +0000 (00:44 +0000)]
net: sched: enable CAN Identifier to be build into kernel

This patch makes it possible to build the CAN Identifier into the kernel, even
if the CAN support is build as a module.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago8139cp: re-enable interrupts after tx timeout
David Woodhouse [Sat, 24 Nov 2012 12:11:21 +0000 (12:11 +0000)]
8139cp: re-enable interrupts after tx timeout

Recovery doesn't work too well if we leave interrupts disabled...

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago8139cp: enable bql
David Woodhouse [Thu, 22 Nov 2012 03:16:58 +0000 (03:16 +0000)]
8139cp: enable bql

This adds support for byte queue limits on RTL8139C+

Tested on real hardware.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-By: Dave Täht <dave.taht@bufferbloat.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago8139cp: set ring address after enabling C+ mode
David Woodhouse [Wed, 21 Nov 2012 10:27:19 +0000 (10:27 +0000)]
8139cp: set ring address after enabling C+ mode

This fixes (for me) a regression introduced by commit b01af457 ("8139cp:
set ring address before enabling receiver"). That commit configured the
descriptor ring addresses earlier in the initialisation sequence, in
order to avoid the possibility of triggering stray DMA before the
correct address had been set up.

Unfortunately, it seems that the hardware will scribble garbage into the
TxRingAddr registers when we enable "plus mode" Tx in the CpCmd
register. Observed on a Traverse Geos router board.

To deal with this, while not reintroducing the problem which led to the
original commit, we augment cp_start_hw() to write to the CpCmd register
*first*, then set the descriptor ring addresses, and then finally to
enable Rx and Tx in the original 8139 Cmd register. The datasheet
actually indicates that we should enable Tx/Rx in the Cmd register
*before* configuring the descriptor addresses, but that would appear to
re-introduce the problem that the offending commit b01af457 was trying
to solve. And this variant appears to work fine on real hardware.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@kernel.org [3.5+]
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoRevert "8139cp: revert "set ring address before enabling receiver""
David S. Miller [Sun, 25 Nov 2012 20:52:09 +0000 (15:52 -0500)]
Revert "8139cp: revert "set ring address before enabling receiver""

This reverts commit b26623dab7eeb1e9f5898c7a49458789dd492f20.

This reverts the revert, in net-next we'll try another scheme
to fix this bug using patches from David Woodhouse.

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Sun, 25 Nov 2012 17:49:17 +0000 (12:49 -0500)]
Merge git://git./linux/kernel/git/davem/net

Conflicts:
drivers/net/wireless/iwlwifi/pcie/tx.c

Minor iwlwifi conflict in TX queue disabling between 'net', which
removed a bogus warning, and 'net-next' which added some status
register poking code.

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetfilter: ipset: fix netiface set name overflow
Florian Westphal [Thu, 22 Nov 2012 01:32:45 +0000 (01:32 +0000)]
netfilter: ipset: fix netiface set name overflow

attribute is copied to IFNAMSIZ-size stack variable,
but IFNAMSIZ is smaller than IPSET_MAXNAMELEN.

Fortunately nfnetlink needs CAP_NET_ADMIN.

Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
11 years agoMerge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Sat, 24 Nov 2012 18:32:11 +0000 (08:32 -1000)]
Merge tag 'sound-3.7' of git://git./linux/kernel/git/tiwai/sound

Pull sound build error fix from Takashi Iwai:
 "Only a single commit for fixing the build error without CONFIG_PM in
  hda driver."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix build without CONFIG_PM

11 years agoALSA: hda - Fix build without CONFIG_PM
Takashi Iwai [Sat, 24 Nov 2012 10:58:24 +0000 (11:58 +0100)]
ALSA: hda - Fix build without CONFIG_PM

I forgot this again...  codec->in_pm is in #ifdef CONFIG_PM

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 24 Nov 2012 06:03:14 +0000 (20:03 -1000)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 arch fixes from Peter Anvin:
 "Here is a collection of fixes for 3.7-rc7.  This is a superset of
  tglx' earlier pull request."

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-64: Fix ordering of CFI directives and recent ASM_CLAC additions
  x86, microcode, AMD: Add support for family 16h processors
  x86-32: Export kernel_stack_pointer() for modules
  x86-32: Fix invalid stack address while in softirq
  x86, efi: Fix processor-specific memcpy() build error
  x86: remove dummy long from EFI stub
  x86, mm: Correct vmflag test for checking VM_HUGETLB
  x86, amd: Disable way access filter on Piledriver CPUs
  x86/mce: Do not change worker's running cpu in cmci_rediscover().
  x86/ce4100: Fix PCI configuration register access for devices without interrupts
  x86/ce4100: Fix reboot by forcing the reboot method to be KBD
  x86/ce4100: Fix pm_poweroff
  MAINTAINERS: Update email address for Robert Richter
  x86, microcode_amd: Change email addresses, MAINTAINERS entry
  MAINTAINERS: Change Boris' email address
  EDAC: Change Boris' email address
  x86, AMD: Change Boris' email address

11 years agoMerge tag 'for-linus-20121123' of git://git.infradead.org/mtd-2.6
Linus Torvalds [Sat, 24 Nov 2012 01:12:17 +0000 (15:12 -1000)]
Merge tag 'for-linus-20121123' of git://git.infradead.org/mtd-2.6

Pull MTD fixes from David Woodhouse:
 "The most important part of this is that it fixes a regression in
  Samsung NAND chip detection, introduced by some rework which went into
  3.7.  The initial fix wasn't quite complete, so it's in two parts.  In
  fact the first part is committed twice (Artem committed his own copy
  of the same patch) and I've merged Artem's tree into mine which
  already had that fix.

  I'd have recommitted that to make it somewhat cleaner, but figured by
  this point in the release cycle it was better to merge *exactly* the
  commits which have been in linux-next.

  If I'd recommitted, I'd also omit the sparse warning fix.  But it's
  there, and it's harmless — just marking one function as 'static' in
  onenand code.

  This also includes a couple more fixes for stable: an AB-BA deadlock
  in JFFS2, and an invalid range check in slram."

* tag 'for-linus-20121123' of git://git.infradead.org/mtd-2.6:
  mtd: nand: fix Samsung SLC detection regression
  mtd: nand: fix Samsung SLC NAND identification regression
  jffs2: Fix lock acquisition order bug in jffs2_write_begin
  mtd: onenand: Make flexonenand_set_boundary static
  mtd: slram: invalid checking of absolute end address
  mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions()
  mtd: nand: fix Samsung SLC NAND identification regression

11 years agoMerge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Fri, 23 Nov 2012 22:36:06 +0000 (12:36 -1000)]
Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6

Pull device tree regression fix from Grant Likely:
 "Simple build regression fix for DT device drivers on Sparc.  An
  earlier change had masked out the of_iomap() helper on SPARC."

* tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  of/address: sparc: Declare of_iomap as an extern function for sparc again

11 years agoMerge tag 'pm-for-3.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 23 Nov 2012 22:16:43 +0000 (12:16 -1000)]
Merge tag 'pm-for-3.7-rc7' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management update from Rafael Wysocki:
 "Fix for an incorrect error condition check in device PM QoS code that
  may lead to an Oops from Guennadi Liakhovetski."

* tag 'pm-for-3.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / QoS: fix wrong error-checking condition

11 years agoMerge tag 'md-3.7-fixes' of git://neil.brown.name/md
Linus Torvalds [Fri, 23 Nov 2012 22:11:13 +0000 (12:11 -1000)]
Merge tag 'md-3.7-fixes' of git://neil.brown.name/md

Pull md fixes from NeilBrown:
 "Several bug fixes for md in 3.7:

   - raid5 discard has problems
   - raid10 replacement devices have problems
   - bad block lock seqlock usage has problems
   - dm-raid doesn't free everything"

* tag 'md-3.7-fixes' of git://neil.brown.name/md:
  md/raid10: decrement correct pending counter when writing to replacement.
  md/raid10: close race that lose writes lost when replacement completes.
  md/raid5: Make sure we clear R5_Discard when discard is finished.
  md/raid5: move resolving of reconstruct_state earlier in stripe_handle.
  md/raid5: round discard alignment up to power of 2.
  md: make sure everything is freed when dm-raid stops an array.
  md: Avoid write invalid address if read_seqretry returned true.
  md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock.

11 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 23 Nov 2012 22:06:05 +0000 (12:06 -1000)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block layer fixes from Jens Axboe:
 "Distilled down version of bug fixes for 3.7.  The patches have been
  well tested.  If you notice that commit dates are from today, it's
  because I pulled less important bits out and shuffled them into the
  3.8 mix.  Apart from that, no changes, base still the same.

  It contains:

   - Fix for aoe, don't run request_fn while it's plugged.

   - Fix for a regression in floppy since 3.6, which causes problems if
     no floppy is found.

   - Stable fix for blk_exec(), don't touch a request after it has been
     sent to the scheduler (and the device as well).

   - Five fixes for various nasties in mtip32xx."

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: Don't access request after it might be freed
  mtip32xx: Fix padding issue
  aoe: avoid running request handler on plugged queue
  mtip32xx: fix potential NULL pointer dereference in mtip_timeout_function()
  mtip32xx: fix shift larger than type warning
  mtip32xx: Fix incorrect mask used for erase mode
  mtip32xx: Fix to make lba address correct in big-endian systems
  mtip32xx: fix potential crash on SEC_ERASE_UNIT
  dm: fix deadlock with request based dm and queue request_fn recursion
  floppy: destroy floppy workqueue before cleaning up the queue

11 years agoof/address: sparc: Declare of_iomap as an extern function for sparc again
Andreas Larsson [Fri, 23 Nov 2012 11:24:09 +0000 (12:24 +0100)]
of/address: sparc: Declare of_iomap as an extern function for sparc again

This bug-fix makes sure that of_iomap is defined extern for sparc so that the
sparc-specific implementation of_iomap is once again used when including
include/linux/of_address.h in a sparc context. OF_GPIO that is now available for
sparc relies on this.

The bug was inadvertently introduced in a850a75, "of/address: add empty static
inlines for !CONFIG_OF", that added a static dummy inline for of_iomap when
!CONFIG_OF_ADDRESS. However, CONFIG_OF_ADDRESS is never defined for sparc, but
there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c.

This fix takes the same approach as 0bce04b that solved the equivalent problem
for of_address_to_resource.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
11 years agoMerge tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linux
Linus Torvalds [Fri, 23 Nov 2012 22:01:02 +0000 (12:01 -1000)]
Merge tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linux

Pull omapdss fixes from Tomi Valkeinen:
 "Here are a few OMAPDSS fixes for the next -rc.  I'm sending these
  directly to you, and quite late, as the fbdev tree maintainer
  (Florian) has been busy with his work and hasn't had time to manage
  the fb patches."

* tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linux:
  OMAPDSS: do not fail if dpll4_m4_ck is missing
  OMAPFB: Fix possible null pointer dereferencing
  OMAPDSS: HDMI: fix missing unlock on error in hdmi_dump_regs()
  omapdss: dss: Fix clocks on OMAP363x
  OMAPDSS: DSI: fix dsi_get_dsidev_from_id()

11 years agoMerge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux
Linus Torvalds [Fri, 23 Nov 2012 21:59:26 +0000 (11:59 -1000)]
Merge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Bugfixes for the i2c subsystem.

  Except for a few one-liners, there is mainly one revert because of an
  overlooked dependency.  Since there is no linux-next at the moment, I
  did some extra testing, and all was fine for me."

* 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux:
  i2c: mxs: Handle i2c DMA failure properly
  i2c: s3c2410: Fix code to free gpios
  i2c: omap: ensure writes to dev->buf_len are ordered
  Revert "ARM: OMAP: convert I2C driver to PM QoS for MPU latency constraints"
  i2c: at91: fix SMBus quick command

11 years agoMerge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 23 Nov 2012 21:58:28 +0000 (11:58 -1000)]
Merge tag 'sound-3.7' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "The highlight of this update is the fixes for ASoC kirkwood by
  Russell.  In addition to that, a couple of regression fixes for
  HD-audio due to the runtime PM support on 3.7, and other driver-
  specific regression fixes like USB MIDI on non-standard USB audio
  drivers."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: snd-usb: properly initialize the sync endpoint
  ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speaker
  ALSA: hda - Add support for Realtek ALC292
  ASoC: kirkwood-i2s: more pause-mode fixes
  ASoC: kirkwood-i2s: fix DMA underruns
  ASoC: kirkwood-i2s: fix DCO lock detection
  ASoC: kirkwood-dma: don't ignore other irq causes on error
  ASoC: kirkwood-dma: fix use of virt_to_phys()
  ALSA: hda - Limit runtime PM support only to known Intel chips
  ALSA: hda - Fix recursive suspend/resume call
  ALSA: ua101, usx2y: fix broken MIDI output
  ASoC: arizona: Fix typo - Swap value in 48k_rates[] and 44k1_rates[]
  ASoC: bells: Fix up git patch application failure
  ASoC: cs4271: free allocated GPIO

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 23 Nov 2012 21:55:49 +0000 (11:55 -1000)]
Merge git://git./linux/kernel/git/davem/net

Pull networkign fixes from David Miller:
 "Networking bug fixes, Cacio e Pepe edition:

  1) BNX2X accidently accesses chip rev specific registers without an
     appropriate guard, fix from Ariel Elior.

  2) When we removed the routing cache, we set ip_rt_max_size to ~0 just
     to keep reporting a value to userspace via sysfs.  But the ipv4
     IPSEC layer was using this to tune itself which is completely bogus
     to now do.  Fix from Steffen Klassert.

  3) Missing initialization in netfilter ipset code from Jozsef
     Kadlecsik.

  4) Check CTA_TIMEOUT_NAME length properly in netfilter cttimeout code,
     fix from Florian Westphal.

  5) After removing the routing cache, we inadvertantly are caching
     multicast routes that end up looping back locally, we cannot do
     that legitimately any more.  Fix from Julian Anastasov.

  6) Revert a race fix for 8139cp qemu/kvm that doesn't actually work
     properly on real hardware.  From Francois Romieu.

  7) Fixup errors in example command lines in VXLAN device docs."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  bnx2x: remove redundant warning log
  vxlan: fix command usage in its doc
  8139cp: revert "set ring address before enabling receiver"
  ipv4: do not cache looped multicasts
  netfilter: cttimeout: fix buffer overflow
  netfilter: ipset: Fix range bug in hash:ip,port,net
  xfrm: Fix the gc threshold value for ipv4

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Fri, 23 Nov 2012 21:55:09 +0000 (11:55 -1000)]
Merge git://git./linux/kernel/git/davem/sparc

Pull sparc fix from David Miller:
 "Bug fix from Al Viro"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: not any error from do_sigaltstack() should fail rt_sigreturn()

11 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Fri, 23 Nov 2012 21:54:22 +0000 (11:54 -1000)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull one more ARM SoC fix from Olof Johansson:
 "I missed one pull request from Samsung with one fix in the previous
  batch.  Here it is -- a dma driver fix for an early version of silicon
  that they still support."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: EXYNOS: PL330 MDMA1 fix for revision 0 of Exynos4210 SOC

11 years agoPM / QoS: fix wrong error-checking condition pm-for-3.7-rc7
Guennadi Liakhovetski [Fri, 23 Nov 2012 19:55:06 +0000 (20:55 +0100)]
PM / QoS: fix wrong error-checking condition

dev_pm_qos_add_request() can return 0, 1, or a negative error code,
therefore the correct error test is "if (error < 0)." Checking just for
non-zero return code leads to erroneous setting of the req->dev pointer
to NULL, which then leads to a repeated call to
dev_pm_qos_add_ancestor_request() in st1232_ts_irq_handler(). This in turn
leads to an Oops, when the I2C host adapter is unloaded and reloaded again
because of the inconsistent state of its QoS request list.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agonet/macb: GEM DMA configuration register update
Nicolas Ferre [Fri, 23 Nov 2012 03:49:01 +0000 (03:49 +0000)]
net/macb: GEM DMA configuration register update

Add information to the DMA Configuration Register to
maximize system performance:
- rx/tx packet buffer full memory size
- allow possibility to use INCR16 if supported

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Joachim Eastwood <manabian@gmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoasix: use ramdom hw addr if the one read is not valid
Jean-Christophe PLAGNIOL-VILLARD [Wed, 21 Nov 2012 21:35:17 +0000 (21:35 +0000)]
asix: use ramdom hw addr if the one read is not valid

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: linux-usb@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: add micrel KSZ8873MLL switch support
Jean-Christophe PLAGNIOL-VILLARD [Wed, 21 Nov 2012 05:38:07 +0000 (05:38 +0000)]
net: add micrel KSZ8873MLL switch support

this will allow to detect the link between the switch and the soc

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: fix a possible events_get() race on BE2
Sathya Perla [Fri, 23 Nov 2012 00:27:18 +0000 (00:27 +0000)]
be2net: fix a possible events_get() race on BE2

On BE2 chip, an interrupt being raised even when EQ is in un-armed state has
been observed a few times.  This is not expected and has never been
observed on BE3/Lancer chips.

As a consequence, be_msix()::events_get() and be_poll()::events_get()
can race and notify an EQ wrongly causing a CEV UE. The other possible
side-effect would be traffic stalling because after notifying EQ,
napi_schedule() is ignored as NAPI is already running.

This patch fixes this issue by counting events only in be_poll().

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotun: change tun_get_iff() prototype.
Rami Rosen [Fri, 23 Nov 2012 03:58:10 +0000 (03:58 +0000)]
tun: change tun_get_iff() prototype.

This patch changes tun_get_iff() prototype to return void as it never fails.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: remove redundant warning log
Ariel Elior [Thu, 22 Nov 2012 07:16:17 +0000 (07:16 +0000)]
bnx2x: remove redundant warning log

fix bug where a register which was only meant to be read in 578xx/57712
devices causes a bogus error message to be logged when read from other
devices.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosmsc95xx: refactor entering suspend modes
Steve Glendinning [Thu, 22 Nov 2012 08:05:25 +0000 (08:05 +0000)]
smsc95xx: refactor entering suspend modes

This patch splits out the logic for entering suspend modes
to separate functions, to reduce the complexity of the
smsc95xx_suspend function.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosmsc95xx: support PHY wakeup source
Steve Glendinning [Thu, 22 Nov 2012 08:05:24 +0000 (08:05 +0000)]
smsc95xx: support PHY wakeup source

This patch enables LAN9500 family devices to wake from suspend
on either link up or link down events

It also adds _nopm versions of mdio access functions, so we can
safely call them from suspend and resume functions

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosmsc95xx: detect chip revision specific features
Steve Glendinning [Thu, 22 Nov 2012 08:05:23 +0000 (08:05 +0000)]
smsc95xx: detect chip revision specific features

Instead of storing the number of wake-up frame filter registers
in the pdata structure, this patch changes the driver to detect
the type of device we have and store its available features.

The new two features will be used in future patches.

This patch is intended to have no change in behaviour.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>