platform/adaptation/renesas_rcar/renesas_kernel.git
11 years agoALSA: hda - Remove superfluous stac_resume()
Takashi Iwai [Tue, 25 Jun 2013 07:27:19 +0000 (09:27 +0200)]
ALSA: hda - Remove superfluous stac_resume()

The stac_resume() is exactly what the default resume code does, so
we don't have to define and use it doubly.  Let's cut it off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda/hdmi - poll eld at resume time
Wang Xingchao [Mon, 24 Jun 2013 11:45:23 +0000 (07:45 -0400)]
ALSA: hda/hdmi - poll eld at resume time

Hdmi driver may not receive intrinsic event from gfx side when
it's in runtime suspend mode. There's no ELD info when exit from
runtime suspend. This patch avoid missing ELD info.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - clean up code to reset hda link
Mengdong Lin [Tue, 25 Jun 2013 09:58:49 +0000 (05:58 -0400)]
ALSA: hda - clean up code to reset hda link

This patch is a cleanup to the previous patch "reset hda link during system/
runtime suspend".

In this patch
- azx_enter_link_reset() and azx_exit_link_reset() are defined for entering and
  exiting the link reset respectively. azx_link_reset() is no longer used and
  replaced by azx_enter_link_reset().
- azx_reset() reuses the above two new functions for a link reset cycle

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Add In-driver connection info
Wang Xingchao [Tue, 25 Jun 2013 03:41:23 +0000 (23:41 -0400)]
ALSA: hda - Add In-driver connection info

Pin's connection list may change dynamically with hot-plug event
on Intel Haswell chip. Users would see connections be "0" in codec#.
when play audio on this pin, software driver choose converter from cache
connections. So add "In-driver connection" info to avoid confuse when
raw connections are different with cache connection.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Use auto_mute_via_amp=1 for VT1708
Takashi Iwai [Mon, 24 Jun 2013 14:18:10 +0000 (16:18 +0200)]
ALSA: hda - Use auto_mute_via_amp=1 for VT1708

We've got bug report wrt many machines with VT1708 (e.g. IBM POS
machines) showing the broken auto-mute behavior.  It turned out that
the problem is that the pin control values of the speaker and line-out
pins are completely ignored.  As a workaround, let's use the newly
introduced feature of the generic parser, to control the mute via amp
on pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Add auto_mute_via_amp flag to generic parser
Takashi Iwai [Mon, 24 Jun 2013 14:00:21 +0000 (16:00 +0200)]
ALSA: hda - Add auto_mute_via_amp flag to generic parser

Add a new flag, auto_mute_via_amp, to determine the behavior of the
headphone / line-out auto-mute.  When this flag is set, the generic
driver mutes the speaker and line outputs via the amp mute of each
pin, instead of changing the pin control values.

This is introduced for devices that don't work expectedly with the pin
control values; for example, some devices are known to keep enabling
the speaker outputs no matter which pin control values are set on the
speaker pins.

The driver doesn't check actually whether the pins have the output amp
caps, but assumes that the proper mixer (mute) controls are created on
all these pins.  If not the case, you can't use this flag for your
device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: vmaster: Add snd_ctl_sync_vmaster() helper function
Takashi Iwai [Mon, 24 Jun 2013 13:51:54 +0000 (15:51 +0200)]
ALSA: vmaster: Add snd_ctl_sync_vmaster() helper function

Introduce a new helper function, snd_ctl_sync_vmaster(), which updates
the slave put callbacks forcibly as well as calling the hook.  This
will be used in the upcoming patch in HD-audio codec driver for
toggling the mute in vmaster slaves.

Along with the new function, the old snd_ctl_sync_vmaster_hook() is
replaced as a macro calling with the argument hook_only=true.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Remove unused variable
Wang Xingchao [Mon, 24 Jun 2013 13:10:18 +0000 (09:10 -0400)]
ALSA: hda - Remove unused variable

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - reset hda link during system/runtime suspend
Mengdong Lin [Mon, 24 Jun 2013 14:18:54 +0000 (10:18 -0400)]
ALSA: hda - reset hda link during system/runtime suspend

If all the codecs report ClkStopOK (OK to stop bus clock) after being put to
D3, this patch will reset the HDA link before the controller is put to D3.

So the link will be in reset during system or runtime suspend, the bus clock
stops and the codecs are in D3(ClkStop) state.

This may help to reduce power consumption by dozens of mW on some peripheral
hda codecs.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoAdd M2Tech hiFace USB-SPDIF driver
Antonio Ospite [Fri, 21 Jun 2013 22:14:46 +0000 (00:14 +0200)]
Add M2Tech hiFace USB-SPDIF driver

Add driver for M2Tech hiFace USB-SPDIF interface and compatible devices.

M2Tech hiFace and compatible devices offer a Hi-End S/PDIF Output
Interface, see http://www.m2tech.biz/hiface.html

The supported products are:

  * M2Tech Young
  * M2Tech hiFace
  * M2Tech North Star
  * M2Tech W4S Young
  * M2Tech Corrson
  * M2Tech AUDIA
  * M2Tech SL Audio
  * M2Tech Empirical
  * M2Tech Rockna
  * M2Tech Pathos
  * M2Tech Metronome
  * M2Tech CAD
  * M2Tech Audio Esclusive
  * M2Tech Rotel
  * M2Tech Eeaudio
  * The Chord Company CHORD
  * AVA Group A/S Vitus

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoASoC: samsung: Fix a typo of CONFIG_SND_SOC_BT_SCO
Takashi Iwai [Fri, 21 Jun 2013 16:09:49 +0000 (18:09 +0200)]
ASoC: samsung: Fix a typo of CONFIG_SND_SOC_BT_SCO

