deliverable/linux.git
7 years agoMerge remote-tracking branches 'asoc/topic/rockchip', 'asoc/topic/rt5659', 'asoc...
Mark Brown [Mon, 12 Sep 2016 19:09:23 +0000 (20:09 +0100)] 
Merge remote-tracking branches 'asoc/topic/rockchip', 'asoc/topic/rt5659', 'asoc/topic/samsung' and 'asoc/topic/sgtl5000' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/platform-drvdata' and...
Mark Brown [Mon, 12 Sep 2016 19:09:22 +0000 (20:09 +0100)] 
Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/platform-drvdata' and 'asoc/topic/qcom' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/max98371', 'asoc/topic/mtk', 'asoc/topic...
Mark Brown [Mon, 12 Sep 2016 19:09:20 +0000 (20:09 +0100)] 
Merge remote-tracking branches 'asoc/topic/max98371', 'asoc/topic/mtk', 'asoc/topic/nau8810' and 'asoc/topic/of-bool' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fsl', 'asoc/topic/gpio...
Mark Brown [Mon, 12 Sep 2016 19:09:17 +0000 (20:09 +0100)] 
Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fsl', 'asoc/topic/gpio-chip' and 'asoc/topic/hdmi' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/cs53l30', 'asoc...
Mark Brown [Mon, 12 Sep 2016 19:09:14 +0000 (20:09 +0100)] 
Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/cs53l30', 'asoc/topic/da7213', 'asoc/topic/da7218' and 'asoc/topic/da7219' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/arizona', 'asoc/topic...
Mark Brown [Mon, 12 Sep 2016 19:09:10 +0000 (20:09 +0100)] 
Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/codec-component' and 'asoc/topic/cs35l30' into asoc-next

7 years agoMerge remote-tracking branch 'asoc/topic/rcar' into asoc-next
Mark Brown [Mon, 12 Sep 2016 19:09:09 +0000 (20:09 +0100)] 
Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next

7 years agoMerge remote-tracking branch 'asoc/topic/pcm' into asoc-next
Mark Brown [Mon, 12 Sep 2016 19:09:08 +0000 (20:09 +0100)] 
Merge remote-tracking branch 'asoc/topic/pcm' into asoc-next

7 years agoMerge remote-tracking branch 'asoc/topic/intel' into asoc-next
Mark Brown [Mon, 12 Sep 2016 19:09:08 +0000 (20:09 +0100)] 
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next

7 years agoMerge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Mark Brown [Mon, 12 Sep 2016 19:09:07 +0000 (20:09 +0100)] 
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/rt5514' and 'asoc/fix...
Mark Brown [Mon, 12 Sep 2016 19:09:04 +0000 (20:09 +0100)] 
Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/rt5514' and 'asoc/fix/shift' into asoc-linus

7 years agoMerge remote-tracking branch 'asoc/fix/intel' into asoc-linus
Mark Brown [Mon, 12 Sep 2016 19:09:03 +0000 (20:09 +0100)] 
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus

7 years agoMerge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
Mark Brown [Mon, 12 Sep 2016 19:09:02 +0000 (20:09 +0100)] 
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus

7 years agoASoC: constify gpio_chip structures
Julia Lawall [Sun, 11 Sep 2016 12:14:42 +0000 (14:14 +0200)] 
ASoC: constify gpio_chip structures

These structures are only used to copy into other structures, so declare
them as const.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct gpio_chip i@p = { ... };

@ok@
identifier r.i;
expression e;
position p;
@@
e = i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct gpio_chip e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct gpio_chip i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: ac97: constify gpio_chip structures
Julia Lawall [Sun, 11 Sep 2016 12:14:41 +0000 (14:14 +0200)] 
ASoC: ac97: constify gpio_chip structures

These structures are only used to copy into other structures, so declare
them as const.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct gpio_chip i@p = { ... };

@ok@
identifier r.i;
expression e;
position p;
@@
e = i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct gpio_chip e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct gpio_chip i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: constify snd_pcm_ops structures
Julia Lawall [Thu, 8 Sep 2016 00:35:23 +0000 (02:35 +0200)] 
ASoC: constify snd_pcm_ops structures

Check for snd_pcm_ops structures that are only stored in the ops field of a
snd_soc_platform_driver structure or passed as the third argument to
snd_pcm_set_ops.  The corresponding field or parameter is declared const,
so snd_pcm_ops structures that have this property can be declared as const
also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct snd_pcm_ops i@p = { ... };

@ok1@
identifier r.i;
struct snd_soc_platform_driver e;
position p;
@@
e.ops = &i@p;

