]> rtime.felk.cvut.cz Git - linux-imx.git/log
linux-imx.git
11 years agostaging: iio: ad7606_par: Remove redundant platform_set_drvdata()
Sachin Kamat [Thu, 6 Jun 2013 09:27:00 +0000 (10:27 +0100)]
staging: iio: ad7606_par: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoRevert "Revert "staging/lustre: drop CONFIG_BROKEN dependency""
Peng Tao [Thu, 6 Jun 2013 14:59:14 +0000 (22:59 +0800)]
Revert "Revert "staging/lustre: drop CONFIG_BROKEN dependency""

This reverts commit 37d4093fd34775bbbf99bddb84a711bdb3ec6d5c.

I've verified that we now don't break build on X86_64 allmodconfig.

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/lustre/libcfs: cleanup linux-crypto
Peng Tao [Thu, 6 Jun 2013 14:59:13 +0000 (22:59 +0800)]
staging/lustre/libcfs: cleanup linux-crypto

We don't need to implement crc32 and crc32pclmul on our own.
The crc32-pclmul support was merged into the 3.8 kernel in commit
78c37d1, no need to keep a local copy in Lustre anymore.
The crc32 implementation is identical to crypto-crc32. So drop
Lustre's private implementation and select kernel crypto in Kconfig.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/lustre: surround module_refcount with CONFIG_MODULE_UNLOAD
Peng Tao [Thu, 6 Jun 2013 14:59:12 +0000 (22:59 +0800)]
staging/lustre: surround module_refcount with CONFIG_MODULE_UNLOAD

module_refcount() is not available when CONFIG_MODULE_UNLOAD is off.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/lustre/libcfs: restore LINVRNT
Peng Tao [Thu, 6 Jun 2013 14:59:11 +0000 (22:59 +0800)]
staging/lustre/libcfs: restore LINVRNT

It was mistakenly removed by coan. Add it back and also with a new
Kconfig option to enable it.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/lustre: remove lu_context_keys_dump and lu_debugging_setup
Peng Tao [Thu, 6 Jun 2013 14:59:10 +0000 (22:59 +0800)]
staging/lustre: remove lu_context_keys_dump and lu_debugging_setup

There are no callers of them. Besides, lu_context_keys_dump breaks
build when CONFIG_MODULES is not set.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/lustre: call set_cpus_allowed_ptr instead of set_cpus_allowed
Peng Tao [Thu, 6 Jun 2013 14:59:09 +0000 (22:59 +0800)]
staging/lustre: call set_cpus_allowed_ptr instead of set_cpus_allowed

set_cpus_allowed is not available with CONFIG_CPUMASK_OFFSTACK on.
We should call set_cpus_allowed_ptr instead.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotracing: Use current_uid() for critical time tracing
Steven Rostedt (Red Hat) [Fri, 31 May 2013 01:10:37 +0000 (21:10 -0400)]
tracing: Use current_uid() for critical time tracing

The irqsoff tracer records the max time that interrupts are disabled.
There are hooks in the assembly code that calls back into the tracer when
interrupts are disabled or enabled.

When they are enabled, the tracer checks if the amount of time they
were disabled is larger than the previous recorded max interrupts off
time. If it is, it creates a snapshot of the currently running trace
to store where the last largest interrupts off time was held and how
it happened.

During testing, this RCU lockdep dump appeared:

[ 1257.829021] ===============================
[ 1257.829021] [ INFO: suspicious RCU usage. ]
[ 1257.829021] 3.10.0-rc1-test+ #171 Tainted: G        W
[ 1257.829021] -------------------------------
[ 1257.829021] /home/rostedt/work/git/linux-trace.git/include/linux/rcupdate.h:780 rcu_read_lock() used illegally while idle!
[ 1257.829021]
[ 1257.829021] other info that might help us debug this:
[ 1257.829021]
[ 1257.829021]
[ 1257.829021] RCU used illegally from idle CPU!
[ 1257.829021] rcu_scheduler_active = 1, debug_locks = 0
[ 1257.829021] RCU used illegally from extended quiescent state!
[ 1257.829021] 2 locks held by trace-cmd/4831:
[ 1257.829021]  #0:  (max_trace_lock){......}, at: [<ffffffff810e2b77>] stop_critical_timing+0x1a3/0x209
[ 1257.829021]  #1:  (rcu_read_lock){.+.+..}, at: [<ffffffff810dae5a>] __update_max_tr+0x88/0x1ee
[ 1257.829021]
[ 1257.829021] stack backtrace:
[ 1257.829021] CPU: 3 PID: 4831 Comm: trace-cmd Tainted: G        W    3.10.0-rc1-test+ #171
[ 1257.829021] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS SDBLI944.86P 05/08/2007
[ 1257.829021]  0000000000000001 ffff880065f49da8 ffffffff8153dd2b ffff880065f49dd8
[ 1257.829021]  ffffffff81092a00 ffff88006bd78680 ffff88007add7500 0000000000000003
[ 1257.829021]  ffff88006bd78680 ffff880065f49e18 ffffffff810daebf ffffffff810dae5a
[ 1257.829021] Call Trace:
[ 1257.829021]  [<ffffffff8153dd2b>] dump_stack+0x19/0x1b
[ 1257.829021]  [<ffffffff81092a00>] lockdep_rcu_suspicious+0x109/0x112
[ 1257.829021]  [<ffffffff810daebf>] __update_max_tr+0xed/0x1ee
[ 1257.829021]  [<ffffffff810dae5a>] ? __update_max_tr+0x88/0x1ee
[ 1257.829021]  [<ffffffff811002b9>] ? user_enter+0xfd/0x107
[ 1257.829021]  [<ffffffff810dbf85>] update_max_tr_single+0x11d/0x12d
[ 1257.829021]  [<ffffffff811002b9>] ? user_enter+0xfd/0x107
[ 1257.829021]  [<ffffffff810e2b15>] stop_critical_timing+0x141/0x209
[ 1257.829021]  [<ffffffff8109569a>] ? trace_hardirqs_on+0xd/0xf
[ 1257.829021]  [<ffffffff811002b9>] ? user_enter+0xfd/0x107
[ 1257.829021]  [<ffffffff810e3057>] time_hardirqs_on+0x2a/0x2f
[ 1257.829021]  [<ffffffff811002b9>] ? user_enter+0xfd/0x107
[ 1257.829021]  [<ffffffff8109550c>] trace_hardirqs_on_caller+0x16/0x197
[ 1257.829021]  [<ffffffff8109569a>] trace_hardirqs_on+0xd/0xf
[ 1257.829021]  [<ffffffff811002b9>] user_enter+0xfd/0x107
[ 1257.829021]  [<ffffffff810029b4>] do_notify_resume+0x92/0x97
[ 1257.829021]  [<ffffffff8154bdca>] int_signal+0x12/0x17

What happened was entering into the user code, the interrupts were enabled
and a max interrupts off was recorded. The trace buffer was saved along with
various information about the task: comm, pid, uid, priority, etc.

The uid is recorded with task_uid(tsk). But this is a macro that uses rcu_read_lock()
to retrieve the data, and this happened to happen where RCU is blind (user_enter).

As only the preempt and irqs off tracers can have this happen, and they both
only have the tsk == current, if tsk == current, use current_uid() instead of
task_uid(), as current_uid() does not use RCU as only current can change its uid.

This fixes the RCU suspicious splat.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
11 years agoUSB: option,zte_ev: move most ZTE CDMA devices to zte_ev
Dan Williams [Wed, 5 Jun 2013 20:26:27 +0000 (15:26 -0500)]
USB: option,zte_ev: move most ZTE CDMA devices to zte_ev

