1
0
Fork 0
Commit Graph

454922 Commits (9898e1ccf5af70ad2d03d5b77c591fb243c0f021)

Author SHA1 Message Date
Lars-Peter Clausen 9898e1ccf5 ASoC: Remove per card platform list
The platform_dev_list was added in commit f0fba2ad1b ("ASoC: multi-component -
ASoC Multi-Component Support") and while platforms are added and remove from
that list it is otherwise unused. This patch removes it again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-22 23:15:57 +01:00
Lars-Peter Clausen 3d9501aff3 ASoC: Remove unused 'r' variable from dapm_connect_dai_link_widgets()
It was accidentally added in commit 44ba2641 ("ASoC: dapm: Add support for DAI
multicodec").

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-17 10:12:42 +01:00
Benoit Cousson 93e6958a36 ASoC: pcm: Add soc_dai_hw_params helper
Add a function helper to factorize the hw_params code.

Suggested by Lars-Peter Clausen <lars@metafoo.de>

Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-16 23:06:27 +01:00
Benoit Cousson 8151d5e602 ASoC: compress: Prevent multicodec for compressed stream
Multiple codecs does not make sense in the case of compressed
stream.

Exit with error if it happens.

Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-16 23:06:27 +01:00
Benoit Cousson 44ba2641b7 ASoC: dapm: Add support for DAI multicodec
Add multicodec support in soc-dapm.c

Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-16 23:06:26 +01:00
Benoit Cousson 2e5894d737 ASoC: pcm: Add support for DAI multicodec
Add multicodec support in soc-pcm.c

Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-16 23:04:52 +01:00
Benoit Cousson 88bd870f02 ASoC: core: Add initial support for DAI multicodec
DAI link assumes a one to one mapping between CPU DAI and CODEC. In
some cases, the same CPU DAI can be connected to several codecs.
This is the case for example, if you connect two mono codecs to the
same I2S link in order to have a stereo card.
The current ASoC implementation does not allow such setup.

Add support for DAI links composed of a single CPU DAI and multiple
CODECs. Sound cards have to pass the CODECs array in the corresponding
DAI link through a new 'snd_soc_dai_link_component' struct. Each CODEC in
this array is described in the same manner single CODEC DAIs are
(either DT/OF node or codec_name).

Multi-codec links are not supported in the case of CODEC to CODEC links.
Just print a warning if it happens.

Based on an original code done by Misael.

Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-16 22:58:49 +01:00
Mark Brown f7acb3694a Merge remote-tracking branch 'asoc/topic/component' into asoc-multi 2014-07-16 22:58:45 +01:00
Lars-Peter Clausen 5f3484ac87 ASoC: core: Move non-shared code paths out of snd_soc_post_component_init()
There are two call sites for snd_soc_post_component_init(), one passes 0 and the
other 1 for the 'dailess' parameter of snd_soc_post_component_init(). Depending
on whether 'dailess' is 0 or 1 snd_soc_post_component_init() runs different code
at the beginning and the end of the function. The patch moves this conditional
code out of snd_soc_post_component_init() and into the call sites. This removes
the need for snd_soc_post_component_init() to know whether it is called for a
DAI link or a aux dev.

Also do the initialization of rtd->card when the rtd struct is allocated.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-02 21:24:13 +01:00
Lars-Peter Clausen 44c69bb139 ASoC: core: Bind aux devs early
Currently in snd_soc_instantiate_card() we only check if the aux dev exists, but
do not yet assign it to its rtd. This means that we need to lookup the aux dev
again in soc_probe_aux_dev(). This patch changes the behavior to assign the aux
dev to the rtd in soc_check_aux_dev() (and renames it to soc_bind_aux_dev()).
This simplifies the implementation a bit and also removes the need for
soc_post_component_init() to know about the specific CODEC that was assigned to
the rtd. The later is necessary for componentization as the code should work for
all types of components not just CODECs. This new behavior is also more in sync
with how soc_bind_dai_link()/soc_probe_link_dais() works.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-02 21:24:10 +01:00
Lars-Peter Clausen 48f466d112 ASoC: core: Replace soc_find_matching_codec() with soc_find_codec()
soc_find_matching_codec() works in the same way as soc_find_codec() except that
it only works for auxdevs. It can easily be replaced by the generic
soc_find_codec().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-02 21:24:07 +01:00
Lars-Peter Clausen b8257be5ff ASoC: core: Remove duplicated rtd->codec initialization
rtd->codec is already initialized in soc_bind_dai_link(), so there is no need to
do it again in soc_dai_link_init(). Removing the rtd->codec initialization from
soc_dai_link_init() also removes the need for soc_dai_link_init() to know about
the CODEC at all.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-02 21:24:04 +01:00
Benoit Cousson c8dd1fec47 ASoC: pcm: Refactor soc_pcm_apply_msb for multicodecs
Refactor the function to facilitate the migration to
multiple codecs.

Fix a trailing space in the header as well.

No functional change.

Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-01 18:20:07 +01:00
Benoit Cousson 3f901a028f ASoC: core: Change soc_link_dai_widgets signature for multiple codecs
Since multiple codecs DAI will be usable in the future, remove
explicit unique codec_dai and cpu_dai parameters.
Replace them with snd_soc_pcm_runtime pointer that will contain
every instances.

No functionale change.

Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-01 18:17:22 +01:00
Mark Brown 211bcc6c3a Merge remote-tracking branch 'asoc/fix/debugfs' into asoc-component
Conflicts:
	sound/soc/soc-core.c
2014-06-28 14:47:12 +01:00
Russell King e73f3de5c5 ASoC: fix debugfs directory creation bug
Avoid creating duplicate directories by prefixing codecs and platforms
with their separate identifiers.  This avoids snd-soc-dummy (which can
appear both as a dummy platform and a dummy codec on the same card)
from clashing.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28 13:45:39 +01:00
Lars-Peter Clausen 88a8fe3df6 ASoC: dapm: Remove platform field from widget and dapm context struct
The platform field in the snd_soc_dapm_widget and snd_soc_dapm_context structs
is now unused can be removed. New code that wants to get the platform for a
widget or dapm context should use snd_soc_dapm_to_platform(w->dapm) or
snd_soc_dapm_to_platform(dapm).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:36:09 +01:00
Lars-Peter Clausen 9420d97b3f ASoC: dapm: Remove DAI DAPM context
The DAI DAPM context was added in commit be09ad90 ("ASoC: core: Add platform DAI
widget mapping") and the only user was removed again in commit ae10e7e8f ("ASoC:
core: Only add platform DAI widgets once."). Now that we have a per component
DAPM context it is unlikely that we'll need the DAI DAPM context again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:36:08 +01:00
Lars-Peter Clausen 14e8bdebfb ASoC: Add component level stream_event() and seq_notifier() support
This patch adds stream_event() and seq_notifier() callbacks similar to those
found in the snd_soc_codec_driver and snd_soc_platform driver struct to the
snd_soc_component_driver struct. This is meant to unify the handling of these
callbacks across different types of components and will eventually allow their
removal from the CODEC and platfrom driver structs.

The new callbacks are slightly different from the old ones in that they take a
snd_soc_component as a parameter rather than a snd_soc_dapm_context. This was
done since otherwise casting from the DAPM context to the component would
typically be the first thing to do in the callback. And the interface becomes
slightly cleaner by passing a snd_soc_component to all callbacks in the
snd_soc_component_driver struct.

The patch also already removes the stream_event() callback from the
snd_soc_codec_driver and snd_soc_platform_driver structs as it is currently
unused.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:34:15 +01:00
Lars-Peter Clausen bc9af9fa9b ASoC: Use component DAPM context for platforms
The snd_soc_platform dapm field is not accessed outside of the ASoC core. Switch
it over to using the snd_soc_component DAPM context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:34:15 +01:00
Lars-Peter Clausen ce0fc93ae5 ASoC: Add DAPM support at the component level
This patch adds full DAPM support at the component level. Previously there was
only full DAPM support for CODECs and partial DAPM support (e.g. no Mixers nor
MUXs) for platforms. Having DAPM support at the component level will allow all
types of components to use DAPM and also help in consolidating the DAPM support
between CODECs and platforms.

Since the DAPM context is directly embedded into the snd_soc_codec and
snd_soc_platform struct and the 'dapm' field is directly referenced in a lot of
drivers moving the field just right now is not possible without causing code
churn. The approach this patch takes is to add two new fields to the component
struct. One field which is the pointer to the actual DAPM context used by the
component and one DAPM context that will be used as the default if no other
context was specified. For CODECs and platforms the pointer is initialized to
point to the CODEC or platform DAPM context. All generic code when referencing
a component's DAPM struct will go via the pointer. This will make it possible to
eventually seamlessly move the DAPM context from snd_soc_codec and
snd_soc_platform struct over once all direct references have been eliminated.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:34:15 +01:00
Lars-Peter Clausen 68f831c272 ASoC: Add a set_bias_level() callback to the DAPM context struct
Currently the DAPM code directly looks at the CODEC driver struct to get a
handle to the set_bias_level() callback. This patch adds a new set_bias_level()
callback to the DAPM context struct. The DAPM code will use this new callback
instead of the CODEC callback. For CODECs the new callback is set up to call the
CODEC specific set_bias_level callback(). Not looking directly at the CODEC
driver struct will allow non CODEC DAPM contexts to implement a set_bias_level()
callback.

This is also similar to how the seq_notifier() and stream_event() callbacks are
currently handled.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:34:15 +01:00
Mark Brown 647d62d9ff Merge remote-tracking branch 'asoc/fix/core' into asoc-component 2014-06-21 21:33:18 +01:00
Lars-Peter Clausen 7df3788410 ASoC: Auto disconnect pins from all DAPM contexts
Currently only pins in CODEC DAPM contexts are automatically marked as
non-connected if the card has the fully_routed flag set. This makes sense since
widgets which qualify for auto-disconnection are only found in CODEC DAPM
contexts. But with componentisation this is going to change, so consider all
widgets for auto-disconnection.

Also it is probably faster to walk the widgets list only once rather than once
for each CODEC.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:06:56 +01:00
Lars-Peter Clausen bb13109d85 ASoC: Split component registration into two steps
Split snd_soc_component_register() into snd_soc_component_initialize() and
snd_soc_component_add(). Using a 2-stage registration approach has the advantage
that it is possible to modify the component after it has been initialized, but
before it is made visible to the system. This e.g. allows CODECs or platforms to
overwrite some of the default settings made in snd_soc_component_initialize().

Similar snd_soc_component_unregister() is split into two steps as well,
snd_soc_component_delete(), which removes the component from the system, and
snd_soc_component_cleanup(), which frees all the resources allocated by the
component.

Furthermore this patch makes sure that if a component is visible on two list
(e.g. the component list and the CODEC list) it is added or removed to both
lists atomically.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:05:13 +01:00
Lars-Peter Clausen f4333203ec ASoC: Move name and id from CODEC/platform to component
The component struct already has a name and id field which are initialized to
the same values as the same fields in the CODEC and platform structs. So remove
them from the CODEC and platform structs and used the ones from the component
struct instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:04:24 +01:00
Lars-Peter Clausen 94f99c875c ASoC: Move name_prefix from CODEC to component
Move the name_prefix from the CODEC struct to the component struct. This will
eventually allow to specify prefixes for all types of components. It is also
necessary to make the DAPM code component type independent (i.e. a DAPM context
does not need to know whether it belongs to a CODEC or a platform or something
else).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:03:22 +01:00
Linus Torvalds 7171511eae Linux 3.16-rc1 2014-06-15 17:45:28 -10:00
Linus Torvalds a9be22425e Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) Fix checksumming regressions, from Tom Herbert.

 2) Undo unintentional permissions changes for SCTP rto_alpha and
    rto_beta sysfs knobs, from Denial Borkmann.

 3) VXLAN, like other IP tunnels, should advertize it's encapsulation
    size using dev->needed_headroom instead of dev->hard_header_len.
    From Cong Wang.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  net: sctp: fix permissions for rto_alpha and rto_beta knobs
  vxlan: Checksum fixes
  net: add skb_pop_rcv_encapsulation
  udp: call __skb_checksum_complete when doing full checksum
  net: Fix save software checksum complete
  net: Fix GSO constants to match NETIF flags
  udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup
  vxlan: use dev->needed_headroom instead of dev->hard_header_len
  MAINTAINERS: update cxgb4 maintainer
