]> rtime.felk.cvut.cz Git - linux-imx.git/log
linux-imx.git
10 years agoALSA: usb-audio: fix regression for fixed stream quirk
Eldad Zack [Tue, 9 Jul 2013 18:36:15 +0000 (20:36 +0200)]
ALSA: usb-audio: fix regression for fixed stream quirk

Commit 8f898e92aea2c24c7f379ee265d178f69ebb9c07 removed the redundant
reads of bInterfaceProtocol from the descriptors, but introduced a
regression to devices with quirks of type QUIRK_AUDIO_FIXED_ENDPOINT,
since fp->protocol is not set in setup process.

As a consequence, audio streams would not get initialized, as the
following logs show:

[   48.923043] setting usb interface 3:1
[   48.923056] Creating new capture data endpoint #81
[   48.923484] 4:3:1: cannot set freq 48000 to ep 0x81

This patch sets fp->protocol in create_fixed_stream_quirk() and
resolves the regression.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Keep halting ALC5505 DSP
Takashi Iwai [Fri, 5 Jul 2013 10:13:59 +0000 (12:13 +0200)]
ALSA: hda - Keep halting ALC5505 DSP

ALC5505 DSP is enabled even though we don't use the features yet at
all.  This results in the unnecessarily high power consumption, more
than 100mV higher.  Until we implement the DSP support, better to
bypass DSP for saving more power.

Reported-by: Mengdong Lin <mengdong.lin@intel.com>
[Patch modified by Mengdong to cal alc5505_dsp_init() with extra
acl5505_dsp_halt().]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge tag 'asoc-v3.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Fri, 5 Jul 2013 09:54:27 +0000 (11:54 +0200)]
Merge tag 'asoc-v3.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v3.11

A few small fixes, all driver specific.  The removal of the GPIO based
pinmuxing is a bug fix, since the obsolete nodes had been removed from
the DT it stopped the driver loading.

10 years agoMerge remote-tracking branch 'asoc/fix/wm8962' into asoc-linus
Mark Brown [Thu, 4 Jul 2013 17:30:03 +0000 (18:30 +0100)]
Merge remote-tracking branch 'asoc/fix/wm8962' into asoc-linus

10 years agoMerge remote-tracking branch 'asoc/fix/samsung' into asoc-linus
Mark Brown [Thu, 4 Jul 2013 17:30:02 +0000 (18:30 +0100)]
Merge remote-tracking branch 'asoc/fix/samsung' into asoc-linus

10 years agoMerge remote-tracking branch 'asoc/fix/mxs' into asoc-linus
Mark Brown [Thu, 4 Jul 2013 17:30:02 +0000 (18:30 +0100)]
Merge remote-tracking branch 'asoc/fix/mxs' into asoc-linus

10 years agoMerge remote-tracking branch 'asoc/fix/fsl' into asoc-linus
Mark Brown [Thu, 4 Jul 2013 17:30:01 +0000 (18:30 +0100)]
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus

10 years agoASoC: wm8962: fix NULL pdata pointer
Shawn Guo [Thu, 4 Jul 2013 15:14:00 +0000 (23:14 +0800)]
ASoC: wm8962: fix NULL pdata pointer

There is an error in merge commit 384b834 on conflict resolution which
causes the following NULL pdata pointer bug.

wm8962 0-001a: customer id 0 revision D
Unable to handle kernel NULL pointer dereference at virtual address 00000004
pgd = 80004000
[00000004] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0+ #1
task: bf870000 ti: bf874000 task.ti: bf874000
PC is at wm8962_probe+0x134/0x6c8
LR is at regmap_unlock_mutex+0x10/0x14
pc : [<80452100>]    lr : [<80304cf4>]    psr: a0000113
sp : bf875c98  ip : 00000000  fp : bf875cd4
r10: 00000000  r9 : bfb1830c  r8 : 80779bc4
r7 : 00000000  r6 : 00000001  r5 : bfbac010  r4 : bfb33e00
r3 : 80304ce4  r2 : 00000000  r1 : 00000001  r0 : fffffffb
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 1000404a  DAC: 00000017
Process swapper/0 (pid: 1, stack limit = 0xbf874238)
Stack: (0xbf875c98 to 0xbf876000)
...

Fix the error by assigning pdata a correct pointer.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
Arnaud Patard (Rtp) [Thu, 20 Jun 2013 21:20:49 +0000 (23:20 +0200)]
ASoC: imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found

If the ssi or codec drivers are not loaded (for instance, because spi or i2c
bus drivers are not loaded), returning -EINVAL will for people to unload and
then reload the module to get sound working. Returning E_PROBE_DEFER will
mitigate this.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Samsung: Remove redundant comment
Sachin Kamat [Thu, 4 Jul 2013 10:54:37 +0000 (16:24 +0530)]
ASoC: Samsung: Remove redundant comment

There is a typo in the filename (i2c mentioned instead of i2s).
However, this is a redundant piece of information. Delete it
altogether.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoALSA: hda - Fix EAPD vmaster hook for AD1884 & co
Takashi Iwai [Thu, 4 Jul 2013 10:54:22 +0000 (12:54 +0200)]
ALSA: hda - Fix EAPD vmaster hook for AD1884 & co

ad1884_fixup_hp_eapd() tries to set the NID for controlling the
speaker EAPD from the pin configuration.  But the current code can't
work expectedly since it sets spec->eapd_nid before calling the
generic parser where the autocfg pins are set up.

This patch changes the function to set spec->eapd_nid after the
generic parser call while it sets vmaster hook unconditionally.  The
spec->eapd_nid check is moved in the hook function itself instead.

Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: vmaster: Fix the regression of missing vmaster hook call
Takashi Iwai [Wed, 3 Jul 2013 12:01:32 +0000 (14:01 +0200)]
ALSA: vmaster: Fix the regression of missing vmaster hook call

The commit [1ca2f2ec: ALSA: vmaster: Add snd_ctl_sync_vmaster() helper
function] changed master_put() function and the check for the required
vmaster hook call is wrongly performed now, which results in the
missing hook call upon "Master Playback Switch" value changes.
This patch corrects the check logic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoASoC: samsung: Remove obsolete GPIO based DT pinmuxing
Mark Brown [Tue, 2 Jul 2013 12:10:28 +0000 (13:10 +0100)]
ASoC: samsung: Remove obsolete GPIO based DT pinmuxing

Since the Samsung platforms have moved to pinctrl for pin muxing and that
is handled in the core the old GPIO based muxing code can just be removed.
Something similar had been submitted by Thomas Abraham back in March but
a resubmission following review never happened.

Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: mxs: register saif mclk to clock framework
Shawn Guo [Mon, 1 Jul 2013 08:16:10 +0000 (16:16 +0800)]
ASoC: mxs: register saif mclk to clock framework