Per some ZTE Linux drivers I found for the AC2716, the following patch
moves most ZTE CDMA devices from option to zte_ev.  The blacklist stuff
that option does is not required with zte_ev, because it doesn't
implement any of the send_setup hooks which the blacklist suppressed.

I did not move the 2718 over because I could not find any ZTE Linux
drivers for that device, nor even any Windows drivers.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: option: blacklist network interface on Huawei E1820
Bjørn Mork [Thu, 6 Jun 2013 10:57:24 +0000 (12:57 +0200)]
USB: option: blacklist network interface on Huawei E1820

The mode used by Windows for the Huawei E1820 will use the
same ff/ff/ff class codes for both serial and network
functions.

Reported-by: Graham Inggs <graham.inggs@uct.ac.za>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: whiteheat: fix broken port configuration
Johan Hovold [Thu, 6 Jun 2013 11:32:47 +0000 (13:32 +0200)]
USB: whiteheat: fix broken port configuration

When configuring the port (e.g. set_termios) the port minor number
rather than the port number was used in the request (and they only
coincide for minor number 0).

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoxfs: increase number of ACL entries for V5 superblocks
Dave Chinner [Wed, 5 Jun 2013 02:09:10 +0000 (12:09 +1000)]
xfs: increase number of ACL entries for V5 superblocks

The limit of 25 ACL entries is arbitrary, but baked into the on-disk
format.  For version 5 superblocks, increase it to the maximum nuber
of ACLs that can fit into a single xattr.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Mark Tinguely <tinuguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit 5c87d4bc1a86bd6e6754ac3d6e111d776ddcfe57)

11 years agoxfs: disable noattr2/attr2 mount options for CRC enabled filesystems
Dave Chinner [Wed, 5 Jun 2013 02:09:09 +0000 (12:09 +1000)]
xfs: disable noattr2/attr2 mount options for CRC enabled filesystems

attr2 format is always enabled for v5 superblock filesystems, so the
mount options to enable or disable it need to be cause mount errors.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit d3eaace84e40bf946129e516dcbd617173c1cf14)

11 years agoxfs: inode unlinked list needs to recalculate the inode CRC
Dave Chinner [Wed, 5 Jun 2013 02:09:08 +0000 (12:09 +1000)]
xfs: inode unlinked list needs to recalculate the inode CRC

The inode unlinked list manipulations operate directly on the inode
buffer, and so bypass the inode CRC calculation mechanisms. Hence an
inode on the unlinked list has an invalid CRC. Fix this by
recalculating the CRC whenever we modify an unlinked list pointer in
an inode, ncluding during log recovery. This is trivial to do and
results in  unlinked list operations always leaving a consistent
inode in the buffer.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit 0a32c26e720a8b38971d0685976f4a7d63f9e2ef)

11 years agoxfs: fix log recovery transaction item reordering
Dave Chinner [Wed, 5 Jun 2013 02:09:07 +0000 (12:09 +1000)]
xfs: fix log recovery transaction item reordering

There are several constraints that inode allocation and unlink
logging impose on log recovery. These all stem from the fact that
inode alloc/unlink are logged in buffers, but all other inode
changes are logged in inode items. Hence there are ordering
constraints that recovery must follow to ensure the correct result
occurs.

As it turns out, this ordering has been working mostly by chance
than good management. The existing code moves all buffers except
cancelled buffers to the head of the list, and everything else to
the tail of the list. The problem with this is that is interleaves
inode items with the buffer cancellation items, and hence whether
the inode item in an cancelled buffer gets replayed is essentially
left to chance.

Further, this ordering causes problems for log recovery when inode
CRCs are enabled. It typically replays the inode unlink buffer long before
it replays the inode core changes, and so the CRC recorded in an
unlink buffer is going to be invalid and hence any attempt to
validate the inode in the buffer is going to fail. Hence we really
need to enforce the ordering that the inode alloc/unlink code has
expected log recovery to have since inode chunk de-allocation was
introduced back in 2003...

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit a775ad778073d55744ed6709ccede36310638911)

11 years agoxfs: fix remote attribute invalidation for a leaf
Dave Chinner [Mon, 3 Jun 2013 05:28:49 +0000 (15:28 +1000)]
xfs: fix remote attribute invalidation for a leaf

When invalidating an attribute leaf block block, there might be
remote attributes that it points to. With the recent rework of the
remote attribute format, we have to make sure we calculate the
length of the attribute correctly. We aren't doing that in
xfs_attr3_leaf_inactive(), so fix it.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Mark Tinguely <tinuguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit 59913f14dfe8eb772ff93eb442947451b4416329)

11 years agoxfs: rework dquot CRCs
Dave Chinner [Mon, 3 Jun 2013 05:28:46 +0000 (15:28 +1000)]
xfs: rework dquot CRCs

Calculating dquot CRCs when the backing buffer is written back just
doesn't work reliably. There are several places which manipulate
dquots directly in the buffers, and they don't calculate CRCs
appropriately, nor do they always set the buffer up to calculate
CRCs appropriately.

Firstly, if we log a dquot buffer (e.g. during allocation) it gets
logged without valid CRC, and so on recovery we end up with a dquot
that is not valid.

Secondly, if we recover/repair a dquot, we don't have a verifier
attached to the buffer and hence CRCs are not calculated on the way
down to disk.

Thirdly, calculating the CRC after we've changed the contents means
that if we re-read the dquot from the buffer, we cannot verify the
contents of the dquot are valid, as the CRC is invalid.

So, to avoid all the dquot CRC errors that are being detected by the
read verifier, change to using the same model as for inodes. That
is, dquot CRCs are calculated and written to the backing buffer at
the time the dquot is flushed to the backing buffer. If we modify
the dquot directly in the backing buffer, calculate the CRC
immediately after the modification is complete. Hence the dquot in
the on-disk buffer should always have a valid CRC.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit 6fcdc59de28817d1fbf1bd58cc01f4f3fac858fb)

11 years agoMIPS: ralink: add missing SZ_1M multiplier
John Crispin [Thu, 6 Jun 2013 12:55:53 +0000 (12:55 +0000)]
MIPS: ralink: add missing SZ_1M multiplier

On RT5350 the memory size is set to Bytes and not MegaBytes due to a missing
multiplier.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/5378/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Compat: Fix cputime_to_timeval() arguments in compat binfmt_elf.
Ralf Baechle [Tue, 28 May 2013 22:48:10 +0000 (00:48 +0200)]
MIPS: Compat: Fix cputime_to_timeval() arguments in compat binfmt_elf.

cputime_to_timeval() takes a struct timeval *as its second argument but
a struct compat_timeval * will be passed resulting in:

  CC      arch/mips/kernel/binfmt_elfn32.o
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c: In function ‘fill_prstatus’:
arch/mips/kernel/../../../fs/binfmt_elf.c:1330:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1331:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1336:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1337:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1339:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1340:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
  AS      arch/mips/kernel/scall64-n32.o
  CC      arch/mips/kernel/signal_n32.o
  CC      arch/mips/kernel/binfmt_elfo32.o
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c: In function ‘fill_prstatus’:
arch/mips/kernel/../../../fs/binfmt_elf.c:1330:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1331:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1336:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1337:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1339:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1340:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: OCTEON: Improve _machine_halt implementation.
David Daney [Fri, 24 May 2013 16:23:02 +0000 (16:23 +0000)]
MIPS: OCTEON: Improve _machine_halt implementation.