2014-06-15 16:37:03 -10:00
Linus Torvalds dd1845af24 This pull request contains the second half the of the clk changes for
3.16. They are simply fixes and code refactoring for the OMAP clock
 drivers. The sunxi clock driver changes include splitting out the one
 mega-driver into several smaller pieces and adding support for the A31
 SoC clocks.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTnHqfAAoJEDqPOy9afJhJnI0P/1PvRHx7bmwNAD8b09pAVm2u
 xTmhiH+zfHcRtKivKCAxFQ4FlkS3v69RB9FC+s6FIgn984K3FjkHRW2zgqe3K2h3
 7tj6EoT6XJ6szK4AWDy/GVqekRF9kyADexSiYI4rIRP0rnSswvBKHZ485OR06Fs+
 Jls0EMbGOEzMyB/B+pDNnTOznZOSd+lZbBznSh1zG+8QHQEzXwxPRr+G0/jxneO/
 rTqUvDRqGC709YIaa+oBCH5ez/wVwrU68u/CpmrLQIPdFfaWl7YhYy/ZicwwJprE
 Oi1AlQpRoBe1yYIz6oJ//+4D6b9Y/e6cqG4P37VhF6PiD9yDyN+ycEtGMqxNXjIa
 OMGlairEU6V43ZrP/wDWvX6NLP7LCEqOG/PSo8zjuoZ/G1kw2jo6firRI5TVR/bY
 uARHkBTUYQGjvwBU3QoLuHf+pOPAeBXfYVsi2n/b+HSueXkPQW+HdH4erktlahPh
 2xkVhEDbMfCOeovOGcZhsQ8aDUIDUjZTJE7uU633DjsHY7P96OTRBHF8qirNpuOx
 0GkAVOsFBU7wMt8tcO4it00i7z6PEKwqDIZBNQVq2F2DnOS9WTTcop7dmYPz95qp
 8qTZIN++ROWaxok0H5SL7ER22GIJlTuGGynwPK5Aa/6v193rUW9pEZPlr7wYSf8u
 RwP/J6OfN9t/rKxCsFCj
 =9/Iv
 -----END PGP SIGNATURE-----