Mostly the mxs system design uses saif0 mclk output as the clock source
of codec.  Since the mclk is implemented as a general divider with the
saif clk as the parent clock, let's register the mclk as a basic
clk-divider to common clock framework.  Then with it being a clock
provdier, clk_get() call in codec driver probe function will just work.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoALSA: hda - Add Dell SSID to support Headset Mic recording
Kailang Yang [Mon, 1 Jul 2013 09:27:16 +0000 (11:27 +0200)]
ALSA: hda - Add Dell SSID to support Headset Mic recording

This is X5 Precision - Diesel platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge tag 'asoc-v3.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 1 Jul 2013 09:23:13 +0000 (11:23 +0200)]
Merge tag 'asoc-v3.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Final updates for v3.11

A few final updates:

 - A couple of additional bug fixes for the AC'97 refactoring.
 - Some fixes for the ADAU1701 driver.

10 years agoMerge branch 'for-next' into for-linus
Takashi Iwai [Mon, 1 Jul 2013 08:27:25 +0000 (10:27 +0200)]
Merge branch 'for-next' into for-linus

Merge the whole changes for 3.11-rc1 merge

10 years agoLinux 3.10
Linus Torvalds [Sun, 30 Jun 2013 22:13:29 +0000 (15:13 -0700)]
Linux 3.10

10 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Sun, 30 Jun 2013 22:08:15 +0000 (15:08 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull another powerpc fix from Benjamin Herrenschmidt:
 "I mentioned that while we had fixed the kernel crashes, EEH error
  recovery didn't always recover...  It appears that I had a fix for
  that already in powerpc-next (with a stable CC).

  I cherry-picked it today and did a few tests and it seems that things
  now work quite well.  The patch is also pretty simple, so I see no
  reason to wait before merging it."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/eeh: Fix fetching bus for single-dev-PE

10 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sun, 30 Jun 2013 22:06:25 +0000 (15:06 -0700)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of seven bug fixes.  Several fcoe fixes for locking
  problems, initiator issues and a VLAN API change, all of which could
  eventually lead to data corruption, one fix for a qla2xxx locking
  problem which could lead to multiple completions of the same request
  (and subsequent data corruption) and a use after free in the ipr
  driver.  Plus one minor MAINTAINERS file update"

(only six bugfixes in this pull, since I had already pulled the fcoe API
fix directly from Robert Love)

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] ipr: Avoid target_destroy accessing memory after it was freed
  [SCSI] qla2xxx: Fix for locking issue between driver ISR and mailbox routines
  MAINTAINERS: Fix fcoe mailing list
  libfc: extend ex_lock to protect all of fc_seq_send
  libfc: Correct check for initiator role
  libfcoe: Fix Conflicting FCFs issue in the fabric

10 years agoMerge remote-tracking branch 'asoc/topic/x86' into asoc-next
Mark Brown [Sun, 30 Jun 2013 11:42:25 +0000 (12:42 +0100)]
Merge remote-tracking branch 'asoc/topic/x86' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/twl6040' into asoc-next
Mark Brown [Sun, 30 Jun 2013 11:42:25 +0000 (12:42 +0100)]
Merge remote-tracking branch 'asoc/topic/twl6040' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/tas5086' into asoc-next
Mark Brown [Sun, 30 Jun 2013 11:42:24 +0000 (12:42 +0100)]
Merge remote-tracking branch 'asoc/topic/tas5086' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/ext' into asoc-next
Mark Brown [Sun, 30 Jun 2013 11:42:24 +0000 (12:42 +0100)]
Merge remote-tracking branch 'asoc/topic/ext' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/adsp' into asoc-next
Mark Brown [Sun, 30 Jun 2013 11:42:24 +0000 (12:42 +0100)]
Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/adau1701' into asoc-next
Mark Brown [Sun, 30 Jun 2013 11:42:23 +0000 (12:42 +0100)]
Merge remote-tracking branch 'asoc/topic/adau1701' into asoc-next

10 years agoASoC: adau1701: remove control_data assignment
Daniel Mack [Thu, 27 Jun 2013 20:00:05 +0000 (22:00 +0200)]
ASoC: adau1701: remove control_data assignment

codec->control_data has to be left unset to make the ASoC core access
the regmap properly.

That bug slipped in during a rebase session of the driver refactoring.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: adau1701: more direct regmap usage
Daniel Mack [Thu, 27 Jun 2013 20:00:04 +0000 (22:00 +0200)]
ASoC: adau1701: more direct regmap usage

Replace calls to snd_soc_update_bits() with regmap_update_bits().

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agopowerpc/eeh: Fix fetching bus for single-dev-PE
Gavin Shan [Wed, 5 Jun 2013 07:34:02 +0000 (15:34 +0800)]
powerpc/eeh: Fix fetching bus for single-dev-PE

While running Linux as guest on top of phyp, we possiblly have
PE that includes single PCI device. However, we didn't return
its PCI bus correctly and it leads to failure on recovery from
EEH errors for single-dev-PE. The patch fixes the issue.