As noted by Wladislav Wiebe:
   $ halt
   ..
   Sent SIGKILL to all processes
   Requesting system halt
   [66.729373] System halted.
   [66.733244]
   [66.734761] =====================================
   [66.739473] [ BUG: lock held at task exit time! ]
   [66.744188] 3.8.7-0-sampleversion-fct #49 Tainted: G           O
   [66.750202] -------------------------------------
   [66.754913] init/21479 is exiting with locks still held!
   [66.760234] 1 lock held by init/21479:
   [66.763990]  #0:  (reboot_mutex){+.+...}, at: [<ffffffff801776c8>] SyS_reboot+0xe0/0x218
   [66.772165]
   [66.772165] stack backtrace:
   [66.776532] Call Trace:
   [66.778992] [<ffffffff805780a8>] dump_stack+0x8/0x34
   [66.783972] [<ffffffff801618b0>] do_exit+0x610/0xa70
   [66.788948] [<ffffffff801777a8>] SyS_reboot+0x1c0/0x218
   [66.794186] [<ffffffff8013d6a4>] handle_sys64+0x44/0x64

This is an alternative fix to the one sent by Wladislav.  We kill the
watchdog for each CPU and then spin in WAIT with interrupts disabled.
This is the lowest power mode for the OCTEON.  If we were to spin with
interrupts enabled, we would get a continual stream of warning messages
and backtraces from the lockup detector, so I chose to disable
interrupts.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: Maxim Uvarov <muvarov@gmail.com>
Cc: Wladislav Wiebe <wladislav.kw@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Patchwork: https://patchwork.linux-mips.org/patch/5324/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: rtlx: Fix implicit declaration of function set_vi_handler()
Yoichi Yuasa [Tue, 28 May 2013 01:23:22 +0000 (01:23 +0000)]
MIPS: rtlx: Fix implicit declaration of function set_vi_handler()

arch/mips/kernel/rtlx.c: In function 'rtlx_module_init':
arch/mips/kernel/rtlx.c:523:3: error: implicit declaration of function 'set_vi_handler' [-Werror=implicit-function-declaration]

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5340/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoarch, mm: Remove tlb_fast_mode()
Peter Zijlstra [Wed, 5 Jun 2013 10:26:50 +0000 (12:26 +0200)]
arch, mm: Remove tlb_fast_mode()

Since the introduction of preemptible mmu_gather TLB fast mode has been
broken. TLB fast mode relies on there being absolutely no concurrency;
it frees pages first and invalidates TLBs later.

However now we can get concurrency and stuff goes *bang*.

This patch removes all tlb_fast_mode() code; it was found the better
option vs trying to patch the hole by entangling tlb invalidation with
the scheduler.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Tony Luck <tony.luck@intel.com>
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Thu, 6 Jun 2013 01:05:45 +0000 (10:05 +0900)]
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kbuild fixes from Michal Marek:
 "There is one fix for a kbuild regression, plus three kconfig fixes for
  bugs that have alway been there, but are simple enough to be fixed in
  an -rc"

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig/menu.c: fix multiple references to expressions in menu_add_prop()
  mconf: handle keys in empty dialogs
  kbuild: Don't assume dts files live in arch/*/boot/dts
  scripts/config: fix assignment of parameters for short version of --*-after options

11 years agostaging: rtl8192u: replace macro rx_hal_is_cck_rate() in r8192U_core.c
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:32 +0000 (23:32 +0300)]
staging: rtl8192u: replace macro rx_hal_is_cck_rate() in r8192U_core.c

This patch replaces macro rx_hal_is_cck_rate() with
the static inline function rx_hal_is_cck_rate().

This replacement was suggested by Dan Carpenter and
has the following benefits:
- improves code readability
- guarantees type safety
- improves code efficiency by enforcing the evaluation of
  the simple boolean expression (!pdrvinfo->RxHT) to be
  done before the evaluation of the more complex one
  (pdrvinfo->RxRate == DESC90_RATE1M ||
   pdrvinfo->RxRate == DESC90_RATE2M ||
   pdrvinfo->RxRate == DESC90_RATE5_5M ||
   pdrvinfo->RxRate == DESC90_RATE11M)

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove trailing whitespace in r8192U_core.c
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:31 +0000 (23:32 +0300)]
staging: rtl8192u: remove trailing whitespace in r8192U_core.c

This patch fixes the following checkpatch error:
ERROR: trailing whitespace

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove space before '++' in r8192U_core.c
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:30 +0000 (23:32 +0300)]
staging: rtl8192u: remove space before '++' in r8192U_core.c

This patch fixes the following checkpatch error:
ERROR: space prohibited before that '++'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove space after reference '&' in r8192U_core.c
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:29 +0000 (23:32 +0300)]
staging: rtl8192u: remove space after reference '&' in r8192U_core.c

This patch fixes the following checkpatch error:
ERROR: space prohibited after that '&'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: add spaces around ?:&&|| in r8192U_core.c
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:28 +0000 (23:32 +0300)]
staging: rtl8192u: add spaces around ?:&&|| in r8192U_core.c

This patch fixes the following checkpatch errors:
ERROR: spaces required around that '?'
ERROR: spaces required around that ':'
ERROR: spaces required around that '&&'
ERROR: spaces required around that '||'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix return statements in r8192U_core.c
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:27 +0000 (23:32 +0300)]
staging: rtl8192u: fix return statements in r8192U_core.c

This patch fixes the following checkpatch error:
ERROR: return is not a function, parentheses are not required

Also, fixes the spaces in return statements to
improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix spaces in array indexing in r8192U_core.c
Xenia Ragiadakou [Tue, 4 Jun 2013 20:32:26 +0000 (23:32 +0300)]
staging: rtl8192u: fix spaces in array indexing in r8192U_core.c

This patch fixes the following checkpatch error:
ERROR: space prohibited before open square bracket '['

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: remove duplicated include from octeon-hcd.c
Wei Yongjun [Wed, 5 Jun 2013 10:06:46 +0000 (18:06 +0800)]
staging: octeon-usb: remove duplicated include from octeon-hcd.c

Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: tidy up multi-line comments
H Hartley Sweeten [Tue, 4 Jun 2013 02:06:40 +0000 (19:06 -0700)]
staging: comedi: pcmda12: tidy up multi-line comments

Tidy up the multi-line comments at the beginning of the file to
follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: return 0 for successful attach
H Hartley Sweeten [Tue, 4 Jun 2013 02:06:21 +0000 (19:06 -0700)]
staging: comedi: pcmda12: return 0 for successful attach

Return 0 instead of 1 to indicate a successful attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: remove 'IOSIZE' define
H Hartley Sweeten [Tue, 4 Jun 2013 02:06:02 +0000 (19:06 -0700)]
staging: comedi: pcmda12: remove 'IOSIZE' define

This define has a very generic name. Its only used in one place
so instead of renaming it just remove it and open code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: tidy up zero_chans()
H Hartley Sweeten [Tue, 4 Jun 2013 02:05:45 +0000 (19:05 -0700)]
staging: comedi: pcmda12: tidy up zero_chans()

Rename the function so it has namespace associated with the driver.

For aesthetic reasons, move the function closer to it's only caller.

Pass the comedi_subdevice pointer to the function so we can get the
number of channels to reset from it instead of using the 'CHANS'
define.

Remove the 'CHANS' define since it's a very generic name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: remove {LSB,MSB}_PORT macros
H Hartley Sweeten [Tue, 4 Jun 2013 02:05:27 +0000 (19:05 -0700)]
staging: comedi: pcmda12: remove {LSB,MSB}_PORT macros

These macros rely on a local variable having a specific name.
Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: cleanup pcmda12_ao_insn_write()
H Hartley Sweeten [Tue, 4 Jun 2013 02:05:08 +0000 (19:05 -0700)]
staging: comedi: pcmda12: cleanup pcmda12_ao_insn_write()

Only the last value needs to be saved for readback.

Remove the LSB and MSB macros.