Merge tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux

Pull more clock framework updates from Mike Turquette:
 "This contains the second half the of the clk changes for 3.16.

  They are simply fixes and code refactoring for the OMAP clock drivers.
  The sunxi clock driver changes include splitting out the one
  mega-driver into several smaller pieces and adding support for the A31
  SoC clocks"

* tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux: (25 commits)
  clk: sunxi: document PRCM clock compatible strings
  clk: sunxi: add PRCM (Power/Reset/Clock Management) clks support
  clk: sun6i: Protect SDRAM gating bit
  clk: sun6i: Protect CPU clock
  clk: sunxi: Rework clock protection code
  clk: sunxi: Move the GMAC clock to a file of its own
  clk: sunxi: Move the 24M oscillator to a file of its own
  clk: sunxi: Remove calls to clk_put
  clk: sunxi: document new A31 USB clock compatible
  clk: sunxi: Implement A31 USB clock
  ARM: dts: OMAP5/DRA7: use omap5-mpu-dpll-clock capable of dealing with higher frequencies
  CLK: TI: dpll: support OMAP5 MPU DPLL that need special handling for higher frequencies
  ARM: OMAP5+: dpll: support Duty Cycle Correction(DCC)
  CLK: TI: clk-54xx: Set the rate for dpll_abe_m2x2_ck
  CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)
  dt:/bindings: DRA7 ATL (Audio Tracking Logic) clock bindings
  ARM: dts: dra7xx-clocks: Correct name for atl clkin3 clock
  CLK: TI: gate: add composite interface clock to OMAP2 only build
  ARM: OMAP2: clock: add DT boot support for cpufreq_ck
  CLK: TI: OMAP2: add clock init support
  ...