... instead of CONFIG_SND_SOC_SCO.
Introduced in the commit 200ceb96.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoASoC: omap: Fix the leftover CONFIG_SND_SOC_HDMI_CODEC
Takashi Iwai [Fri, 21 Jun 2013 16:02:01 +0000 (18:02 +0200)]
ASoC: omap: Fix the leftover CONFIG_SND_SOC_HDMI_CODEC

Replace the leftover CONFIG_SND_SOC_OMAP_HDMI_CODEC in
sound/soc/omap/Kconfig with CONFIG_SND_SOC_HDMI_CODEC, which was
forgotten in the commit bf7c6e6c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge tag 'asoc-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Fri, 21 Jun 2013 15:52:58 +0000 (17:52 +0200)]
Merge tag 'asoc-v3.11' of git://git./linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v3.11

Not a big release subsystem wise, the main changes have been some nice
improvements on the driver side:

- Lots of cleanups and fixes for Blackfin, SGTL5000 and UX500.
- Generalisation of the Bluetooth and HDMI stub drivers.
- New CODEC drivers for SSM2518 and RT5640.
- New machine driver for Tegra CPUs with RT5640.

11 years agoALSA: usb: uniform style used in MODULE_SUPPORTED_DEVICE()
Antonio Ospite [Fri, 21 Jun 2013 11:11:51 +0000 (13:11 +0200)]
ALSA: usb: uniform style used in MODULE_SUPPORTED_DEVICE()

In sound/usb/card.c and sound/usb/misc/ua101.c there are no spaces
between the vendor and the device names, use this style in the other
drivers too.

This also helps keeping consistency when new drivers copies from the
ones already in the mainline tree.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: snd-usb-6fire: use vmalloc buffers
Antonio Ospite [Fri, 21 Jun 2013 11:11:50 +0000 (13:11 +0200)]
ALSA: snd-usb-6fire: use vmalloc buffers

For USB devices it's not necessary to allocate physically contiguous
buffers.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: snd-usb-caiaq: use vmalloc buffers
Antonio Ospite [Fri, 21 Jun 2013 11:11:49 +0000 (13:11 +0200)]
ALSA: snd-usb-caiaq: use vmalloc buffers

For USB devices it's not necessary to allocate physically contiguous
buffers.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: snd-usb-caiaq: remove the unused snd_card_used variable
Antonio Ospite [Fri, 21 Jun 2013 11:11:48 +0000 (13:11 +0200)]
ALSA: snd-usb-caiaq: remove the unused snd_card_used variable

The snd_card_used variable is only read but never written, remove it.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: vx_core: off by one in vx_read_status()
Dan Carpenter [Fri, 21 Jun 2013 12:25:33 +0000 (15:25 +0300)]
ALSA: vx_core: off by one in vx_read_status()

This code is older than git, and I haven't tested it, but if size ==
SIZE_MAX_STATUS then we would write one space past the end of the
rmh->Stat[] array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Make Thinkpad X220-tablet use generic parser
David Henningsson [Thu, 20 Jun 2013 08:23:54 +0000 (10:23 +0200)]
ALSA: hda - Make Thinkpad X220-tablet use generic parser

Like the X220, this quirk was added to support docking station,
so enable the fixup instead.

According to Jan, the generic parser works equal or better
than the current parser. This was tested under a 3.9 kernel.

Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Fix missing Mic Boost controls for VIA codecs
Takashi Iwai [Wed, 19 Jun 2013 05:54:09 +0000 (07:54 +0200)]
ALSA: hda - Fix missing Mic Boost controls for VIA codecs

Some VIA codecs like VT1708S have Mic boost amps in the mic pins but
they aren't exposed in the capability bits.  In the past driver code,
we override the pin caps and create mic boost controls forcibly.
While transition to the generic parser, we lost the mic boost controls
although the pin caps are still overridden, because the generic parser
code checks the widget caps, too.

So this patch adds a new helper function to allow the override of the
given widget capability bits, and makes VIA codecs driver to add the
missing input-amp capability bit.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59861
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Use snd_hda_check_power_state() in patch_hdmi.c
Takashi Iwai [Tue, 18 Jun 2013 14:28:36 +0000 (16:28 +0200)]
ALSA: hda - Use snd_hda_check_power_state() in patch_hdmi.c

... instead of open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Avoid choose same converter for unused pins
Wang Xingchao [Tue, 18 Jun 2013 13:42:14 +0000 (21:42 +0800)]
ALSA: hda - Avoid choose same converter for unused pins

For Intel Haswell HDMI codecs, the pins choose converter 0 by default.
This would cause conflict when playing audio on unused pins,the pin with
physical device connected would get audio data too.
i.e. Pin 0/1/2 default choose converter 0, pin 1 has HDMI monitor connected.
when play audio on Pin 0 or pin 2, pin 1 could get audio data too.

This patch configure unused pins to choose different converter.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Cache the MUX selection for generic HDMI
Takashi Iwai [Tue, 18 Jun 2013 14:14:22 +0000 (16:14 +0200)]
ALSA: hda - Cache the MUX selection for generic HDMI

When a selection to a converter MUX is changed in hdmi_pcm_open(), it
should be cached so that the given connection can be restored properly
at PM resume.  We need just to replace the corresponding
snd_hda_codec_write() call with snd_hda_codec_write_cache().

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: firewire: fix error return code in scs_probe()
Wei Yongjun [Tue, 18 Jun 2013 13:09:42 +0000 (21:09 +0800)]
ALSA: firewire: fix error return code in scs_probe()