(*insn_write) functions should return an errno or the number of
samples actually read. Change the final return to insn->n to
make this clear.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: cleanup pcmda12_ao_insn_read()
H Hartley Sweeten [Tue, 4 Jun 2013 02:04:45 +0000 (19:04 -0700)]
staging: comedi: pcmda12: cleanup pcmda12_ao_insn_read()

Remove the boilerplate comment from the 'skel' driver.

To initiate the simultaneaous transfer, only one analog output
register needs to be read. Move the read out of the for() loop.

(*insn_read) functions should return an errno or the number of
samples actually read. Change the final return to insn->n to
make this clear.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: rename the analog output (*insn_{read, write}) functions
H Hartley Sweeten [Tue, 4 Jun 2013 02:04:23 +0000 (19:04 -0700)]
staging: comedi: pcmda12: rename the analog output (*insn_{read, write}) functions

For aesthetic reasons. rename these functions so they have namespace
associated with the driver. Also remove the unnecessary '&' when setting
the callbacks.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: tidy up subdevice init
H Hartley Sweeten [Tue, 4 Jun 2013 02:04:03 +0000 (19:04 -0700)]
staging: comedi: pcmda12: tidy up subdevice init

For aesthetic reasons. add some whitespace to the subdevice init
and reorder it a bit.

Remove the 's->private = NULL', it was kzalloc'ed by the core and
will already be NULL.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: tidy up comedi_lrange table
H Hartley Sweeten [Tue, 4 Jun 2013 02:03:47 +0000 (19:03 -0700)]
staging: comedi: pcmda12: tidy up comedi_lrange table

Tidy up the whitespace in the comedi_lrange table.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmda12: remove 'BITS' define
H Hartley Sweeten [Tue, 4 Jun 2013 02:03:29 +0000 (19:03 -0700)]
staging: comedi: pcmda12: remove 'BITS' define

'BITS' is a pretty generic name for a define. It's only used in
the board attach to set the subdevice 'maxdata' so instead of
renaming the define just open code the value and remove the define.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: fix the last > 80 char line warning
H Hartley Sweeten [Tue, 4 Jun 2013 01:04:33 +0000 (18:04 -0700)]
staging: comedi: pcmuio: fix the last > 80 char line warning

Fix the last checkpatch.pl warning in this file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove the pcmuio_dio_insn_bits() debug noise
H Hartley Sweeten [Tue, 4 Jun 2013 01:04:13 +0000 (18:04 -0700)]
staging: comedi: pcmuio: remove the pcmuio_dio_insn_bits() debug noise

These dev_dbg() and printk() messages are just development noise.
Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: fix > 80 char line warnings
H Hartley Sweeten [Tue, 4 Jun 2013 01:03:50 +0000 (18:03 -0700)]
staging: comedi: pcmuio: fix > 80 char line warnings

Cleanup some comments to fix the checkpatch.pl warnings about lines
over 80 characters.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove some boilerplate comments
H Hartley Sweeten [Tue, 4 Jun 2013 01:03:31 +0000 (18:03 -0700)]
staging: comedi: pcmuio: remove some boilerplate comments

These comments are boilerplate from the 'skel' driver. Just remove
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: tidy up the boardinfo
H Hartley Sweeten [Tue, 4 Jun 2013 01:03:12 +0000 (18:03 -0700)]
staging: comedi: pcmuio: tidy up the boardinfo

Remove the boilerplate comment about the boardinfo struct.

For aesthetic reasons, move the boardinfo declaration near the
struct definition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: tidy up driver #define's
H Hartley Sweeten [Tue, 4 Jun 2013 01:02:52 +0000 (18:02 -0700)]
staging: comedi: pcmuio: tidy up driver #define's

Add some whitespace to the #defines to make them more readable.
Tidy up the comments.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove 'CALC_N_SUBDEVS' macro
H Hartley Sweeten [Tue, 4 Jun 2013 01:02:34 +0000 (18:02 -0700)]
staging: comedi: pcmuio: remove 'CALC_N_SUBDEVS' macro

This macro is only used once in the driver, just remove it.

This also fixes a > 80 char line checkpatch.pl warning.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: tidy up the multi-line comments
H Hartley Sweeten [Tue, 4 Jun 2013 01:02:07 +0000 (18:02 -0700)]
staging: comedi: pcmuio: tidy up the multi-line comments

Tidy up the multi-line comments at the beginning of the file to
follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: refactor interrupt_pcmuio()
H Hartley Sweeten [Tue, 4 Jun 2013 01:01:37 +0000 (18:01 -0700)]
staging: comedi: pcmuio: refactor interrupt_pcmuio()

Refactor this function into two new functions in order to reduce the indent
levels and clean up the ugly line breaks that, unsuccessfully, try to keep
the lines < 80 chars.

The first function handles the irq for a specific asic.

The second function handles the irq for a specific subdevice that is
associated with the asic.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove 'subpriv' macro
H Hartley Sweeten [Tue, 4 Jun 2013 01:01:17 +0000 (18:01 -0700)]
staging: comedi: pcmuio: remove 'subpriv' macro

The 'subpriv' macro relies on a local variable having a specific name.
Replace the macro with a local variable where used.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: gdm72xx: fix typos in Kconfig
Ben Chan [Tue, 4 Jun 2013 05:55:39 +0000 (22:55 -0700)]
staging: gdm72xx: fix typos in Kconfig

Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: gdm72xx: WIMAX_GDM72XX should depend on either USB or MMC
Ben Chan [Tue, 4 Jun 2013 05:55:38 +0000 (22:55 -0700)]
staging: gdm72xx: WIMAX_GDM72XX should depend on either USB or MMC

The gdm72xx driver needs to have either the USB or SDIO implementation
enabled to provide useful functionalities, so the driver should depend
on either USB or MMC. This patch makes WIMAX_GDM72XX depend on either
USB or MMC.

Also, WIMAX_GDM72XX needs to be built as a module if its dependent
interface, either USB or MMC, is built as a module. This patch enforces
that in the WIMAX_GDM72XX_USB and WIMAX_GDM72XX_SDIO dependency.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/asus_oled fixed linebreak and printk issue
Matthias Schid [Wed, 5 Jun 2013 12:04:32 +0000 (14:04 +0200)]
staging/asus_oled fixed linebreak and printk issue

fixed a linebreak within an error message string coding style
issue reported by checkpatch.pl and dev_err format parameters

Signed-off-by: Matthias Schid <aircrach115@gmail.com>
Signed-off-by: Stefan Huber <steffhip@googlemail.com>
Signed-off-by: Simon Puels <simon.puels@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/asus_oled fixed alignment in defines
Matthias Schid [Wed, 5 Jun 2013 10:50:44 +0000 (12:50 +0200)]
staging/asus_oled fixed alignment in defines

replaced spaces in incorrect alignment in defines with tabs

Signed-off-by: Matthias Schid <aircrach115@gmail.com>
Signed-off-by: Stefan Huber <steffhip@googlemail.com>
Signed-off-by: Simon Puels <simon.puels@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: call device_unregister when platform_device_register_simple...
Devendra Naga [Mon, 3 Jun 2013 21:16:21 +0000 (02:46 +0530)]
staging: octeon-usb: call device_unregister when platform_device_register_simple fails

device_register is called before platform_device_register_simple gets called.
unregister and reset the octeon_usb_registered variable

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: check return value of platform_device_register_simple
Devendra Naga [Mon, 3 Jun 2013 21:16:20 +0000 (02:46 +0530)]
staging: octeon-usb: check return value of platform_device_register_simple

the return value is a pointer having an error set. we have to check for
IS_ERR and return PTR_ERR when appropriate

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: fix more checkpatch errors/warns
Devendra Naga [Mon, 3 Jun 2013 21:16:19 +0000 (02:46 +0530)]
staging: octeon-usb: fix more checkpatch errors/warns