2014-06-15 16:02:20 -10:00
Linus Torvalds b55b390202 Merge git://git.infradead.org/users/willy/linux-nvme
Pull NVMe update from Matthew Wilcox:
 "Mostly bugfixes again for the NVMe driver.  I'd like to call out the
  exported tracepoint in the block layer; I believe Keith has cleared
  this with Jens.

  We've had a few reports from people who're really pounding on NVMe
  devices at scale, hence the timeout changes (and new module
  parameters), hotplug cpu deadlock, tracepoints, and minor performance
  tweaks"

[ Jens hadn't seen that tracepoint thing, but is ok with it - it will
  end up going away when mq conversion happens ]

* git://git.infradead.org/users/willy/linux-nvme: (22 commits)
  NVMe: Fix START_STOP_UNIT Scsi->NVMe translation.
  NVMe: Use Log Page constants in SCSI emulation
  NVMe: Define Log Page constants
  NVMe: Fix hot cpu notification dead lock
  NVMe: Rename io_timeout to nvme_io_timeout
  NVMe: Use last bytes of f/w rev SCSI Inquiry
  NVMe: Adhere to request queue block accounting enable/disable
  NVMe: Fix nvme get/put queue semantics
  NVMe: Delete NVME_GET_FEAT_TEMP_THRESH
  NVMe: Make admin timeout a module parameter
  NVMe: Make iod bio timeout a parameter
  NVMe: Prevent possible NULL pointer dereference
  NVMe: Fix the buffer size passed in GetLogPage(CDW10.NUMD)
  NVMe: Update data structures for NVMe 1.2
  NVMe: Enable BUILD_BUG_ON checks
  NVMe: Update namespace and controller identify structures to the 1.1a spec
  NVMe: Flush with data support
  NVMe: Configure support for block flush
  NVMe: Add tracepoints
  NVMe: Protect against badly formatted CQEs
  ...
2014-06-15 15:58:03 -10:00
Daniel Borkmann b58537a1f5 net: sctp: fix permissions for rto_alpha and rto_beta knobs
Commit 3fd091e73b ("[SCTP]: Remove multiple levels of msecs
to jiffies conversions.") has silently changed permissions for
rto_alpha and rto_beta knobs from 0644 to 0444. The purpose of
this was to discourage users from tweaking rto_alpha and
rto_beta knobs in production environments since they are key
to correctly compute rtt/srtt.

RFC4960 under section 6.3.1. RTO Calculation says regarding
rto_alpha and rto_beta under rule C3 and C4:

  [...]
  C3)  When a new RTT measurement R' is made, set

       RTTVAR <- (1 - RTO.Beta) * RTTVAR + RTO.Beta * |SRTT - R'|

       and

       SRTT <- (1 - RTO.Alpha) * SRTT + RTO.Alpha * R'

       Note: The value of SRTT used in the update to RTTVAR
       is its value before updating SRTT itself using the
       second assignment. After the computation, update
       RTO <- SRTT + 4 * RTTVAR.

  C4)  When data is in flight and when allowed by rule C5
       below, a new RTT measurement MUST be made each round
       trip. Furthermore, new RTT measurements SHOULD be
       made no more than once per round trip for a given
       destination transport address. There are two reasons
       for this recommendation: First, it appears that
       measuring more frequently often does not in practice
       yield any significant benefit [ALLMAN99]; second,
       if measurements are made more often, then the values
       of RTO.Alpha and RTO.Beta in rule C3 above should be
       adjusted so that SRTT and RTTVAR still adjust to
       changes at roughly the same rate (in terms of how many
       round trips it takes them to reflect new values) as
       they would if making only one measurement per
       round-trip and using RTO.Alpha and RTO.Beta as given
       in rule C3. However, the exact nature of these
       adjustments remains a research issue.
  [...]