Fix to return -ENOMEM in the kmalloc() error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Haswell converter power state D0 verify
Wang Xingchao [Tue, 18 Jun 2013 02:41:53 +0000 (10:41 +0800)]
ALSA: hda - Haswell converter power state D0 verify

Haswell converters maybe in wrong power state before usage.
i.e. only converter 0 is in D0, converter 1/2 are in D3.
When pin choose converter 1/2, there's no audio output, this
cause dependency when playing differnt stream on pins.

AUD_PWRST  ConvertorA_Widget_Power_State_Current        D0
AUD_PWRST  ConvertorA_Widget_Power_State_Requsted       D0
AUD_PWRST  ConvertorB_Widget_Power_State_Current        D3
AUD_PWRST  ConvertorB_Widget_Power_State_Requested      D3
AUD_PWRST  ConvC_Widget_PwrSt_Curr                      D3
AUD_PWRST  ConvC_Widget_PwrSt_Req                       D3

This patch check converter's power state and set D0 if it's in D3 mode.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Fix return value of snd_hda_check_power_state()
Takashi Iwai [Tue, 18 Jun 2013 05:55:02 +0000 (07:55 +0200)]
ALSA: hda - Fix return value of snd_hda_check_power_state()

The refactoring by commit 9040d102 introduced the new function
snd_hda_check_power_state().  This function is supposed to return true
if the state already reached to the target state, but it actually
returns false for that.  An utterly stupid typo while copy & paste.