place the opening brace right after the if, else, else if, switch
statements.

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: more checkpatch fixes
Devendra Naga [Mon, 3 Jun 2013 21:16:18 +0000 (02:46 +0530)]
staging: octeon-usb: more checkpatch fixes

place the opening brace right after the if,else, else if,switch
statements.

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: fix checkpatch error
Devendra Naga [Mon, 3 Jun 2013 21:16:17 +0000 (02:46 +0530)]
staging: octeon-usb: fix checkpatch error

this places the opening braces just after the if, else, elseif, switch
statements

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: place opening braces of structs, enums on top
Devendra Naga [Mon, 3 Jun 2013 21:16:16 +0000 (02:46 +0530)]
staging: octeon-usb: place opening braces of structs, enums on top

this fixes coding style problem, placing of the braces just right after the
struct name, not below the struct name.

this reduces the errors reported by checkpatch script from

total: 1496 errors, 2133 warnings, 3344 lines checked

to

total: 1488 errors, 2132 warnings, 3336 lines checked

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <ddaney.cavm@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoRevert "staging/lustre: drop CONFIG_BROKEN dependency"
Greg Kroah-Hartman [Wed, 5 Jun 2013 22:21:47 +0000 (15:21 -0700)]
Revert "staging/lustre: drop CONFIG_BROKEN dependency"

This reverts commit 52f6317528c6877c8c5d4b2ab7a04430af99ed4a.

It's still broken, especially for a simple build on x86 with 'make
allmodconfig'

As no fixes seem forthcoming, just mark it broken.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/lustre/lprocfs: interpret result of dt_statfs() correctly
John L. Hammond [Wed, 5 Jun 2013 13:13:40 +0000 (21:13 +0800)]
staging/lustre/lprocfs: interpret result of dt_statfs() correctly