While it is discouraged to adjust rto_alpha and rto_beta
and not further specified how to adjust them, the RFC also
doesn't explicitly forbid it, but rather gives a RECOMMENDED
default value (rto_alpha=3, rto_beta=2). We have a couple
of users relying on the old permissions before they got
changed. That said, if someone really has the urge to adjust
them, we could allow it with a warning in the log.

Fixes: 3fd091e73b ("[SCTP]: Remove multiple levels of msecs to jiffies conversions.")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15 01:17:32 -07:00
David S. Miller e4f7ae930a Merge branch 'csum_fixes'
Tom Herbert says:

====================
Fixes related to some recent checksum modifications.

- Fix GSO constants to match NETIF flags
- Fix logic in saving checksum complete in __skb_checksum_complete
- Call __skb_checksum_complete from UDP if we are checksumming over
  whole packet in order to save checksum.
- Fixes to VXLAN to work correctly with checksum complete
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15 01:00:56 -07:00
Tom Herbert f79b064c15 vxlan: Checksum fixes
Call skb_pop_rcv_encapsulation and postpull_rcsum for the Ethernet
header to work properly with checksum complete.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15 01:00:50 -07:00
Tom Herbert e5eb4e30a5 net: add skb_pop_rcv_encapsulation
This function is used by UDP encapsulation protocols in RX when
crossing encapsulation boundary. If ip_summed is set to
CHECKSUM_UNNECESSARY and encapsulation is not set, change to
CHECKSUM_NONE since the checksum has not been validated within the
encapsulation. Clears csum_valid by the same rationale.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15 01:00:50 -07:00
Tom Herbert bbdff225ed udp: call __skb_checksum_complete when doing full checksum
In __udp_lib_checksum_complete check if checksum is being done over all
the data (len is equal to skb->len) and if it is call
__skb_checksum_complete instead of __skb_checksum_complete_head. This
allows checksum to be saved in checksum complete.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15 01:00:49 -07:00
Tom Herbert 46fb51eb96 net: Fix save software checksum complete
Geert reported issues regarding checksum complete and UDP.
The logic introduced in commit 7e3cead517
("net: Save software checksum complete") is not correct.

This patch:
1) Restores code in __skb_checksum_complete_header except for setting
   CHECKSUM_UNNECESSARY. This function may be calculating checksum on
   something less than skb->len.
2) Adds saving checksum to __skb_checksum_complete. The full packet
   checksum 0..skb->len is calculated without adding in pseudo header.
   This value is saved in skb->csum and then the pseudo header is added
   to that to derive the checksum for validation.
3) In both __skb_checksum_complete_header and __skb_checksum_complete,
   set skb->csum_valid to whether checksum of zero was computed. This
   allows skb_csum_unnecessary to return true without changing to
   CHECKSUM_UNNECESSARY which was done previously.
4) Copy new csum related bits in __copy_skb_header.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15 01:00:49 -07:00
Tom Herbert 4b28252cad net: Fix GSO constants to match NETIF flags
Joseph Gasparakis reported that VXLAN GSO offload stopped working with
i40e device after recent UDP changes. The problem is that the
SKB_GSO_* bits are out of sync with the corresponding NETIF flags. This
patch fixes that. Also, we add BUILD_BUG_ONs in net_gso_ok for several
GSO constants that were missing to avoid the problem in the future.

Reported-by: Joseph Gasparakis <joseph.gasparakis@intel.com>
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15 01:00:49 -07:00
Linus Torvalds abf04af74a SCSI for-linus on 20140613
This is just a couple of drivers (hpsa and lpfc) that got left out for further
 testing in linux-next.  We also have one fix to a prior submission (qla2xxx
 sparse).
 
 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQEcBAABAgAGBQJTm48MAAoJEDeqqVYsXL0M1YEH/iZyEILT4EIZxre/tspqX/LB
 dxtGlmlF8AEU8/Eze3k/OB5nSuGcnYZ1hN1CgT2zZEv+sih6FekQOQV06qTwzwbo
 DnWA3dOrPVgMzzSVvXFEjryroIUNhZvMy8TGu+DefE9b6FUs6B3VZlMR3A+TcSgV
 cgknkG2Q6mWN8rO44pTSVlVDe2JpkvCYsHnqhO8uneQXVHNtsPpV7FfoLMLjBUDX
 dgsaDiUjyrj0sdR1yOgRjDH68FPewEiEONdtKi63kkI6zWDFASiKDY9yc1eIyjVd
 /1gbBJxwTRl4dWEdsigr/pOBxs6yjXGBSl/6PPDtuvdpWLFWUg4C2XtDLz0KLfU=
 =tdDT
 -----END PGP SIGNATURE-----

Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull more SCSI updates from James Bottomley:
 "This is just a couple of drivers (hpsa and lpfc) that got left out for
  further testing in linux-next.  We also have one fix to a prior
  submission (qla2xxx sparse)"

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (36 commits)
  qla2xxx: fix sparse warnings introduced by previous target mode t10-dif patch
  lpfc: Update lpfc version to driver version 10.2.8001.0
  lpfc: Fix ExpressLane priority setup
  lpfc: mark old devices as obsolete
  lpfc: Fix for initializing RRQ bitmap
  lpfc: Fix for cleaning up stale ring flag and sp_queue_event entries
  lpfc: Update lpfc version to driver version 10.2.8000.0
  lpfc: Update Copyright on changed files from 8.3.45 patches
  lpfc: Update Copyright on changed files
  lpfc: Fixed locking for scsi task management commands
  lpfc: Convert runtime references to old xlane cfg param to fof cfg param
  lpfc: Fix FW dump using sysfs
  lpfc: Fix SLI4 s abort loop to process all FCP rings and under ring_lock
  lpfc: Fixed kernel panic in lpfc_abort_handler
  lpfc: Fix locking for postbufq when freeing
  lpfc: Fix locking for lpfc_hba_down_post
  lpfc: Fix dynamic transitions of FirstBurst from on to off
  hpsa: fix handling of hpsa_volume_offline return value
  hpsa: return -ENOMEM not -1 on kzalloc failure in hpsa_get_device_id
  hpsa: remove messages about volume status VPD inquiry page not supported
  ...
