platform/adaptation/renesas_rcar/renesas_kernel.git
11 years agobatman-adv: correctly pass the client flag on tt_response
Antonio Quartulli [Thu, 8 Nov 2012 13:21:11 +0000 (14:21 +0100)]
batman-adv: correctly pass the client flag on tt_response

When a TT response with the full table is sent, the client flags
should be sent as well. This patch fix the flags assignment when
populating the tt_response to send back

This was introduced by 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59
("batman-adv: detect not yet announced clients")

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
11 years agobatman-adv: fix tt_global_entries flags update
Antonio Quartulli [Wed, 7 Nov 2012 14:05:33 +0000 (15:05 +0100)]
batman-adv: fix tt_global_entries flags update

Flags carried by a change_entry have to be always copied into the
client entry as they may contain important attributes (e.g.
TT_CLIENT_WIFI).

For instance, a client added by means of the "early detection
mechanism" has no flag set at the beginning, so they must be updated once the
proper ADD event is received.

This was introduced by 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59
("batman-adv: detect not yet announced clients")

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
11 years agoipv6: export IP6_RT_PRIO_* to userland
Nicolas Dichtel [Mon, 5 Nov 2012 05:28:18 +0000 (05:28 +0000)]
ipv6: export IP6_RT_PRIO_* to userland

The kernel uses some default metric when routes are managed. For example, a
static route added with a metric set to 0 is inserted in the kernel with
metric 1024 (IP6_RT_PRIO_USER).
It is useful for routing daemons to know these values, to be able to set routes
without interfering with what the kernel does.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotilegx: request_irq with a non-null device name
Simon Marchi [Thu, 15 Nov 2012 18:13:19 +0000 (18:13 +0000)]
tilegx: request_irq with a non-null device name

This patch simply makes the tilegx net driver call request_irq with a
non-null name. It makes the output in /proc/interrupts more obvious, but
also helps tools that don't expect to find null there.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Fix build error with udp_offload
Vlad Yasevich [Thu, 15 Nov 2012 16:35:37 +0000 (16:35 +0000)]
ipv6: Fix build error with udp_offload

Add ip6_checksum.h include.  This should resolve the following issue
that shows up on power:

net/ipv6/udp_offload.c: In function 'udp6_ufo_send_check':
net/ipv6/udp_offload.c:29:2: error: implicit declaration of function
'csum_ipv6_magic' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Make IPv6 build depend on CONFIG_INET
Vlad Yasevich [Thu, 15 Nov 2012 16:34:57 +0000 (16:34 +0000)]
net: Make IPv6 build depend on CONFIG_INET

IPv6 build selection currently controlled by CONFIG_NET, so it is
possible to build IPv6 functinality without selectiona any TCP/IP
features (CONFIG_INET).  Make IPv6 be consistent with IPv4.

This should resolve the following issue:

net/built-in.o: In function `tcp6_gro_complete':
tcpv6_offload.c:(.text+0x3d045): undefined reference to
`tcp_gro_complete'
net/built-in.o: In function `tcp6_gro_receive':
tcpv6_offload.c:(.text+0x3d19b): undefined reference to
`tcp_gro_receive'
net/built-in.o: In function `ipv6_exthdrs_offload_init':
(.init.text+0x118b): undefined reference to `inet_del_offload'
net/built-in.o:(.rodata+0x1c58): undefined reference to
`tcp_tso_segment'

Signed-off-by: Vlad Yasevich <vyasvic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel...
Dave Airlie [Fri, 16 Nov 2012 00:00:43 +0000 (10:00 +1000)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes

Daniel writes:
Just a few small things to fix regressions, somehow all patches from Jani:
- Fix dpms confusion about which platforms support intermediate modes on
  vga.
- Revert the "ignore vbt for eDP bpc" patch, it breaks machines. This will
  annoy mbp retina owners again, but windows machines seem to _really_
  depend upon this. We can try to quirk the mbp retinas again in 3.8 and
  backport the patch.
- Fix connector leaks when the sdvo setup failed, resulted in an OOPS
  later on when trying to probe that connector (with it's encoder kfree'd
  already).

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: do not ignore eDP bpc settings from vbt
  drm/i915/sdvo: clean up connectors on intel_sdvo_init() failures
  drm/i915/crt: fix DPMS standby and suspend mode handling

11 years agoMerge branch 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 16 Nov 2012 00:00:24 +0000 (10:00 +1000)]
Merge branch 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

Just a single radeon fix from Alex.

* 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: fix logic error in atombios_encoders.c

11 years agodrm/ttm: remove unneeded preempt_disable/enable
Akinobu Mita [Fri, 9 Nov 2012 12:10:43 +0000 (12:10 +0000)]
drm/ttm: remove unneeded preempt_disable/enable

It is unnecessary to disable preemption explicitly while calling
copy_highpage().  Because copy_highpage() will do it again through
kmap_atomic/kunmap_atomic.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agottm: Clear the ttm page allocated from high memory zone correctly
Zhao Yakui [Tue, 13 Nov 2012 18:31:55 +0000 (18:31 +0000)]
ttm: Clear the ttm page allocated from high memory zone correctly

The TTM page can be allocated from high memory. In such case it is
wrong to use the page_address(page) as the virtual address for the high memory
page.

bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=50241

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agovmwgfx: return an -EFAULT if copy_to_user() fails
Dan Carpenter [Mon, 12 Nov 2012 11:07:24 +0000 (11:07 +0000)]
vmwgfx: return an -EFAULT if copy_to_user() fails

copy_to_user() returns the number of bytes remaining to be copied, but
we want to return a negative error code here.  I fixed a couple of these
last year, but I missed this one.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agonet: correct check in dev_addr_del()
Jiri Pirko [Wed, 14 Nov 2012 02:51:04 +0000 (02:51 +0000)]
net: correct check in dev_addr_del()

Check (ha->addr == dev->dev_addr) is always true because dev_addr_init()
sets this. Correct the check to behave properly on addr removal.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
David S. Miller [Thu, 15 Nov 2012 22:50:24 +0000 (17:50 -0500)]
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next

Marc Kleine-Budde says:

====================
this pull request is for net-next, for the v3.8 release cycle. Muhammad
Ghias added support another board to the plx_pci sja1000 driver.
Matthias Fuchs improved the esd_usb2 driver with listen-only mode and
CAN-USB/Micro support. Andreas Larsson contributed a driver for the
GRHCAN CAN IP-Core
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: phy: smsc: Re-enable EDPD mode for LAN87xx
Patrick Trantham [Thu, 15 Nov 2012 09:00:57 +0000 (09:00 +0000)]
net: phy: smsc: Re-enable EDPD mode for LAN87xx

This patch re-enables Energy Detect Power Down (EDPD) mode for the
LAN8710/LAN8720.  EDPD mode was disabled in a previous commit,
(b629820d18fa65cc598390e4b9712fd5f83ee693), because it was causing the
PHY to not be able to detect a link when cold started without a cable
connected.

The LAN8710/LAN8720 requires a minimum of 2 link pulses within 64ms of
each other in order to set the ENERGYON bit and exit EDPD mode.  If a
link partner does send the pulses within this interval, the PHY will
remained powered down.

This workaround will manually toggle the PHY on/off upon calls to
read_status in order to generate link test pulses if the link is down.
If a link partner is present, it will respond to the pulses, which will
cause the ENERGYON bit to be set and will cause the EDPD mode to be
exited.

Signed-off-by: Patrick Trantham <patrick.trantham@fuel7.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp: fix retransmission in repair mode
Andrew Vagin [Thu, 15 Nov 2012 04:03:17 +0000 (04:03 +0000)]
tcp: fix retransmission in repair mode

Currently if a socket was repaired with a few packet in a write queue,
a kernel bug may be triggered:

kernel BUG at net/ipv4/tcp_output.c:2330!
RIP: 0010:[<ffffffff8155784f>] tcp_retransmit_skb+0x5ff/0x610

According to the initial realization v3.4-rc2-963-gc0e88ff,
all skb-s should look like already posted. This patch fixes code
according with this sentence.

Here are three points, which were not done in the initial patch:
1. A tcp send head should not be changed
2. Initialize TSO state of a skb
3. Reset the retransmission time

This patch moves logic from tcp_sendmsg to tcp_write_xmit. A packet
passes the ussual way, but isn't sent to network. This patch solves
all described problems and handles tcp_sendpages.

Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Remove code duplication between offload structures
Vlad Yasevich [Thu, 15 Nov 2012 08:49:23 +0000 (08:49 +0000)]
net: Remove code duplication between offload structures

Move the offload callbacks into its own structure.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Pull IPv6 GSO registration out of the module
Vlad Yasevich [Thu, 15 Nov 2012 08:49:22 +0000 (08:49 +0000)]
ipv6: Pull IPv6 GSO registration out of the module

Sing GSO support is now separate, pull it out of the module
and make it its own init call.
Remove the cleanup functions as they are no longer called.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: Pull GSO registration out of inet_init()
Vlad Yasevich [Thu, 15 Nov 2012 08:49:21 +0000 (08:49 +0000)]
ipv4: Pull GSO registration out of inet_init()

Since GSO/GRO support is now separated, make IPv4 GSO a
stand-alone init call and not part of inet_init().

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Update ipv6 static library with newly needed functions
Vlad Yasevich [Thu, 15 Nov 2012 08:49:20 +0000 (08:49 +0000)]
ipv6: Update ipv6 static library with newly needed functions

UDP offload needs some additional functions to be in the static kernel
for it work correclty.  Move those functions into the core.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Move exthdr offload support into separate file
Vlad Yasevich [Thu, 15 Nov 2012 08:49:19 +0000 (08:49 +0000)]
ipv6: Move exthdr offload support into separate file

Move the exthdr offload functionality into a separeate
file in preparate for moving it out of the module

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Separate out UDP offload functionality
Vlad Yasevich [Thu, 15 Nov 2012 08:49:18 +0000 (08:49 +0000)]
ipv6: Separate out UDP offload functionality

Pull UDP GSO code into a separate file in preparation for moving
the code out of the module.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Separate tcp offload functionality
Vlad Yasevich [Thu, 15 Nov 2012 08:49:17 +0000 (08:49 +0000)]
ipv6: Separate tcp offload functionality

Pull TCPv6 offload functionality into its won file in preparation
for moving it out of the module.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Separate ipv6 offload support
Vlad Yasevich [Thu, 15 Nov 2012 08:49:16 +0000 (08:49 +0000)]
ipv6: Separate ipv6 offload support

Separate IPv6 offload functionality into its own file
in preparation for the move out of the module

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Switch to using new offload infrastructure.
Vlad Yasevich [Thu, 15 Nov 2012 08:49:15 +0000 (08:49 +0000)]
ipv6: Switch to using new offload infrastructure.

Switch IPv6 protocol to using the new GRO/GSO calls and data.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: Switch to using the new offload infrastructure.
Vlad Yasevich [Thu, 15 Nov 2012 08:49:14 +0000 (08:49 +0000)]
ipv4: Switch to using the new offload infrastructure.

Switch IPv4 code base to using the new GRO/GSO calls and data.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Add new offload registration infrastructure.
Vlad Yasevich [Thu, 15 Nov 2012 08:49:13 +0000 (08:49 +0000)]
ipv6: Add new offload registration infrastructure.

Create a new data structure for IPv6 protocols that holds GRO/GSO
callbacks and a new array to track the protocols that register GRO/GSO.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Add net protocol offload registration infrustructure
Vlad Yasevich [Thu, 15 Nov 2012 08:49:12 +0000 (08:49 +0000)]
net: Add net protocol offload registration infrustructure

Create a new data structure for IPv4 protocols that holds GRO/GSO
callbacks and a new array to track the protocols that register GRO/GSO.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Switch to using the new packet offload infrustructure
Vlad Yasevich [Thu, 15 Nov 2012 08:49:11 +0000 (08:49 +0000)]
net: Switch to using the new packet offload infrustructure

Convert to using the new GSO/GRO registration mechanism and new
packet offload structure.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Add generic packet offload infrastructure.
Vlad Yasevich [Thu, 15 Nov 2012 08:49:10 +0000 (08:49 +0000)]
net: Add generic packet offload infrastructure.

Create a new data structure to contain the GRO/GSO callbacks and add
a new registration mechanism.

Singed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Thu, 15 Nov 2012 20:18:02 +0000 (15:18 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
This series contains updates to ioat (DCA) and ixgbevf.
 ...
Alexander Duyck (1):
  ioat: Do not enable DCA if tag map is invalid

Greg Rose (8):
  ixgbevf: Streamline the rx buffer allocation
  ixgbevf: Fix unnecessary dereference where local var is available.
  ixgbevf: Remove the ring adapter pointer value
  ixgbevf: Remove checking for mac.ops function pointers
  ixgbevf: Remove mailbox spinlock from the reset function
  ixgbevf: White space and comments clean up
  ixgbevf: Remove unneeded and obsolete comment
  ixgbevf: Add checksum statistics counters to rings
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocan: grcan: Add device driver for GRCAN and GRHCAN cores
Andreas Larsson [Thu, 15 Nov 2012 07:47:14 +0000 (08:47 +0100)]
can: grcan: Add device driver for GRCAN and GRHCAN cores

This driver supports GRCAN and CRHCAN CAN controllers available in the GRLIB
VHDL IP core library.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agoclk: remove inline usage from clk-provider.h
Igor Mazanov [Thu, 15 Nov 2012 17:07:00 +0000 (21:07 +0400)]
clk: remove inline usage from clk-provider.h

Users of GCC 4.7 have reported compiler errors due to having inline
applied to function declarations in clk-provider.h.  The definitions
exist in drivers/clk/clk.c.  An example error:

In file included from arch/arm/mach-omap2/clockdomain.c:25:0:
arch/arm/mach-omap2/clockdomain.c: In function â€˜clkdm_clk_disable’:
include/linux/clk-provider.h:338:12: error: inlining failed in call to always_inline â€˜__clk_get_enable_count’: function body not available
arch/arm/mach-omap2/clockdomain.c:1001:28: error: called from here
make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

This patch removes the use of inline from include/linux/clk-provider.h
but keeps the function definitions in drivers/clk/clk.c as inlined since
they are one-liners.

Signed-off-by: Igor Mazanov <i.mazanov@gmail.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[mturquette@linaro.org: improved subject, added changelog]

11 years agoMerge tag 'for-linus' of git://github.com/gxt/linux
Linus Torvalds [Thu, 15 Nov 2012 19:34:45 +0000 (11:34 -0800)]
Merge tag 'for-linus' of git://github.com/gxt/linux

Pull unicore32 update from Guan Xuetao.

* tag 'for-linus' of git://github.com/gxt/linux:
  arch/unicore32: remove CONFIG_EXPERIMENTAL
  unicore32: switch to generic sys_execve()
  unicore32: switch to generic kernel_thread()/kernel_execve()
  unicore32: Use Kbuild infrastructure for kvm_para.h
  UAPI: (Scripted) Disintegrate arch/unicore32/include/asm
  UniCore32-bugfix: Remove definitions in asm/bug.h to solve difference between native and cross compiler
  UniCore32-bugfix: fix mismatch return value of __xchg_bad_pointer
  UniCore32 bugfix: add missed CONFIG_ZONE_DMA
  unicore32/mm/fault.c: Port OOM changes to do_pf

11 years agoMerge tag 'upstream-3.7-rc6' of git://git.infradead.org/linux-ubifs
Linus Torvalds [Thu, 15 Nov 2012 19:28:43 +0000 (11:28 -0800)]
Merge tag 'upstream-3.7-rc6' of git://git.infradead.org/linux-ubifs

Pull UBIFS fixes from Artem Bityutskiy:
 "Two patches which fix a problem reported by several people in the
  past, but only fixed now because no one gave enough material for
  debugging.

  Anyway, these fix the problem that sometimes after a power cut the
  file-system is not mountable with the following symptom:

grab_empty_leb: could not find an empty LEB

  The fixes make the file-system mountable again."

* tag 'upstream-3.7-rc6' of git://git.infradead.org/linux-ubifs:
  UBIFS: fix mounting problems after power cuts
  UBIFS: introduce categorized lprops counter

11 years agoMerge tag 'for-v3.7-fixes' of git://git.infradead.org/users/cbou/linux-pstore
Linus Torvalds [Thu, 15 Nov 2012 19:27:53 +0000 (11:27 -0800)]
Merge tag 'for-v3.7-fixes' of git://git.infradead.org/users/cbou/linux-pstore

Pull pstore fix from Anton Vorontsov:
 "A small fixup for the persistent storage subsystem.  The bug can
  prevent kernel booting on a APEI-enabled machines w/ PSTORE_CONSOLE=y
  (this is N by default, though)."

* tag 'for-v3.7-fixes' of git://git.infradead.org/users/cbou/linux-pstore:
  pstore: Fix NULL pointer dereference in console writes

11 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Thu, 15 Nov 2012 19:25:39 +0000 (11:25 -0800)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging

Pill i2c fixes from Jean Delvare.

Well, "fixes"..  The biggest patch here is actually Jan marking Wolfram
Sang as the main i2c subsystem maintainer, with Jan staying on as the PC
controller maintainer.

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c-mux-pinctrl: Fix probe error path
  MAINTAINERS: i2c: 7 years, this is it

11 years agoMerge tag 'regulator-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Linus Torvalds [Thu, 15 Nov 2012 19:22:03 +0000 (11:22 -0800)]
Merge tag 'regulator-3.7' of git://git./linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A few fixes for teardown issues that will be rarely seen, plus a fix
  for a silly bug in regulator_is_supported_voltage() which shows how
  often the answer to the question should be false.

  The supported voltage commit is very new as I just edited to add a Cc
  to stable, the code itself has been in -next."

* tag 'regulator-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: fix voltage check in regulator_is_supported_voltage()
  regulator: core: Avoid deadlock when regulator_register fails
  Regulator: core: Unregister when gpio request fails.

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

Pull sound fixes from Takashi Iwai:
 "The only large LOC is seen in WM5102 driver, just writing a bunch of
  register updates, but the actual code change is small.  Other than
  that, all small fixes suitable for rc6."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Fix mutex deadlock at disconnection
  ALSA: fm801: precedence bug in snd_fm801_tea575x_get_pins()
  ALSA: es1968: precedence bug in snd_es1968_tea575x_get_pins()
  ALSA: hda - Add a missing quirk entry for iMac 9,1
  ASoC: core: Double control update err for snd_soc_put_volsw_sx
  ASoC: dapm: Use card_list during DAPM shutdown
  ASoC: cs42l52: fix the return value of cs42l52_set_fmt()
  ASoC: bells: Correct type in sub speaker DAI name for WM5102
  ASoC: wm8978: pll incorrectly configured when codec is master
  ASoC: mxs-saif: Fix channel swap for 24-bit format
  ASoC: bells: Select WM1250-EV1 Springbank audio I/O module
  ASoC: bells: Add missing select of WM0010
  ASoC: mxs-saif: Add MODULE_ALIAS
  ASoC: wm5102: Write register value corrections after SYSCLK is enabled

11 years agosctp: fix /proc/net/sctp/ memory leak
Tommi Rantala [Thu, 15 Nov 2012 03:49:05 +0000 (03:49 +0000)]
sctp: fix /proc/net/sctp/ memory leak

Commit 13d782f ("sctp: Make the proc files per network namespace.")
changed the /proc/net/sctp/ struct file_operations opener functions to
use single_open_net() and seq_open_net().

Avoid leaking memory by using single_release_net() and seq_release_net()
as the release functions.

Discovered with Trinity (the syscall fuzzer).

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoip6tnl: fix sparse warnings in ip6_tnl_netlink_parms()
Nicolas Dichtel [Thu, 15 Nov 2012 04:06:42 +0000 (04:06 +0000)]
ip6tnl: fix sparse warnings in ip6_tnl_netlink_parms()

This change fixes a sparse warning triggered by casting the flowinfo from
netlink messages in an u32 instead of be32. This change corrects that in order
to resolve the sparse warning.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosit: fix sparse warnings
Nicolas Dichtel [Thu, 15 Nov 2012 04:06:41 +0000 (04:06 +0000)]
sit: fix sparse warnings

This change fixes several sparse warnings about endianness problem. The wrong
nla_*() functions were used.
It also fix a sparse warning about a flag test (field i_flags). This field is
used in this file like a local flag only, so it is more an u16 (gre uses it as a
be16). This sparse warning was already there before the patch that add netlink
management, the code has just been moved.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipip: fix sparse warnings in ipip_netlink_parms()
Nicolas Dichtel [Thu, 15 Nov 2012 04:06:40 +0000 (04:06 +0000)]
ipip: fix sparse warnings in ipip_netlink_parms()

This change fixes two sparse warnings triggered by casting the ip addresses
from netlink messages in an u32 instead of be32. This change corrects that
in order to resolve the sparse warnings.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocan: janz-ican3: Fix the usage of wait_for_completion_timeout
Chuansheng Liu [Tue, 6 Nov 2012 17:31:37 +0000 (01:31 +0800)]
can: janz-ican3: Fix the usage of wait_for_completion_timeout

The return value of wait_for_completion_timeout() is always
>= 0 with unsigned int type.

So the condition "ret < 0" or "ret >= 0" is pointless.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agocan: usb: esd_usb2: Add support for CAN-USB/Micro
Matthias Fuchs [Mon, 29 Oct 2012 09:54:48 +0000 (10:54 +0100)]
can: usb: esd_usb2: Add support for CAN-USB/Micro

This patch extends the esd_usb2 driver to support the
tiny CAN-USB/Micro CAN/USB interface.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agocan: usb: esd_usb2: Add support for listen-only mode
Matthias Fuchs [Mon, 29 Oct 2012 09:54:47 +0000 (10:54 +0100)]
can: usb: esd_usb2: Add support for listen-only mode

Add listen-only mode for esd_usb2 driver.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agocan: sja1000: plx_pci: add support for Connect Tech Inc's Canpro/104-Plus Opto CAN...
Muhammad Ghias [Tue, 16 Oct 2012 21:03:35 +0000 (17:03 -0400)]
can: sja1000: plx_pci: add support for Connect Tech Inc's Canpro/104-Plus Opto CAN board

Patch adds support for CANpro/104-Plus Opto CAN board. Board uses PLX9030
bridge and two NXP SJA1000 CAN controllers. Patch is generated and tested with
kernel 3.6.1.

Signed-off-by: Muhammad Ghias <mghias@connecttech.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
[mkl: minor adjustments to commit message]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agos390/3215: fix tty close handling
Heiko Carstens [Thu, 15 Nov 2012 08:22:40 +0000 (09:22 +0100)]
s390/3215: fix tty close handling

The 3215 console always has the RAW3215_FIXED flag set, which causes
raw3215_shutdown() not to wait for outstanding I/O requests if an attached
tty gets closed.
The flag however can be simply removed, so we can guarantee that all requests
belonging to the tty have been processed when the tty is closed.

However the tasklet that belongs to the 3215 device may be scheduled even if
there is no tty attached anymore, since we have a race between console and tty
processing.
Thefore unconditional tty_wakekup() in raw3215_wakeup() can cause the following
NULL pointer dereference:

3.465368 Unable to handle kernel pointer dereference at virtual kernel address (null)
3.465448 Oops: 0004 #1 SMP
3.465454 Modules linked in:
3.465459 CPU: 1 Not tainted 3.6.0 #1
3.465462 Process swapper/1 (pid: 0, task: 000000003ffa4428, ksp: 000000003ffb7ce0)
3.465466 Krnl PSW : 0404100180000000 0000000000162f86 (__wake_up+0x46/0xb8)
3.465480            R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
         Krnl GPRS: fffffffffffffffe 0000000000000000 0000000000000160 0000000000000001
3.465492            0000000000000001 0000000000000004 0000000000000004 000000000096b490
3.465499            0000000000000001 0000000000000100 0000000000000001 0000000000000001
3.465506            070000003fc87d60 0000000000000160 000000003fc87d68 000000003fc87d00
3.465526 Krnl Code: 0000000000162f76e3c0f0a80004      lg      %r12,168(%r15)
                    0000000000162f7c58000370          l       %r0,880
                   #0000000000162f80c007ffffffff00    xilf    %r0,4294967295
                   >0000000000162f86ba102000          cs      %r1,%r0,0(%r2)
                    0000000000162f8a: 1211              ltr     %r1,%r1
                    0000000000162f8ca774002f          brc     7,162fea
                    0000000000162f90b904002d          lgr     %r2,%r13
                    0000000000162f94b904003a          lgr     %r3,%r10
3.465597 Call Trace:
3.465599 (<0400000000000000> 0x400000000000000)
3.465602  <000000000048c77e> raw3215_wakeup+0x2e/0x40
3.465607  <0000000000134d66> tasklet_action+0x96/0x168
3.465612  <000000000013423c> __do_softirq+0xd8/0x21c
3.465615  <0000000000134678> irq_exit+0xa8/0xac
3.465617  <000000000046c232> do_IRQ+0x182/0x248
3.465621  <00000000005c8296> io_return+0x0/0x8
3.465625  <00000000005c7cac> vtime_stop_cpu+0x4c/0xb8
3.465629 (<0000000000194e06> tick_nohz_idle_enter+0x4e/0x74)
3.465633  <0000000000104760> cpu_idle+0x170/0x184
3.465636  <00000000005b5182> smp_start_secondary+0xd6/0xe0
3.465641  <00000000005c86be> restart_int_handler+0x56/0x6c
3.465643  <0000000000000000> 0x0
3.465645 Last Breaking-Event-Address:
3.465647  <0000000000403136> tty_wakeup+0x46/0x98
3.465652
3.465654 Kernel panic - not syncing: Fatal exception in interrupt
01: HCPGIR450W CP entered; disabled wait PSW 00020001 80000000 00000000 0010F63C

The easiest solution is simply to check if tty is NULL in the tasklet.
If it is NULL nothing is to do (no tty attached), otherwise tty_wakeup()
can be called, since we hold a reference to the tty.
This is not nice... but it is a small patch and it works.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agoixgbevf: Add checksum statistics counters to rings
Greg Rose [Tue, 6 Nov 2012 05:53:32 +0000 (05:53 +0000)]
ixgbevf: Add checksum statistics counters to rings

Add hardware checksum statistic counters to the ring structures and
then during packet processing update those counters instead of the
global counters in the adapter structure.  Only update the adapter
structure counters when all other statistics are gathered in the
ixgbevf_update_stats() function.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbevf: Remove unneeded and obsolete comment
Greg Rose [Tue, 6 Nov 2012 05:31:00 +0000 (05:31 +0000)]
ixgbevf: Remove unneeded and obsolete comment

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agodrm/radeon: fix logic error in atombios_encoders.c
Alex Deucher [Wed, 14 Nov 2012 14:10:39 +0000 (09:10 -0500)]
drm/radeon: fix logic error in atombios_encoders.c

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=50431

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
11 years agoixgbevf: White space and comments clean up
Greg Rose [Fri, 2 Nov 2012 05:50:57 +0000 (05:50 +0000)]
ixgbevf: White space and comments clean up

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbevf: Remove mailbox spinlock from the reset function
Greg Rose [Fri, 2 Nov 2012 05:50:52 +0000 (05:50 +0000)]
ixgbevf: Remove mailbox spinlock from the reset function

The spinlocks are not required during reset.  There won't be any
contention for the mailbox resource.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbevf: Remove checking for mac.ops function pointers
Greg Rose [Fri, 2 Nov 2012 05:50:47 +0000 (05:50 +0000)]
ixgbevf: Remove checking for mac.ops function pointers

The function pointers will always be set - there is no good reason to
check them.  Also just remove get_bus_info() call as the VF has no bus
info to report.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbevf: Remove the ring adapter pointer value
Greg Rose [Fri, 2 Nov 2012 05:50:41 +0000 (05:50 +0000)]
ixgbevf: Remove the ring adapter pointer value

It is unused - remove it.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbevf: Fix unnecessary dereference where local var is available.
Greg Rose [Fri, 2 Nov 2012 05:50:26 +0000 (05:50 +0000)]
ixgbevf: Fix unnecessary dereference where local var is available.

Remove dereference of hw pointer from adapter structure since a pointer
to the hw structure has already been allocated off the stack.  Also clean
up useless parenthesis.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbevf: Streamline the rx buffer allocation
Greg Rose [Fri, 2 Nov 2012 05:50:21 +0000 (05:50 +0000)]
ixgbevf: Streamline the rx buffer allocation

Moves allocation of local variable to section where it is needed and
removes unnecessary if statement.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoioat: Do not enable DCA if tag map is invalid
Alexander Duyck [Sat, 15 Sep 2012 04:08:39 +0000 (04:08 +0000)]
ioat: Do not enable DCA if tag map is invalid

I have encountered several systems that have an invalid tag map.  This
invalid tag map results in only two tags being generated 0x1F which is
usually applied to the first core in a Hyper-threaded pair and 0x00 which
is applied to the second core in a Hyper-threaded pair.  The net result of
all this is that DCA causes significant cache thrash because the 0x1F tag
will send traffic to the second socket, which the 0x00 tag will not DCA tag
the frame resulting in no benefit.

For now the best solution from the driver's perspective is to just disable
DCA if the tag map is invalid.  The correct solution for this would be to
have the BIOS on affected systems updated so that the correct tags are
generated for a given APIC ID.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoRevert "drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free"
David S. Miller [Thu, 15 Nov 2012 03:32:15 +0000 (22:32 -0500)]
Revert "drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free"

This reverts commit aa731872f7d33dcb8b54dad0cfb82d4e4d195d7e.

As pointed out by Ben Hutchings, this change is not correct.

mdiobus_unregister() can't be called if the bus isn't registered yet,
however this change can result in situations which cause that to
happen.

Part of the confusion here revolves around the fact that the
callers of this module control registration/unregistration,
rather than the module itself.

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Thu, 15 Nov 2012 03:10:50 +0000 (22:10 -0500)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:
- hash computation improvements
- Bridge Loop Avoidance set-up phase optimisations
- Roaming handling code redesign
- some code cleanups

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoarm/dts: am33xx: Add CPSW and MDIO module nodes for AM33XX
Mugunthan V N [Wed, 14 Nov 2012 09:08:00 +0000 (09:08 +0000)]
arm/dts: am33xx: Add CPSW and MDIO module nodes for AM33XX

Add CPSW and MDIO related device tree data for AM33XX.
Also enable them into board/evm dts files by providing
respective phy-id.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: OMAP2+: omap2plus_defconfig: Enable CPSW support
Mugunthan V N [Wed, 14 Nov 2012 09:07:59 +0000 (09:07 +0000)]
ARM: OMAP2+: omap2plus_defconfig: Enable CPSW support

Enable CPSW support in defconfig which is present in AM33xx SoC

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: OMAP3+: hwmod: Add AM33XX HWMOD data for davinci_mdio module
Mugunthan V N [Wed, 14 Nov 2012 09:07:58 +0000 (09:07 +0000)]
ARM: OMAP3+: hwmod: Add AM33XX HWMOD data for davinci_mdio module

This patch adds hwmod entry for davinci MDIO module,
creating parent<->child relationship between CPSW and MDIO module.

This Parent-child relation is required in order to use common resources
like, clock, but still maintaining the logical separation between them.

CPGMAC SubSystem consist of various sub-modules, like, mdio, cpdma,
cpsw, etc... These sub-modules are also used in some of Davinci
family of devices, so separate and independent platform devices &
drivers for CPSW and MDIO is implemented.
In case of AM33XX, the resources are shared and common register
bit-field is provided to control module/clock enable/disable,
makes it difficult to handle common resources from both drivers.

So the solution is, create parent<->child relationship between
CPGMAC & MDIO modules.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: cpsw: halt network stack before halting the device during suspend
Mugunthan V N [Wed, 14 Nov 2012 09:07:57 +0000 (09:07 +0000)]
net: cpsw: halt network stack before halting the device during suspend

Move network stack halt APIs before halting the hardware to ensure no
packets are queued to hardware during closing the device during
suspend sequence.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocpsw: simplify the setup of the register pointers
Richard Cochran [Wed, 14 Nov 2012 09:07:56 +0000 (09:07 +0000)]
cpsw: simplify the setup of the register pointers

Instead of having a host of different register offsets in the device tree,
this patch simplifies the CPSW code by letting the driver set the proper
register offsets automatically, based on the CPSW version.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: cpsw: Add parent<->child relation support between cpsw and mdio
Vaibhav Hiremath [Wed, 14 Nov 2012 09:07:55 +0000 (09:07 +0000)]
net: cpsw: Add parent<->child relation support between cpsw and mdio

CPGMAC SubSystem consist of various sub-modules, like, mdio, cpdma,
cpsw, etc... These sub-modules are also used in some of Davinci family
of devices. Now based on requirement, use-case and available technology
nodes the integration of these sub-modules varies across devices.

So coming back to Linux net driver, currently separate and independent
platform devices & drivers for CPSW and MDIO is implemented. In case of
Davinci they both has separate control, from resources perspective,
like clock.

In case of AM33XX, the resources are shared and only one register
bit-field is provided to control module/clock enable/disable, makes it
difficult to handle common resource.

So the solution here implemented in this patch is,

Create parent<->child relationship between both the drivers, making
CPSW as a parent and MDIO as its child and enumerate all the child nodes
under CPSW module.
Both the drivers will function exactly the way it was operating before,
including runtime-pm functionality. No change is required in MDIO driver
(for that matter to any child driver).

As this is only supported during DT boot, the parent<->child relationship
is created and populated in DT execution flow. The only required change
is inside DTS file, making MDIO as a child to CPSW node.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: davinci_mdio: Fix typo mistake in calling runtime-pm api
Vaibhav Hiremath [Wed, 14 Nov 2012 09:07:54 +0000 (09:07 +0000)]
net: davinci_mdio: Fix typo mistake in calling runtime-pm api

By mistake (most likely a copy-paste), instead of pm_runtime_get_sync()
api, driver is calling pm_runtime_put_sync() api in resume callback
function. The bug was introduced by commit id (ae2c07aaf74:
davinci_mdio: runtime PM support).

Now, the reason why it didn't impact functionality is, the patch has
been tested on AM335x-EVM and BeagleBone platform while submitting;
and in case of AM335x the MDIO driver doesn't control the module
enable/disable part, which is handled by CPSW driver.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Thu, 15 Nov 2012 03:06:57 +0000 (22:06 -0500)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next

John W. Linville says:

====================
Included is a Bluetooth pull -- Gustavo says:

"These are the Bluetooth bits for inclusion in 3.8, there is basically one big
thing here which is the High Speed patches from Andrei, he did a lot of work on
A2MP and management of AMP devices. The rest are mostly clean up and bug
fixes."

Also included is an NFC pull -- Samuel says:

"With this one we have:

- pn544 p2p support.
- pn544 physical and HCI layers separation. We are getting the pn544 driver
  ready to support non i2c physical layers.
- LLCP SNL (Service Name Lookup). This is the NFC p2p service discovery
  protocol.
- LLCP datagram sockets (connection less) support.
- IDR library usage for NFC devices indexes assignement.
- NFC netlink extension for setting and getting LLCP link characteristics.
- Various code style fixes and cleanups spread over the pn533, LLCP, HCI and
  pn544 code."

There are a couple of mac80211 pulls as well -- Johannes says:

"Please pull my mac80211-next tree to get the first round of new features
for 3.8. We have:
 * finally, the mac80211 multi-channel work
 * scan improvements:
   - bg scan
   - scan flush
   - forced AP scan
 * cfg80211 tracing
 * a bit of new code to allow implementing SAE (secure authentication of
   equals) in managed mode

Along with a few random improvements, features and fixes."

and...

"Please pull from mac80211-next (per below pull request) to get a few
updates. Most important is probably the fix for the WDS regression that
my previous pull request introduced. Other than that, I have some
tracing code, two mesh updates and a change to allow drivers to
calculate the AES CMAC subkeys without having to implement the GF_mulx
operation themselves."

On top of that are the usual updates to iwlwifi, ath9k, rt2x00,
brcmfmac, mwifiex, and a few others here and there.  Of note is the
addition of the ar5523 driver, ported from an original FreeBSD driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotg3: Use tp->rxq_cnt when checking RSS tables.
Michael Chan [Wed, 14 Nov 2012 14:44:29 +0000 (14:44 +0000)]
tg3: Use tp->rxq_cnt when checking RSS tables.

irq_cnt is no longer reliable since rxq_cnt can be independently configured.

Update version to 3.127.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotg3: Cleanup hardcoded ethtool test array indexes
Nithin Nayak Sujir [Wed, 14 Nov 2012 14:44:28 +0000 (14:44 +0000)]
tg3: Cleanup hardcoded ethtool test array indexes

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 agotg3: Prevent spurious tx timeout by setting carrier off before tx disable.
Nithin Nayak Sujir [Wed, 14 Nov 2012 14:44:27 +0000 (14:44 +0000)]
tg3: Prevent spurious tx timeout by setting carrier off before tx disable.

The watchdog will not trigger when the carrier is off when reconfiguring
the device.  Because carrier state is now off during reset, we need to
introduce a link_up flag to keep track of link state during PHY setup.

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 agotg3: Set 10_100_ONLY flag for additional 10/100 Mbps devices
Nithin Nayak Sujir [Wed, 14 Nov 2012 14:44:26 +0000 (14:44 +0000)]
tg3: Set 10_100_ONLY flag for additional 10/100 Mbps devices

- Also refactor the conditional to use the existing tg3_pci_tbl array.
- Set flags in the driver_data field of the pci_device_id structure to
identify these devices.
- Add PCI_DEVICE_SUB() to pci.h to declare PCI 4-part IDs to match these
devices.

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 agosit: add support of link creation via rtnl
Nicolas Dichtel [Wed, 14 Nov 2012 05:14:07 +0000 (05:14 +0000)]
sit: add support of link creation via rtnl

This patch add the support of 'ip link .. type sit'.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosit: rename rtnl functions for consistency
Nicolas Dichtel [Wed, 14 Nov 2012 05:14:06 +0000 (05:14 +0000)]
sit: rename rtnl functions for consistency

Functions in this file start with ipip6_.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosit/rtnl: add missing parameters on dump
Nicolas Dichtel [Wed, 14 Nov 2012 05:14:05 +0000 (05:14 +0000)]
sit/rtnl: add missing parameters on dump

IFLA_IPTUN_FLAGS and IFLA_IPTUN_PMTUDISC were missing.
There is only one possible flag in i_flag: SIT_ISATAP.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosit: always notify change when params are updated
Nicolas Dichtel [Wed, 14 Nov 2012 05:14:04 +0000 (05:14 +0000)]
sit: always notify change when params are updated

netdev_state_change() was called only when end points or link was updated. Now
that all parameters are advertised via netlink, we must advertise any change.

This patch also prepares the support of sit tunnels management via rtnl. The
code which update tunnels will be put in a new function.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipip: add support of link creation via rtnl
Nicolas Dichtel [Wed, 14 Nov 2012 05:14:03 +0000 (05:14 +0000)]
ipip: add support of link creation via rtnl

This patch add the support of 'ip link .. type ipip'.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipip/rtnl: add IFLA_IPTUN_PMTUDISC on dump
Nicolas Dichtel [Wed, 14 Nov 2012 05:14:02 +0000 (05:14 +0000)]
ipip/rtnl: add IFLA_IPTUN_PMTUDISC on dump

This parameter was missing in the dump.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipip: always notify change when params are updated
Nicolas Dichtel [Wed, 14 Nov 2012 05:14:01 +0000 (05:14 +0000)]
ipip: always notify change when params are updated

netdev_state_change() was called only when end points or link was updated. Now
that all parameters are advertised via netlink, we must advertise any change.

This patch also prepares the support of ipip tunnels management via rtnl. The
code which update tunnels will be put in a new function.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoip6tnl: add support of link creation via rtnl
Nicolas Dichtel [Wed, 14 Nov 2012 05:14:00 +0000 (05:14 +0000)]
ip6tnl: add support of link creation via rtnl

This patch add the support of 'ip link .. type ip6tnl'.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoip6tnl: rename rtnl functions for consistency
Nicolas Dichtel [Wed, 14 Nov 2012 05:13:59 +0000 (05:13 +0000)]
ip6tnl: rename rtnl functions for consistency

Functions in this file start with ip6_tnl_.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoip6tnl/rtnl: add IFLA_IPTUN_PROTO on dump
Nicolas Dichtel [Wed, 14 Nov 2012 05:13:58 +0000 (05:13 +0000)]
ip6tnl/rtnl: add IFLA_IPTUN_PROTO on dump

IPv6 tunnels can have three mode: 4in6, 6in6 and xin6.
This information was missing in the netlink message.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/smsc911x: Fix ready check in cases where WORD_SWAP is needed
Kamlakant Patel [Wed, 14 Nov 2012 01:41:38 +0000 (01:41 +0000)]
net/smsc911x: Fix ready check in cases where WORD_SWAP is needed

The chip ready check added by the commit 3ac3546e [Always wait for
the chip to be ready] does not work when the register read/write
is word swapped. This check has been added before the WORD_SWAP
register is programmed, so we need to check for swapped register
value as well.

Bit 16 is marked as RESERVED in SMSC datasheet, Steve Glendinning
<steve@shawell.net> checked with SMSC and wrote:

  The chip architects have concluded we should be reading PMT_CTRL
  until we see any of bits 0, 8, 16 or 24 set.  Then we should read
  BYTE_TEST to check the byte order is correct (as we already do).

  The rationale behind this is that some of the chip variants have
  word order swapping features too, so the READY bit could actually
  be in any of the 4 possible locations.  The architects have confirmed
  that if any of these 4 positions is set the chip is ready.  The other
  3 locations will either never be set or can only go high after READY
  does (so also indicate the device is ready).

This change will check for the READY bit at the 16th position. We do
not check the other two cases (bit 8 and 24) since the driver does not
support byte-swapped register read/write.

Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers/net: fix tasklet misuse issue
Xiaotian Feng [Tue, 13 Nov 2012 19:47:36 +0000 (19:47 +0000)]
drivers/net: fix tasklet misuse issue

In commit 175c0dff, drivers uses tasklet_kill to avoid put disabled tasklet
on the tasklet vec. But some of the drivers uses tasklet_init & tasklet_disable
in the driver init code, then tasklet_enable when it is opened. This makes
tasklet_enable on a killed tasklet and make ksoftirqd crazy then. Normally,
drivers should use tasklet_init/tasklet_kill on device open/remove, and use
tasklet_disable/tasklet_enable on device suspend/resume.

Reported-by: Peter Wu <lekensteyn@gmail.com>
Tested-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovmxnet3: fix indentation
stephen hemminger [Tue, 13 Nov 2012 13:53:28 +0000 (13:53 +0000)]
vmxnet3: fix indentation

Minor indentation out of alignment.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4/ip_vti.c: VTI fix post-decryption forwarding
Saurabh Mohan [Thu, 15 Nov 2012 02:08:15 +0000 (18:08 -0800)]
ipv4/ip_vti.c: VTI fix post-decryption forwarding

With the latest kernel there are two things that must be done post decryption
 so that the packet are forwarded.
 1. Remove the mark from the packet. This will cause the packet to not match
 the ipsec-policy again. However doing this causes the post-decryption check to
 fail also and the packet will get dropped. (cat /proc/net/xfrm_stat).
 2. Remove the sp association in the skbuff so that no policy check is done on
 the packet for VTI tunnels.

Due to #2 above we must now do a security-policy check in the vti rcv path
prior to resetting the mark in the skbuff.

Signed-off-by: Saurabh Mohan <saurabh.mohan@vyatta.com>
Reported-by: Ruben Herold <ruben@puettmann.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agopstore: Fix NULL pointer dereference in console writes
Colin Ian King [Wed, 14 Nov 2012 11:49:53 +0000 (11:49 +0000)]
pstore: Fix NULL pointer dereference in console writes

Passing a NULL id causes a NULL pointer deference in writers such as
erst_writer and efi_pstore_write because they expect to update this id.
Pass a dummy id instead.

This avoids a cascade of oopses caused when the initial
pstore_console_write passes a null which in turn causes writes to the
console causing further oopses in subsequent pstore_console_write calls.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
11 years agoMerge remote-tracking branches 'regulator/fix/gpio', 'regulator/fix/put' and 'regulat...
Mark Brown [Thu, 15 Nov 2012 02:16:02 +0000 (11:16 +0900)]
Merge remote-tracking branches 'regulator/fix/gpio', 'regulator/fix/put' and 'regulator/fix/supp-volt' into tmp

11 years agoregulator: fix voltage check in regulator_is_supported_voltage()
Marek Szyprowski [Tue, 13 Nov 2012 08:48:51 +0000 (09:48 +0100)]
regulator: fix voltage check in regulator_is_supported_voltage()

regulator_is_supported_voltage() should return true only if the voltage
of fixed/constant regulator is between min_uV and max_uV.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
11 years agobridge: add root port blocking
stephen hemminger [Tue, 13 Nov 2012 07:53:08 +0000 (07:53 +0000)]
bridge: add root port blocking

This is Linux bridge implementation of root port guard.
If BPDU is received from a leaf (edge) port, it should not
be elected as root port.

Why would you want to do this?
If using STP on a bridge and the downstream bridges are not fully
trusted; this prevents a hostile guest for rerouting traffic.

Why not just use netfilter?
Netfilter does not track of follow spanning tree decisions.
It would be difficult and error prone to try and mirror STP
resolution in netfilter module.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobridge: implement BPDU blocking
stephen hemminger [Tue, 13 Nov 2012 07:53:07 +0000 (07:53 +0000)]
bridge: implement BPDU blocking

This is Linux bridge implementation of STP protection
(Cisco BPDU guard/Juniper BPDU block). BPDU block disables
the bridge port if a STP BPDU packet is received.

Why would you want to do this?
If running Spanning Tree on bridge, hostile devices on the network
may send BPDU and cause network failure. Enabling bpdu block
will detect and stop this.

How to recover the port?
The port will be restarted if link is brought down, or
removed and reattached.  For example:
 # ip li set dev eth0 down; ip li set dev eth0 up

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobridge: add template for bridge port flags
stephen hemminger [Tue, 13 Nov 2012 07:53:06 +0000 (07:53 +0000)]
bridge: add template for bridge port flags

Provide macro to build sysfs data structures and functions
for accessing flag bits.  If flag bits change do netlink
notification.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobridge: bridge port parameters over netlink
stephen hemminger [Tue, 13 Nov 2012 07:53:05 +0000 (07:53 +0000)]
bridge: bridge port parameters over netlink

Expose bridge port parameter over netlink. By switching to a nested
message, this can be used for other bridge parameters.

This changes IFLA_PROTINFO attribute from one byte to a full nested
set of attributes. This is safe for application interface because the
old message used IFLA_PROTINFO and new one uses
 IFLA_PROTINFO | NLA_F_NESTED.

The code adapts to old format requests, and therefore stays
compatible with user mode RSTP daemon. Since the type field
for nested and unnested attributes are different, and the old
code in libnetlink doesn't do the mask, it is also safe to use
with old versions of bridge monitor command.

Note: although mode is only a boolean, treating it as a
full byte since in the future someone will probably want to add more
values (like macvlan has).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: remove obsolete comments in route.c
Li RongQing [Sun, 11 Nov 2012 20:16:08 +0000 (20:16 +0000)]
ipv6: remove obsolete comments in route.c

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/macb: clear unused address register
Joachim Eastwood [Sun, 11 Nov 2012 13:56:28 +0000 (13:56 +0000)]
net/macb: clear unused address register

Only the first register set is used for matching but
we support getting the initial hw addr from any of
the registers.

To prevent stale entries and false matches clear unused
register sets. This most important for the at91_ether
driver where u-boot always uses the 2nd register set.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/macb: add support for phy irq via gpio pin
Joachim Eastwood [Sun, 11 Nov 2012 13:56:27 +0000 (13:56 +0000)]
net/macb: add support for phy irq via gpio pin

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/phy/davicom: add irq functions to DM9161E and DM9161A
Joachim Eastwood [Sun, 11 Nov 2012 13:56:26 +0000 (13:56 +0000)]
net/phy/davicom: add irq functions to DM9161E and DM9161A

Both these PHYs support interrupt generation on IC pin 32.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: unify for_each_ip_tunnel_rcu()
Amerigo Wang [Sun, 11 Nov 2012 21:52:34 +0000 (21:52 +0000)]
net: unify for_each_ip_tunnel_rcu()

The defitions of for_each_ip_tunnel_rcu() are same,
so unify it. Also, don't hide the parameter 't'.

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: convert __IPTUNNEL_XMIT() to an inline function
Amerigo Wang [Sun, 11 Nov 2012 21:52:33 +0000 (21:52 +0000)]
net: convert __IPTUNNEL_XMIT() to an inline function

__IPTUNNEL_XMIT() is an ugly macro, convert it to a static
inline function, so make it more readable.

IPTUNNEL_XMIT() is unused, just remove it.

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotty: serial: max310x: Add terminating entry for spi_device_id table
Axel Lin [Sun, 4 Nov 2012 15:34:18 +0000 (23:34 +0800)]
tty: serial: max310x: Add terminating entry for spi_device_id table

The spi_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Linus Torvalds [Wed, 14 Nov 2012 21:46:40 +0000 (13:46 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux

Pull power tools fixes from Len Brown:
 "A pair of power tools patches -- a 3.7 regression fix plus a bug fix."

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  tools/power turbostat: graceful fail on garbage input
  tools/power turbostat: Repair Segmentation fault when using -i option