I accidentally reversed the sense of the error check after the call to
dt_statfs() in lprocfs_dt_rd_{blksize,{files,kbytes}{free,avail}.
Unreverse the error checking.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3300
Lustre-change: http://review.whamcloud.com/6385
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoiio:pressure: Add STMicroelectronics pressures driver
Denis CIOCCA [Mon, 3 Jun 2013 14:58:00 +0000 (15:58 +0100)]
iio:pressure: Add STMicroelectronics pressures driver

This patch adds a generic pressure driver for STMicroelectronics
pressure sensors, currently it supports: LPS331AP.

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:common: Removed stuff macros, added num_data_channels on st_sensors struct and...
Denis CIOCCA [Mon, 3 Jun 2013 14:58:00 +0000 (15:58 +0100)]
iio:common: Removed stuff macros, added num_data_channels on st_sensors struct and added support on one-shot sysfs reads to 3 byte channel

This patch introduce num_data_channels variable on st_sensors struct
to manage different type of channels (size or number) in
st_sensors_get_buffer_element function.
Removed ST_SENSORS_NUMBER_DATA_CHANNELS and ST_SENSORS_BYTE_FOR_CHANNEL
and used struct iio_chan_spec const *ch to catch data.
Added 3 byte channel data support on one-shot reads.

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agox86/PCI: Map PCI setup data with ioremap() so it can be in highmem
Matt Fleming [Wed, 5 Jun 2013 14:15:41 +0000 (15:15 +0100)]
x86/PCI: Map PCI setup data with ioremap() so it can be in highmem

f9a37be0f0 ("x86: Use PCI setup data") added support for using PCI ROM
images from setup_data.  This used phys_to_virt(), which is not valid for
highmem addresses, and can cause a crash when booting a 32-bit kernel via
the EFI boot stub.

pcibios_add_device() assumes that the physical addresses stored in
setup_data are accessible via the direct kernel mapping, and that calling
phys_to_virt() is valid.  This isn't guaranteed to be true on x86 where the
direct mapping range is much smaller than on x86-64.

Calling phys_to_virt() on a highmem address results in the following:

 BUG: unable to handle kernel paging request at 39a3c198
 IP: [<c262be0f>] pcibios_add_device+0x2f/0x90
 ...
 Call Trace:
  [<c2370c73>] pci_device_add+0xe3/0x130
  [<c274640b>] pci_scan_single_device+0x8b/0xb0
  [<c2370d08>] pci_scan_slot+0x48/0x100
  [<c2371904>] pci_scan_child_bus+0x24/0xc0
  [<c262a7b0>] pci_acpi_scan_root+0x2c0/0x490
  [<c23b7203>] acpi_pci_root_add+0x312/0x42f
  ...

The solution is to use ioremap() instead of phys_to_virt() to map the
setup data into the kernel address space.

[bhelgaas: changelog]
Tested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Seth Forshee <seth.forshee@canonical.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@vger.kernel.org # v3.8+
11 years agoUSB: serial: fix TIOCMIWAIT return value
Johan Hovold [Wed, 5 Jun 2013 10:21:11 +0000 (12:21 +0200)]
USB: serial: fix TIOCMIWAIT return value

Fix regression introduced by commit 143d9d9616 ("USB: serial: add
tiocmiwait subdriver operation") which made the ioctl operation return
ENODEV rather than ENOIOCTLCMD when a subdriver TIOCMIWAIT
implementation is missing.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agovfio: fix crash on rmmod
Alexey Kardashevskiy [Wed, 5 Jun 2013 14:54:16 +0000 (08:54 -0600)]
vfio: fix crash on rmmod

devtmpfs_delete_node() calls devnode() callback with mode==NULL but
vfio still tries to write there.

The patch fixes this.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agocpufreq: cpufreq-cpu0: use the exact frequency for clk_set_rate()
Guennadi Liakhovetski [Mon, 25 Feb 2013 17:22:37 +0000 (18:22 +0100)]
cpufreq: cpufreq-cpu0: use the exact frequency for clk_set_rate()

clk_set_rate() isn't supposed to accept approximate frequencies, instead
a supported frequency should be obtained from clk_round_rate() and then
used to set the clock.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agocpufreq: protect 'policy->cpus' from offlining during __gov_queue_work()
Michael Wang [Wed, 5 Jun 2013 08:49:37 +0000 (08:49 +0000)]
cpufreq: protect 'policy->cpus' from offlining during __gov_queue_work()

Jiri Kosina <jkosina@suse.cz> and Borislav Petkov <bp@alien8.de>
reported the warning:

[   51.616759] ------------[ cut here ]------------
[   51.621460] WARNING: at arch/x86/kernel/smp.c:123 native_smp_send_reschedule+0x58/0x60()
[   51.629638] Modules linked in: ext2 vfat fat loop snd_hda_codec_hdmi usbhid snd_hda_codec_realtek coretemp kvm_intel kvm snd_hda_intel snd_hda_codec crc32_pclmul crc32c_intel ghash_clmulni_intel snd_hwdep snd_pcm aesni_intel sb_edac aes_x86_64 ehci_pci snd_page_alloc glue_helper snd_timer xhci_hcd snd iTCO_wdt iTCO_vendor_support ehci_hcd edac_core lpc_ich acpi_cpufreq lrw gf128mul ablk_helper cryptd mperf usbcore usb_common soundcore mfd_core dcdbas evdev pcspkr processor i2c_i801 button microcode
[   51.675581] CPU: 0 PID: 244 Comm: kworker/1:1 Tainted: G        W    3.10.0-rc1+ #10
[   51.683407] Hardware name: Dell Inc. Precision T3600/0PTTT9, BIOS A08 01/24/2013
[   51.690901] Workqueue: events od_dbs_timer
[   51.695069]  0000000000000009 ffff88043a2f5b68 ffffffff8161441c ffff88043a2f5ba8
[   51.702602]  ffffffff8103e540 0000000000000033 0000000000000001 ffff88043d5f8000
[   51.710136]  00000000ffff0ce1 0000000000000001 ffff88044fc4fc08 ffff88043a2f5bb8
[   51.717691] Call Trace:
[   51.720191]  [<ffffffff8161441c>] dump_stack+0x19/0x1b
[   51.725396]  [<ffffffff8103e540>] warn_slowpath_common+0x70/0xa0
[   51.731473]  [<ffffffff8103e58a>] warn_slowpath_null+0x1a/0x20
[   51.737378]  [<ffffffff81025628>] native_smp_send_reschedule+0x58/0x60
[   51.744013]  [<ffffffff81072cfd>] wake_up_nohz_cpu+0x2d/0xa0
[   51.749745]  [<ffffffff8104f6bf>] add_timer_on+0x8f/0x110
[   51.755214]  [<ffffffff8105f6fe>] __queue_delayed_work+0x16e/0x1a0
[   51.761470]  [<ffffffff8105f251>] ? try_to_grab_pending+0xd1/0x1a0
[   51.767724]  [<ffffffff8105f78a>] mod_delayed_work_on+0x5a/0xa0
[   51.773719]  [<ffffffff814f6b5d>] gov_queue_work+0x4d/0xc0
[   51.779271]  [<ffffffff814f60cb>] od_dbs_timer+0xcb/0x170
[   51.784734]  [<ffffffff8105e75d>] process_one_work+0x1fd/0x540
[   51.790634]  [<ffffffff8105e6f2>] ? process_one_work+0x192/0x540
[   51.796711]  [<ffffffff8105ef22>] worker_thread+0x122/0x380
[   51.802350]  [<ffffffff8105ee00>] ? rescuer_thread+0x320/0x320
[   51.808264]  [<ffffffff8106634a>] kthread+0xea/0xf0
[   51.813200]  [<ffffffff81066260>] ? flush_kthread_worker+0x150/0x150
[   51.819644]  [<ffffffff81623d5c>] ret_from_fork+0x7c/0xb0
[   51.918165] nouveau E[     DRM] GPU lockup - switching to software fbcon
[   51.930505]  [<ffffffff81066260>] ? flush_kthread_worker+0x150/0x150
[   51.936994] ---[ end trace f419538ada83b5c5 ]---

It was caused by the policy->cpus changed during the process of
__gov_queue_work(), in other word, cpu offline happened.

Use get/put_online_cpus() to prevent the offline from happening while
__gov_queue_work() is running.

[rjw: The problem has been present since recent commit 031299b
(cpufreq: governors: Avoid unnecessary per cpu timer interrupts)]

References: https://lkml.org/lkml/2013/6/5/88
Reported-by: Borislav Petkov <bp@alien8.de>
Reported-and-tested-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / scan: do not match drivers against objects having scan handlers
Aaron Lu [Tue, 4 Jun 2013 21:02:58 +0000 (23:02 +0200)]
ACPI / scan: do not match drivers against objects having scan handlers

With the introduction of ACPI scan handlers, an ACPI device object
with an ACPI scan handler attached to it must not be bound to an ACPI
driver any more.  Therefore it doesn't make sense to match those
ACPI device objects against a newly registered ACPI driver in
acpi_bus_match(), so make that function return 0 if the device
object passed to it has an ACPI scan handler attached.

This also addresses a regression related to a broken ACPI table in
the BIOS, where it has defined a _ROM method under the PCI root
bridge object.  This causes the video module to treat that object
as a display controller device (since only display devices are
supposed to have a _ROM method defined according to the ACPI spec).
As a result, the ACPI video driver binds to the PCI root bridge
object and overwrites the previously assigned driver_data field of
it, causing subsequent calls to acpi_get_pci_dev() to fail.

[rjw: Subject and changelog]
References: https://bugzilla.kernel.org/show_bug.cgi?id=58091
Reported-by: Jason Cassell <bluesloth600@gmail.com>
Reported-and-bisected-by: Dmitry S. Demin <dmitryy.demin@gmail.com>
Cc: 3.9+ <stable@kernel.org>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / APEI: fix error return code in ghes_probe()
Wei Yongjun [Mon, 3 Jun 2013 02:08:39 +0000 (02:08 +0000)]
ACPI / APEI: fix error return code in ghes_probe()

Fix to return a negative error code in the acpi_gsi_to_irq() and
request_irq() error handling case instead of 0, as done elsewhere
in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoacpi-cpufreq: set current frequency based on target P-State
Ross Lagerwall [Fri, 31 May 2013 19:45:17 +0000 (20:45 +0100)]
acpi-cpufreq: set current frequency based on target P-State

Commit 4b31e774 (Always set P-state on initialization) fixed bug
#4634 and caused the driver to always set the target P-State at
least once since the initial P-State may not be the desired one.
Commit 5a1c0228 (cpufreq: Avoid calling cpufreq driver's target()
routine if target_freq == policy->cur) caused a regression in
this behavior.

This fixes the regression by setting policy->cur based on the CPU's
target frequency rather than the CPU's current reported frequency
(which may be different).  This means that the P-State will be set
initially if the CPU's target frequency is different from the
governor's target frequency.

This fixes an issue where setting the default governor to
performance wouldn't correctly enable turbo mode on all cores.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: 3.8+ <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Wed, 5 Jun 2013 10:19:04 +0000 (19:19 +0900)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix timeouts with direct mode authentication in mac80211, from
    Stanislaw Gruszka.

 2) Aggregation sessions can deadlock in ath9k, from Felix Fietkau.

 3) Netfilter's xt_addrtype doesn't work with ipv6 due to route lookups
    creating undesirable cache entries, from Florian Westphal.

 4) Fix netfilter's ipt_ULOG from generating non-NULL terminated
    strings.

 5) Fix netdev transmit queue crashes in mac80211, from Johannes Berg.

 6) Fix copy and paste error in 802.11 stack that broke reporting of
    64-bit station tx statistics, from Felix Fietkau.

 7) When qlge_probe fails, it leaks the netdev.  Fix from Wei Yongjun.

 8) SKB control block (where we store the IP options information,
    amongst other things) must be cleared properly otherwise ICMP
    sending can crash for IP tunnels.  Fix from Eric Dumazet.

 9) Verification of Energy Efficient Ether support was coded wrongly,
    the test was inversed.  Fix from Giuseppe CAVALLARO.

10) TCP handles redirects improperly because the wrong flow key is used
    for the route lookup.  From Michal Kubecek.

11) Don't interpret MSG_CMSG_COMPAT from userspace, fix from Andy
    Lutomirski.

12) The new AF_VSOCK was missing from the lockdep string table, fix from
    Federico Vaga.

13) be2net doesn't handle checksumming of IP fragments properly, from
    Somnath Kotur.

14) Fix several bugs in the device address list code that lead to
    crashes and other misbehaviors.  From Jay Vosburgh.

15) Fix ipv6 segmentation handling of fragmented GRE tunnel traffic,
    from Pravin B Shalr.

16) Fix usage of stale policies in IPSEC layer, from Paul Moore.

17) Fix team driver dump of ports when there are a large number of them,
    from Jiri Pirko.

18) Fix softlockups in UDP ipv4 socket lookup causes by and error in the
    hlist_nulls_for_each_entry_rcu() macro.  From Eric Dumazet.

19) Fix several regressions added by the high rate accuracy changes to
    the htb packet scheduler.  From Eric Dumazet.

20) Fix DMA'ing onto the stack in esd_usb2 and peak_usb CAN drivers,
    from Olivier Sobrie and Marc Kleine-Budde.