Fortunately this didn't influence on much behavior because powering up
AFG usually powers up the child widgets, too.  But the finer power
control must have been broken by this bug.

Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: sound/usb/misc/ua101.c: convert __list_for_each usage to list_for_each
Dave Jones [Tue, 18 Jun 2013 02:26:57 +0000 (22:26 -0400)]
ALSA: sound/usb/misc/ua101.c: convert __list_for_each usage to list_for_each

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge remote-tracking branch 'asoc/topic/x86' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:33 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/x86' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm8994' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:32 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm8962' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:32 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/wm8962' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm0010' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:31 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ux500' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:30 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/ux500' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/tegra' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:30 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/tegra' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ssm2518' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:29 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/ssm2518' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/spear' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:28 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/spear' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/spdif' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:28 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/spdif' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/sn95031' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:27 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/sn95031' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/sgtl5000' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:27 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/sgtl5000' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/samsung' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:26 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/rt5640' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:25 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/rt5640' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/pxa' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:25 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/pxa' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/omap' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:24 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/omap' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/mxs' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:23 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/max98090' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:23 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/max98090' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:22 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/jz4740' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:22 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/jz4740' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/hdmi' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:21 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/hdmi' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/fsl' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:20 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/fsi' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:20 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/fsi' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ep93xx' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:19 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/ep93xx' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/dwc' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:19 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/dwc' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/dfmbcs320' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:18 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/dfmbcs320' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/davinci' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:18 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:17 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/core' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:16 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/blackfin' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:16 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/blackfin' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/atmel' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:15 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/atmel' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/arizona' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:14 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/adsp' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:14 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/adau1701' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:13 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/adau1701' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next
Mark Brown [Mon, 17 Jun 2013 16:20:13 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/fix/wm8962' into asoc-linus
Mark Brown [Mon, 17 Jun 2013 16:20:12 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/fix/wm8962' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
Mark Brown [Mon, 17 Jun 2013 16:20:11 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/adsp' into asoc-linus
Mark Brown [Mon, 17 Jun 2013 16:20:11 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/fix/adsp' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/adav80x' into asoc-linus
Mark Brown [Mon, 17 Jun 2013 16:20:10 +0000 (17:20 +0100)]
Merge remote-tracking branch 'asoc/fix/adav80x' into asoc-linus

11 years agoASoC: spear: Convert to use devm_ioremap_resource
Tushar Behera [Mon, 17 Jun 2013 10:40:57 +0000 (16:10 +0530)]
ASoC: spear: Convert to use devm_ioremap_resource

Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().

devm_request_mem_region is called in devm_ioremap_resource(). Hence that
part can also be removed.

Since devm_ioremap_resource prints error message on failure, there is
no need to print an explicit warning message.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: alsa-devel@alsa-project.org
CC: Liam Girdwood <lgirdwood@gmail.com>
CC: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoASoC: spear: Normalise module names
Mark Brown [Mon, 17 Jun 2013 08:02:11 +0000 (09:02 +0100)]
ASoC: spear: Normalise module names

Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoALSA: hda - Update HD-Audio-Models.txt
David Henningsson [Mon, 17 Jun 2013 09:04:03 +0000 (11:04 +0200)]
ALSA: hda - Update HD-Audio-Models.txt

Add new known codecs, and fix up tabs.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 17 Jun 2013 09:16:16 +0000 (11:16 +0200)]
Merge branch 'for-linus' into for-next

* for-linus:
  ALSA: hda - Add models for Dell headset jacks

11 years agoALSA: hda - Add models for Dell headset jacks
David Henningsson [Mon, 17 Jun 2013 09:04:02 +0000 (11:04 +0200)]
ALSA: hda - Add models for Dell headset jacks

These headset jacks keep coming in on more and more platforms, and
it's possible I don't catch them all. Make it easier to test and
verify by making models.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoASoC: davinci: remove sffsdr machine support
Sekhar Nori [Mon, 17 Jun 2013 08:46:31 +0000 (14:16 +0530)]
ASoC: davinci: remove sffsdr machine support

sffsdr machine support does not build since at least v2.6.36
(~3 years). There is little hope of it being fixed, so remove
the support.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoALSA: usx2y: remove some old dead code
Dan Carpenter [Sun, 9 Jun 2013 13:14:25 +0000 (16:14 +0300)]
ALSA: usx2y: remove some old dead code

USB_QUEUE_BULK isn't defined any more.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 17 Jun 2013 08:45:28 +0000 (10:45 +0200)]
Merge branch 'for-linus' into for-next

* for-linus: (635 commits)
  ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310
  ALSA: hda - Fix pin configurations for MacBook Air 4,2
  ALSA: usb-audio: work around Android accessory firmware bug
  ALSA: hda - Headset mic support for three more machines
  Linux 3.10-rc6
  smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().
  powerpc: Fix missing/delayed calls to irq_work
  powerpc: Fix emulation of illegal instructions on PowerNV platform
  powerpc: Fix stack overflow crash in resume_kernel when ftracing
  snd_pcm_link(): fix a leak...
  use can_lookup() instead of direct checks of ->i_op->lookup
  move exit_task_namespaces() outside of exit_notify()
  fput: task_work_add() can fail if the caller has passed exit_task_work()
  xfs: don't shutdown log recovery on validation errors
  xfs: ensure btree root split sets blkno correctly
  xfs: fix implicit padding in directory and attr CRC formats
  xfs: don't emit v5 superblock warnings on write
  mei: me: clear interrupts on the resume path
  mei: nfc: fix nfc device freeing
  mei: init: Flush scheduled work before resetting the device
  ...

11 years agoALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310
Takashi Iwai [Mon, 17 Jun 2013 08:25:02 +0000 (10:25 +0200)]
ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310

Just like the previous fix for LogitechHD Webcam c270 in commit
11e7064f35bb87da8f427d1aa4bbd8b7473a3993, c310 model also requires the
same workaround for avoiding the kernel warning.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59741
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Fix pin configurations for MacBook Air 4,2
Takashi Iwai [Mon, 17 Jun 2013 08:19:49 +0000 (10:19 +0200)]
ALSA: hda - Fix pin configurations for MacBook Air 4,2

MacBook Air 4,2 requires the whole default pin configuration table to
be overridden by the driver, as usual, as Apple's machines don't set
up properly after boot.  Otherwise mic won't work, and other ill
effect may happen.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59381
Reported-and-tested-by: Peter John Hartman <peterjohnhartman@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoASoC: spear: Remove nonexistant EVM options
Mark Brown [Mon, 17 Jun 2013 07:58:52 +0000 (08:58 +0100)]
ASoC: spear: Remove nonexistant EVM options

The source wasn't added.

Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoALSA: usb-audio: work around Android accessory firmware bug
Clemens Ladisch [Sat, 15 Jun 2013 09:21:09 +0000 (11:21 +0200)]
ALSA: usb-audio: work around Android accessory firmware bug

When the Android firmware enables the audio interfaces in accessory
mode, it always declares in the control interface's baInterfaceNr array
that interfaces 0 and 1 belong to the audio function.  However, the
accessory interface itself, if also enabled, already is at index 0 and
shifts the actual audio interface numbers to 1 and 2, which prevents the
PCM streaming interface from being seen by the host driver.

To get the PCM interface interface to work, detect when the descriptors
point to the (for this driver useless) accessory interface, and redirect
to the correct one.

Reported-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
Tested-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
Cc: <stable@vger.kernel.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Headset mic support for three more machines
David Henningsson [Tue, 11 Jun 2013 09:06:48 +0000 (11:06 +0200)]
ALSA: hda - Headset mic support for three more machines

They need these quirks to have headset mic support.

BugLink: https://bugs.launchpad.net/bugs/1189363
Tested-by: Shawn Wang <shawn.wang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoLinux 3.10-rc6
Linus Torvalds [Sat, 15 Jun 2013 21:51:07 +0000 (11:51 -1000)]
Linux 3.10-rc6

11 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sat, 15 Jun 2013 21:49:48 +0000 (11:49 -1000)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "These are a little later than I planned on since I got caught up with
  handling merges for 3.11 most of the week.

  Another week, another batch of fixes for arm-soc platforms.

  Again, nothing controversial.  A few more than would be ideal, but all
  are valid fixes.  In particular the prima2 panic patch is critical
  since it fixes a problem where multiplatform kernels panic on all but
  prima2 hardware."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: SAMSUNG: pm: Adjust for pinctrl- and DT-enabled platforms
  ARM: prima2: fix incorrect panic usage
  arm: mvebu: armada-xp-{gp,openblocks-ax3-4}: specify PCIe range
  ARM: Kirkwood: handle mv88f6282 cpu in __kirkwood_variant().
  ARM: omap3: clock: fix wrong container_of in clock36xx.c
  ARM: dts: OMAP5: Fix missing PWM capability to timer nodes
  ARM: dts: omap4-panda|sdp: Fix mux for twl6030 IRQ pin and msecure line
  ARM: dts: AM33xx: Fix properties on gpmc node
  arm: omap2: fix AM33xx hwmod infos for UART2
  ARM: OMAP3: Fix iva2_pwrdm settings for 3703

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Sat, 15 Jun 2013 21:47:56 +0000 (11:47 -1000)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix RTNL locking in batman-adv, from Matthias Schiffer.

 2) Don't allow non-passthrough macvlan devices to set NOPROMISC via
    netlink, otherwise we can end up with corrupted promisc counter
    values on the device.  From Michael S Tsirkin.

 3) Fix stmmac driver build with debugging defines enabled, from Dinh
    Nguyen.

 4) Make sure name string we give in socket address in AF_PACKET is NULL
    terminated, from Daniel Borkmann.

 5) Fix leaking of two uninitialized bytes of memory to userspace in
    l2tp, from Guillaume Nault.

 6) Clear IPCB(skb) before tunneling otherwise we touch dangling IP
    options state and crash.  From Saurabh Mohan.

 7) Fix suspend/resume for davinci_mdio by using suspend_late and
    resume_early.  From Mugunthan V N.

 8) Don't tag ip_tunnel_init_net and ip_tunnel_delete_net with
    __net_{init,exit}, they can be called outside of those contexts.
    From Eric Dumazet.

 9) Fix RX length error in sh_eth driver, from Yoshihiro Shimoda.