@ok2@
identifier r.i;
expression e1, e2;
position p;
@@
snd_pcm_set_ops(e1, e2, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct snd_pcm_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct snd_pcm_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: merge fsl_espi_trans and fsl_espi_do_trans
Heiner Kallweit [Wed, 7 Sep 2016 20:54:51 +0000 (22:54 +0200)] 
spi: fsl-espi: merge fsl_espi_trans and fsl_espi_do_trans

Merge both functions to reduce source code size and improve
readability.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: improve message length handling
Heiner Kallweit [Wed, 7 Sep 2016 20:54:35 +0000 (22:54 +0200)] 
spi: fsl-espi: improve message length handling

Move checking for a zero-length message up in the call chain and
use m->frame_length instead of re-calculating the overall length
of all transfers in the message.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: factor out handling of read data
Heiner Kallweit [Wed, 7 Sep 2016 20:54:18 +0000 (22:54 +0200)] 
spi: fsl-espi: factor out handling of read data

Factor out copying read data to the read buffers in the original
message to a new function fsl_espi_copy_from_buf.
This also allows to simplify fsl_espi_copy_to_buf.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: centralize populating struct spi_transfer
Heiner Kallweit [Wed, 7 Sep 2016 20:54:00 +0000 (22:54 +0200)] 
spi: fsl-espi: centralize populating struct spi_transfer

Better structure the code by population all elements of struct
spi_transfer in one place.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: factor out initial message checking
Heiner Kallweit [Wed, 7 Sep 2016 20:53:38 +0000 (22:53 +0200)] 
spi: fsl-espi: factor out initial message checking

Checking the message is currently done at diffrent places in the
driver. Factor it out to fsl_espi_check_message.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: tools: enable CROSS_COMPILE in Makefile
Jorge Ramirez-Ortiz [Wed, 7 Sep 2016 15:43:00 +0000 (17:43 +0200)] 
spi: tools: enable CROSS_COMPILE in Makefile

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: pxa2xx: Default thresholds to PXA configuration
Andy Shevchenko [Wed, 7 Sep 2016 12:43:22 +0000 (15:43 +0300)] 
spi: pxa2xx: Default thresholds to PXA configuration

Most of the devices in the supported list have PXA configuration of FIFO. In
particularly Intel Medfield and Merrifield have bigger FIFO, than it's defined
for CE4100.

Split CE4100 in the similar way how it was done for Intel Quark, i.e. prefix
definitions by CE4100 and append necessary pieces of code to switch case
conditions.

We are on safe side since those bits are ignored on all LPSS IPs.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: pxa2xx: Remove pointer to chip data from driver data
Jarkko Nikula [Wed, 7 Sep 2016 14:04:07 +0000 (17:04 +0300)] 
spi: pxa2xx: Remove pointer to chip data from driver data

Transfer state machine in this driver does not need to set/unset pointer
to chip data between queueing and finalizing message as it is not
actually used as a state info itself but just pointer passing.

Since this per SPI device specific chip data is already carried in
ctldata use that and remove pointer to chip data from driver data.

While at it, group initialized variables before uninitialized variables
in pump_transfers().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: pxa2xx: Remove pointer to current SPI message from driver data
Jarkko Nikula [Wed, 7 Sep 2016 14:04:06 +0000 (17:04 +0300)] 
spi: pxa2xx: Remove pointer to current SPI message from driver data

There is no need to carry pointer to current SPI message in driver data
because cur_msg in struct spi_master holds it already when driver is using
the message queueing infrastructure from the SPI core.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: pxa2xx: Do not needlessly initialize stack variables
Jarkko Nikula [Wed, 7 Sep 2016 14:04:05 +0000 (17:04 +0300)] 
spi: pxa2xx: Do not needlessly initialize stack variables

All of these variables are unconditionally set before their use.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rockchip: spdif: restore register during runtime_suspend/resume cycle
Sugar Zhang [Wed, 7 Sep 2016 06:30:21 +0000 (14:30 +0800)] 
ASoC: rockchip: spdif: restore register during runtime_suspend/resume cycle

when step into runtime_suspend, spdif pd will be disabled and loss state.
so need to restore register when runtime_resume.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle
Sugar Zhang [Wed, 7 Sep 2016 06:27:33 +0000 (14:27 +0800)] 
ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle

when step into runtime_suspend, i2s pd will be disabled and loss state.
so need to restore register when runtime_resume.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rt5514: make the volume TLV to match the units 0.01dB
Oder Chiou [Wed, 7 Sep 2016 03:07:49 +0000 (11:07 +0800)] 
ASoC: rt5514: make the volume TLV to match the units 0.01dB

The volume have a step of 0.375dB, but TLV uses the units 0.01dB. It should
be changed to a step of 0.75dB to match the units of TLV.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: dw: round up result of calculation for clock divider
Matthias Seidel [Wed, 7 Sep 2016 15:45:30 +0000 (17:45 +0200)] 
spi: dw: round up result of calculation for clock divider

Avoid ending up with a higher frequency than requested

Signed-off-by: Matthias Seidel <kernel@mseidel.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: merge fsl_espi_bufs and fsl_espi_cpu_bufs
Heiner Kallweit [Wed, 7 Sep 2016 20:53:01 +0000 (22:53 +0200)] 
spi: fsl-espi: merge fsl_espi_bufs and fsl_espi_cpu_bufs

fsl_espi_bufs and fsl_espi_cpu_bufs are very small that we can merge them.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: improve return value handling in fsl_espi_bufs
Heiner Kallweit [Wed, 7 Sep 2016 20:52:43 +0000 (22:52 +0200)] 
spi: fsl-espi: improve return value handling in fsl_espi_bufs

Return a proper status code from fsl_espi_bufs instead of returning
the number of remaining words and let the caller evaluate it.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: merge fsl_espi_cmd_trans and fsl_espi_rw_trans
Heiner Kallweit [Wed, 7 Sep 2016 20:52:25 +0000 (22:52 +0200)] 
spi: fsl-espi: merge fsl_espi_cmd_trans and fsl_espi_rw_trans

fsl_espi_cmd_trans and fsl_espi_rw_trans share most of the code so
we can merge them.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: eliminate struct fsl_espi_transfer
Heiner Kallweit [Wed, 7 Sep 2016 20:52:06 +0000 (22:52 +0200)] 
spi: fsl-espi: eliminate struct fsl_espi_transfer

The remaining elements of struct fsl_espi_transfer are part of struct
spi_transfer anyway. So we can get rid of struct fsl_espi_transfer
and use a struct spi_transfer only.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: remove element actual_length from struct fsl_espi_trans
Heiner Kallweit [Wed, 7 Sep 2016 20:51:48 +0000 (22:51 +0200)] 
spi: fsl-espi: remove element actual_length from struct fsl_espi_trans

If an error occurs during processing the message, then we don't have
to populate the actual_length element of struct message.
So we can get rid of element actual_length in struct
fsl_espi_transfer.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: fix status handling in fsl_espi_do_one_msg
Heiner Kallweit [Wed, 7 Sep 2016 20:51:29 +0000 (22:51 +0200)] 
spi: fsl-espi: fix status handling in fsl_espi_do_one_msg

If an error occurred during message handling return this error instead
of always returning 0 and align the code with the generic
implementation in spi_transfer_one_message.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: remove element status from struct fsl_espi_transfer
Heiner Kallweit [Wed, 7 Sep 2016 20:51:10 +0000 (22:51 +0200)] 
spi: fsl-espi: remove element status from struct fsl_espi_transfer

Use the return values of the functions in the call chain to transport
status information instead of using an element in struct
fsl_espi_transfer for this.

This is more in line with the general approach how to handle status
information and is one step further to eventually get rid of
struct fsl_espi_transfer completely.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: factor out filling the local buffer
Heiner Kallweit [Wed, 7 Sep 2016 20:50:53 +0000 (22:50 +0200)] 
spi: fsl-espi: factor out filling the local buffer

Better structure the code by factoring out filling the local buffer.

In addition don't initialize the complete local buffer at the
beginning of fsl_espi_do_one_msg. Instead move initialization of
those parts of the local buffer to be used for transfers w/o tx_buf
to fsl_espi_copy_to_buf.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agospi: fsl-espi: pre-allocate message buffer
Heiner Kallweit [Wed, 7 Sep 2016 20:50:22 +0000 (22:50 +0200)] 
spi: fsl-espi: pre-allocate message buffer

Currently the driver allocates a 64kb buffer for each single message.
On systems with little and fragmented memory this can result in
memory allocation errors. Solve this by pre-allocating a buffer.

This patch was developed in OpenWRT long ago, however it never
made it upstream.

I slightly modified the original patch to re-initialize the buffer
at the beginning of each transfer.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agonetfilter: nf_nat: handle NF_DROP from nfnetlink_parse_nat_setup()
Pablo Neira Ayuso [Fri, 9 Sep 2016 13:38:12 +0000 (15:38 +0200)] 
netfilter: nf_nat: handle NF_DROP from nfnetlink_parse_nat_setup()

nf_nat_setup_info() returns NF_* verdicts, so convert them to error
codes that is what ctnelink expects. This has passed overlook without
having any impact since this nf_nat_setup_info() has always returned
NF_ACCEPT so far. Since 870190a9ec90 ("netfilter: nat: convert nat bysrc
hash to rhashtable"), this is problem.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agoEDAC, sb_edac: Remove NULL pointer check on array pci_tad
Colin Ian King [Thu, 8 Sep 2016 08:38:01 +0000 (09:38 +0100)] 
EDAC, sb_edac: Remove NULL pointer check on array pci_tad

pvt->pci_tad is a NUM_CHANNELS array of struct pci_dev pointers and
hence cannot be NULL, so the NULL pointer check on pci_tad is redundant.
Remove it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20160908083801.14766-1-colin.king@canonical.com
Signed-off-by: Borislav Petkov <bp@suse.de>
7 years agonetfilter: nft_numgen: fix race between num generate and store it
Liping Zhang [Mon, 12 Sep 2016 14:21:36 +0000 (22:21 +0800)] 
netfilter: nft_numgen: fix race between num generate and store it

After we generate a new number, we still use the priv->counter and
store it to the dreg. This is not correct, another cpu may already
change it to a new number. So we must use the generated number, not
the priv->counter itself.

Fixes: 91dbc6be0a62 ("netfilter: nf_tables: add number generator expression")
Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: conntrack: remove packet hotpath stats
Florian Westphal [Sun, 11 Sep 2016 20:55:53 +0000 (22:55 +0200)] 
netfilter: conntrack: remove packet hotpath stats

These counters sit in hot path and do show up in perf, this is especially
true for 'found' and 'searched' which get incremented for every packet
processed.

Information like

searched=212030105
new=623431
found=333613
delete=623327

does not seem too helpful nowadays:

- on busy systems found and searched will overflow every few hours
(these are 32bit integers), other more busy ones every few days.

- for debugging there are better methods, such as iptables' trace target,
the conntrack log sysctls.  Nowadays we also have perf tool.

This removes packet path stat counters except those that
are expected to be 0 (or close to 0) on a normal system, e.g.
'insert_failed' (race happened) or 'invalid' (proto tracker rejects).

The insert stat is retained for the ctnetlink case.
The found stat is retained for the tuple-is-taken check when NAT has to
determine if it needs to pick a different source address.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: nf_queue: get rid of dependency on IP6_NF_IPTABLES
Liping Zhang [Sun, 11 Sep 2016 14:05:27 +0000 (22:05 +0800)] 
netfilter: nf_queue: get rid of dependency on IP6_NF_IPTABLES

hash_v6 is used by both nftables and ip6tables, so depend on
IP6_NF_IPTABLES is not properly.

Actually, it only parses ipv6hdr and computes a hash value, so
even if IPV6 is disabled, there's no side effect too, remove it.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: Add the missed return value check of nft_register_chain_type
Gao Feng [Sat, 10 Sep 2016 02:04:30 +0000 (10:04 +0800)] 
netfilter: Add the missed return value check of nft_register_chain_type

There are some codes of netfilter module which did not check the return
value of nft_register_chain_type. Add the checks now.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: Add the missed return value check of register_netdevice_notifier
Gao Feng [Fri, 9 Sep 2016 15:25:09 +0000 (23:25 +0800)] 
netfilter: Add the missed return value check of register_netdevice_notifier

There are some codes of netfilter module which did not check the return
value of register_netdevice_notifier. Add the checks now.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: nf_conntrack: simplify __nf_ct_try_assign_helper() return logic
Pablo Neira [Fri, 9 Sep 2016 12:01:26 +0000 (14:01 +0200)] 
netfilter: nf_conntrack: simplify __nf_ct_try_assign_helper() return logic

Instead of several goto's just to return the result, simply return it.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: nf_tables: don't drop IPv6 packets that cannot parse transport
Pablo Neira Ayuso [Fri, 9 Sep 2016 10:42:53 +0000 (12:42 +0200)] 
netfilter: nf_tables: don't drop IPv6 packets that cannot parse transport

This is overly conservative and not flexible at all, so better let them
go through and let the filtering policy decide what to do with them. We
use skb_header_pointer() all over the place so we would just fail to
match when trying to access fields from malformed traffic.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: nf_tables_bridge: use nft_set_pktinfo_ipv{4, 6}_validate
Pablo Neira Ayuso [Fri, 9 Sep 2016 10:42:52 +0000 (12:42 +0200)] 
netfilter: nf_tables_bridge: use nft_set_pktinfo_ipv{4, 6}_validate

Consolidate pktinfo setup and validation by using the new generic
functions so we converge to the netdev family codebase.

We only need a linear IPv4 and IPv6 header from the reject expression,
so move nft_bridge_iphdr_validate() and nft_bridge_ip6hdr_validate()
to net/bridge/netfilter/nft_reject_bridge.c.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: introduce nft_set_pktinfo_{ipv4, ipv6}_validate()
Pablo Neira Ayuso [Fri, 9 Sep 2016 10:42:51 +0000 (12:42 +0200)] 
netfilter: introduce nft_set_pktinfo_{ipv4, ipv6}_validate()

These functions are extracted from the netdev family, they initialize
the pktinfo structure and validate that the IPv4 and IPv6 headers are
well-formed given that these functions are called from a path where
layer 3 sanitization did not happen yet.

These functions are placed in include/net/netfilter/nf_tables_ipv{4,6}.h
so they can be reused by a follow up patch to use them from the bridge
family too.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: nf_tables_ipv6: setup pktinfo transport field on failure to parse
Pablo Neira Ayuso [Fri, 9 Sep 2016 10:42:50 +0000 (12:42 +0200)] 
netfilter: nf_tables_ipv6: setup pktinfo transport field on failure to parse

Make sure the pktinfo protocol fields are initialized if this fails to
parse the transport header.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: nf_tables: ensure proper initialization of nft_pktinfo fields
Pablo Neira Ayuso [Fri, 9 Sep 2016 10:42:49 +0000 (12:42 +0200)] 
netfilter: nf_tables: ensure proper initialization of nft_pktinfo fields

This patch introduces nft_set_pktinfo_unspec() that ensures proper
initialization all of pktinfo fields for non-IP traffic. This is used
by the bridge, netdev and arp families.

This new function relies on nft_set_pktinfo_proto_unspec() to set a new
tprot_set field that indicates if transport protocol information is
available. Remain fields are zeroed.

The meta expression has been also updated to check to tprot_set in first
place given that zero is a valid tprot value. Even a handcrafted packet
may come with the IPPROTO_RAW (255) protocol number so we can't rely on
this value as tprot unset.

Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: nft_dynset: allow to invert match criteria
Pablo Neira Ayuso [Wed, 7 Sep 2016 10:22:18 +0000 (12:22 +0200)] 
netfilter: nft_dynset: allow to invert match criteria

The dynset expression matches if we can fit a new entry into the set.
If there is no room for it, then it breaks the rule evaluation.

This patch introduces the inversion flag so you can add rules to
explicitly drop packets that don't fit into the set. For example:

 # nft filter input flow table xyz size 4 { ip saddr timeout 120s counter } overflow drop

This is useful to provide a replacement for connlimit.

For the rule above, every new entry uses the IPv4 address as key in the
set, this entry gets a timeout of 120 seconds that gets refresh on every
packet seen. If we get new flow and our set already contains 4 entries
already, then this packet is dropped.

You can already express this in positive logic, assuming default policy
to drop:

 # nft filter input flow table xyz size 4 { ip saddr timeout 10s counter } accept

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
7 years agonetfilter: nft_hash: Add hash offset value
Laura Garcia Liebana [Tue, 6 Sep 2016 06:44:19 +0000 (08:44 +0200)] 
netfilter: nft_hash: Add hash offset value

Add support to pass through an offset to the hash value. With this
feature, the sysadmin is able to generate a hash with a given
offset value.

Example:

meta mark set jhash ip saddr mod 2 seed 0xabcd offset 100

This option generates marks according to the source address from 100 to
101.

Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
7 years agoMerge branch 'devel-stable' into for-next
Russell King [Mon, 12 Sep 2016 15:03:06 +0000 (16:03 +0100)] 
Merge branch 'devel-stable' into for-next

7 years agoMerge branches 'fixes' and 'misc' into for-next
Russell King [Mon, 12 Sep 2016 15:03:01 +0000 (16:03 +0100)] 
Merge branches 'fixes' and 'misc' into for-next

7 years agoMerge tag 'arm-plt-optimizations-for-v4.9' of git://git.linaro.org/people/ard.biesheu...
Russell King [Wed, 7 Sep 2016 16:15:23 +0000 (17:15 +0100)] 
Merge tag 'arm-plt-optimizations-for-v4.9' of git://git.linaro.org/people/ard.biesheuvel/linux-arm into devel-stable

This series of 4 patches optimizes the ARM PLT generation code that
is invoked at module load time, to get rid of the O(n^2) algorithm
that results in pathological load times of 10 seconds or more for
large modules on certain STB platforms

7 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Mon, 12 Sep 2016 14:56:06 +0000 (07:56 -0700)] 
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:
 "Mostly small sets of driver fixes scattered all over the place.

   1) Mediatek driver fixes from Sean Wang.  Forward port not written
      correctly during TX map, missed handling of EPROBE_DEFER, and
      mistaken use of put_page() instead of skb_free_frag().

   2) Fix socket double-free in KCM code, from WANG Cong.

   3) QED driver fixes from Sudarsana Reddy Kalluru, including a fix for
      using the dcbx buffers before initializing them.

   4) Mellanox Switch driver fixes from Jiri Pirko, including a fix for
      double fib removals and an error handling fix in
      mlxsw_sp_module_init().

   5) Fix kernel panic when enabling LLDP in i40e driver, from Dave
      Ertman.

   6) Fix padding of TSO packets in thunderx driver, from Sunil Goutham.

   7) TCP's rcv_wup not initialized properly when using fastopen, from
      Neal Cardwell.

   8) Don't use uninitialized flow keys in flow dissector, from Gao
      Feng.

   9) Use after free in l2tp module unload, from Sabrina Dubroca.

  10) Fix interrupt registry ordering issues in smsc911x driver, from
      Jeremy Linton.

  11) Fix crashes in bonding having to do with enslaving and rx_handler,
      from Mahesh Bandewar.

  12) AF_UNIX deadlock fixes from Linus.

  13) In mlx5 driver, don't read skb->xmit_mode after it might have been
      freed from the TX reclaim path.  From Tariq Toukan.

  14) Fix a bug from 2015 in TCP Yeah where the congestion window does
      not increase, from Artem Germanov.

  15) Don't pad frames on receive in NFP driver, from Jakub Kicinski.

  16) Fix chunk fragmenting in SCTP wrt. GSO, from Marcelo Ricardo
      Leitner.

  17) Fix deletion of VRF routes, from Mark Tomlinson.

  18) Fix device refcount leak when DAD fails in ipv6, from Wei Yongjun"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (101 commits)
  net/mlx4_en: Fix panic on xmit while port is down
  net/mlx4_en: Fixes for DCBX
  net/mlx4_en: Fix the return value of mlx4_en_dcbnl_set_state()
  net/mlx4_en: Fix the return value of mlx4_en_dcbnl_set_all()
  net: ethernet: renesas: sh_eth: add POST registers for rz
  drivers: net: phy: mdio-xgene: Add hardware dependency
  dwc_eth_qos: do not register semi-initialized device
  sctp: identify chunks that need to be fragmented at IP level
  mlxsw: spectrum: Set port type before setting its address
  mlxsw: spectrum_router: Fix error path in mlxsw_sp_router_init
  nfp: don't pad frames on receive
  nfp: drop support for old firmware ABIs
  nfp: remove linux/version.h includes
  tcp: cwnd does not increase in TCP YeAH
  net/mlx5e: Fix parsing of vlan packets when updating lro header
  net/mlx5e: Fix global PFC counters replication
  net/mlx5e: Prevent casting overflow
  net/mlx5e: Move an_disable_cap bit to a new position
  net/mlx5e: Fix xmit_more counter race issue
  tcp: fastopen: avoid negative sk_forward_alloc
  ...