21) Fix unremovable network devices due to missing route pointer
    installation in the per-device ipv6 address list entries.  From Gao
    feng.

22) Apply the tg3 5719 DMA workaround on 5720 chips as well, otherwise
    we get stalls.  From Nithin Sujir.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (68 commits)
  net_sched: htb: do not mix 1ns and 64ns time units
  net: fix sk_buff head without data area
  tg3: Add read dma workaround for 5720
  net: ethernet: xilinx_emaclite: set protocol selector bits when writing ANAR
  bnx2x: Fix bridged GSO for 57710/57711 chips
  net: fec: add fallback to random MAC address
  bnx2x: fix TCP offload for tunneling ipv4 over ipv6
  ipv6: assign rt6_info to inet6_ifaddr in init_loopback
  net/mlx4_core: Keep VF assigned MAC in the PF admin table
  net/mlx4_en: Handle unassigned VF MAC address correctly
  net/mlx4_core: Return -EPROBE_DEFER when a VF is probed before PF is sufficiently initialized
  net/mlx4_en: Fix adaptive moderation cq update
  net: can: peak_usb: Do not do dma on the stack
  net: can: esd_usb2: Do not do dma on the stack
  net: can: kvaser_usb: fix reception on "USBcan Pro" and "USBcan R" type hardware.
  net_sched: restore "overhead xxx" handling
  net: force a reload of first item in hlist_nulls_for_each_entry_rcu
  hyperv: Fix vlan_proto setting in netvsc_recv_callback()
  team: fix port list dump for big number of ports
  list: introduce list_first_entry_or_null
  ...

11 years agoeCryptfs: Check return of filemap_write_and_wait during fsync
Tyler Hicks [Tue, 4 Jun 2013 17:24:56 +0000 (10:24 -0700)]
eCryptfs: Check return of filemap_write_and_wait during fsync

Error out of ecryptfs_fsync() if filemap_write_and_wait() fails.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Cc: Paul Taysom <taysom@chromium.org>
Cc: Olof Johansson <olofj@chromium.org>
Cc: stable@vger.kernel.org # v3.6+
11 years agoALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270
Takashi Iwai [Wed, 5 Jun 2013 06:35:26 +0000 (08:35 +0200)]
ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270

USB audio driver spews an error message when probing Logitech HD
webcam c270:
  ALSA mixer.c:1300 usb_audio: Warning! Unlikely big volume range (=6144), cval->res is probably wrong.
  ALSA mixer.c:1304 usb_audio: [5] FU [Mic Capture Volume] ch = 1, val = 1536/7680/1

Obviously the device needs a fixed volume resolution (cval->res = 384)
like other Logitech devices.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=821735

Reported-and-tested-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge branch 'drm-nouveau-fixes-3.10' of git://anongit.freedesktop.org/git/nouveau...
Dave Airlie [Wed, 5 Jun 2013 04:35:08 +0000 (14:35 +1000)]
Merge branch 'drm-nouveau-fixes-3.10' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes

Multiple nouveau regression fixes, hdmi audio, s/r and dac load detection
* 'drm-nouveau-fixes-3.10' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nv50/kms: use dac loadval from vbios, where it's available
  drm/nv50/disp: force dac power state during load detect
  drm/nv50-nv84/fifo: fix resume regression introduced by playlist race fix
  drm/nv84/disp: Fix HDMI audio regression

11 years agoMerge tag 'drm-intel-fixes-2013-06-04' of git://people.freedesktop.org/~danvet/drm...
Dave Airlie [Wed, 5 Jun 2013 04:34:22 +0000 (14:34 +1000)]
Merge tag 'drm-intel-fixes-2013-06-04' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes

Daniel writes:

Three regression fixes and one no-lvds quirk update. The regression Egbert
Eich tracked down goes back to 2.6.37 ... ugh. The other two are pretty
minor: One bogus modeset state checker WARN and a patch to prevent X
dying in a SIGBUS after a gpu hang with failed (or not implement as on
gen2/3) gpu reset.

* tag 'drm-intel-fixes-2013-06-04' of git://people.freedesktop.org/~danvet/drm-intel: (368 commits)
  drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC.
  drm/i915: no lvds quirk for hp t5740
  drm/i915: Quirk the pipe A quirk in the modeset state checker
  drm/i915: Fix spurious -EIO/SIGBUS on wedged gpus
  Linux 3.10-rc4
  parisc: parport0: fix this legacy no-device port driver!
  parport_pc: disable PARPORT_PC_SUPERIO on parisc architecture
  parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources (v2)
  parisc/PCI: Set type for LBA bus_num resource
  MAINTAINERS: update parisc architecture file list
  parisc: kernel: using strlcpy() instead of strcpy()
  parisc: rename "CONFIG_PA7100" to "CONFIG_PA7000"
  parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50
  parisc: memory overflow, 'name' length is too short for using
  powerpc/cputable: Fix typo on P7+ cputable entry
  powerpc/perf: Add missing SIER support
  powerpc/perf: Revert to original NO_SIPR logic
  powerpc/pci: Remove the unused variables in pci_process_bridge_OF_ranges
  powerpc/pci: Remove the stale comments of pci_process_bridge_OF_ranges
  powerpc/pseries: Always enable CONFIG_HOTPLUG_CPU on PSERIES SMP
  ...

11 years agoMerge branch 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Wed, 5 Jun 2013 04:33:26 +0000 (14:33 +1000)]
Merge branch 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

Alex writes:
Just a few fixes for radeon.  The big one is a fix for hangs on older
asics due to the ordering of interrupt initialization.

* 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: don't allow audio on DCE6
  drm/radeon: Use direct mapping for fast fb access on RS780/RS880 (v2)
  radeon: Fix system hang issue when using KMS with older cards

11 years agodrm/nv50/kms: use dac loadval from vbios, where it's available
Ben Skeggs [Mon, 3 Jun 2013 06:40:14 +0000 (16:40 +1000)]
drm/nv50/kms: use dac loadval from vbios, where it's available

Regression from merging the old nv50/nvd9 code together, and may be
needed to fully fix fdo#64904.

The value is ignored completely by the hardware starting from nva3.

Reported-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50/disp: force dac power state during load detect
Ben Skeggs [Mon, 3 Jun 2013 06:07:06 +0000 (16:07 +1000)]
drm/nv50/disp: force dac power state during load detect

fdo#64904

Reported-by: Gerhard Bräunlich <wippbox@gmx.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-nv84/fifo: fix resume regression introduced by playlist race fix
Ben Skeggs [Mon, 3 Jun 2013 05:43:30 +0000 (15:43 +1000)]
drm/nv50-nv84/fifo: fix resume regression introduced by playlist race fix

Reported-by: Maarten Maathuis <madman2003@gmail.com>
Reported-by: Sven Joachim <svenjoac@gmx.de>
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv84/disp: Fix HDMI audio regression
Alexander Stein [Mon, 20 May 2013 17:14:00 +0000 (19:14 +0200)]
drm/nv84/disp: Fix HDMI audio regression

Code refactoring in commit 8e9e3d2deacc460fbb8a4691140318f6e85e6891
(drm/nv84/disp: move hdmi control into core) disabled HDMI audio on my
nv84 by removing too much old code without adding it in the new one.
This patch adds the missing code within the new code layout resulting in
HDMI audio working again.
It should work on any HDMI head, but due to lacking ahrdware I could
only test the (1st) one.
It also might be possible that similar code is needed for nva3, which I
can't test.

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agostaging: comedi: ni_daq_700: fix some trailing whitespace errors
H Hartley Sweeten [Mon, 3 Jun 2013 21:37:09 +0000 (14:37 -0700)]
staging: comedi: ni_daq_700: fix some trailing whitespace errors