Cc: <stable@vger.kernel.org> # v3.7+
Cc: Steve Best <sbest@us.ibm.com>
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
10 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Sun, 30 Jun 2013 00:02:48 +0000 (17:02 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc fixes from Ben Herrenschmidt:
 "We discovered some breakage in our "EEH" (PCI Error Handling) code
  while doing error injection, due to a couple of regressions.  One of
  them is due to a patch (37f02195bee9 "powerpc/pci: fix PCI-e devices
  rescan issue on powerpc platform") that, in hindsight, I shouldn't
  have merged considering that it caused more problems than it solved.

  Please pull those two fixes.  One for a simple EEH address cache
  initialization issue.  The other one is a patch from Guenter that I
  had originally planned to put in 3.11 but which happens to also fix
  that other regression (a kernel oops during EEH error handling and
  possibly hotplug).

  With those two, the couple of test machines I've hammered with error
  injection are remaining up now.  EEH appears to still fail to recover
  on some devices, so there is another problem that Gavin is looking
  into but at least it's no longer crashing the kernel."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/pci: Improve device hotplug initialization
  powerpc/eeh: Add eeh_dev to the cache during boot

10 years agoARM: dt: Only print warning, not WARN() on bad cpu map in device tree
Olof Johansson [Sat, 29 Jun 2013 23:25:14 +0000 (16:25 -0700)]
ARM: dt: Only print warning, not WARN() on bad cpu map in device tree

Due to recent changes and expecations of proper cpu bindings, there are
now cases for many of the in-tree devicetrees where a WARN() will hit
on boot due to badly formatted /cpus nodes.

Downgrade this to a pr_warn() to be less alarmist, since it's not a
new problem.

Tested on Arndale, Cubox, Seaboard and Panda ES. Panda hits the WARN
without this, the others do not.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agopowerpc/pci: Improve device hotplug initialization
Guenter Roeck [Mon, 10 Jun 2013 17:18:08 +0000 (10:18 -0700)]
powerpc/pci: Improve device hotplug initialization

Commit 37f02195b (powerpc/pci: fix PCI-e devices rescan issue on powerpc
platform) fixes a problem with interrupt and DMA initialization on hot
plugged devices. With this commit, interrupt and DMA initialization for
hot plugged devices is handled in the pci device enable function.

This approach has a couple of drawbacks. First, it creates two code paths
for device initialization, one for hot plugged devices and another for devices
known during the initial PCI scan. Second, the initialization code for hot
plugged devices is only called when the device is enabled, ie typically
in the probe function. Also, the platform specific setup code is called each
time pci_enable_device() is called, not only once during device discovery,
meaning it is actually called multiple times, once for devices discovered
during the initial scan and again each time a driver is re-loaded.

The visible result is that interrupt pins are only assigned to hot plugged
devices when the device driver is loaded. Effectively this changes the PCI
probe API, since pci_dev->irq and the device's dma configuration will now
only be valid after pci_enable() was called at least once. A more subtle
change is that platform specific PCI device setup is moved from device
discovery into the driver's probe function, more specifically into the
pci_enable_device() call.

To fix the inconsistencies, add new function pcibios_add_device.
Call pcibios_setup_device from pcibios_setup_bus_devices if device setup
is not complete, and from pcibios_add_device if bus setup is complete.

With this change, device setup code is moved back into device initialization,
and called exactly once for both static and hot plugged devices.

[ This also fixes a regression introduced by the above patch which
  causes dev->irq to be overwritten under some cirumstances after
  MSIs have been enabled for the device which leads to crashes due
  to the MSI core "hijacking" dev->irq to store the base MSI number
  and not the LSI. --BenH
]

Cc: Yuanquan Chen <Yuanquan.Chen@freescale.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hiroo Matsumoto <matsumoto.hiroo@jp.fujitsu.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sat, 29 Jun 2013 18:34:18 +0000 (11:34 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "This fixes a crash in the crypto layer exposed by an SCTP test tool"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: algboss - Hold ref count on larval

10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sat, 29 Jun 2013 18:32:05 +0000 (11:32 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm/qxl fix from Dave Airlie:
 "Bad me forgot an access check, possible security issue, but since this
  is the first kernel with it, should be fine to just put it in now"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/qxl: add missing access check for execbuffer ioctl

10 years agoFix: kernel/ptrace.c: ptrace_peek_siginfo() missing __put_user() validation
Mathieu Desnoyers [Fri, 28 Jun 2013 13:49:46 +0000 (09:49 -0400)]
Fix: kernel/ptrace.c: ptrace_peek_siginfo() missing __put_user() validation

This __put_user() could be used by unprivileged processes to write into
kernel memory.  The issue here is that even if copy_siginfo_to_user()
fails, the error code is not checked before __put_user() is executed.

Luckily, ptrace_peek_siginfo() has been added within the 3.10-rc cycle,
so it has not hit a stable release yet.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andrey Vagin <avagin@openvz.org>
Cc: Roland McGrath <roland@redhat.com>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Pedro Alves <palves@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Sat, 29 Jun 2013 17:31:15 +0000 (10:31 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

Pull Ceph fix from Sage Weil:
 "This is a recently spotted regression in the snapshot behavior...

  It turns out several tests weren't being run in the nightlies so this
  took a while to spot"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: send snapshot context with writes

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sat, 29 Jun 2013 17:30:31 +0000 (10:30 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull ubifs fixes from Al Viro:
 "A couple of ubifs readdir/lseek race fixes.  Stable fodder, really
  nasty..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  UBIFS: fix a horrid bug
  UBIFS: prepare to fix a horrid bug

10 years agoMerge tag 'for-linus-20130628' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowe...
Linus Torvalds [Sat, 29 Jun 2013 17:28:52 +0000 (10:28 -0700)]
Merge tag 'for-linus-20130628' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-mn10300

Pull two MN10300 fixes from David Howells:
 "The first fixes a problem with passing arrays rather than pointers to
  get_user() where __typeof__ then wants to declare and initialise an
  array variable which gcc doesn't like.

  The second fixes a problem whereby putting mem=xxx into the kernel
  command line causes init=xxx to get an incorrect value."

* tag 'for-linus-20130628' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-mn10300:
  mn10300: Use early_param() to parse "mem=" parameter
  mn10300: Allow to pass array name to get_user()

10 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 29 Jun 2013 17:27:19 +0000 (10:27 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Thomas Gleixner:
 "Correct an ordering issue in the tick broadcast code.  I really wish
  we'd get compensation for pain and suffering for each line of code we
  write to work around dysfunctional timer hardware."

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tick: Fix tick_broadcast_pending_mask not cleared

10 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 29 Jun 2013 17:26:50 +0000 (10:26 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fix from Ingo Molnar:
 "One more fix for a recently discovered bug"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Disable monitoring on setuid processes for regular users

10 years agoASoC: ac97: fixup multi-platform AC'97 module build failure
Kevin Hilman [Fri, 28 Jun 2013 18:17:49 +0000 (11:17 -0700)]
ASoC: ac97: fixup multi-platform AC'97 module build failure

commit b047e1cc (ASoC: ac97: Support multi-platform AC'97) introduced
some build failures for modules wanting to access the generic
soc_ac97_ops.  For example:

ERROR: "soc_ac97_ops" [sound/soc/codecs/snd-soc-wm9712.ko] undefined!

To fix, export soc_ac97_ops to modules.

Cc: Mark Brown <broonie@linaro.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: pxa2xx: fixup multi-platform AC'97 build failures
Kevin Hilman [Fri, 28 Jun 2013 18:17:48 +0000 (11:17 -0700)]
ASoC: pxa2xx: fixup multi-platform AC'97 build failures

commit b047e1cc (ASoC: ac97: Support multi-platform AC'97) introduced
some build failures for the pxa2xx-ac97 support, fix them.

Cc: Mark Brown <broonie@linaro.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tegra20-ac97: Remove unused variable
Thierry Reding [Fri, 28 Jun 2013 19:53:25 +0000 (21:53 +0200)]
ASoC: tegra20-ac97: Remove unused variable

With the conversion to devm_ioremap_resource() the memregion variable is
no longer used so it can be dropped.

Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tegra20-ac97: Remove duplicate error message
Thierry Reding [Fri, 28 Jun 2013 19:53:24 +0000 (21:53 +0200)]
ASoC: tegra20-ac97: Remove duplicate error message

devm_ioremap_resource() already outputs an error message when any of the
operations it performs fails, so the duplicate in the caller can be
removed.

Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoUBIFS: fix a horrid bug
Artem Bityutskiy [Fri, 28 Jun 2013 11:15:15 +0000 (14:15 +0300)]
UBIFS: fix a horrid bug

Al Viro pointed me to the fact that '->readdir()' and '->llseek()' have no
mutual exclusion, which means the 'ubifs_dir_llseek()' can be run while we are
in the middle of 'ubifs_readdir()'.

This means that 'file->private_data' can be freed while 'ubifs_readdir()' uses
it, and this is a very bad bug: not only 'ubifs_readdir()' can return garbage,
but this may corrupt memory and lead to all kinds of problems like crashes an
security holes.

This patch fixes the problem by using the 'file->f_version' field, which
'->llseek()' always unconditionally sets to zero. We set it to 1 in
'ubifs_readdir()' and whenever we detect that it became 0, we know there was a
seek and it is time to clear the state saved in 'file->private_data'.

I tested this patch by writing a user-space program which runds readdir and
seek in parallell. I could easily crash the kernel without these patches, but
could not crash it with these patches.

Cc: stable@vger.kernel.org
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agoUBIFS: prepare to fix a horrid bug
Artem Bityutskiy [Fri, 28 Jun 2013 11:15:14 +0000 (14:15 +0300)]
UBIFS: prepare to fix a horrid bug

Al Viro pointed me to the fact that '->readdir()' and '->llseek()' have no
mutual exclusion, which means the 'ubifs_dir_llseek()' can be run while we are
in the middle of 'ubifs_readdir()'.

First of all, this means that 'file->private_data' can be freed while
'ubifs_readdir()' uses it.  But this particular patch does not fix the problem.
This patch is only a preparation, and the fix will follow next.

In this patch we make 'ubifs_readdir()' stop using 'file->f_pos' directly,
because 'file->f_pos' can be changed by '->llseek()' at any point. This may
lead 'ubifs_readdir()' to returning inconsistent data: directory entry names
may correspond to incorrect file positions.

So here we introduce a local variable 'pos', read 'file->f_pose' once at very
the beginning, and then stick to 'pos'. The result of this is that when
'ubifs_dir_llseek()' changes 'file->f_pos' while we are in the middle of
'ubifs_readdir()', the latter "wins".

Cc: stable@vger.kernel.org
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agomn10300: Use early_param() to parse "mem=" parameter
Akira Takeuchi [Fri, 28 Jun 2013 15:53:03 +0000 (16:53 +0100)]
mn10300: Use early_param() to parse "mem=" parameter

This fixes the problem that "init=" options may not be passed to kernel
correctly.

parse_mem_cmdline() of mn10300 arch gets rid of "mem=" string from
redboot_command_line. Then init_setup() parses the "init=" options from
static_command_line, which is a copy of redboot_command_line, and keeps
the pointer to the init options in execute_command variable.

Since the commit 026cee0 upstream (params: <level>_initcall-like kernel
parameters), static_command_line becomes overwritten by saved_command_line at
do_initcall_level(). Notice that saved_command_line is a command line
which includes "mem=" string.

As a result, execute_command may point to weird string by the length of
"mem=" parameter.
I noticed this problem when using the command line like this:

    mem=128M console=ttyS0,115200 init=/bin/sh

Here is the processing flow of command line parameters.
    start_kernel()
      setup_arch(&command_line)
         parse_mem_cmdline(cmdline_p)
           * strcpy(boot_command_line, redboot_command_line);
           * Remove "mem=xxx" from redboot_command_line.
           * *cmdline_p = redboot_command_line;
      setup_command_line(command_line) <-- command_line is redboot_command_line
        * strcpy(saved_command_line, boot_command_line)
        * strcpy(static_command_line, command_line)
      parse_early_param()
        strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE);
        parse_early_options(tmp_cmdline);
          parse_args("early options", cmdline, NULL, 0, 0, 0, do_early_param);
      parse_args("Booting ..", static_command_line, ...);
        init_setup() <-- save the pointer in execute_command
      rest_init()
        kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);

At this point, execute_command points to "/bin/sh" string.

    kernel_init()
      kernel_init_freeable()
        do_basic_setup()
          do_initcalls()
            do_initcall_level()
              (*) strcpy(static_command_line, saved_command_line);

Here, execute_command gets to point to "200" string !!

Signed-off-by: David Howells <dhowells@redhat.com>
10 years agomn10300: Allow to pass array name to get_user()
Akira Takeuchi [Fri, 28 Jun 2013 15:53:01 +0000 (16:53 +0100)]
mn10300: Allow to pass array name to get_user()

This fixes the following compile error:

CC block/scsi_ioctl.o
block/scsi_ioctl.c: In function 'sg_scsi_ioctl':
block/scsi_ioctl.c:449: error: invalid initializer

Signed-off-by: David Howells <dhowells@redhat.com>
10 years agoALSA: usb-audio: Add Audio Advantage Micro II
Przemek Rudy [Thu, 27 Jun 2013 21:52:33 +0000 (23:52 +0200)]
ALSA: usb-audio: Add Audio Advantage Micro II

This patch is adding extensive support (beside standard usb audio class)
for Audio Advantage Micro II usb sound card.
Features included:
- Access to AES bits (so now sending the IEC61937 compliant stream is
possible).
- Mixer SPDIF control added to turn on/off the optical transmitter.

Signed-off-by: Przemek Rudy <prudy1@o2.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge tag 'asoc-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Fri, 28 Jun 2013 11:36:22 +0000 (13:36 +0200)]
Merge tag 'asoc-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: More updates for v3.11

Some more fixes and enhancements, and also a bunch of refectoring for
AC'97 support which enables more than one AC'97 controller driver to be
built in.

10 years agoMerge remote-tracking branch 'asoc/topic/x86' into asoc-next
Mark Brown [Fri, 28 Jun 2013 11:17:07 +0000 (12:17 +0100)]
Merge remote-tracking branch 'asoc/topic/x86' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/twl6040' into asoc-next
Mark Brown [Fri, 28 Jun 2013 11:17:06 +0000 (12:17 +0100)]
Merge remote-tracking branch 'asoc/topic/twl6040' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/tas5086' into asoc-next
Mark Brown [Fri, 28 Jun 2013 11:17:06 +0000 (12:17 +0100)]
Merge remote-tracking branch 'asoc/topic/tas5086' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/ext' into asoc-next
Mark Brown [Fri, 28 Jun 2013 11:17:05 +0000 (12:17 +0100)]
Merge remote-tracking branch 'asoc/topic/ext' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/adsp' into asoc-next
Mark Brown [Fri, 28 Jun 2013 11:17:05 +0000 (12:17 +0100)]
Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/adau1701' into asoc-next
Mark Brown [Fri, 28 Jun 2013 11:17:04 +0000 (12:17 +0100)]
Merge remote-tracking branch 'asoc/topic/adau1701' into asoc-next

10 years agoASoC: tas5086: fix Mid-Z implementation
Daniel Mack [Thu, 27 Jun 2013 19:59:11 +0000 (21:59 +0200)]
ASoC: tas5086: fix Mid-Z implementation

It turns out that the TAS5086 doesn't like channel start parts to be
empty, and if all channels are configured to Mid-Z, part 1 has to be
used.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tas5086: fix TAS5086_CLOCK_CONTROL register size
Daniel Mack [Thu, 27 Jun 2013 19:59:10 +0000 (21:59 +0200)]
ASoC: tas5086: fix TAS5086_CLOCK_CONTROL register size

The TAS5086_CLOCK_CONTROL also has a size of 1 byte.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoALSA: Replace the magic number 44 with const
Takashi Iwai [Fri, 28 Jun 2013 09:56:49 +0000 (11:56 +0200)]
ALSA: Replace the magic number 44 with const

The char arrays with size 44 are for the name string of
snd_ctl_elem_id.  Define the constant and replace the raw numbers with
it for clarifying better.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Fix the max length of control name in generic parser
Takashi Iwai [Fri, 28 Jun 2013 09:51:32 +0000 (11:51 +0200)]
ALSA: hda - Fix the max length of control name in generic parser

add_control_with_pfx() in hda_generic.c assumes a shorter name string
for the control element, and this resulted in the truncation of the
long but valid string like "Headphone Surround Switch" in the middle.

This patch aligns the max size to the actual limit of snd_ctl_elem_id,
44.

Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Guess what, it's two more Dell headset mic quirks
David Henningsson [Fri, 28 Jun 2013 09:09:56 +0000 (11:09 +0200)]
ALSA: hda - Guess what, it's two more Dell headset mic quirks

Add two more machines that need quirks for headset mics to work.

Tested-by: Shawn Wang <shawn.wang@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1195636
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Yet another Dell headset mic quirk
David Henningsson [Fri, 28 Jun 2013 06:53:34 +0000 (08:53 +0200)]
ALSA: hda - Yet another Dell headset mic quirk

This quirk is needed for the headset mic to work on this Dell
machine.

BugLink: https://bugs.launchpad.net/bugs/1195597
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'full-roland-support' of git://git.alsa-project.org/alsa-kprivate into...
Takashi Iwai [Fri, 28 Jun 2013 10:13:26 +0000 (12:13 +0200)]
Merge branch 'full-roland-support' of git://git.alsa-project.org/alsa-kprivate into for-next

For adding support for many Roland and Yamaha devices:
* 'full-roland-support' of git://git.alsa-project.org/alsa-kprivate:
  ALSA: usb-audio: add quirks for Roland QUAD/OCTO-CAPTURE
  ALSA: usb-audio: claim autodetected PCM interfaces all at once
  ALSA: usb-audio: remove superfluous Roland quirks
  ALSA: usb-audio: add MIDI port names for some Roland devices
  ALSA: usb-audio: add support for many Roland/Yamaha devices
  ALSA: usb-audio: detect implicit feedback on Roland devices
  ALSA: usb-audio: store protocol version in struct audioformat

10 years agoALSA: hda - Add support for ALC5505 DSP power-save mode
Kailang Yang [Fri, 28 Jun 2013 10:03:01 +0000 (12:03 +0200)]
ALSA: hda - Add support for ALC5505 DSP power-save mode

This patch adds the power-saving control for ALC5505 DSP on some
Realtek codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Tested-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoASoC: mfld: Remove unused variable
Mark Brown [Fri, 28 Jun 2013 09:57:26 +0000 (10:57 +0100)]
ASoC: mfld: Remove unused variable

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agodrm/qxl: add missing access check for execbuffer ioctl
Dave Airlie [Fri, 28 Jun 2013 03:27:40 +0000 (13:27 +1000)]
drm/qxl: add missing access check for execbuffer ioctl

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agopowerpc/eeh: Add eeh_dev to the cache during boot
Thadeu Lima de Souza Cascardo [Thu, 27 Jun 2013 21:00:10 +0000 (18:00 -0300)]
powerpc/eeh: Add eeh_dev to the cache during boot

commit f8f7d63fd96ead101415a1302035137a866f8998 ("powerpc/eeh: Trace eeh
device from I/O cache") broke EEH on pseries for devices that were
present during boot and have not been hotplugged/DLPARed.

eeh_check_failure will get the eeh_dev from the cache, and will get
NULL. eeh_addr_cache_build adds the addresses to the cache, but eeh_dev
for the giving pci_device is not set yet. Just reordering the call to
eeh_addr_cache_insert_dev works fine. The ordering is similar to the one
in eeh_add_device_late.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Acked-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
10 years agoALSA: usb-audio: add quirks for Roland QUAD/OCTO-CAPTURE
Clemens Ladisch [Sun, 16 Jun 2013 16:27:56 +0000 (18:27 +0200)]
ALSA: usb-audio: add quirks for Roland QUAD/OCTO-CAPTURE

The Roland Quad/Octo-Capture devices use some unknown vendor-specific
mechanism to switch sample rates (and to manage other controls).  To
prevent the driver from attempting to use any other than the default
44.1 kHz sample rate, use quirks to hide the other alternate settings.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
10 years agoALSA: usb-audio: claim autodetected PCM interfaces all at once
Clemens Ladisch [Thu, 4 Apr 2013 19:43:57 +0000 (21:43 +0200)]
ALSA: usb-audio: claim autodetected PCM interfaces all at once

snd_card_register() registers all devices newly added since the last
call.  However, the playback/capture streams are handled as one ALSA
device, so the second /dev device will not be registered if the PCM
streams are added in two steps.

QUIRK_AUTODETECT caused the probe callback to be called once for each
interface, which triggered this problem.  Work around this by handling
this like the composite quirk, i.e., autodetecting all other interfaces
that might be used for PCM or MIDI.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
10 years agoALSA: usb-audio: remove superfluous Roland quirks
Clemens Ladisch [Thu, 7 Feb 2013 21:45:16 +0000 (22:45 +0100)]
ALSA: usb-audio: remove superfluous Roland quirks

Remove all quirks that are no longer needed now that the generic Roland
quirks can handle the vendor-specific descriptors correctly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
10 years agoALSA: usb-audio: add MIDI port names for some Roland devices
Clemens Ladisch [Sat, 9 Feb 2013 09:05:20 +0000 (10:05 +0100)]
ALSA: usb-audio: add MIDI port names for some Roland devices

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
10 years agoALSA: usb-audio: add support for many Roland/Yamaha devices
Clemens Ladisch [Sun, 31 Mar 2013 21:43:12 +0000 (23:43 +0200)]
ALSA: usb-audio: add support for many Roland/Yamaha devices

Add quirks to detect the various vendor-specific descriptors used by
Roland and Yamaha in most of their recent USB audio and MIDI devices.

Together with the previous patch, this should add audio/MIDI support for
the following USB devices:
- Edirol motion dive .tokyo performance package
- Roland MC-808 Synthesizer
- Roland BK-7m Synthesizer
- Roland VIMA JM-5/8 Synthesizer
- Roland SP-555 Sequencer
- Roland V-Synth GT Synthesizer
- Roland Music Atelier AT-75/100/300/350C/500/800/900/900C Organ
- Edirol V-Mixer M-200i/300/380/400/480/R-1000
- BOSS GT-10B Effects Processor
- Roland Fantom G6/G7/G8 Keyboard
- Cakewalk Sonar V-Studio 20/100/700 Audio Interface
- Roland GW-8 Keyboard
- Roland AX-Synth Keyboard
- Roland JUNO-Di/STAGE/Gi Keyboard
- Roland VB-99 Effects Processor
- Cakewalk UM-2G MIDI Interface
- Roland A-500S Keyboard
- Roland SD-50 Synthesizer
- Roland OCTAPAD SPD-30 Controller
- Roland Lucina AX-09 Synthesizer
- BOSS BR-800 Digital Recorder
- Roland DUO/TRI-CAPTURE (EX) Audio Interface
- BOSS RC-300 Loop Station
- Roland JUPITER-50/80 Keyboard
- Roland R-26 Recorder
- Roland SPD-SX Controller
- BOSS JS-10 Audio Player
- Roland TD-11/15/30 Drum Module
- Roland A-49/88 Keyboard
- Roland INTEGRA-7 Synthesizer
- Roland R-88 Recorder

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
10 years agoALSA: usb-audio: detect implicit feedback on Roland devices
Clemens Ladisch [Sun, 3 Feb 2013 21:31:20 +0000 (22:31 +0100)]
ALSA: usb-audio: detect implicit feedback on Roland devices

All the Roland/Edirol/BOSS USB audio devices that need implicit feedback
show this unambiguously in their descriptors, so it might be a good idea
to let the driver detect this.

This should make playback work correctly (at least with Jack) with the
following devices:
- BOSS GT-100
- BOSS JS-8 Jam Station
- Edirol M-16DX
- Roland GAIA SH-01

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
10 years agoALSA: usb-audio: store protocol version in struct audioformat
Clemens Ladisch [Thu, 31 Jan 2013 20:39:17 +0000 (21:39 +0100)]
ALSA: usb-audio: store protocol version in struct audioformat

Instead of reading bInterfaceProtocol from the descriptor whenever it's
needed, store this value in the audioformat structure.  Besides
simplifying some code, this will allow us to correctly handle vendor-
specific devices where the descriptors are marked with other values.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
10 years agoALSA: pci: trivial: replace numeric with standard PM state macros
Yijing Wang [Thu, 27 Jun 2013 12:55:11 +0000 (20:55 +0800)]
ALSA: pci: trivial: replace numeric with standard PM state macros

Use standard PM state macros PCI_Dx instead of numeric 0/1/2..

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agorbd: send snapshot context with writes
Josh Durgin [Wed, 26 Jun 2013 19:56:17 +0000 (12:56 -0700)]
rbd: send snapshot context with writes

Sending the right snapshot context with each write is required for
snapshots to work. Due to the ordering of calls, the snapshot context
is never set for any requests. This causes writes to the current
version of the image to be reflected in all snapshots, which are
supposed to be read-only.

This happens because rbd_osd_req_format_write() sets the snapshot
context based on obj_request->img_request. At this point, however,
obj_request->img_request has not been set yet, to the snapshot context
is set to NULL. Fix this by moving rbd_img_obj_request_add(), which
sets obj_request->img_request, before the osd request formatting
calls.

This resolves:
    http://tracker.ceph.com/issues/5465

Reported-by: Karol Jurak <karol.jurak@gmail.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
10 years agoASoC: ac97: Support multi-platform AC'97
Mark Brown [Wed, 26 Jun 2013 11:45:59 +0000 (12:45 +0100)]
ASoC: ac97: Support multi-platform AC'97

Currently we can only have a single platform built in with AC'97 support
due to the use of a global variable to provide the bus operations. Fix
this by making that variable a pointer and having the bus drivers set the
operations prior to registering.

This is not a particularly good or nice approach but it avoids blocking
multiplatform and a real fix involves fixing the fairly deep problems
with AC'97 support - we should be converting it to a real bus.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge branch 'topic/wm9705' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Thu, 27 Jun 2013 08:48:37 +0000 (09:48 +0100)]
Merge branch 'topic/wm9705' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-ac97

10 years agoMerge branch 'topic/stac9766' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Mark Brown [Thu, 27 Jun 2013 08:47:04 +0000 (09:47 +0100)]
Merge branch 'topic/stac9766' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-ac97

10 years agoASoC: wm9705: Remove noisy print on boot
Mark Brown [Tue, 25 Jun 2013 16:19:56 +0000 (17:19 +0100)]
ASoC: wm9705: Remove noisy print on boot

There's no content in the announcement.

Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()
Mark Brown [Wed, 26 Jun 2013 11:40:47 +0000 (12:40 +0100)]
ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()

Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tegra-ac97: Do common and clock init prior to component registration
Mark Brown [Wed, 26 Jun 2013 11:27:58 +0000 (12:27 +0100)]
ASoC: tegra-ac97: Do common and clock init prior to component registration

Otherwise we may instantiate and hence have something try to access the
device while it is still completing initialisation.

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tegra20-ac97: Convert to devm_ioremap_resource()
Mark Brown [Wed, 26 Jun 2013 11:18:39 +0000 (12:18 +0100)]
ASoC: tegra20-ac97: Convert to devm_ioremap_resource()

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tegra20-ac97: Convert to devm_clk_get()
Mark Brown [Wed, 26 Jun 2013 11:16:50 +0000 (12:16 +0100)]
ASoC: tegra20-ac97: Convert to devm_clk_get()

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: nuc900-ac97: Convert to use devm_ APIs
Mark Brown [Wed, 26 Jun 2013 11:11:33 +0000 (12:11 +0100)]
ASoC: nuc900-ac97: Convert to use devm_ APIs

Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: ep93xx: Remove redundant dev_set_drvdata() calls
Mark Brown [Wed, 26 Jun 2013 10:53:45 +0000 (11:53 +0100)]
ASoC: ep93xx: Remove redundant dev_set_drvdata() calls

The driver core does this and it's never legal to rely on the value of
drvdata if not set in probe() anyway.

Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: bf5xx-ac97: Convert to devm_gpio_request_one()
Mark Brown [Wed, 26 Jun 2013 10:47:56 +0000 (11:47 +0100)]
ASoC: bf5xx-ac97: Convert to devm_gpio_request_one()

Also clean up the error reporting from failed requests while we're at it.

Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: ac97c: Use module_platform_driver()
Mark Brown [Wed, 26 Jun 2013 10:30:37 +0000 (11:30 +0100)]
ASoC: ac97c: Use module_platform_driver()

Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: psc-ac97: Convert to module_platform_driver()
Mark Brown [Wed, 26 Jun 2013 10:28:59 +0000 (11:28 +0100)]
ASoC: psc-ac97: Convert to module_platform_driver()

Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: psc-ac97: Use devm_ioremap_resource()
Mark Brown [Wed, 26 Jun 2013 10:09:55 +0000 (11:09 +0100)]
ASoC: psc-ac97: Use devm_ioremap_resource()

Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: samsung-ac97: Convert to devm_ioremap_resource()
Mark Brown [Wed, 26 Jun 2013 09:34:37 +0000 (10:34 +0100)]
ASoC: samsung-ac97: Convert to devm_ioremap_resource()

Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: samsung-ac97: Use devm_clk_get()
Mark Brown [Wed, 26 Jun 2013 09:29:02 +0000 (10:29 +0100)]
ASoC: samsung-ac97: Use devm_clk_get()

Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge tag 'fcoe1' into fixes
James Bottomley [Thu, 27 Jun 2013 06:08:22 +0000 (23:08 -0700)]
Merge tag 'fcoe1' into fixes

This patch fixes a critical bug that was introduced in 3.9
related to VLAN tagging FCoE frames.

10 years agoMerge tag 'fcoe' into fixes
James Bottomley [Thu, 27 Jun 2013 06:07:53 +0000 (23:07 -0700)]
Merge tag 'fcoe' into fixes

3.10 fixes

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 27 Jun 2013 05:24:37 +0000 (19:24 -1000)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Found via trinity:

    If you connect up an ipv6 socket to an ipv4 mapped address then an
    ipv6 one, sendmsg() can croak because ip6_sk_dst_check() assumes the
    route cached in the socket is an ipv6 one.  In this case there is an
    ipv4 route attached, so it gets stomped on.

    Reported by Dave Jones and Hannes Frederic Sowa, fixed by Eric
    Dumazet.

 2) AF_KEY notifications leak some kernel memory to userspace, fix from
    Mathias Krause.

 3) DLCI calls __dev_get_by_name() without proper locking, and dlci_del
    doesn't validate that the device being deleted is actually a DLCI
    one.  Fixes from Li Zefan.

 4) Length check on bluetooth l2cap information responses is wrong, each
    response type has a different lenth, so we should make sure it's in
    a given range rather than enforce one single valid length.  From
    Jaganath Kanakkassery.

 5) Receive FIFO overflow is really easy to trigger in stress scenerios
    in the sh_eth driver, but the event isn't being handled properly at
    all.  Specifically, the mask of error interrupts doesn't include the
    event so we never clear it, resulting in the driver becomming wedged
    processing an interrupt that never gets cleared.

    Fix from Sergei Shtylyov.

 6) qlcnic sleeps while holding a spinlock, use mdelay() instead of
    msleep().  From Shahed Shaikh.

 7) Missing curly braces causes SIP netfilter NAT module to always drop
    packets.  Fix from Balazs Peter Odor.

 8) ipt_ULOG in netfilter passes the wrong value to timer setup, causing
    the timer to dereference crap when it fires.  Fix from Gao Feng.

 9) Missing RCU protection around txq->axq_acq traversal in
    ath_txq_schedule().  Fix from Felix Fietkau.

10) Idle state transition test in ath9k_htc_config() is reversed, fix
    from Sujith Manoharan.