7 years agodrm: Move property validation to a helper, v2.
Maarten Lankhorst [Thu, 8 Sep 2016 10:30:01 +0000 (12:30 +0200)] 
drm: Move property validation to a helper, v2.

Property lifetimes are equal to the device lifetime, so the separate
drm_property_find is not needed. The pointer can be retrieved from
the properties member, which saves us some locking and a extra lookup.
The lifetime for properties is until the device is destroyed, which
happens late in the device unload path.

kms_atomic is also testing for invalid properties which returns -ENOENT,
to be consistent return -ENOENT for valid properties that don't appear
on the object property list.

Changes since v1:
- Return -ENOENT for invalid properties to make kms_atomic pass.
- Change commit message slightly to take this into account.

Testcase: kms_atomic
Testcase: kms_properties
Fixes: 4e9951d96093 ("drm/atomic: Reject properties not part of the object.")
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/599c7fa8-b6fd-a42b-c619-a9e4a9c5c244@linux.intel.com
7 years agoMerge branch 'for-4.9/block' into for-next
Jens Axboe [Mon, 12 Sep 2016 14:26:30 +0000 (08:26 -0600)] 
Merge branch 'for-4.9/block' into for-next

7 years agoMerge branches 'hwspinlock-next', 'rpmsg-next' and 'rproc-next' into for-next
Bjorn Andersson [Mon, 12 Sep 2016 14:05:47 +0000 (07:05 -0700)] 
Merge branches 'hwspinlock-next', 'rpmsg-next' and 'rproc-next' into for-next