2014-06-14 19:49:48 -05:00
Linus Torvalds 16d52ef7c0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull more btrfs updates from Chris Mason:
 "This has a few fixes since our last pull and a new ioctl for doing
  btree searches from userland.  It's very similar to the existing
  ioctl, but lets us return larger items back down to the app"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs: fix error handling in create_pending_snapshot
  btrfs: fix use of uninit "ret" in end_extent_writepage()
  btrfs: free ulist in qgroup_shared_accounting() error path
  Btrfs: fix qgroups sanity test crash or hang
  btrfs: prevent RCU warning when dereferencing radix tree slot
  Btrfs: fix unfinished readahead thread for raid5/6 degraded mounting
  btrfs: new ioctl TREE_SEARCH_V2
  btrfs: tree_search, search_ioctl: direct copy to userspace
  btrfs: new function read_extent_buffer_to_user
  btrfs: tree_search, copy_to_sk: return needed size on EOVERFLOW
  btrfs: tree_search, copy_to_sk: return EOVERFLOW for too small buffer
  btrfs: tree_search, search_ioctl: accept varying buffer
  btrfs: tree_search: eliminate redundant nr_items check
2014-06-14 19:48:43 -05:00
Linus Torvalds a311c48038 Merge git://git.kvack.org/~bcrl/aio-next
Pull aio fix and cleanups from Ben LaHaise:
 "This consists of a couple of code cleanups plus a minor bug fix"

* git://git.kvack.org/~bcrl/aio-next:
  aio: cleanup: flatten kill_ioctx()
  aio: report error from io_destroy() when threads race in io_destroy()
  fs/aio.c: Remove ctx parameter in kiocb_cancel
2014-06-14 19:43:27 -05:00
Al Viro 05064084e8 fix __swap_writepage() compile failure on old gcc versions
Tetsuo Handa wrote:
 "Commit 62a8067a7f ("bio_vec-backed iov_iter") introduced an unnamed
  union inside a struct which gcc-4.4.7 cannot handle.  Name the unnamed
   union as u in order to fix build failure"

Let's do this instead: there is only one place in the entire tree that
steps into this breakage.  Anon structs and unions work in older gcc
versions; as the matter of fact, we have those in the tree - see e.g.
struct ieee80211_tx_info in include/net/mac80211.h

What doesn't work is handling their initializers:

struct {
	int a;
	union {
		int b;
		char c;
	};
} x[2] = {{.a = 1, .c = 'a'}, {.a = 0, .b = 1}};

is the obvious syntax for initializer, perfectly fine for C11 and
handled correctly by gcc-4.7 or later.

Earlier versions, though, break on it - declaration is fine and so's
access to fields (i.e.  x[0].c = 'a'; would produce the right code), but
members of the anon structs and unions are not inserted into the right
namespace.  Tellingly, those older versions will not barf on struct {int
a; struct {int a;};}; - looks like they just have it hacked up somewhere
around the handling of .  and -> instead of doing the right thing.