11) IPV6 forwarding handles unicast Router Alert packets incorrectly.
    It tests the wrong option state.  Previously opt->ra being non-zero
    indicated a router alert marking in the SKB, but now it's indicated
    by a bit in opt->flags.  Fix from YOSHIFUJI Hideaki.

12) SKB leak in GRE tunnel GSO handling, from Eric Dumazet.

13) get_user_pages_fast() error handling in TUN and MACVTAP use the same
    local variable for the base index and the loop iterator for page
    traversal, oops! Fix from Michael S Tsirkin.

14) ipv6_get_lladdr() can fail, and we must therefore check it's return
    value in inet6_set_iftoken().  For from Hannes Frederic Sowa.

15) If you change an interface name and meanwhile can sneak in something
    that looks up the name (like SO_BINDTODEVICE or SIOCGIFNAME) we can
    deadlock with CONFIG_PREEMPT=n.  Fix this by providing a helper
    function that properly uses raw_seqcount_begin().  From Nicolas
    Schichan.

16) Chain noise calibration test is inverted in iwlwifi, fix from
    Nikolay Martynov.

17) Properly set TX iwlwifi descriptor flags for back requests.  Fix
    from Emmanuel Grumbach.

18) We can't assume skb_transport_header() is set in xt_TCPOPTSTRAP
    module, fix from Pablo Neira Ayuso.