7 years agorpmsg: smd: fix dependency on QCOM_SMD=n
Arnd Bergmann [Mon, 12 Sep 2016 09:58:56 +0000 (11:58 +0200)] 
rpmsg: smd: fix dependency on QCOM_SMD=n

The ARM allmodconfig build broke with the addition of the SMD rpmsg
driver that conflicts with the driver its replaces:

WARNING: drivers/soc/qcom/smd: 'qcom_smd_register_edge' exported twice. Previous export was in drivers/rpmsg/qcom_smd.ko
WARNING: drivers/soc/qcom/smd: 'qcom_smd_unregister_edge' exported twice. Previous export was in drivers/rpmsg/qcom_smd.ko

There is already a dependency that is meant to avoid the broken
configuration, but that only prevents the case where at least
one of the two are built-in, but not if both are modules.

This changes the dependency to "=n", to ensure that the new driver
can only be enabled if the other one is completely disabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agotracing: Have max_latency be defined for HWLAT_TRACER as well
Steven Rostedt (Red Hat) [Wed, 7 Sep 2016 16:45:09 +0000 (12:45 -0400)] 
tracing: Have max_latency be defined for HWLAT_TRACER as well

The hwlat tracer uses tr->max_latency, and if it's the only tracer enabled
that uses it, the build will fail. Add max_latency and its file when the
hwlat tracer is enabled.