10) Fix missing sctp_outq initialization in some code paths of SCTP
    stack, from Neil Horman.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits)
  sctp: fully initialize sctp_outq in sctp_outq_init
  netiucv: Hold rtnl between name allocation and device registration.
  tulip: Properly check dma mapping result
  net: sh_eth: fix incorrect RX length error if R8A7740
  ip_tunnel: remove __net_init/exit from exported functions
  drivers: net: davinci_mdio: restore mdio clk divider in mdio resume
  drivers: net: davinci_mdio: moving mdio resume earlier than cpsw ethernet driver
  net/ipv4: ip_vti clear skb cb before tunneling.
  tg3: Wait for boot code to finish after power on
  l2tp: Fix sendmsg() return value
  l2tp: Fix PPP header erasure and memory leak
  bonding: fix igmp_retrans type and two related races
  bonding: reset master mac on first enslave failure
  packet: packet_getname_spkt: make sure string is always 0-terminated
  net: ethernet: stmicro: stmmac: Fix compile error when STMMAC_XMIT_DEBUG used
  be2net: Fix 32-bit DMA Mask handling
  xen-netback: don't de-reference vif pointer after having called xenvif_put()
  macvlan: don't touch promisc without passthrough
  batman-adv: Don't handle address updates when bla is disabled
  batman-adv: forward late OGMs from best next hop
  ...

11 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Sat, 15 Jun 2013 05:25:04 +0000 (19:25 -1000)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

Pull powerpc fixes from Benjamin Herrenschmidt:
 "So here are 3 fixes still for 3.10.  Fixes are simple, bugs are nasty
  (though not recent regressions, nasty enough) and all targeted at
  stable"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Fix missing/delayed calls to irq_work
  powerpc: Fix emulation of illegal instructions on PowerNV platform
  powerpc: Fix stack overflow crash in resume_kernel when ftracing

11 years agosmp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().
David Daney [Fri, 14 Jun 2013 18:13:59 +0000 (11:13 -0700)]
smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().

Thanks to commit f91eb62f71b3 ("init: scream bloody murder if interrupts
are enabled too early"), "bloody murder" is now being screamed.

With a MIPS OCTEON config, we use on_each_cpu() in our
irq_chip.irq_bus_sync_unlock() function.  This gets called in early as a
result of the time_init() call.  Because the !SMP version of
on_each_cpu() unconditionally enables irqs, we get:

    WARNING: at init/main.c:560 start_kernel+0x250/0x410()
    Interrupts were enabled early
    CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.0-rc5-Cavium-Octeon+ #801
    Call Trace:
      show_stack+0x68/0x80
      warn_slowpath_common+0x78/0xb0
      warn_slowpath_fmt+0x38/0x48
      start_kernel+0x250/0x410

Suggested fix: Do what we already do in the SMP version of
on_each_cpu(), and use local_irq_save/local_irq_restore.  Because we
need a flags variable, make it a static inline to avoid name space
issues.

[ Change from v1: Convert on_each_cpu to a static inline function, add
  #include <linux/irqflags.h> to avoid build breakage on some files.

  on_each_cpu_mask() and on_each_cpu_cond() suffer the same problem as
  on_each_cpu(), but they are not causing !SMP bugs for me, so I will
  defer changing them to a less urgent patch. ]

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sat, 15 Jun 2013 05:18:56 +0000 (19:18 -1000)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull VFS fixes from Al Viro:
 "Several fixes + obvious cleanup (you've missed a couple of open-coded
  can_lookup() back then)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  snd_pcm_link(): fix a leak...
  use can_lookup() instead of direct checks of ->i_op->lookup
  move exit_task_namespaces() outside of exit_notify()
  fput: task_work_add() can fail if the caller has passed exit_task_work()
  ncpfs: fix rmdir returns Device or resource busy

11 years agoMerge tag 'for-linus-v3.10-rc6' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Sat, 15 Jun 2013 05:16:31 +0000 (19:16 -1000)]
Merge tag 'for-linus-v3.10-rc6' of git://oss.sgi.com/xfs/xfs

Pull xfs fixes from Ben Myers:
 - Remove noisy warnings about experimental support which spams the logs
 - Add padding to align directory and attr structures correctly
 - Set block number on child buffer on a root btree split
 - Disable verifiers during log recovery for non-CRC filesystems

* tag 'for-linus-v3.10-rc6' of git://oss.sgi.com/xfs/xfs:
  xfs: don't shutdown log recovery on validation errors
  xfs: ensure btree root split sets blkno correctly
  xfs: fix implicit padding in directory and attr CRC formats
  xfs: don't emit v5 superblock warnings on write

11 years agoMerge tag 'char-misc-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Sat, 15 Jun 2013 05:15:36 +0000 (19:15 -1000)]
Merge tag 'char-misc-3.10-rc5' of git://git./linux/kernel/git/gregkh/char-misc