checkpatch.pl reports 2 errors about trailing whitespace in this file.
Fix them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: Kconfig: COMEDI_S526 is a PC/104 board not a PCI board
H Hartley Sweeten [Mon, 3 Jun 2013 21:38:21 +0000 (14:38 -0700)]
staging: comedi: Kconfig: COMEDI_S526 is a PC/104 board not a PCI board

The Sensoray Model 526 board is a PC/104 style board not a PCI board.
Move it into the correct group in the Kconfig and Makefile.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix identation in r8192U_core.c
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:48 +0000 (23:58 +0300)]
staging: rtl8192u: fix identation in r8192U_core.c

This patch fixes identation and alignment in r8192U_core.c.
Also, removes spaces from idents when applicable.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove unnecessary line continuations in r8192U_core.c
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:47 +0000 (23:58 +0300)]
staging: rtl8192u: remove unnecessary line continuations in r8192U_core.c

This patch fixes the following checkpatch warning:
WARNING: Avoid unnecessary line continuations

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix function definitions' style in r8192U_core.c
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:46 +0000 (23:58 +0300)]
staging: rtl8192u: fix function definitions' style in r8192U_core.c

This patch fixes the function definitions' style in order
to be uniform across the file and in compliance with the
linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix braces in r8192U_core.c
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:45 +0000 (23:58 +0300)]
staging: rtl8192u: fix braces in r8192U_core.c

This patch fixes the position of braces and removes
redundant braces, following the kernel coding style
conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove dead and commented-out code in r8192U_core.c
Xenia Ragiadakou [Mon, 3 Jun 2013 20:58:44 +0000 (23:58 +0300)]
staging: rtl8192u: remove dead and commented-out code in r8192U_core.c

This cleanup patch removes commented-out code and
the functions rtl8192_dump_reg() and print_buffer()
which are not called anywhere in the driver.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agonet_sched: htb: do not mix 1ns and 64ns time units
Eric Dumazet [Tue, 4 Jun 2013 07:11:48 +0000 (07:11 +0000)]
net_sched: htb: do not mix 1ns and 64ns time units

commit 56b765b79 ("htb: improved accuracy at high rates") added another
regression for low rates, because it mixes 1ns and 64ns time units.

So the maximum delay (mbuffer) was not 60 second, but 937 ms.

Lets convert all time fields to 1ns as 64bit arches are becoming the
norm.

Reported-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fix sk_buff head without data area
Pablo Neira [Mon, 3 Jun 2013 09:28:43 +0000 (09:28 +0000)]
net: fix sk_buff head without data area

Eric Dumazet spotted that we have to check skb->head instead
of skb->data as skb->head points to the beginning of the
data area of the skbuff. Similarly, we have to initialize the
skb->head pointer, not skb->data in __alloc_skb_head.

After this fix, netlink crashes in the release path of the
sk_buff, so let's fix that as well.

This bug was introduced in (0ebd0ac net: add function to
allocate sk_buff head without data area).

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotg3: Add read dma workaround for 5720
Nithin Sujir [Mon, 3 Jun 2013 09:19:34 +0000 (09:19 +0000)]
tg3: Add read dma workaround for 5720

Commit 091f0ea30074bc43f9250961b3247af713024bc6 "tg3: Add New 5719 Read
DMA workaround" added a workaround for TX DMA stall on the 5719. This
workaround needs to be applied to the 5720 as well.

Cc: stable@vger.kernel.org
Reported-by: Roland Dreier <roland@purestorage.com>
Tested-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ethernet: xilinx_emaclite: set protocol selector bits when writing ANAR
Jens Renner \(EFE\) [Mon, 3 Jun 2013 04:32:52 +0000 (04:32 +0000)]
net: ethernet: xilinx_emaclite: set protocol selector bits when writing ANAR

This patch sets the protocol selector bits (4:0) of the PHY's MII_ADVERTISE
register (ANAR) when writing ADVERTISE_ALL. The protocol selector bits are
indicating IEEE 803.3u support and are fixed / read-only on some PHYs. Not
setting them correctly on others (like TI DP83630) makes the PHY fall back
to 10M HDX mode which should be avoided.

Tested for TI DP83630 PHY on Microblaze platform.

Signed-off-by: Jens Renner <renner@efe-gmbh.de>
Tested-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Fix bridged GSO for 57710/57711 chips
Yuval Mintz [Mon, 3 Jun 2013 02:59:57 +0000 (02:59 +0000)]
bnx2x: Fix bridged GSO for 57710/57711 chips

It was recently found out that GSO on 57710/57711 was broken, due to packets
being sent without a valid IP checksum.

Commit 057cf65 "bnx2x: Fix GSO for 57710/57711 chips" partially fixed this
issue, but failed to set the correct IP checksum when receiving GSO packets
via bridges, as such packets enter bnx2x_tx_split() and the FW flags needed
to calculate IP checksum were erroneously set in the incorrect
buffer descriptor.

This patch re-enables GSO in said scenario for 57710/57711 chips.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
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 agoMerge tag 'mmc-fixes-for-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 5 Jun 2013 00:13:06 +0000 (09:13 +0900)]
Merge tag 'mmc-fixes-for-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc

Pull MMC fixes from Chris Ball:
 - sdhci-acpi: Fix initial runtime PM status, add more ACPI IDs
 - atmel-mci, omap_hsmmc: DT handling fixes
 - esdhc-imx: Fix SDIO IRQs, fix multiblock reads (both h/w errata)

* tag 'mmc-fixes-for-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: omap_hsmmc: Skip platform_get_resource_byname() for dt case
  mmc: omap_hsmmc: convert to dma_request_slave_channel_compat
  mmc: omap_hsmmc: Fix the DT pbias workaround for MMC controllers 2 to 5
  mmc: sdhci-pci: add more device ids
  mmc: sdhci-acpi: add more device ids
  mmc: sdhci-acpi: fix initial runtime pm status
  mmc: atmel-mci: convert to dma_request_slave_channel_compat()
  mmc: sdhci-esdhc-imx: fix multiblock reads on i.MX53
  mmc: sdhci-esdhc-imx: Fix SDIO interrupts

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Wed, 5 Jun 2013 00:11:06 +0000 (09:11 +0900)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:
 "Just a 2 small driver fixups here"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: wacom - fix a typo for Cintiq 22HDT
  Input: synaptics - fix sync lost after resume on some laptops

11 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Wed, 5 Jun 2013 00:09:35 +0000 (09:09 +0900)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm bugfixes from Gleb Natapov:
 "The bulk of the fixes is in MIPS KVM kernel<->userspace ABI.  MIPS KVM
  is new for 3.10 and some problems were found with current ABI.  It is
  better to fix them now and do not have a kernel with broken one"

* 'fixes' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: Fix race in apic->pending_events processing
  KVM: fix sil/dil/bpl/spl in the mod/rm fields
  KVM: Emulate multibyte NOP
  ARM: KVM: be more thorough when invalidating TLBs
  ARM: KVM: prevent NULL pointer dereferences with KVM VCPU ioctl
  mips/kvm: Use ENOIOCTLCMD to indicate unimplemented ioctls.
  mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG
  mips/kvm: Use ARRAY_SIZE() instead of hardcoded constants in kvm_arch_vcpu_ioctl_{s,g}et_regs
  mips/kvm: Fix name of gpr field in struct kvm_regs.
  mips/kvm: Fix ABI for use of 64-bit registers.
  mips/kvm: Fix ABI for use of FPU.

11 years agoMerge branches 'iser' and 'qib' into for-next
Roland Dreier [Wed, 5 Jun 2013 00:06:46 +0000 (17:06 -0700)]
Merge branches 'iser' and 'qib' into for-next