Link: http://lkml.kernel.org/r/d6c3b7eb-ba95-1ffa-0453-464e1e24262a@infradead.org
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
7 years agoMerge branch 'devel' into for-next
Linus Walleij [Mon, 12 Sep 2016 13:45:39 +0000 (15:45 +0200)] 
Merge branch 'devel' into for-next

7 years agopinctrl: samsung: Remove an always false dev->of_node test
Sylwester Nawrocki [Thu, 1 Sep 2016 11:59:00 +0000 (13:59 +0200)] 
pinctrl: samsung: Remove an always false dev->of_node test

samsung_pinctrl_probe() can be called only after matching
the driver by the compatible string so this already implies
a non null dev->of_node.  Remove the always false test
and related error trace. While at it drop another error log
in case of memory allocation failure - any errors are logged
by the memory subsystem.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agopinctrl: intel: merrifield: fix dup size in probe
Vincent Stehlé [Wed, 31 Aug 2016 12:30:50 +0000 (14:30 +0200)] 
pinctrl: intel: merrifield: fix dup size in probe

In function mrfld_pinctrl_probe(), when duplicating the mrfld_families
array the requested memory region length is multiplied once too many by the
number of elements in the original array. Fix this to spare some memory.

Fixes: 4e80c8f505741cbd ("pinctrl: intel: Add Intel Merrifield pin controller support")
Signed-off-by: Vincent Stehlé <vincent.stehle@intel.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agoMerge branch 'devel' into for-next
Linus Walleij [Mon, 12 Sep 2016 13:44:29 +0000 (15:44 +0200)] 
Merge branch 'devel' into for-next

7 years agogpio: pca953x: initialize ret to zero to avoid returning garbage
Colin Ian King [Fri, 9 Sep 2016 08:31:54 +0000 (09:31 +0100)] 
gpio: pca953x: initialize ret to zero to avoid returning garbage

ret is not initialized so it contains garbage.  Ensure garbage
is not returned in the case that pdata && pdata->teardown is false
by initializing ret to 0.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agomei: me: add kaby point device ids
Alexander Usyskin [Mon, 12 Sep 2016 13:21:43 +0000 (16:21 +0300)] 
mei: me: add kaby point device ids

Add device ids for Intel Kabypoint PCH (Kabylake)

Cc: <stable@vger.kernel.org> #4.6+
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agogpio: iop: Use generic GPIO MMIO functions for driver
Alexander Shiyan [Fri, 9 Sep 2016 06:20:03 +0000 (09:20 +0300)] 
gpio: iop: Use generic GPIO MMIO functions for driver

This patch switches the driver to use the generic GPIO MMIO functions
that removes a bit of redundant and duplicate code.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agogpio: fix documentation for gpiod_unexport
Amitesh Singh [Thu, 8 Sep 2016 11:41:20 +0000 (17:11 +0530)] 
gpio: fix documentation for gpiod_unexport

Both gpio_export and gpio_free APIs are obsolete now.

Signed-off-by: Amitesh Singh <singh.amitesh@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agoMerge branches 'pnp' and 'device-properties' into linux-next
Rafael J. Wysocki [Mon, 12 Sep 2016 12:51:30 +0000 (14:51 +0200)] 
Merge branches 'pnp' and 'device-properties' into linux-next

* pnp:
  PNP: isapnp: make core more explicitly non-modular

