Commit Graph

311490 Commits

Author SHA1 Message Date
Grazvydas Ignotas
a859e4d659 wl1251: Fix memory leaks in SPI initialization
This patch fixes two memory leaks in the SPI initialization code.

Patch based on old maemo patch by:
Yuri Ershov <ext-yuri.ershov@nokia.com>

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-20 14:10:25 -04:00
Grazvydas Ignotas
0d776fcdaf wl1251: always report beacon loss to the stack
Always report beacon loss to the stack, not only when in powersave
state. This is because there's possibility that the driver disables
PSM before it handles old BSS_LOSE_EVENT, so beacon loss has to be
reported.

Patch based on old maemo patch by:
Janne Ylalehto <janne.ylalehto@nokia.com>
Juuso Oikarinen <juuso.oikarinen@nokia.com>
Luciano Coelho <luciano.coelho@nokia.com>
Yuri Ershov <ext-yuri.ershov@nokia.com>

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-20 14:10:24 -04:00
Grazvydas Ignotas
cae6247db0 wl1251: fix TSF calculation
Cast MSB part of current TSF to u64 to prevent loss of most
significant bits. MSB should also be shifted by 32.

Patch based on old maemo patch by:
Yuri Kululin <ext-yuri.kululin@nokia.com>
Yuri Ershov <ext-yuri.ershov@nokia.com>

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-20 14:10:24 -04:00
Linus Torvalds
a4d7a12238 Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
 "This includes three MMCI changes - one to fix up the wrong version of
  the DT support patch which was merged, and two to make deferred
  probing work.  It also includes a fix to the OMAP SPI driver which is
  causing a boot time warning.

  The remainder are very minor ARM fixes."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  SPI: fix over-eager devm_xxx() conversion
  ARM: 7427/1: mmc: mmci: Defer probe() in case of yet uninitialized GPIOs
  ARM: 7426/1: mmc: mmci: Remove wrong error handling of gpio 0
  ARM: 7425/1: extable: ensure fixup entries are 4-byte aligned
  ARM: 7421/1: bpf_jit: BPF_S_ANC_ALU_XOR_X support
  ARM: 7423/1: kprobes: run t32_simulate_ldr_literal() without insn slot
  ARM: 7422/1: mmc: mmci: Allocate platform memory during Device Tree boot
2012-06-20 09:42:09 -07:00
Linus Torvalds
61fcbc8dfe pinctrl fixes for the -rc series:
- Fixed a 2-line compile error for MXS
 - A pure documentation fix for Nomadik
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJP4PWNAAoJEEEQszewGV1zE2UQAKRMoeJw97o9NFuHICg3+oMA
 SExUxD9H9Ey5nWtFsjqVkZKkEksdFlDwkdsXoXxsDVZlVNBFM/oxRe3fGiqgEIjN
 /fks/xfFBo7xQPoJw05z8Z/dYKDgchhor5Q7oRWReYMnNhuHccjWdhD0Z7dFG27Q
 Up8purFH3v3qidxXy3jrLG03b+s/wDHTzsGBP2sIJVhUvMkVcoi3AUgjoWE/Qj68
 Ljklf1f5mSzY6YKU4kkpSaickoD8FxxkbTk4qNarFk4RLTxQeFOyqjVN0lFfUjF1
 sUvfnlgeFYy3N3Vp5keI1iBRBuRYBR002WI3T6uorHyM78ssbks5md3BxA/IDff+
 QTdPUCKNAfPqnqmnVBsvtTSb9MrdreBEiSw6j31fzgeN+MipYc2h0BErJPynMKGP
 QWWZrm0q+ux6bf/bsdfpBl7q0RD0d45qihYI7azQq4vV/QfXpFsPxDdFY+edIau4
 TVb3c7xang5cMK7aq+HZ9tBV8v4WvcGg+OSPOitaXyIk4kHmO3E+eYGQ9GsSFxcK
 Jd25v88tXrrip4//fEb6RCRxf1oHeZ8onR8Ex8FsxMh0cMumhXi+VmKEel0UJKux
 42Ti/Pl6CX/FtiU5hwzn6ojwntR9yaQHz7bInzkUgeP8r1fLa96IN2ndoLDv0SEh
 gvFcBaAbZV7WlZV8gLkD
 =zNxH
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull two pinctrl fixes from Linus Walleij:
 - Fixed a 2-line compile error for MXS
 - A pure documentation fix for Nomadik