The easiest way to deal with that crap is to turn initialization of
those fields (in the only place where we have such initializer of
iov_iter) into plain assignment.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-14 19:30:48 -05:00
Linus Torvalds 4a54e5e517 HSI Fixes for the v3.16 series:
* Tighten Dependency between ssi-protocol and omap-ssi
   to fix build failures with randconfig.
 * Use normal module refcounting in omap driver to fix
   build with disabled module support.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCgAGBQJTm50dAAoJENju1/PIO/qaI54P/ix0jMNYUJTHgEuPa8uifJY8
 ZJBvE1jdb9k4keOaQvD5d0B0ExEBzfaBKzmSIGOlfREPcR2o7m20psLNXkkfsSbj
 6jquDEp7ObOGgGdQ+3OebXRE+4qZm91H5AmX+8VMPbcxhcjLYvfn73T6dCbl/Wo/
 y0VY2gGdUGQ0uQLcQ8WIeVah0mlmQ2lVbpVakG9cfDE+0yVYzb86xvepBvqzeMei
 0xGmJo/dXQegLpS//uqSW6S9ds6BFPBvptLJjjQ1wOGdcBxe6ADkcu9VYZFv0FaN
 XnD10FaKnRZROYTAC+9w7XksT4WsAwuuGRySrn2H12Da5XCxjTrGMCUnNgKc4HhO
 cERQDdgtBe8+8wPD7kTnhYSzWWqQTBelwucmTuO1jecIa3vC6DA8UuMPKLE7K8Qs
 g7MelhcT7aw3Clmgbvg11oH7YAfFnis9/fJ3Bq2wgKivfbEik++BjE1P8lVB2uVK
 UXrLsEgSwEDQV3wLW4bpHO1NO8XtVFmkoBoxCWRKOYouhVlkucyt8HYi1pPwnhcq
 hjxtXN7pUgf7lnFeeS7CH5xbZSkIkBHjUS3mmTPr5AKgsqYpNlyP8jMt7GTTZGXX
 LzOS0VDAi73vl08k1yiLRDAhu7iZwKMk8+arTP3iYhzmk7OI/9gMB+pRf+zPGp6B
 ADWLvkEREuu1zw6Ob4wp
 =BKDp
 -----END PGP SIGNATURE-----

Merge tag 'hsi-for-3.16-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi

Pull HSI build fixes from Sebastian Reichel:
 - tighten dependency between ssi-protocol and omap-ssi to fix build
   failures with randconfig.
 - use normal module refcounting in omap driver to fix build with
   disabled module support

* tag 'hsi-for-3.16-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
  hsi: omap_ssi_port: use normal module refcounting
  HSI: fix omap ssi driver dependency
2014-06-14 14:51:25 -07:00
Linus Torvalds 1ad96bb0a2 A first GPIO fix for the v3.16 series, this was serious since
it blocks the OMAP boot.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTm3A3AAoJEEEQszewGV1zFMoQAKFQR8bkDzG0iyzuQ6h6921Y
 Lj7KgIlwQvLNqHIz/MznVGprhIkUwtIs9BMeUzkkDhuhjWtXnMU7JgUMRAch4gwL
 aU2IlNkhYQlXRRJpZbCaOUYZ8veIJR+Ax0qnNvGF+rwqCCYi0sHJGAEKiCuprZNI
 dQcNG0AtSEmysV9pW+ikVnN6ehblussaHCfTdG8xf+kuzcEW5n0QpbN7YiwIBcFW
 bmZdELxDEBPA+zWGw2STZ0rCLc4PI3hdVmD84sIClbg0mLuE75piHS+MHM36aEGJ
 GUTFyI1DZRjam6KH3L1GhaQsYS6NwfTumoArjf/8O/xBe+WTt6roauWWn6wavk+m
 W64Syj8yibfhcI28ZdH6lvS0uwvqWrUeApgihDagoJsVmb5NOP+eMRXVRZsY3k0n
 qtO3AzwL77b95CUwuuWMW/4wmBsdiN+KPunCVgHXz41FBsL9wmPv1gHIKh80NJCP
 WKi++fSjbKeJZ5p5l8xQ2J04CbiYeJic6dr8+4KldI/RtO12rUQ/C2tv1NiXnv1l
 YvOqSVRuM0JOnbk2SRzT0HIEJ3I36t+QE5DWxQawAv2RIrWlWF1kKlZZ7PfBywxl
 l2GTo7eHusHU4CVxYOL63r+NFanjDbLUrLgZZ8VsGYc9FWgAoo4eiqku2iNFVMuz
 V/zxEhDuhKqN/gnAVkNI
 =6SvI
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fix from Linus Walleij:
 "A first GPIO fix for the v3.16 series, this was serious since it
  blocks the OMAP boot.

  Sending you this vital fix before leaving for a short vacation so it
  does not sit collecting dust in my tree for no good reason.

  Apart from this, our v3.16 cycle looks like a good start"

* tag 'gpio-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: of: Fix handling for deferred probe for -gpio suffix
2014-06-14 14:49:51 -07:00
Linus Torvalds c728762e06 Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 vdso fixes from Peter Anvin:
 "Fixes for x86/vdso.

  One is a simple build fix for bigendian hosts, one is to make "make
  vdso_install" work again, and the rest is about working around a bug
  in Google's Go language -- two are documentation patches that improves
  the sample code that the Go coders took, modified, and broke; the
  other two implements a workaround that keeps existing Go binaries from
  segfaulting at least"

* 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/vdso: Fix vdso_install
  x86/vdso: Hack to keep 64-bit Go programs working
  x86/vdso: Add PUT_LE to store little-endian values
  x86/vdso/doc: Make vDSO examples more portable
  x86/vdso/doc: Rename vdso_test.c to vdso_standalone_test_x86.c
  x86, vdso: Remove one final use of htole16()