Pull char / misc fixes from Greg Kroah-Hartman:
 "Here are some small mei driver fixes for 3.10-rc6 that fix some
  reported problems"

* tag 'char-misc-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  mei: me: clear interrupts on the resume path
  mei: nfc: fix nfc device freeing
  mei: init: Flush scheduled work before resetting the device

11 years agoMerge tag 'usb-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 15 Jun 2013 05:14:39 +0000 (19:14 -1000)]
Merge tag 'usb-3.10-rc5' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg Kroah-Hartman:
 "Here are some small USB driver fixes that resolve some reported
  problems for 3.10-rc6

  Nothing major, just 3 USB serial driver fixes, and two chipidea fixes"

* tag 'usb-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: chipidea: fix id change handling
  usb: chipidea: fix no transceiver case
  USB: pl2303: fix device initialisation at open
  USB: spcp8x5: fix device initialisation at open
  USB: f81232: fix device initialisation at open

11 years agopowerpc: Fix missing/delayed calls to irq_work
Benjamin Herrenschmidt [Sat, 15 Jun 2013 02:13:40 +0000 (12:13 +1000)]
powerpc: Fix missing/delayed calls to irq_work

When replaying interrupts (as a result of the interrupt occurring
while soft-disabled), in the case of the decrementer, we are exclusively
testing for a pending timer target. However we also use decrementer
interrupts to trigger the new "irq_work", which in this case would
be missed.

This change the logic to force a replay in both cases of a timer
boundary reached and a decrementer interrupt having actually occurred
while disabled. The former test is still useful to catch cases where
a CPU having been hard-disabled for a long time completely misses the
interrupt due to a decrementer rollover.

CC: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
11 years agopowerpc: Fix emulation of illegal instructions on PowerNV platform
Paul Mackerras [Fri, 14 Jun 2013 10:07:41 +0000 (20:07 +1000)]
powerpc: Fix emulation of illegal instructions on PowerNV platform

Normally, the kernel emulates a few instructions that are unimplemented
on some processors (e.g. the old dcba instruction), or privileged (e.g.
mfpvr).  The emulation of unimplemented instructions is currently not
working on the PowerNV platform.  The reason is that on these machines,
unimplemented and illegal instructions cause a hypervisor emulation
assist interrupt, rather than a program interrupt as on older CPUs.
Our vector for the emulation assist interrupt just calls
program_check_exception() directly, without setting the bit in SRR1
that indicates an illegal instruction interrupt.  This fixes it by
making the emulation assist interrupt set that bit before calling
program_check_interrupt().  With this, old programs that use no-longer
implemented instructions such as dcba now work again.

CC: <stable@vger.kernel.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Fix stack overflow crash in resume_kernel when ftracing
Michael Ellerman [Thu, 13 Jun 2013 11:04:56 +0000 (21:04 +1000)]
powerpc: Fix stack overflow crash in resume_kernel when ftracing

It's possible for us to crash when running with ftrace enabled, eg:

  Bad kernel stack pointer bffffd12 at c00000000000a454
  cpu 0x3: Vector: 300 (Data Access) at [c00000000ffe3d40]
      pc: c00000000000a454: resume_kernel+0x34/0x60
      lr: c00000000000335c: performance_monitor_common+0x15c/0x180
      sp: bffffd12
     msr: 8000000000001032
     dar: bffffd12
   dsisr: 42000000

If we look at current's stack (paca->__current->stack) we see it is
equal to c0000002ecab0000. Our stack is 16K, and comparing to
paca->kstack (c0000002ecab3e30) we can see that we have overflowed our
kernel stack. This leads to us writing over our struct thread_info, and
in this case we have corrupted thread_info->flags and set
_TIF_EMULATE_STACK_STORE.