19) Some crummy APs don't provide the proper High Throughput info in
    association response frames.  Add a workaround by assume we'll use
    whatever is in the beacon/probe.  Fix from Johannes Berg.

20) mac80211 call to rate_idx_match_mask() swaps two arguments (mask and
    channel width).  Fix from Simon Wunderlich.

21) xt_TCPMSS (like xt_TCPOPTSTRAP) must not try to handle fragmented
    frames.  Fix from Phil Oester.

22) Fix rate control regression causing iwlwifi/iwlegacy chips to use
    1Mbit/s on pre-11n networks.  From Moshe Benji and Stanslaw Gruszka.

23) Disable brcmsmac power-save functions, they cause regressions.  From
    Arend van Spriel.

24) Enforce a sane minimum MTU in l2cap_build_cmd() otherwise we can
    easily crash.  Fix from Anderson Lizardo.

25) If a learning packet arrives during vxlan_stop() we crash, easily
    fixed by checking netif_running().  From Stephen Hemminger.

26) Static vxlan FDB entries should not be migrated, also from Stephen.

27) skb_clone() failures not handled in vxlan_xmit(), oops.  Also from
    Stephen.

28) Add minimal driver for AR816x/AR817x ethernet chips, from Johannes
    Berg.

29) Fix regression in userspace VLAN acceleration control, added by the
    802.1ad support changes.  Fix from Fernando Luis Vazquez Cao.