* device-properties:
  serial: 8250_dw: Add quirk for APM X-Gene SoC
  ACPI / LPSS: Provide build-in properties of the UART
  ACPI / APD: Provide build-in properties of the UART
  driver core: Don't leak secondary fwnode on device removal

7 years agoMerge branches 'pm-cpufreq' and 'pm-cpufreq-sched' into linux-next
Rafael J. Wysocki [Mon, 12 Sep 2016 12:50:30 +0000 (14:50 +0200)] 
Merge branches 'pm-cpufreq' and 'pm-cpufreq-sched' into linux-next

* pm-cpufreq:
  cpufreq: Drop unnecessary check from cpufreq_policy_alloc()
  cpufreq-SCPI: Delete unnecessary assignment for the field "owner"
  cpufreq: dt: Add exynos5433 compatible to use generic cpufreq driver

* pm-cpufreq-sched:
  cpufreq / sched: ignore SMT when determining max cpu capacity
  cpufreq / sched: Pass runqueue pointer to cpufreq_update_util()
  cpufreq / sched: Pass flags to cpufreq_update_util()

7 years agogpio: pca953x: coding style fixes
Bartosz Golaszewski [Fri, 9 Sep 2016 09:17:38 +0000 (11:17 +0200)] 
gpio: pca953x: coding style fixes

pca953x_gpio_set_multiple() has some coding style issues that make it
harder to read. Tweak the code a bit.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agoMerge back earlier cpufreq material for v4.9.
Rafael J. Wysocki [Mon, 12 Sep 2016 12:49:29 +0000 (14:49 +0200)] 
Merge back earlier cpufreq material for v4.9.

7 years agoMerge branches 'pm-domains' and 'pm-cpuidle' into linux-next
Rafael J. Wysocki [Mon, 12 Sep 2016 12:49:03 +0000 (14:49 +0200)] 
Merge branches 'pm-domains' and 'pm-cpuidle' into linux-next

* pm-domains:
  PM / Domains: Always enable debugfs support if available

* pm-cpuidle:
  ARM: cpuidle: Fix error return code

7 years agogpio: pca953x: remove an unused variable
Bartosz Golaszewski [Fri, 9 Sep 2016 09:17:37 +0000 (11:17 +0200)] 
gpio: pca953x: remove an unused variable

The chip_type variable in struct pca953x_chip is no longer required.

Remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agoMerge branches 'acpi-button', 'acpi-tables' and 'acpi-battery' into linux-next
Rafael J. Wysocki [Mon, 12 Sep 2016 12:48:35 +0000 (14:48 +0200)] 
Merge branches 'acpi-button', 'acpi-tables' and 'acpi-battery' into linux-next

* acpi-button:
  ACPI / button: Add document for ACPI control method lid device restrictions
  ACPI / button: Fix an issue in button.lid_init_state=ignore mode

* acpi-tables:
  ACPI / tables: do not report the number of entries ignored by acpi_parse_entries()
  ACPI / tables: fix acpi_parse_entries_array() so it traverses all subtables
  ACPI / tables: fix incorrect counts returned by acpi_parse_entries_array()

* acpi-battery:
  ACPI / battery: Add sysfs representation after checking _BST

7 years agoMerge branches 'acpi-ec' and 'acpi-cppc' into linux-next
Rafael J. Wysocki [Mon, 12 Sep 2016 12:48:13 +0000 (14:48 +0200)] 
Merge branches 'acpi-ec' and 'acpi-cppc' into linux-next

* acpi-ec:
  ACPI / EC: Fix issues related to boot_ec
  ACPI / EC: Fix a gap that ECDT EC cannot handle EC events
  ACPI / EC: Fix a memory leakage issue in acpi_ec_add()
  ACPI / EC: Cleanup first_ec/boot_ec code
  ACPI / EC: Enable event freeze mode to improve event handling for suspend process
  ACPI / EC: Add PM operations to improve event handling for suspend process
  ACPI / EC: Add PM operations to improve event handling for resume process
  ACPI / EC: Fix an issue that SCI_EVT cannot be detected after event is enabled
  ACPI / EC: Add EC_FLAGS_QUERY_ENABLED to reveal a hidden logic
  ACPI / EC: Add PM operations for suspend/resume noirq stage

* acpi-cppc:
  ACPI / CPPC: Add prefix cppc to cpudata structure name
  ACPI / CPPC: Add support for functional fixed hardware address
  ACPI / CPPC: Don't return on CPPC probe failure
  ACPI / CPPC: Allow build with ACPI_CPU_FREQ_PSS config
  ACPI / CPPC: check for error bit in PCC status field
  ACPI / CPPC: move all PCC related information into pcc_data
  ACPI / CPPC: add sysfs support to compute delivered performance
  ACPI / CPPC: set a non-zero value for transition_latency
  ACPI / CPPC: support for batching CPPC requests
  ACPI / CPPC: acquire pcc_lock only while accessing PCC subspace
  ACPI / CPPC: restructure read/writes for efficient sys mapped reg ops
  mailbox: pcc: Support HW-Reduced Communication Subspace type 2

7 years agoMerge branches 'acpi-sysfs', 'acpi-pci', 'acpi-soc' and 'acpi-bus' into linux-next
Rafael J. Wysocki [Mon, 12 Sep 2016 12:47:33 +0000 (14:47 +0200)] 
Merge branches 'acpi-sysfs', 'acpi-pci', 'acpi-soc' and 'acpi-bus' into linux-next

* acpi-sysfs:
  ACPI / sysfs: Use new GPE masking mechanism in GPE interface

* acpi-pci:
  ACPI / PCI: fix GIC irq model default PCI IRQ polarity

* acpi-soc:
  ACPI / APD: Add device HID for Vulcan SPI controller

* acpi-bus:
  ACPI / bus: Make acpi_get_first_physical_node() public

7 years agoMerge branch 'acpica' into linux-next
Rafael J. Wysocki [Mon, 12 Sep 2016 12:47:04 +0000 (14:47 +0200)] 
Merge branch 'acpica' into linux-next