2014-06-14 14:46:29 -07:00
Linus Torvalds 503698e12d New driver for Sensirion SHTC1 humidity / temperature sensor
Convert ltc4151 and vexpress drivers to use devm functions
 Drop generic chip detection from lm85 driver
 Avoid forward declarations in atxp1 driver
 Fix sign extensions in ina2xx driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTmckcAAoJEMsfJm/On5mBjioP/A0gxpRxfC28kuIj2R2k6iQg
 F+13HggU6y8AfVg1+ITDVlt29IPsyr4C48OE3Vi7NkASON0uBykE2Yaw3fOxnlDn
 DHzOXPzB2sZimvrOVeb0ZwYaTfe3nu/MwwFTFOyoIdImZVCvluJ0ZaeEDuboSHty
 q8grWKxHw6bxJJFUM1c1Q2xZm/yr5LL9WXHBIDFhv4/ZUOcpOhfLPPiXpD/KpPsM
 dLfumbgyUOCbQraX+5p+8PovcnUa7NS3sQHKvQGm9M+K1pXMJubmtzUn3huga1zx
 ZrV0zlZpwANhsuOyEVPuceOuhCyD9a9C7mRhL3AMPtJw2fiIzhctxGuSJ5hkpm4i
 okzpyD2eX7UsKWNJcIAbFsBdsFBaZV1kN7A3ERdnSiHwkvUnxExWUKY3DLTaja+A
 ilY3+AkRMqy/BfVd2Odjh2EkF3YaWhSUU5YLZipkGkHAJU5aAt9Kde7U+nhJJ5Oe
 AHt/q8buDkH82X+F5rS7L60KXKARnaGQks3GsqxMopo+ZL3dVGyAgJ4TJ/5RQrPa
 K6yflRV5u2gi1dBZN8Al3118MCNrsqNhkwWCBxY3xAnRaDWeI5EdZKT2nho1aaNw
 06sE8Q5yAaLeFxRtkQuYQew2PVpV8RLKMfDMo+yqQkYKQWE9rRfQNVAdQpFNhpPN
 SuU1GSjWmAs+cjI1MULZ
 =mv/m
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 - new driver for Sensirion SHTC1 humidity / temperature sensor
 - convert ltc4151 and vexpress drivers to use devm functions
 - drop generic chip detection from lm85 driver
 - avoid forward declarations in atxp1 driver
 - fix sign extensions in ina2xx driver

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: vexpress: Use devm helper for hwmon device registration
  hwmon: (atxp1) Avoid forward declaration
  hwmon: add support for Sensirion SHTC1 sensor
  hwmon: (ltc4151) Convert to devm_hwmon_device_register_with_groups
  hwmon: (lm85) Drop generic detection
  hwmon: (ina2xx) Cast to s16 on shunt and current regs
2014-06-14 14:43:23 -07:00
Eric Dumazet 63c6f81cdd udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup
Its too easy to add thousand of UDP sockets on a particular bucket,
and slow down an innocent multicast receiver.

Early demux is supposed to be an optimization, we should avoid spending
too much time in it.

It is interesting to note __udp4_lib_demux_lookup() only tries to
match first socket in the chain.

10 is the threshold we already have in __udp4_lib_lookup() to switch
to secondary hash.

Fixes: 421b3885bf ("udp: ipv4: Add udp early demux")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: David Held <drheld@google.com>
Cc: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-13 15:39:24 -07:00
Cong Wang 2853af6a2e vxlan: use dev->needed_headroom instead of dev->hard_header_len
When we mirror packets from a vxlan tunnel to other device,
the mirror device should see the same packets (that is, without
outer header). Because vxlan tunnel sets dev->hard_header_len,
tcf_mirred() resets mac header back to outer mac, the mirror device
actually sees packets with outer headers

Vxlan tunnel should set dev->needed_headroom instead of
dev->hard_header_len, like what other ip tunnels do. This fixes
the above problem.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: stephen hemminger <stephen@networkplumber.org>
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-13 15:27:59 -07:00
Dimitris Michailidis 56f16c74ca MAINTAINERS: update cxgb4 maintainer
Hari's been doing the patch submissions for a while now and he'll be
taking over as maintainer.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-13 14:55:43 -07:00
Andy Lutomirski a934fb5bc9 x86/vdso: Fix vdso_install
"make vdso_install" installs unstripped versions of the vdso objects
for the benefit of the debugger.  This was broken by checkin:

6f121e548f x86, vdso: Reimplement vdso.so preparation in build-time C

The filenames are different now, so update the Makefile to cope.

This still installs the 64-bit vdso as vdso64.so.  We believe this
will be okay, as the only known user is a patched gdb which is known
to use build-ids, but if it turns out to be a problem we may have to
add a link.

Inspired by a patch from Sam Ravnborg.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: Josh Boyer <jwboyer@fedoraproject.org>
Tested-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/b10299edd8ba98d17e07dafcd895b8ecf4d99eff.1402586707.git.luto@amacapital.net
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-06-13 10:31:48 -07:00