Dumping the stack we see:

  3:mon> t c0000002ecab0000
  [c0000002ecab0000c00000000002131c .performance_monitor_exception+0x5c/0x70
  [c0000002ecab0080c00000000000335c performance_monitor_common+0x15c/0x180
  --- Exception: f01 (Performance Monitor) at c0000000000fb2ec .trace_hardirqs_off+0x1c/0x30
  [c0000002ecab0370c00000000016fdb0 .trace_graph_entry+0xb0/0x280 (unreliable)
  [c0000002ecab0410c00000000003d038 .prepare_ftrace_return+0x98/0x130
  [c0000002ecab04b0c00000000000a920 .ftrace_graph_caller+0x14/0x28
  [c0000002ecab0520c0000000000d6b58 .idle_cpu+0x18/0x90
  [c0000002ecab05a0c00000000000a934 .return_to_handler+0x0/0x34
  [c0000002ecab0620c00000000001e660 .timer_interrupt+0x160/0x300
  [c0000002ecab06d0c0000000000025dc decrementer_common+0x15c/0x180
  --- Exception: 901 (Decrementer) at c0000000000104d4 .arch_local_irq_restore+0x74/0xa0
  [c0000002ecab09c0c0000000000fe044 .trace_hardirqs_on+0x14/0x30 (unreliable)
  [c0000002ecab0fb0c00000000016fe3c .trace_graph_entry+0x13c/0x280
  [c0000002ecab1050c00000000003d038 .prepare_ftrace_return+0x98/0x130
  [c0000002ecab10f0c00000000000a920 .ftrace_graph_caller+0x14/0x28
  [c0000002ecab1160c0000000000161f0 .__ppc64_runlatch_on+0x10/0x40
  [c0000002ecab11d0c00000000000a934 .return_to_handler+0x0/0x34
  --- Exception: 901 (Decrementer) at c0000000000104d4 .arch_local_irq_restore+0x74/0xa0

  ... and so on

__ppc64_runlatch_on() is called from RUNLATCH_ON in the exception entry
path. At that point the irq state is not consistent, ie. interrupts are
hard disabled (by the exception entry), but the paca soft-enabled flag
may be out of sync.

This leads to the local_irq_restore() in trace_graph_entry() actually
enabling interrupts, which we do not want. Because we have not yet
reprogrammed the decrementer we immediately take another decrementer
exception, and recurse.

The fix is twofold. Firstly make sure we call DISABLE_INTS before
calling RUNLATCH_ON. The badly named DISABLE_INTS actually reconciles
the irq state in the paca with the hardware, making it safe again to
call local_irq_save/restore().

Although that should be sufficient to fix the bug, we also mark the
runlatch routines as notrace. They are called very early in the
exception entry and we are asking for trouble tracing them. They are
also fairly uninteresting and tracing them just adds unnecessary
overhead.

[ This regression was introduced by fe1952fc0afb9a2e4c79f103c08aef5d13db1873
  "powerpc: Rework runlatch code" by myself --BenH
]

CC: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agosnd_pcm_link(): fix a leak...
Al Viro [Wed, 5 Jun 2013 18:07:08 +0000 (14:07 -0400)]
snd_pcm_link(): fix a leak...

in case when snd_pcm_stream_linked(substream) is true, we end up leaking
group.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agouse can_lookup() instead of direct checks of ->i_op->lookup
Al Viro [Thu, 6 Jun 2013 23:33:47 +0000 (19:33 -0400)]
use can_lookup() instead of direct checks of ->i_op->lookup

a couple of places got missed back when Linus has introduced that one...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agomove exit_task_namespaces() outside of exit_notify()
Oleg Nesterov [Fri, 14 Jun 2013 19:09:49 +0000 (21:09 +0200)]
move exit_task_namespaces() outside of exit_notify()

exit_notify() does exit_task_namespaces() after
forget_original_parent(). This was needed to ensure that ->nsproxy
can't be cleared prematurely, an exiting child we are going to
reparent can do do_notify_parent() and use the parent's (ours) pid_ns.

However, after 32084504 "pidns: use task_active_pid_ns in
do_notify_parent" ->nsproxy != NULL is no longer needed, we rely
on task_active_pid_ns().

Move exit_task_namespaces() from exit_notify() to do_exit(), after
exit_fs() and before exit_task_work().

This solves the problem reported by Andrey, free_ipc_ns()->shm_destroy()
does fput() which needs task_work_add().

Note: this particular problem can be fixed if we change fput(), and
that change makes sense anyway. But there is another reason to move
the callsite. The original reason for exit_task_namespaces() from
the middle of exit_notify() was subtle and it has already gone away,
now this looks confusing. And this allows us do simplify exit_notify(),
we can avoid unlock/lock(tasklist) and we can use ->exit_state instead
of PF_EXITING in forget_original_parent().

Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agofput: task_work_add() can fail if the caller has passed exit_task_work()
Oleg Nesterov [Fri, 14 Jun 2013 19:09:47 +0000 (21:09 +0200)]
fput: task_work_add() can fail if the caller has passed exit_task_work()

fput() assumes that it can't be called after exit_task_work() but
this is not true, for example free_ipc_ns()->shm_destroy() can do
this. In this case fput() silently leaks the file.

Change it to fallback to delayed_fput_work if task_work_add() fails.
The patch looks complicated but it is not, it changes the code from

if (PF_KTHREAD) {
schedule_work(...);
return;
}
task_work_add(...)

to
if (!PF_KTHREAD) {
if (!task_work_add(...))
return;
/* fallback */
}
schedule_work(...);

As for shm_destroy() in particular, we could make another fix but I
think this change makes sense anyway. There could be another similar
user, it is not safe to assume that task_work_add() can't fail.

Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoxfs: don't shutdown log recovery on validation errors
Dave Chinner [Wed, 12 Jun 2013 02:19:06 +0000 (12:19 +1000)]
xfs: don't shutdown log recovery on validation errors

Unfortunately, we cannot guarantee that items logged multiple times
and replayed by log recovery do not take objects back in time. When
they are taken back in time, the go into an intermediate state which
is corrupt, and hence verification that occurs on this intermediate
state causes log recovery to abort with a corruption shutdown.

Instead of causing a shutdown and unmountable filesystem, don't
verify post-recovery items before they are written to disk. This is
less than optimal, but there is no way to detect this issue for
non-CRC filesystems If log recovery successfully completes, this
will be undone and the object will be consistent by subsequent
transactions that are replayed, so in most cases we don't need to
take drastic action.

For CRC enabled filesystems, leave the verifiers in place - we need
to call them to recalculate the CRCs on the objects anyway. This
recovery problem can be solved for such filesystems - we have a LSN
stamped in all metadata at writeback time that we can to determine
whether the item should be replayed or not. This is a separate piece
of work, so is not addressed by this patch.

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

11 years agoxfs: ensure btree root split sets blkno correctly
Dave Chinner [Wed, 12 Jun 2013 02:19:08 +0000 (12:19 +1000)]
xfs: ensure btree root split sets blkno correctly

For CRC enabled filesystems, the BMBT is rooted in an inode, so it
passes through a different code path on root splits than the
freespace and inode btrees. This is much less traversed by xfstests
than the other trees. When testing on a 1k block size filesystem,
I've been seeing ASSERT failures in generic/234 like:

XFS: Assertion failed: cur->bc_btnum != XFS_BTNUM_BMAP || cur->bc_private.b.allocated == 0, file: fs/xfs/xfs_btree.c, line: 317

which are generally preceded by a lblock check failure. I noticed
this in the bmbt stats:

$ pminfo -f xfs.btree.block_map

xfs.btree.block_map.lookup
    value 39135

xfs.btree.block_map.compare
    value 268432

xfs.btree.block_map.insrec
    value 15786

xfs.btree.block_map.delrec
    value 13884

xfs.btree.block_map.newroot
    value 2

xfs.btree.block_map.killroot
    value 0
.....

Very little coverage of root splits and merges. Indeed, on a 4k
filesystem, block_map.newroot and block_map.killroot are both zero.
i.e. the code is not exercised at all, and it's the only generic
btree infrastructure operation that is not exercised by a default run
of xfstests.

Turns out that on a 1k filesystem, generic/234 accounts for one of
those two root splits, and that is somewhat of a smoking gun. In
fact, it's the same problem we saw in the directory/attr code where
headers are memcpy()d from one block to another without updating the
self describing metadata.

Simple fix - when copying the header out of the root block, make
sure the block number is updated correctly.

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

11 years agoxfs: fix implicit padding in directory and attr CRC formats
Dave Chinner [Wed, 12 Jun 2013 02:19:07 +0000 (12:19 +1000)]
xfs: fix implicit padding in directory and attr CRC formats

Michael L. Semon has been testing CRC patches on a 32 bit system and
been seeing assert failures in the directory code from xfs/080.
Thanks to Michael's heroic efforts with printk debugging, we found
that the problem was that the last free space being left in the
directory structure was too small to fit a unused tag structure and
it was being corrupted and attempting to log a region out of bounds.
Hence the assert failure looked something like:

.....
#5 calling xfs_dir2_data_log_unused() 36 32
#1 4092 4095 4096
#2 8182 8183 4096
XFS: Assertion failed: first <= last && last < BBTOB(bp->b_length), file: fs/xfs/xfs_trans_buf.c, line: 568

Where #1 showed the first region of the dup being logged (i.e. the
last 4 bytes of a directory buffer) and #2 shows the corrupt values
being calculated from the length of the dup entry which overflowed
the size of the buffer.

It turns out that the problem was not in the logging code, nor in
the freespace handling code. It is an initial condition bug that
only shows up on 32 bit systems. When a new buffer is initialised,
where's the freespace that is set up:

[  172.316249] calling xfs_dir2_leaf_addname() from xfs_dir_createname()
[  172.316346] #9 calling xfs_dir2_data_log_unused()
[  172.316351] #1 calling xfs_trans_log_buf() 60 63 4096
[  172.316353] #2 calling xfs_trans_log_buf() 4094 4095 4096

Note the offset of the first region being logged? It's 60 bytes into
the buffer. Once I saw that, I pretty much knew that the bug was
going to be caused by this.

Essentially, all direct entries are rounded to 8 bytes in length,
and all entries start with an 8 byte alignment. This means that we
can decode inplace as variables are naturally aligned. With the
directory data supposedly starting on a 8 byte boundary, and all
entries padded to 8 bytes, the minimum freespace in a directory
block is supposed to be 8 bytes, which is large enough to fit a
unused data entry structure (6 bytes in size). The fact we only have
4 bytes of free space indicates a directory data block alignment
problem.

And what do you know - there's an implicit hole in the directory
data block header for the CRC format, which means the header is 60
byte on 32 bit intel systems and 64 bytes on 64 bit systems. Needs
padding. And while looking at the structures, I found the same
problem in the attr leaf header. Fix them both.

Note that this only affects 32 bit systems with CRCs enabled.
Everything else is just fine. Note that CRC enabled filesystems created
before this fix on such systems will not be readable with this fix
applied.

Reported-by: Michael L. Semon <mlsemon35@gmail.com>
Debugged-by: Michael L. Semon <mlsemon35@gmail.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit 8a1fd2950e1fe267e11fc8c85dcaa6b023b51b60)

11 years agoxfs: don't emit v5 superblock warnings on write
Dave Chinner [Mon, 27 May 2013 06:38:19 +0000 (16:38 +1000)]
xfs: don't emit v5 superblock warnings on write

We write the superblock every 30s or so which results in the
verifier being called. Right now that results in this output
every 30s:

XFS (vda): Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled!
Use of these features in this kernel is at your own risk!

And spamming the logs.

We don't need to check for whether we support v5 superblocks or
whether there are feature bits we don't support set as these are
only relevant when we first mount the filesytem. i.e. on superblock
read. Hence for the write verification we can just skip all the
checks (and hence verbose output) altogether.

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

11 years agoASoC: wm5110: Correct rate control for DSP4
Charles Keepax [Fri, 14 Jun 2013 13:19:36 +0000 (14:19 +0100)]
ASoC: wm5110: Correct rate control for DSP4

Reported-by: Dennis May <dennis.may@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoASoC: wm8962: Enable start-up and normal bias after reset in runtime resume
Nicolin Chen [Fri, 14 Jun 2013 11:49:06 +0000 (19:49 +0800)]
ASoC: wm8962: Enable start-up and normal bias after reset in runtime resume

This part of bias settings are essential for WM8962 to power up. Without it
"wm8962 0-001a: DC servo timed out" might be prompted due to power-up failure
that happens to FLL if being used.

The driver's also bringing the bias down in the suspend path so it needs to be
powered up in the resume path for symmetry.

According to dapm_pre_sequence_async(), DAPM would call pm_runtime_get_sync()
to let driver finish the bias settings in pm_runtime_resume() before the bias
level being set to STANDBY. So no need to worry about disordered settings for
VMID of WM8962.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>