* acpica: (42 commits)
  ACPICA: Update version to 20160831
  ACPICA: Tables: Tune table mutex to be a leaf lock
  ACPICA: Dispatcher: Fix a mutex issue for method auto serialization
  ACPICA: Namespace: Fix dynamic table loading issues
  ACPICA: Namespace: Add acpi_ns_get_node_unlocked()
  ACPICA: Interpreter: Fix MLC issues by switching to new term_list grammar for table loading
  ACPICA: Update return value for intenal _OSI method
  ACPICA: Tables: Override all 64-bit GAS fields when acpi_gbl_use32_bit_fadt_addresses is TRUE
  ACPICA: Tables: Add new table events indicating table installation/uninstallation
  ACPICA: Tables: Remove wrong table event macros
  ACPICA: Tables: Remove acpi_tb_install_fixed_table()
  ACPICA: Add a couple of casts to uthex.c
  ACPICA: Cleanup for all string-to-integer conversions
  ACPICA: Debugger: Add subcommand for predefined name execution
  ACPICA: Update version to 20160729
  ACPICA: OSL: Fix a regression that old GCC requires a workaround for strchr()
  ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers
  ACPICA: EFI: Port acpidump to EDK2 environment
  ACPICA: Applications: Fix a potential issue that help messages may be dumped to acpi_gbl_debug_file
  ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link clibrary fxxx()/errno/perror() instead
  ...

7 years agogpio: pca953x: refactor pca953x_read_regs()
Bartosz Golaszewski [Fri, 9 Sep 2016 09:17:36 +0000 (11:17 +0200)] 
gpio: pca953x: refactor pca953x_read_regs()

Avoid the unnecessary if-else in pca953x_read_regs() by spltting the
routine into smaller, specialized functions and calling the right one
via a function pointer held in struct pca953x.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agogpio: pca953x: refactor pca953x_write_regs()
Bartosz Golaszewski [Fri, 9 Sep 2016 09:17:35 +0000 (11:17 +0200)] 
gpio: pca953x: refactor pca953x_write_regs()

Avoid the unnecessary if-else in pca953x_write_regs() by splitting
the routine into smaller, specialized functions and calling the right
one via a function pointer held in struct pca953x_chip.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agogpio: pca953x: code shrink
Bartosz Golaszewski [Fri, 9 Sep 2016 09:17:34 +0000 (11:17 +0200)] 
gpio: pca953x: code shrink

There are multiple places in the driver code where a
switch (chip->chip_type) is used to determine the proper register
offset.

Unduplicate the code by adding a simple structure holding the possible
offsets that differ between the pca953x and pca957x chip families and
use it to avoid the checks.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agommc: sdhci-acpi: Set MMC_CAP_CMD_DURING_TFR for Intel eMMC controllers
Adrian Hunter [Tue, 16 Aug 2016 10:44:15 +0000 (13:44 +0300)] 
mmc: sdhci-acpi: Set MMC_CAP_CMD_DURING_TFR for Intel eMMC controllers

Set MMC_CAP_CMD_DURING_TFR for Intel BYT and related eMMC host controllers.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
7 years agommc: sdhci-pci: Set MMC_CAP_CMD_DURING_TFR for Intel eMMC controllers
Adrian Hunter [Tue, 16 Aug 2016 10:44:14 +0000 (13:44 +0300)] 
mmc: sdhci-pci: Set MMC_CAP_CMD_DURING_TFR for Intel eMMC controllers

Set MMC_CAP_CMD_DURING_TFR for Intel BYT and related eMMC host controllers.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
7 years agommc: sdhci: Support cap_cmd_during_tfr requests
Adrian Hunter [Tue, 16 Aug 2016 10:44:13 +0000 (13:44 +0300)] 
mmc: sdhci: Support cap_cmd_during_tfr requests

Now SDHCI supports commands during transfer, enable support for the core
API.

There are 3 small changes needed:

First, auto-CMD12 cannot be used with a cap_cmd_during_tfr request because
the host controller cannot expect the command line to be available.

Secondly, a cap_cmd_during_tfr request must not send a stop command, again
because the host controller cannot expect the command line to be available.

Thirdly, when a cap_cmd_during_tfr command completes, use
mmc_command_complete() to notify the upper layers that the command line is
now available for further commands.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
7 years agommc: mmc_test: Add tests for sending commands during transfer
Adrian Hunter [Tue, 16 Aug 2016 10:44:12 +0000 (13:44 +0300)] 
mmc: mmc_test: Add tests for sending commands during transfer

Add 6 tests for sending commands during transfer. The tests are:
 * Commands during read - no Set Block Count (CMD23).
 * Commands during write - no Set Block Count (CMD23).
 * Commands during read - use Set Block Count (CMD23).
 * Commands during write - use Set Block Count (CMD23).
 * Commands during non-blocking read - use Set Block Count (CMD23).
 * Commands during non-blocking write - use Set Block Count (CMD23).

For a range of transfer sizes, the tests start an ongoing data transfer and
then repeatedly send the status command (CMD13) while the transfer
continues. The tests pass if all requests complete with no errors. The host
controller driver must support MMC_CAP_CMD_DURING_TFR.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
7 years agommc: core: Add support for sending commands during data transfer
Adrian Hunter [Tue, 16 Aug 2016 10:44:11 +0000 (13:44 +0300)] 
mmc: core: Add support for sending commands during data transfer

A host controller driver exposes its capability using caps flag
MMC_CAP_CMD_DURING_TFR. A driver with that capability can accept requests
that are marked mrq->cap_cmd_during_tfr = true. Then the driver informs the
upper layers when the command line is available for further commands by
calling mmc_command_done(). Because of that, the driver will not then
automatically send STOP commands, and it is the responsibility of the upper
layer to send a STOP command if it is required.

For requests submitted through the mmc_wait_for_req() interface, the caller
sets mrq->cap_cmd_during_tfr = true which causes mmc_wait_for_req() in fact
not to wait. The caller can then send commands that do not use the data
lines. Finally the caller can wait for the transfer to complete by calling
mmc_wait_for_req_done() which is now exported.

For requests submitted through the mmc_start_req() interface, the caller
again sets mrq->cap_cmd_during_tfr = true, but mmc_start_req() anyway does
not wait. The caller can then send commands that do not use the data
lines. Finally the caller can wait for the transfer to complete in the
normal way i.e. calling mmc_start_req() again.

Irrespective of how a cap_cmd_during_tfr request is started,
mmc_is_req_done() can be called if the upper layer needs to determine if
the request is done. However the appropriate waiting function (either
mmc_wait_for_req_done() or mmc_start_req()) must still be called.

The implementation consists primarily of a new completion
mrq->cmd_completion which notifies when the command line is available for
further commands. That completion is completed by mmc_command_done().
When there is an ongoing data transfer, calls to mmc_wait_for_req() will
automatically wait on that completion, so the caller does not have to do
anything special.