30) Interval selection for MLD queries in the bridging code was
    reversed.  Fix from Linus Lüssing.

31) ipv6's ndisc_send_redirect() erroneously writes to the packet we
    received not the packet we are building to send out.  Fix from
    Matthias Schiffer.

32) Don't free netdev before unregistering it, in usb_8dev can driver.
    From Marc Kleine-Budde.

33) Fix nl80211 attribute buffer races, from Johannes Berg.

34) Although netlink_diag.h is under uapi/ it isn't present in Kbuild.
    From Stephen Hemminger.

35) Wrong address and family passed to MD5 key lookups in TCP, from
    Aydin Arik.

36) phy_type attribute created by SFC driver should not be writable.
    From Ben Hutchings.

37) Receive/Transmit queue allocations in pxa168_eth and mv643xx_eth
    should use kzalloc().  Otherwise if setup fails half-way, we'll
    dereference garbage when trying to teardown the rings.  From Lubomir
    Rintel.

38) Fix double-allocation of dst (resulting in unfreeable net device) in
    ipv6's init_loopback().  From Gao Feng.

39) Fix fragmentation handling SKB leak in netfilter conntrack, we were
    freeing the wrong skb pointer.  From Phil Oester.

40) Don't report "-1" (SPEED_UNKNOWN) in bond_miimon_commit(), from
    Nikolay Aleksandrov.