* tag 'pinctrl-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl/nomadik: document Alt-C glitch
  pinctrl: mxs: Use kfree to fix build error
2012-06-20 09:41:21 -07:00
Russ Dill
aef2b89662 ARM: OMAP: Fix Beagleboard DVI reset gpio
Commit e813a55eb9 ("OMAP: board-files:
remove custom PD GPIO handling for DVI output") moved TFP410 chip's
powerdown-gpio handling from the board files to the tfp410 driver. One
gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in
the Beagle board file. This causes the tfp410 driver to fail to request
the gpio on Beagle, causing the driver to fail and thus the DVI output
doesn't work.

This patch removes several boot errors from board-omap3beagle.c:

 - gpio_request: gpio--22 (DVI reset) status -22
 - Unable to get DVI reset GPIO

There is a combination of leftover code and revision confusion.
Additionally, xM support is currently a hack.

For original Beagleboard this removes the double initialization of GPIO
170, properly configures it as an output, and wraps the initialization
in an if block so that xM does not attempt to request it.

For Beagleboard xM it removes reference to GPIO 129 which was part
of rev A1 and A2 designs, but never functioned. It then properly assigns
beagle_dvi_device.reset_gpio in beagle_twl_gpio_setup and removes the
hack of initializing it high. Additionally, it uses
gpio_set_value_cansleep since this GPIO is connected through i2c.

Unfortunately, there is no way to tell the difference between xM A2 and
A3. However, GPIO 129 does not function on rev A1 and A2, and the TWL
GPIO used on A3 and beyond is not used on rev A1 and A2, there are no
problems created by this fix.

Tested on Beagleboard-xM Rev C1 and Beagleboard Rev B4.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-06-20 07:18:21 -07:00
Jon Hunter
95dca12d6b arm/dts: OMAP2: Fix interrupt controller binding
When booting with device-tree on an OMAP2420H4, the kernel is hanging when
initialising the interrupts and following kernel dumps is seen ...

[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at arch/arm/mach-omap2/irq.c:271 omap_intc_of_init+0x50/0xb4()
[    0.000000] unable to get intc registers
[    0.000000] Modules linked in:
[    0.000000] [<c001befc>] (unwind_backtrace+0x0/0xf4) from [<c0040c34>] (warn_slowpath_common+0x4c/0x64)
[    0.000000] [<c0040c34>] (warn_slowpath_common+0x4c/0x64) from [<c0040ce0>] (warn_slowpath_fmt+0x30/0x40)
[    0.000000] [<c0040ce0>] (warn_slowpath_fmt+0x30/0x40) from [<c066b8a4>] (omap_intc_of_init+0x50/0xb4)
[    0.000000] [<c066b8a4>] (omap_intc_of_init+0x50/0xb4) from [<c0688b70>] (of_irq_init+0x144/0x288)
[    0.000000] [<c0688b70>] (of_irq_init+0x144/0x288) from [<c0663294>] (init_IRQ+0x14/0x1c)
[    0.000000] [<c0663294>] (init_IRQ+0x14/0x1c) from [<c06607fc>] (start_kernel+0x198/0x304)
[    0.000000] [<c06607fc>] (start_kernel+0x198/0x304) from [<80008044>] (0x80008044)
[    0.000000] ---[ end trace 1b75b31a2719ed1c ]---
[    0.000000] of_irq_init: children remain, but no parents

The OMAP2 interrupt controller binding is missing the number of interrupts and
interrupt controller register address. Adding these fixes the problem.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-06-20 07:18:20 -07:00
Tony Lindgren
3d09b33fec ARM: OMAP2: Fix tusb6010 GPIO interrupt for n8x0
Here's one more gpio_to_irq conversion that we missed
earlier. Tested with n800 in gadget mode using USB_ETH.

Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-06-20 07:18:15 -07:00
Tony Lindgren
310018d52e ARM: OMAP2+: Fix MUSB ifdefs for platform init code
Commit 62285963 (usb: musb: drop a gigantic amount of ifdeferry)
got rid of a bunch of ifdefs in the MUSB code. Looks like the
platform init code is still using these dropped defines though,
which in many cases results the board defaulting always to host
mode.

Currently the situation is that USB_MUSB_HDRC is the main
Kconfig option with additional USB_GADGET_MUSB_HDRC so only
these two should be used to select between host and OTG mode.

Fix the situation for omaps. The following users should fix the
platform init code in a similar way:

Dropped Kconfig option          Current users

USB_MUSB_OTG                    blackfin, davinci, not in Kconfigs
USB_MUSB_PERIPHERAL             davinci, not in Kconfigs
USB_MUSB_HOST                   davinci, not in Kconfigs
USB_MUSB_HDRC_HCD               blackfin, not in Kconfigs
USB_MUSB_OTG                    blackfin, not in Kconfigs

Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: linux-usb@vger.kernel.org
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-06-20 07:18:15 -07:00
Sage Weil
642c0dbde3 libceph: flush msgr queue during mon_client shutdown
We need to flush the msgr workqueue during mon_client shutdown to
ensure that any work affecting our embedded ceph_connection is
finished so that we can be safely destroyed.

Previously, we were flushing the work queue after osd_client
shutdown and before mon_client shutdown to ensure that any osd
connection refs to authorizers are flushed.  Remove the redundant
flush, and document in the comment that the mon_client flush is
needed to cover that case as well.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
(cherry picked from commit f3dea7edd3)
2012-06-20 07:43:50 -05:00
Yan, Zheng
b132cf4c73 rbd: Clear ceph_msg->bio_iter for retransmitted message
The bug can cause NULL pointer dereference in write_partial_msg_pages

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Reviewed-by: Alex Elder <elder@inktank.com>
(cherry picked from commit 43643528cc)
2012-06-20 07:43:50 -05:00
Sage Weil
88ed6ea0b2 libceph: use con get/put ops from osd_client
There were a few direct calls to ceph_con_{get,put}() instead of the con
ops from osd_client.c.  This is a bug since those ops aren't defined to
be ceph_con_get/put.

This breaks refcounting on the ceph_osd structs that contain the
ceph_connections, and could lead to all manner of strangeness.

The purpose of the ->get and ->put methods in a ceph connection are
to allow the connection to indicate it has a reference to something
external to the messaging system, *not* to indicate something
external has a reference to the connection.

[elder@inktank.com: added that last sentence]

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Alex Elder <elder@inktank.com>
(cherry picked from commit 0d47766f14)
2012-06-20 07:43:49 -05:00
Alex Elder
680584fab0 libceph: osd_client: don't drop reply reference too early
In ceph_osdc_release_request(), a reference to the r_reply message
is dropped.  But just after that, that same message is revoked if it
was in use to receive an incoming reply.  Reorder these so we are
sure we hold a reference until we're actually done with the message.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ab8cb34a4b)
2012-06-20 07:43:48 -05:00
Yan, Zheng
61600ef848 ceph: check PG_Private flag before accessing page->private
I got lots of NULL pointer dereference Oops when compiling kernel on ceph.
The bug is because the kernel page migration routine replaces some pages
in the page cache with new pages, these new pages' private can be non-zero.

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 28c0254ede)
2012-06-20 07:43:48 -05:00
Ingo Molnar
6921a575c9 Merge branch 'tip/perf/urgent-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent 2012-06-20 14:26:58 +02:00
Axel Lin
8386a00f14 regulator: tps6524x: Fix get_voltage_sel for fixed voltage
get_voltage_sel() should return selector rather than voltage.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-20 11:20:24 +01:00
Alexander Duyck
8633c08461 ixgbe: Fix memory leak in ixgbe when receiving traffic on DDP enabled rings
This patch fixes a memory leak that was introduced in the 3.4 kernel.  The
leak occurred when FCoE was enabled and traffic was passed over the FCoE
rings reserved for FCoE.  The memory leak was due to us not populating the
compound page information on the order 1 pages needed for FCoE.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-06-20 00:53:57 -07:00
Carolyn Wyborny
0e808bcc48 Kconfig: Fix Kconfig for Intel ixgbe and igb PTP support.
Fix Kconfig file to make sure that PTP and IGB/IXGBE are both either
in-kernel or modules, not mixed.  Having the build status mixed causes
compile errors.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-06-20 00:52:54 -07:00
Carolyn Wyborny
adc0fa4139 igb: Fix incorrect RAR address entries for i210/i211 device.
i210/i211 device has only 16 RAR address filters like 82575, instead of
32 like i350.  This patch removes the entries for i210/i211 in the
get_invariants function which was setting them for 32. This ensures that
they will get the default value which is the correct one.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-06-20 00:50:54 -07:00
Linus Torvalds
f40759e704 Sound fixes for 3.5-rc4
Most of changes are fairly small and driver-specific.
 
 A remaining regression fix for USB-audio sync pipe check, a fix for
 HD-audio power-up sequence, fixes for ASoC pxa-ssp compile issues, and
 bunch of ASoC codec and trivial fix patches.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJP4WpIAAoJEGwxgFQ9KSmkmwMQAJ4kgUED9asypx3bGkw5hRdb
 wgyZZJsyUYUIpK+xuwqpYnZFCd77+8su1PXnepmB7+0ChvxhyN2NyPPjxrXwL4Pz
 Av3/s5jMSmHesu+xhy3hkpT/QBE5Gal6a3ZK9ZYTFBULC7w8SLaOAdld1+aJYul8
 vMPL84dwsz3LYhItVNLKydRdzxiyQh1uIRCcUojqbvNusULMYsDv4P1jeBN7PzKJ
 qPhqc9Tabjer1+MEXD5CvWB8YhsUBmbR6aWH7fi++/v+ve4YP/OKfxHkPPCE7tG3
 W0wtKbZFXo177gzGe/p8JnzUYZ0IdmTf6KUv1KcqHBGDzSUj1dQtN/g6L4CjbBl1
 DNuNZVmKzwlL8iMUpfPpxVnw2ZiqZ2w5Ze439/CTngZuR6LoeBvFBgYZ5nQ65fZw
 TZ0tWK4/2XawDf1+FX7bDcXEM4U7zqqg1nl2X2WZwuDhw+TDQj1wKfKu52ZZVAfS
 tCn9uT++33y1Id39bhKiRHZUbdovTED1kDaX9Fh2d8Kn3tZUyQnb4tciDyim4P1p
 WSfzTouqUTTP9p+kbWyk8PW9RnbcK/BttS2p6G1e287eLF/poHEJxj00vQ85gdDo
 pib7E2gEEQfrtbHv8c6yRDQsYL+ON6Zc1bjSBy9h8YhVaNHhe8UGqFVSmCMHwRFB
 NyEGpUNuBmq3PI8Nhc8j
 =oQ5N
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Most of changes are fairly small and driver-specific.

  A remaining regression fix for USB-audio sync pipe check, a fix for
  HD-audio power-up sequence, fixes for ASoC pxa-ssp compile issues, and
  bunch of ASoC codec and trivial fix patches."

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: 6fire: use NULL instead of 0 for pointer assignment
  ALSA: hda - Handle open while transitioning to D3.
  ALSA: snd-usb: make snd_usb_substream_capture_trigger static
  ALSA: snd-usb: fix sync pipe check
  ASoC: tegra+wm8903: turn of mic detect when card is removed
  ASoC: wm8996: Mark the CODEC as cache only when powering off on boot
  ASoC: wm8996: Move reset before the initial regulator disable
  ASoC: wm8996: Remove spurious regulator_bulk_free()
  ASoC: wm8904: Fix cache only management
  ASoC: wm8904: Fix GPIO and MICBIAS initialisation for regmap conversion
  ASoC: fix pxa-ssp compiling issue under mach-mmp
  ARM: MMP: add pxa910-ssp into ssp_id_table
2012-06-19 23:37:19 -07:00
Oleksij Rempel
b64a1ba9d3 ALSA: snd_usb_audio: ignore ctrl errors on QuickCam Pro for Notebooks
This webcam works mostly ok, exept with skype.
Skype sends lots of ctrl messages to dynamically ajust
record level. If for some reasons it pokes some error
every thing goes broken:
- first pulseaudio blocks sound for all apps
- then video is reseted
- then skype freez

dmesg has lots of messages like:
cannot set freq 16000 to ep 0x86"

Setting ignore_ctl_error=1 fixes this problem.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-20 08:29:08 +02:00
Oleksij Rempel
05b9afd5b7 ALSA: snd_usb_audio: ignore ctrl errors on QuickCam E3500
if this cam is pluged in, pulse audio can't initiate capture
device.
dmesg has lots of messages like:
"cannot set freq 16000 to ep 0x86"

Setting ignore_ctl_error=1 fixes this problem.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-20 08:28:57 +02:00
Sean Hefty
4dd81e8956 RDMA/cma: QP type check on received REQs should be AND not OR
Change || check to the intended && when checking the QP type in a
received connection request against the listening endpoint.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-06-19 20:04:04 -07:00
Trond Myklebust
1a0de48ae5 NFS: Initialise commit_info.rpc_out when !defined(CONFIG_NFS_V4)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Fred Isaman <iisaman@netapp.com>
2012-06-19 18:42:28 -04:00
Trond Myklebust
5a695da263 NFS: Fix a refcounting issue in O_DIRECT
In nfs_direct_write_reschedule(), the requests from nfs_scan_commit_list
have a refcount of 2, whereas the operations in
nfs_direct_write_completion_ops expect them to have a refcount of 1.

This patch adds a call to release the extra references.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Fred Isaman <iisaman@netapp.com>
2012-06-19 18:42:14 -04:00
Antonio Quartulli
2c995ff892 batman-adv: fix skb->data assignment
skb_linearize(skb) possibly rearranges the skb internal data and then changes
the skb->data pointer value. For this reason any other pointer in the code that
was assigned skb->data before invoking skb_linearise(skb) must be re-assigned.

In the current tt_query message handling code this is not done and therefore, in
case of skb linearization, the pointer used to handle the packet header ends up
in pointing to free'd memory.

This bug was introduced by a73105b8d4
(batman-adv: improved client announcement mechanism)

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19 14:49:08 -07:00
John W. Linville
69d4cfef8b Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2012-06-19 16:00:11 -04:00
Linus Torvalds
2fe8ac608b regulator: Fixes for 3.5
One small bug fix, plus a rename of all the ST Ericsson regulators in
 the device tree since all the device trees had been written with
 different names and some infelicities in the test proceedures meant that
 the device tree code had apparently never actually been run against the
 upstream device tree.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP3hQ6AAoJEBus8iNuMP3dbToP/iFWsPR14SRqtmv5N0AEftyD
 SdDYZRdWAlwSunRkZhE12Kk1+q2wpxYmG2rJgYHJWw2Mk4biaW6XHKKGYjKxJ0C6
 WdskxhAs+Pl0KFqq0Z2+zrWEjSFMqkFHQrt3zfSHFb/ju3Us6jn8VaxR0i+WlWSJ
 IIZRvHPRU0et+BXuVUwcF6JOPNnoWlsFVugCBH7r56mCgPkU78NTKycUD6oprQvy
 BIMrHek5TWK39a6oHICWGLgQBxMKDNz+91yq9+4mIjxE84XcsAGuZcoDcbpNHtbA
 YmusSqKHQ0ShZVDvGj58xntbmh0SjqC/8CnVrzgXGOHaHisHiErZ/1y4sEiLrPnL
 o/6/42wyO+DKfftAOYOydks4AfOFPUJsfpvR/wDFvVSwwCSYJCwxP0ZxfQ9GGGcl
 IH8oLb84F3uHqg7De/zCW5+Qsw+EUxq76K+lnKx8vab5mJWtwxl9kMOsttYjr/f0
 8/q5ndln0C3rnAoB6hPMqE7bCswDkk3dXuAbln3OIkbhNglpSsyU5R+b2h5hugTG
 oENPkMTYFf8dRJ1hZsWrKM9HZaHWgxUe5KcEMyYEel3qdiYHWjmprnOeNHNo/u/o
 uG4tVlHO0rvOZpRbuvzc72Uonyri/oTfJ3b5Z9ZkRhmd/9pV83jJx12HlXxQoIae
 nvHtEhp2dKYVBIXfc+0s
 =NS0T
 -----END PGP SIGNATURE-----

Merge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "One small bug fix, plus a rename of all the ST Ericsson regulators in
  the device tree since all the device trees had been written with
  different names and some infelicities in the test proceedures meant
  that the device tree code had apparently never actually been run
  against the upstream device tree."

* tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Change db8500-prcmu match names to reflect Device Tree
  regulator: Change ab8500 match names to reflect Device Tree
  regulator: Fix the s5m8767a problem of the division by null
2012-06-19 12:35:44 -07:00
Bing Zhao
858faa57dd mwifiex: fix wrong return values in add_virtual_intf() error cases
add_virtual_intf() needs to return an ERR_PTR(), instead of NULL,
on errors, otherwise cfg80211 will crash.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-19 14:59:19 -04:00
Dan Carpenter
7f59ebb5f3 airo: copying wrong data in airo_get_aplist()
"qual" used to be declared on the stack, but then in 998a5a7d6a ("airo:
reduce stack memory footprint") we made it dynamically allocated.
Unfortunately the memcpy() here was missed and it's still copying stack
memory instead of the data that we want.  In other words, "&qual" should
be "qual".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-19 14:56:26 -04:00
Avinash Patil
73dc3b9023 mwifiex: fix uAP TX packet timeout issue
When running heavy traffic we stop the tx queue if the pending
packet count reaches certain threshold. Later, the tx queue should
be woken up as soon as the packet count falls below the threshold.

Current code wakes TX queue up on STA interface only. Removing the
check for STA interface will allow both STA and AP interfaces to
resume transmit when tx_pending count becomes low.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-19 14:56:25 -04:00
Bob Copeland
6617942e15 ath5k: remove _bh from inner locks
spin_unlock_bh(&txq->lock) already disables softirqs so we don't want
to do it here.  Fixes smatch warnings:

   drivers/net/wireless/ath/ath5k/base.c:1048 ath5k_drain_tx_buffs() error: double lock 'bottom_half:'
   drivers/net/wireless/ath/ath5k/base.c:1056 ath5k_drain_tx_buffs() error: double unlock 'bottom_half:'

Reported-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-19 14:56:25 -04:00
Felix Fietkau
80b08a8d88 ath9k: fix invalid pointer access in the tx path
After setup_frame_info has been called, only info->control.rates is still
valid, other control fields have been overwritten by the ath_frame_info
data. Move the access to info->control.vif for checking short preamble
to setup_frame_info before it gets overwritten.

This regression was introduced in commit d47a61aa
"ath9k: Fix multi-VIF BSS handling"

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Thomas Hühn <thomas@net.t-labs.tu-berlin.de>
Acked-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Cc: stable@vger.kernel.org [3.4]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-19 14:56:24 -04:00
Felix Fietkau
76591bea97 ath9k: fix a tx rate duration calculation bug
The rate pointer variable for a rate series is used in a loop before it is
initialized. This went unnoticed because it was used earlier for the RTS/CTS
rate. This bug can lead to the wrong PHY type being passed to the
duration calculation function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-19 14:56:24 -04:00
Trond Myklebust
0a9c63fae7 NFSv4.1: Fix a race in set_pnfs_layoutdriver
The call to try_module_get() dereferences ld_type outside the
spin locks, which means that it may be pointing to garbage if
a module unload was in progress.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-06-19 13:32:45 -04:00
Paul Mackerras
081f323bd3 KVM: PPC: Book3S HV: Drop locks around call to kvmppc_pin_guest_page
At the moment we call kvmppc_pin_guest_page() in kvmppc_update_vpa()
with two spinlocks held: the vcore lock and the vcpu->vpa_update_lock.
This is not good, since kvmppc_pin_guest_page() calls down_read() and
get_user_pages_fast(), both of which can sleep.  This bug was introduced
in 2e25aa5f ("KVM: PPC: Book3S HV: Make virtual processor area
registration more robust").

This arranges to drop those spinlocks before calling
kvmppc_pin_guest_page() and re-take them afterwards.  Dropping the
vcore lock in kvmppc_run_core() means we have to set the vcore_state
field to VCORE_RUNNING before we drop the lock, so that other vcpus
won't try to run this vcore.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-06-19 15:04:13 +03:00
Jason Wang
48d7d0ad90 phy/micrel: change phy_id_mask for KSZ9021 and KS8001
On a freescale imx6q platform, a hardware phy chip KSZ9021 is
recognized as a KS8001 chip by the current driver like this:
eth0: Freescale FEC PHY driver [Micrel KS8001 or KS8721]

KSZ9021 has phy_id 0x00221610, while KSZ8001 has phy_id
0x0022161a, the current phy_id_mask (0x00fffff0/0x00ffff10) can't
distinguish them. So change phy_id_mask to resolve this problem.

Although the micrel datasheet says that the 4 LSB of phyid2 register
contains the chip revision number and the current driver is designed
to follow this rule, in reality the chip implementation doesn't follow
it.

Cc: David J. Choi <david.choi@micrel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Hui Wang <jason77.wang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19 00:31:36 -07:00
Daniel Halperin
39d84a58ad sctp: fix warning when compiling without IPv6
net/sctp/protocol.c: In function ‘sctp_addr_wq_timeout_handler’:
net/sctp/protocol.c:676: warning: label ‘free_next’ defined but not used

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19 00:26:26 -07:00
Andrei Emeltchenko
ea1e76a3f9 Bluetooth: btmrvl: Do not send vendor events to bluetooth stack
Vendor-specific events shall be processed in driver and not sent
to bluetooth stack where they screw up HCI command countings.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-06-19 00:19:11 -03:00
Thomas Graf
d189634eca ipv6: Move ipv6 proc file registration to end of init order
/proc/net/ipv6_route reflects the contents of fib_table_hash. The proc
handler is installed in ip6_route_net_init() whereas fib_table_hash is
allocated in fib6_net_init() _after_ the proc handler has been installed.

This opens up a short time frame to access fib_table_hash with its pants
down.

Move the registration of the proc files to a later point in the init
order to avoid the race.

Tested :-)

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-18 18:38:50 -07:00
Stephen Warren
6355f25ed9 ARM: tegra: make tegra_cpu_reset_handler_enable() __init
This solves a section mismatch warning. I hadn't noticed this before,
because my compiler was inlining tegra_cpu_reset_handler_enable() inside
tegra_cpu_reset_handler_init(), which is already __init, but I switched
compilers and it stopped doing that.

Cc: <stable@kernel.org> # v3.4
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-06-18 16:42:57 -07:00
Axel Lin
96c9f05b39 extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove()
extcon_dev_unregister(info->edev) doest not free info->edev, we need to call
kfree(info->edev) here.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 16:30:42 -07:00
Axel Lin
3f1dc550b0 extcon: Set platform drvdata in gpio_extcon_probe() and fix irq leak
Add missing platform_set_drvdata() in gpio_extcon_probe(), otherwise calling
platform_get_drvdata in gpio_extcon_remove() returns NULL.

Also add missing free_irq call in gpio_extcon_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 16:30:42 -07:00
Axel Lin
155cb06c89 extcon: Fix wrong index in max8997_extcon_cable[]
Currently, the index of "Dock-desk" and "Dock-card" are the same.
Thus the latter one overrides the first one.
Then we have problem when calling extcon_find_cable_index() because
edev->supported_cable[7] only matches "Dock-card".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 16:30:42 -07:00
Kay Sievers
246f6f2ff2 kmsg - kmsg_dump() fix CONFIG_PRINTK=n compilation
Signed-off-by: Kay Sievers <kay@vrfy.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 15:55:21 -07:00
Alan Cox
099987f0aa [media] smia: Fix compile failures
Fix compile of smia code.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43337

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-18 19:52:05 -03:00
Hans Verkuil
2bece307c9 [media] Fix VIDIOC_DQEVENT docbook entry
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-18 19:50:07 -03:00
Kamil Debski
4c4ed22632 [media] s5p-fimc: Fix control creation function
Fixed the size of the V4L2_CID_COLORFX control cluster.
Prior to this fix V4L2_CID_ROTATE was also icluded in
the cluster preventing application from enabling rotation.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-18 19:49:27 -03:00
Sachin Kamat
618a2a3a72 [media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file
Fixes the following error:
ERROR: open brace '{' following enum go on the same line
+enum MFC_SHM_OFS
+{

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-18 19:49:06 -03:00
Kamil Debski
f60935c17f [media] s5p-mfc: Fix setting controls
Fixed s_ctrl function when setting the following controls:
- V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER
- V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-18 19:48:43 -03:00