Note, in the case of errors, the driver may call mmc_request_done() without
calling mmc_command_done() because mmc_request_done() always calls
mmc_command_done().

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
7 years agogpio: mxc: add generic gpio request/free callbacks to pinctrl
Vladimir Zapolskiy [Thu, 8 Sep 2016 01:48:16 +0000 (04:48 +0300)] 
gpio: mxc: add generic gpio request/free callbacks to pinctrl

If a GPIO controller description in board DTB contains information
about mappings between GPIOs and pads under IOMUX control use it to
request and free GPIOs with respect to pinctrl/pinmux subsystems.

One of immediate positive functional changes is inability to
request non-existing GPIOs, i.e. if there is no pad such. Also
pinctrl/pinmux may now properly account pads occupied by requested
GPIOs.

The change has no effect, if "gpio-ranges" property is not found
including the case if a board has no DTB firmware.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agogpio: mxc: shift gpio_mxc_init() to subsys_initcall level
Vladimir Zapolskiy [Thu, 8 Sep 2016 01:48:15 +0000 (04:48 +0300)] 
gpio: mxc: shift gpio_mxc_init() to subsys_initcall level

In general situation on-SoC GPIO controller drivers should be probed
after pinctrl/pinmux controller driver, because on-SoC GPIOs utilize a
pin/pad as a resource provided and controlled by pinctrl subsystem.

This is stated in multiple places, e.g. from drivers/Makefile:

  GPIO must come after pinctrl as gpios may need to mux pins etc

Looking at Freescale iMX SoC series specifics, imx*_pinctrl_init()
functions are called at arch_initcall and postcore_initcall init
levels, so the change of initcall level for gpio-mxc driver from
postcore_initcall to subsys_initcall level is sufficient. Also note
that the most of GPIO controller drivers settled at subsys_initcall
level.

If pinctrl subsystem manages pads with GPIO functions, the change is
needed to avoid unwanted driver probe deferrals during kernel boot.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agopinctrl: imx: accept gpio request/free from pinctrl
Vladimir Zapolskiy [Thu, 8 Sep 2016 01:48:14 +0000 (04:48 +0300)] 
pinctrl: imx: accept gpio request/free from pinctrl

While only Freescale Vybrid SoC has settings of GPIO capabilities done
by iomux controller, it is only a matter of GPIO controller driver
implementation for the rest of Freescale/NXP SoCs from iMX series.

As a practical example on GPIO request a pad function should be
switched to GPIO, but because this requires updates to all particular
iMX pinctrl drivers, for simplicity at the moment add only a proper
connection between shared pinctrl-imx and pinctrl/pinmux core, namely
.gpio_request_enable/.gpio_disable_free/.gpio_set_direction callbacks
should return success to a caller. This change allows to progress by
adding request/free callbacks into gpio-mxc.c driver.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agogpio: lpc32xx: remove unused platform data file
Vladimir Zapolskiy [Wed, 7 Sep 2016 23:58:32 +0000 (02:58 +0300)] 
gpio: lpc32xx: remove unused platform data file

ARM LPC32xx platform is device-tree only, there is no need to keep
a file with GPIO platform data structures, however some of macro
definitions should be moved to the driver code, which is the only user
of the removed header file.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agopinctrl/at91: Don't provide a default trigger type
Marc Zyngier [Tue, 6 Sep 2016 13:58:15 +0000 (14:58 +0100)] 
pinctrl/at91: Don't provide a default trigger type

at91 used to set a default trigger type for GPIO interrupts in
order to cope with the old board files. These days are long gone,
and it all gets probed through DT.

Andras Szemzo reported that the Ethernet device on his board was
bailing to be probed, due to a conflict in interrupt trigger.
Surely enough, this is due to this default trigger still being
present, and turning this into a IRQ_TYPE_NONE fixes the issue.

Reported-by: Andras Szemzo <szemzo.andras@gmail.com>
Tested-by: Andras Szemzo <szemzo.andras@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 years agommc: sdhci-brcmstb: Fix incorrect capability
Jaedon Shin [Fri, 9 Sep 2016 02:08:40 +0000 (11:08 +0900)] 
mmc: sdhci-brcmstb: Fix incorrect capability

Clear incorrect SDHCI_CAN_64BIT capability on Broadcom MIPS based SoCs.
The MIPS based SoCs are using ADMA only, but the several SoCs have the
incorrect capability bit about ADMA 64-bit. The "brcm,bcm7425-sdhci" is
compatible string for MIPS based SoC.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
7 years agommc: DT: sdhci-brcmstb: Bindings document for common sdhci-brcmstb
Jaedon Shin [Fri, 9 Sep 2016 02:08:39 +0000 (11:08 +0900)] 
mmc: DT: sdhci-brcmstb: Bindings document for common sdhci-brcmstb

Changes to the DT binding document to separate the BCM7425 and the
BCM7445.

A compatible string "brcm,bcm7425-sdhci" was representing the BCM7425
SDHCI host controller with all BRCMSTB SoCs including the BCM7445. Now
it should be separated because vary a bit in initialize each host
controller.

- Renames the DT binding document to common name.
- Adds a compatible string "brcm,bcm7445-sdhci" that is representing the
  BCM7445 with thereafter 28nm generation ARM based SoCs.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
7 years agostaging: unisys: visorbus: cleanup include listings
David Kershner [Fri, 2 Sep 2016 20:41:45 +0000 (16:41 -0400)] 
staging: unisys: visorbus: cleanup include listings

Cleaned up include section of files so that they only
include the files needed by them. If an include file includes
the file already don't repeat it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visorbus: merge guestlinuxdebug with vmcallinterface.h
David Kershner [Fri, 2 Sep 2016 20:41:44 +0000 (16:41 -0400)] 
staging: unisys: visorbus: merge guestlinuxdebug with vmcallinterface.h

Merge guestlinuxdebug into vmcallinterface.h since it is dependent on it

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: remove check for GNUC
David Kershner [Fri, 2 Sep 2016 20:41:43 +0000 (16:41 -0400)] 
staging: unisys: remove check for GNUC

The check for GNUC is redundant and is not needed for vmcallinterface.h.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visorbus: Move non global guestlinuxdebug to visorbus
David Kershner [Fri, 2 Sep 2016 20:41:42 +0000 (16:41 -0400)] 
staging: unisys: visorbus: Move non global guestlinuxdebug to visorbus

Guestlinuxdebug.h is only used by visorbus, move the include file
into its directory instead of the global one.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This page took 0.052324 seconds and 5 git commands to generate.