41) davinci_cpdma doesn't check for DMA mapping errors, letting the
    device scribble to random addresses.  From Sebastian Siewior.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (69 commits)
  dlci: validate the net device in dlci_del()
  dlci: acquire rtnl_lock before calling __dev_get_by_name()
  af_key: fix info leaks in notify messages
  ipv6: ip6_sk_dst_check() must not assume ipv6 dst
  net: fix kernel deadlock with interface rename and netdev name retrieval.
  net/tg3: Avoid delay during MMIO access
  ipv6: check return value of ipv6_get_lladdr
  macvtap: fix recovery from gup errors
  tun: fix recovery from gup errors
  gre: fix a possible skb leak
  ipv6: Process unicast packet with Router Alert by checking flag in skb.
  ath9k_htc: Handle IDLE state transition properly
  ath9k: fix an RCU issue in calling ieee80211_get_tx_rates
  netfilter: ipt_ULOG: fix incorrect setting of ulog timer
  netfilter: ctnetlink: send event when conntrack label was modified
  netfilter: nf_nat_sip: fix mangling
  qlcnic: Do not sleep while holding spinlock
  drivers: net: cpsw: fix compilation error with cpsw driver
  tcp: doc : fix the syncookies default value
  sh_eth: fix misreporting of transmit abort
  ...

10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Thu, 27 Jun 2013 05:23:15 +0000 (19:23 -1000)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull i915 drm fixes from Dave Airlie:
 "These should be the last two fixes for i915, one is for a fence leak
  killing X on some older GPUs, and one is a late regression partial
  revert for an swiotlb/xen/i915 interaction, Konrad has promised to
  figure out the proper answer, and this patch is the best thing to do
  at this stage to avoid regressing"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: make compact dma scatter lists creation work with SWIOTLB backend.
  drm/i915: Restore fences after resume and GPU resets

10 years agodlci: validate the net device in dlci_del()
Zefan Li [Wed, 26 Jun 2013 07:31:58 +0000 (15:31 +0800)]
dlci: validate the net device in dlci_del()

We triggered an oops while running trinity with 3.4 kernel:

BUG: unable to handle kernel paging request at 0000000100000d07
IP: [<ffffffffa0109738>] dlci_ioctl+0xd8/0x2d4 [dlci]
PGD 640c0d067 PUD 0
Oops: 0000 [#1] PREEMPT SMP
CPU 3
...
Pid: 7302, comm: trinity-child3 Not tainted 3.4.24.09+ 40 Huawei Technologies Co., Ltd. Tecal RH2285          /BC11BTSA
RIP: 0010:[<ffffffffa0109738>]  [<ffffffffa0109738>] dlci_ioctl+0xd8/0x2d4 [dlci]
...
Call Trace:
  [<ffffffff8137c5c3>] sock_ioctl+0x153/0x280
  [<ffffffff81195494>] do_vfs_ioctl+0xa4/0x5e0
  [<ffffffff8118354a>] ? fget_light+0x3ea/0x490
  [<ffffffff81195a1f>] sys_ioctl+0x4f/0x80
  [<ffffffff81478b69>] system_call_fastpath+0x16/0x1b
...

It's because the net device is not a dlci device.

Reported-by: Li Jinyue <lijinyue@huawei.com>
Signed-off-by: Li Zefan <lizefan@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agodlci: acquire rtnl_lock before calling __dev_get_by_name()
Zefan Li [Wed, 26 Jun 2013 07:29:54 +0000 (15:29 +0800)]
dlci: acquire rtnl_lock before calling __dev_get_by_name()

Otherwise the net device returned can be freed at anytime.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoaf_key: fix info leaks in notify messages
Mathias Krause [Wed, 26 Jun 2013 21:52:30 +0000 (23:52 +0200)]
af_key: fix info leaks in notify messages

key_notify_sa_flush() and key_notify_policy_flush() miss to initialize
the sadb_msg_reserved member of the broadcasted message and thereby
leak 2 bytes of heap memory to listeners. Fix that.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipv6: ip6_sk_dst_check() must not assume ipv6 dst
Eric Dumazet [Wed, 26 Jun 2013 11:15:07 +0000 (04:15 -0700)]
ipv6: ip6_sk_dst_check() must not assume ipv6 dst

It's possible to use AF_INET6 sockets and to connect to an IPv4
destination. After this, socket dst cache is a pointer to a rtable,
not rt6_info.

ip6_sk_dst_check() should check the socket dst cache is IPv6, or else
various corruptions/crashes can happen.

Dave Jones can reproduce immediate crash with
trinity -q -l off -n -c sendmsg -c connect

With help from Hannes Frederic Sowa

Reported-by: Dave Jones <davej@redhat.com>
Reported-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>