firefly-linux-kernel-4.4.55.git
11 years agoARM: mm: fix MMU mapping of CMA regions
Chris Brand [Tue, 7 Aug 2012 12:01:14 +0000 (14:01 +0200)]
ARM: mm: fix MMU mapping of CMA regions

Fix dma_contiguous_remap() so that it continues through all the
regions, even after encountering one that is outside lowmem.
Without this change, if you have two CMA regions, the first outside
lowmem and the seocnd inside lowmem, only the second one will get
set up in the MMU. Data written to that region then doesn't get
automatically flushed from the cache into memory.

Signed-off-by: Chris Brand <cbrand@broadcom.com>
[extended patch subject with 'fix' word]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
11 years agoMerge branches 'sh/urgent' and 'sh/gpiolib' into sh-latest
Paul Mundt [Thu, 9 Aug 2012 04:21:13 +0000 (13:21 +0900)]
Merge branches 'sh/urgent' and 'sh/gpiolib' into sh-latest

11 years agosh: intc: Handle domain association for sparseirq pre-allocated vectors.
Paul Mundt [Thu, 9 Aug 2012 03:59:40 +0000 (12:59 +0900)]
sh: intc: Handle domain association for sparseirq pre-allocated vectors.

Presently it's assumed that the irqdomain code handles the irq_desc
allocation for us, but this isn't necessarily the case when we've
pre-allocated IRQs via sparseirq. Previously we had a -EEXIST check in
the code that attempted to trap these cases and simply update them
in-place, but this behaviour was inadvertently lost in the transition to
irqdomains.

This simply restores the previous behaviour, first attempting to let the
irqdomain core fetch the allocation for us, and falling back to an
in-place domain association in the extant IRQ case. Fixes up regressions
on platforms that pre-allocate legacy IRQs (specifically ARM-based
SH-Mobile platforms, as SH stopped pre-allocating vectors some time ago).

Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agosh: sh7269: Fix LCD pinmux
Phil Edworthy [Tue, 7 Aug 2012 07:10:40 +0000 (08:10 +0100)]
sh: sh7269: Fix LCD pinmux

There are two ports that can output the LCD data, therefore
they have to use separate pimux identifiers so we can select
the one we want to use.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agosh: dma: fix request_irq usage
Mike Frysinger [Sun, 5 Aug 2012 01:54:05 +0000 (21:54 -0400)]
sh: dma: fix request_irq usage

When calling request_irq with IRQF_SHARED, the dev cookie must be set
(i.e. non-NULL), otherwise the code rejects it immediately with -EINVAL.
So restore the logic here where we'd pass a pointer to the name as a
dummy unique val.

Otherwise, booting up on my LANDISK system would fail with:
DMAC Address Error0 request_irq fail

This was introduced in commit 7f47c7189b3e8f19a589f77a3ad169d7b691b582.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agodrm/udl: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
Thomas Meyer [Tue, 7 Aug 2012 06:57:25 +0000 (06:57 +0000)]
drm/udl: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]

The semantic patch that makes this change is available
in scripts/coccinelle/api/err_cast.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoMerge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel...
Dave Airlie [Wed, 8 Aug 2012 23:54:49 +0000 (09:54 +1000)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-next

Daniel writes:

"- Regression fixer for an OOPS at boot when i915.ko is built-in and
  CONFIG_PM=n, introduce in 3.5 (patch from Hunt Xu)
- Regression fixer for occlusion query failures, the required w/a wasn't
  applied in all cases (thanks to Eric for tracking this on down).
- dmar vs. dma_buf imprt fix (Dave Airlie)
- 2 patches to fight down forcewake issues on snb. This is the stuff I've
  talked about 2 weeks ago already, it's a minefield. Investigation still
  going on, but afaict this is the best we have for now.
- a few minor things to keep coverty&compiler happy (Alan, Davendra,
  Stéphane)
- tons of hsw pci ids - this one is a bit late because internal approval
  sometimes takes a while, but ppl in charge finally agreed that world+dog
  already knows about ult and crw haswell variants ;-)

Wrt regressions I'm aware of:
- the power regression due to semaphores=1. Ben is running around with a
  killawatt, unfortunately we have a hard time reproducing this one. And
  this /shouldn't/ increase power usage. Ben has turned up a few odds bits
  though already.
- the lvds fix in 3.6-rc1 broke a backlight after lid close/open (but can
  be resurrected with a modeset cycle). I guess we anger the bios - I'm
  still looking into this one.
- gmbus broke edid reading on an odd-ball monitor, we need to fall-back.
  Due to vacation (both mine&the reporter's) this is stalling for a final
  patch and a tested-by on it. But issue is fully diagnosed."

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: correctly order the ring init sequence
  drm/i915: add more Haswell PCI IDs
  drm/i915: make rc6 in sysfs functions conditional
  drm/i915: Workaround hang with BSD and forcewake on SandyBridge
  drm/i915: Make intel_panel_get_backlight static.
  i915: don't map imported dma-bufs for dmar.
  drm/i915: remove unused variable
  drm/i915: Don't forget to apply SNB PIPE_CONTROL GTT workaround.
  drm/i915: fix forcewake related hangs on snb
  i915: Remove silly test
  i915: fix error path leak in intel_sdvo_write_cmd
  vlv: it might be wise if we initialised the flag value...

11 years agodrm/radeon/kms: allow "invalid" DB formats as a means to disable DB
Marek Olšák [Sun, 29 Jul 2012 14:24:57 +0000 (16:24 +0200)]
drm/radeon/kms: allow "invalid" DB formats as a means to disable DB

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agonet/stmmac: mark probe function as __devinit
Arnd Bergmann [Wed, 8 Aug 2012 04:47:24 +0000 (04:47 +0000)]
net/stmmac: mark probe function as __devinit

Driver probe functions are generally __devinit so they will be
discarded after initialization for non-hotplug kernels.
This was found by a new warning after patch 6a228452d "stmmac: Add
device-tree support" adds a new __devinit function that is called
from stmmac_pltfr_probe.

Without this patch, building socfpga_defconfig results in:

WARNING: drivers/net/ethernet/stmicro/stmmac/stmmac.o(.text+0x5d4c): Section mismatch in reference from the function stmmac_pltfr_probe() to the function .devinit.text:stmmac_probe_config_dt()
The function stmmac_pltfr_probe() references
the function __devinit stmmac_probe_config_dt().
This is often because stmmac_pltfr_probe lacks a __devinit
annotation or the annotation of stmmac_probe_config_dt is wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agolpc_eth: remove obsolete ifdefs
stigge@antcom.de [Wed, 8 Aug 2012 03:18:54 +0000 (03:18 +0000)]
lpc_eth: remove obsolete ifdefs

The #ifdefs regarding CONFIG_ARCH_LPC32XX_MII_SUPPORT and
CONFIG_ARCH_LPC32XX_IRAM_FOR_NET are obsolete since the symbols have been
removed from Kconfig and replaced by devicetree based configuration.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/core: Fix potential memory leak in dev_set_alias()
Alexey Khoroshilov [Wed, 8 Aug 2012 00:33:25 +0000 (00:33 +0000)]
net/core: Fix potential memory leak in dev_set_alias()

Do not leak memory by updating pointer with potentially NULL realloc return value.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocdc-phonet: Don't leak in usbpn_open
Jesper Juhl [Tue, 7 Aug 2012 11:56:26 +0000 (11:56 +0000)]
cdc-phonet: Don't leak in usbpn_open

We allocate memory for 'req' with usb_alloc_urb() and then test
'if (!req || rx_submit(pnd, req, GFP_KERNEL | __GFP_COLD))'.
If we enter that branch due to '!req' then there is no problem. But if
we enter the branch due to 'req' being != 0 and the 'rx_submit()' call
being false, then we'll leak the memory we allocated.
Deal with the leak by always calling 'usb_free_urb(req)' when entering
the branch. If 'req' happens to be 0 then the call is harmless, if it
is not 0 then we free the memory we allocated but don't need.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobatman-adv: Fix mem leak in the batadv_tt_local_event() function
Jesper Juhl [Tue, 7 Aug 2012 08:32:34 +0000 (08:32 +0000)]
batman-adv: Fix mem leak in the batadv_tt_local_event() function

Memory is allocated for 'tt_change_node' with kmalloc().
'tt_change_node' may go out of scope really being used for anything
(except have a few members initialized) if we hit the 'del:' label.
This patch makes sure we free the memory in that case.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosched: add missing group change to qfq_change_class
Paolo Valente [Tue, 7 Aug 2012 07:27:25 +0000 (07:27 +0000)]
sched: add missing group change to qfq_change_class

[Resending again, as the text was corrupted by the email client]

To speed up operations, QFQ internally divides classes into
groups. Which group a class belongs to depends on the ratio between
the maximum packet length and the weight of the class. Unfortunately
the function qfq_change_class lacks the steps for changing the group
of a class when the ratio max_pkt_len/weight of the class changes.

For example, when the last of the following three commands is
executed, the group of class 1:1 is not correctly changed:

tc disc add dev XXX root handle 1: qfq
tc class add dev XXX parent 1: qfq classid 1:1 weight 1
tc class change dev XXX parent 1: classid 1:1 qfq weight 4

Not changing the group of a class does not affect the long-term
bandwidth guaranteed to the class, as the latter is independent of the
maximum packet length, and correctly changes (only) if the weight of
the class changes. In contrast, if the group of the class is not
updated, the class is still guaranteed the short-term bandwidth and
packet delay related to its old group, instead of the guarantees that
it should receive according to its new weight and/or maximum packet
length. This may also break service guarantees for other classes.
This patch adds the missing operations.

Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: force dst_default_metrics to const section
Eric Dumazet [Tue, 7 Aug 2012 10:55:45 +0000 (10:55 +0000)]
net: force dst_default_metrics to const section

While investigating on network performance problems, I found this little
gem :

$ nm -v vmlinux | grep -1 dst_default_metrics
ffffffff82736540 b busy.46605
ffffffff82736560 B dst_default_metrics
ffffffff82736598 b dst_busy_list

Apparently, declaring a const array without initializer put it in
(writeable) bss section, in middle of possibly often dirtied cache
lines.

Since we really want dst_default_metrics be const to avoid any possible
false sharing and catch any buggy writes, I force a null initializer.

ffffffff818a4c20 R dst_default_metrics

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fib: fix incorrect call_rcu_bh()
Eric Dumazet [Tue, 7 Aug 2012 00:47:11 +0000 (00:47 +0000)]
net: fib: fix incorrect call_rcu_bh()

After IP route cache removal, I believe rcu_bh() has very little use and
we should remove this RCU variant, since it adds some cycles in fast
path.

Anyway, the call_rcu_bh() use in fib_true is obviously wrong, since
some users only assert rcu_read_lock().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agopptp: lookup route with the proper net namespace
Gao feng [Tue, 7 Aug 2012 00:23:11 +0000 (00:23 +0000)]
pptp: lookup route with the proper net namespace

pptp always use init_net as the net namespace to lookup
route, this will cause route lookup failed in container.

because we already set the correct net namespace to struct
sock in pptp_create,so fix this by using sock_net(sk) to
replace &init_net.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'fixes-for-3.6' of git://gitorious.org/linux-can/linux-can
David S. Miller [Wed, 8 Aug 2012 22:55:02 +0000 (15:55 -0700)]
Merge branch 'fixes-for-3.6' of git://gitorious.org/linux-can/linux-can

Marc Kleine-Budde says:

====================
here's a fix intended for the v3.6 release cycle. Oliver noticed and
fixed that the flags definition for the new canfd_frame contains
redundant and confusing information.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoaf_packet: Quiet sparse noise about using plain integer as NULL pointer
Ying Xue [Mon, 6 Aug 2012 16:27:10 +0000 (16:27 +0000)]
af_packet: Quiet sparse noise about using plain integer as NULL pointer

Quiets the sparse warning:
warning: Using plain integer as NULL pointer

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/ppwaskie/net
David S. Miller [Wed, 8 Aug 2012 22:41:04 +0000 (15:41 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/ppwaskie/net

Peter P Waskiewicz Jr says:

====================
This series contains fixes to the e1000e and igb drivers.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers: net: irda: bfin_sir: fix compile error
Sonic Zhang [Mon, 6 Aug 2012 16:08:36 +0000 (16:08 +0000)]
drivers: net: irda: bfin_sir: fix compile error

Bit IREN is replaced by UMOD_IRDA and UMOD_MASK since blackfin 60x added, but
this driver didn't update which will cause bfin_sir build error:

drivers/net/irda/bfin_sir.c:161:9: error: 'IREN' undeclared (first use in this
function)
drivers/net/irda/bfin_sir.c:435:18: error: 'IREN' undeclared (first use in
this function)
drivers/net/irda/bfin_sir.c:521:11: error: 'IREN' undeclared (first use in
this function)

This patch fix it.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousb/ohci-omap: remove unused variable
Arnd Bergmann [Sat, 4 Aug 2012 07:12:00 +0000 (07:12 +0000)]
usb/ohci-omap: remove unused variable

Commit c2e935a7d "USB: move transceiver from ehci_hcd and ohci_hcd to
hcd and rename it as phy" removed the last use of the "ohci" variable
in the usb_hcd_omap_remove function, but left the variable in place
unused.

Without this patch, building omap1_defconfig results in:

In file included from drivers/usb/host/ohci-hcd.c:1013:0:
drivers/usb/host/ohci-omap.c: In function 'usb_hcd_omap_remove':
drivers/usb/host/ohci-omap.c:406:19: warning: unused variable 'ohci' [-Wunused-variable]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Richard Zhao <richard.zhao@freescale.com>
11 years agomfd/asic3: fix asic3_mfd_probe return value
Arnd Bergmann [Sat, 4 Aug 2012 06:20:49 +0000 (06:20 +0000)]
mfd/asic3: fix asic3_mfd_probe return value

In commit 4f304245b "mfd: Set asic3 DS1WM clock_rate", a possible
path through asic3_mfd_probe was introduced that would lead to
an unpredictable return value, if everything succeeds but there
are pdata->leds is NULL. This was reported correctly by gcc.

Without this patch, building magician_defconfig results in:

drivers/mfd/asic3.c: In function 'asic3_mfd_probe':
drivers/mfd/asic3.c:940:2: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
11 years agoRevert "NMI watchdog: fix for lockup detector breakage on resume"
Rafael J. Wysocki [Tue, 7 Aug 2012 11:50:22 +0000 (13:50 +0200)]
Revert "NMI watchdog: fix for lockup detector breakage on resume"

Revert commit 45226e9 (NMI watchdog: fix for lockup detector breakage
on resume) which breaks resume from system suspend on my SH7372
Mackerel board (by causing a NULL pointer dereference to happen) and
is generally wrong, because it abuses the CPU hotplug functionality
in a shamelessly blatant way.

The original issue should be addressed through appropriate syscore
resume callback instead.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
11 years agoPM: Make dev_pm_get_subsys_data() always return 0 on success
Rafael J. Wysocki [Tue, 7 Aug 2012 11:50:14 +0000 (13:50 +0200)]
PM: Make dev_pm_get_subsys_data() always return 0 on success

Commits 1d5fcfec22 (PM / Domains: Add device domain data reference
counter) and 62d4490294 (PM / Domains: Allow device callbacks to be
added at any time) added checks for the return value of
dev_pm_get_subsys_data(), but those checks were incorrect, because
that function returned 1 on success in some cases.

Since all of the existing users of dev_pm_get_subsys_data() don't use
the positive value returned by it on success, change its definition
so that it always returns 0 when successful.

Reported-by: Heiko Stübner <heiko@sntech.de>
Reported-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
11 years agodrivers/cpufreq/pcc-cpufreq.c: fix error return code
Julia Lawall [Sun, 5 Aug 2012 20:56:43 +0000 (22:56 +0200)]
drivers/cpufreq/pcc-cpufreq.c: fix error return code

Convert a 0 error return code to a negative one, as returned elsewhere in the
function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@

(
if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
|
ret = 0
)
... when != ret = e1
*x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
... when != x = e2
    when != ret = e3
*if (x == NULL || ...)
{
  ... when != ret = e4
*  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
11 years agoRTC: Avoid races between RTC alarm wakeup and suspend.
NeilBrown [Sun, 5 Aug 2012 20:56:20 +0000 (22:56 +0200)]
RTC: Avoid races between RTC alarm wakeup and suspend.

If an RTC alarm fires just as suspend is happening, it is possible for
suspend to complete and the alarm to be missed.

To avoid the race, we must register the event with the PM core.

As the event is made visible to userspace through a thread which is
only scheduled by the interrupt, we need a pm_stay_awake/pm_relax
pair preventing suspend from the interrupt until the thread completes
its work.

This makes the pm_wakeup_event() call in cmos_interrupt unnecessary as
it provides suspend protection for all RTCs that use rtc_update_irq.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Wed, 8 Aug 2012 17:06:43 +0000 (20:06 +0300)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Missed rcu_assign_pointer() in mac80211 scanning, from Johannes
    Berg.

 2) Allow devices to limit the number of segments that an individual
    TCP TSO packet can use at a time, to deal with device and/or driver
    specific limitations.  From Ben Hutchings.

 3) Fix unexpected hard IPSEC expiration after setting the date.  From
    Fan Du.

 4) Memory leak fix in bxn2x driver, from Jesper Juhl.

 5) Fix two memory leaks in libertas driver, from Daniel Drake.

 6) Fix deref of out-of-range array index in packet scheduler generic
    actions layer.  From Hiroaki SHIMODA.

 7) Fix TX flow control errors in mlx4 driver, from Yevgeny Petrilin.

 8) Fix CRIS eth_v10.c driver build, from Randy Dunlap.

 9) Fix wrong SKB freeing in LLC protocol layer, from Sorin Dumitru.

10) The IP output path checks neigh lookup errors incorrectly, it needs
    to use IS_ERR().  From Vasiliy Kulikov.

11) An estimator leak leads to deref of freed memory in timer handler,
    fix from Hiroaki SHIMODA.

12) TCP early demux in ipv6 needs to use DST cookies in order to
    validate the RX route properly.  Fix from Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
  net: ipv6: fix TCP early demux
  net: Use PTR_RET rather than if(IS_ERR(.. [1]
  net_sched: act: Delete estimator in error path.
  ip: fix error handling in ip_finish_output2()
  llc: free the right skb
  ixp4xx_eth: fix ptp_ixp46x build failure
  drivers/atm/iphase.c: fix error return code
  tcp_output: fix sparse warning for tcp_wfree
  drivers/net/phy/mdio-mux-gpio.c: drop devm_kfree of devm_kzalloc'd data
  batman-adv: select an internet gateway if none was chosen
  mISDN: Bugfix for layer2 fixed TEI mode
  igb: don't break user visible strings over multiple lines in igb_ethtool.c
  igb: correct hardware type (i210/i211) check in igb_loopback_test()
  igb: Fix for failure to init on some 82576 devices.
  cris: fix eth_v10.c build error
  cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN
  isdnloop: fix and simplify isdnloop_init()
  hyperv: Move wait completion msg code into rndis_filter_halt_device()
  net/mlx4_core: Remove port type restrictions
  net/mlx4_en: Fixing TX queue stop/wake flow
  ...

11 years agoMerge tag 'pinctrl-fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 8 Aug 2012 17:04:40 +0000 (20:04 +0300)]
Merge tag 'pinctrl-fixes-for-v3.6-rc1' of git://git./linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:
 - Move MXS pinctrl registration to poscore_initcall
 - Fix up various devm_* managed resources code paths
 - Fix one function group in the Nomadik driver
 - Update MAINTAINERS

* tag 'pinctrl-fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  drivers/pinctrl/pinctrl-nomadik.c: drop devm_kfree of devm_kzalloc'd data
  MAINTAINERS: fix a few pinctrl related entries
  pinctrl-sirf: remove devm_kfree at error path
  pinctrl/nomadik: fix hsi function group list
  pinctrl/pinctrl-u300: remove unneeded devm_kfree call
  pinctrl: mxs: register driver at postcore_initcall time

11 years agoMerge tag 'iommu-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 8 Aug 2012 17:01:45 +0000 (20:01 +0300)]
Merge tag 'iommu-fixes-v3.6-rc1' of git://git./linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:
 "These patches fix a couple of issues.  First of all a few problems
  with ACS on x86 introduced in the last merge window, where ACS did not
  work on AMD and a NULL pointer dereference when there ran against
  SR-IOV devices.

  The patches fallen out of coccinelle checks fix a possible invalid
  memory reference and a possible memory leak.  The other patches mostly
  fix build errors and warnings and a wrong return value."

* tag 'iommu-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: Fix ACS path checking
  iommu/intel: Fix ACS path checking
  iommu/amd: Fix pci_request_acs() call-place
  iommu/exynos: Fix build error
  iommu/tegra: smmu: Fix error initial value at domain_init
  iommu/tegra: smmu: Cleanup with lesser nest
  iommu: Add missing forward declaration in include file
  iommu: Include linux/types.h
  iommu/intel: add missing free_domain_mem
  iommu/tegra: remove invalid reference to list iterator variable

11 years agoMerge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Wed, 8 Aug 2012 16:59:52 +0000 (19:59 +0300)]
Merge tag 'sound-3.6' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Containing only a few really small/trivial fixes.  The only urgent fix
  is a regression fix of HDMI codec probing, introduced in 3.6-rc1.  The
  rest are HD-audio specific fixes and a copule of minor bug fixes in
  PCM core and the old emu10k1."

* tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad
  ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y
  ALSA: hda - remove redundant auto quirks for conexant 506x
  ALSA: hda - remove quirk for Dell Vostro 1015
  ALSA: hda - add dock support for Thinkpad X230
  ALSA: hda - Fix regression of HDMI codec probing
  ALSA: hda - add dock support for Thinkpad T430s
  ALSA: emu10k1: Avoid access to invalid pages when period=1
  ALSA: PCM: Fix possible memory leaks in the error path

11 years agos390/compat: fix mmap compat system calls
Heiko Carstens [Wed, 8 Aug 2012 07:32:20 +0000 (09:32 +0200)]
s390/compat: fix mmap compat system calls

The native 31 bit and the compat behaviour for the mmap system calls differ:

In native 31 bit mode the passed in address for the mmap system call will be
unmodified passed to sys_mmap_pgoff().
In compat mode however the passed in address will be modified with
compat_ptr() which masks out the most significant bit.

The result is that in native 31 bit mode each mmap request (with MAP_FIXED)
will fail where the most significat bit is set, while in compat mode it
may succeed.

This odd behaviour was introduced with d3815898 "[S390] mmap: add missing
compat_ptr conversion to both mmap compat syscalls".

To restore a consistent behaviour accross native and compat mode this
patch functionally reverts the above mentioned commit.

Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/compat: fix compat wrappers for process_vm system calls
Heiko Carstens [Tue, 7 Aug 2012 07:48:13 +0000 (09:48 +0200)]
s390/compat: fix compat wrappers for process_vm system calls

The compat wrappers incorrectly called the non compat versions of
the system process_vm system calls.

Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390: do not clobber personality flags in sys_32_personality()
Jiri Kosina [Thu, 2 Aug 2012 07:11:23 +0000 (09:11 +0200)]
s390: do not clobber personality flags in sys_32_personality()

There are multiple errors in how sys_32_personality() handles personality
flags stored in top three bytes.

- directly comparing current->personality against PER_LINUX32 doesn't work
  in cases when any of the personality flags stored in the top three bytes
  are used.
- directly forcefully setting personality to PER_LINUX32 or PER_LINUX
  discards any flags stored in the top three bytes

Fix the first one by properly using personality() macro to compare only
PER_MASK bytes.
Fix the second one by setting only the bits that should be set, instead of
overwriting the whole value.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/seccomp: add support for system call filtering using BPF
Heiko Carstens [Tue, 31 Jul 2012 13:37:13 +0000 (15:37 +0200)]
s390/seccomp: add support for system call filtering using BPF

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/sclp_sdias: Add missing break and "fall through"
Michael Holzheu [Tue, 31 Jul 2012 09:01:30 +0000 (11:01 +0200)]
s390/sclp_sdias: Add missing break and "fall through"

If the last block of the HSA is read, EVSTATE_ALL_STORED is returned
by SCLP. Because of a missing break in the switch statement two trace
entries are written in this case: "all stored" and "part stored".

This patch adds the missing break and also adds a "fall through"
comment to improve the readability.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reported-by: David A Gilbert <DavidAGilbert@uk.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm: remove MAX_PHYSADDR_BITS define
Heiko Carstens [Mon, 30 Jul 2012 08:04:39 +0000 (10:04 +0200)]
s390/mm: remove MAX_PHYSADDR_BITS define

It's unused, so remove it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agodrm/i915: correctly order the ring init sequence
Daniel Vetter [Tue, 7 Aug 2012 07:54:14 +0000 (09:54 +0200)]
drm/i915: correctly order the ring init sequence

We may only start to set up the new register values after having
confirmed that the ring is truely off. Otherwise the hw might lose the
newly written register values. This is caught later on in the init
sequence, when we check whether the register writes have stuck.

Cc: stable@vger.kernel.org
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50522
Tested-by: Yang Guang <guang.a.yang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad
David Henningsson [Wed, 8 Aug 2012 06:43:37 +0000 (08:43 +0200)]
ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad

The same ID is twice in the quirk table, so the second one is not used.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoleds: lp8788: Fix updating scale configuration bits
Axel Lin [Wed, 1 Aug 2012 12:40:34 +0000 (20:40 +0800)]
leds: lp8788: Fix updating scale configuration bits

We need to do left shift (cfg->num + LP8788_ISINK_SCALE_OFFSET) bits for
updating scale configuration.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
11 years agovfio: Include vfio.h in installed headers
Alex Williamson [Tue, 7 Aug 2012 17:48:33 +0000 (11:48 -0600)]
vfio: Include vfio.h in installed headers

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agoALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y
Takashi Iwai [Tue, 7 Aug 2012 16:09:23 +0000 (18:09 +0200)]
ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y

When CONFIG_SND_VERBOSE_PRINTK=y is set, the debug print in
hda_auto_parser.c looks really ugly like:

  ALSA sound/pci/hda/hda_auto_parser.c:331    mono: mono_out=0x0
  ALSA sound/pci/hda/hda_auto_parser.c:334    dig-out=0x12/0x0
  ALSA sound/pci/hda/hda_auto_parser.c:335    inputs:
  ALSA sound/pci/hda/hda_auto_parser.c:339  Mic=0x11ALSA sound/pci/hda/hda_auto_parser.c:339  Line=0x10
  ALSA sound/pci/hda/hda_auto_parser.c:341
  ALSA sound/pci/hda/hda_auto_parser.c:343    dig-in=0x13

Better to put one item at each line.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agodrivers/pinctrl/pinctrl-nomadik.c: drop devm_kfree of devm_kzalloc'd data
Julia Lawall [Sat, 4 Aug 2012 16:50:47 +0000 (18:50 +0200)]
drivers/pinctrl/pinctrl-nomadik.c: drop devm_kfree of devm_kzalloc'd data

devm_kfree should not have to be explicitly used.

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

// <smpl>
@@
expression x,d;
@@

x = devm_kzalloc(...)
...
?-devm_kfree(d,x);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoMAINTAINERS: fix a few pinctrl related entries
Uwe Kleine-König [Mon, 30 Jul 2012 16:38:34 +0000 (18:38 +0200)]
MAINTAINERS: fix a few pinctrl related entries

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl-sirf: remove devm_kfree at error path
Devendra Naga [Sun, 29 Jul 2012 08:11:38 +0000 (13:56 +0545)]
pinctrl-sirf: remove devm_kfree at error path

the pointers that are allocated with devm_kzalloc will be automatically freed,
at unload time.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoALSA: hda - remove redundant auto quirks for conexant 506x
David Henningsson [Tue, 7 Aug 2012 12:03:30 +0000 (14:03 +0200)]
ALSA: hda - remove redundant auto quirks for conexant 506x

Now that the auto model is the default, these quirks are redundant
and can be removed.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - remove quirk for Dell Vostro 1015
David Henningsson [Tue, 7 Aug 2012 12:03:29 +0000 (14:03 +0200)]
ALSA: hda - remove quirk for Dell Vostro 1015

This computer is confirmed working with model=auto on kernel 3.2.
Also, parsing fails with hda-emu with the current model.

Cc: stable@kernel.org (3.2+)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agopinctrl/nomadik: fix hsi function group list
Patrice Chotard [Tue, 31 Jul 2012 12:57:38 +0000 (14:57 +0200)]
pinctrl/nomadik: fix hsi function group list

Tidy up a small typo in the HSI function group list.

Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agodrm/i915: add more Haswell PCI IDs
Paulo Zanoni [Mon, 6 Aug 2012 21:45:01 +0000 (18:45 -0300)]
drm/i915: add more Haswell PCI IDs

Also properly indent the HB IDs.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoMerge tag 'imx-fixes' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes
Arnd Bergmann [Tue, 7 Aug 2012 09:22:14 +0000 (11:22 +0200)]
Merge tag 'imx-fixes' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes

ARM i.MX fixes for 3.6-rc

* tag 'imx-fixes' of git://git.pengutronix.de/git/imx/linux-2.6:
  i.MX27: Fix emma-prp and csi clocks.
  ARM: clk-imx31: Fix the keypad clock name
  ARM: dts: imx27-3ds.dts: Fix serial console node

11 years agoARM: kirkwood: fix typo in Makefile.boot
Sebastian Hesselbarth [Sun, 5 Aug 2012 14:45:32 +0000 (16:45 +0200)]
ARM: kirkwood: fix typo in Makefile.boot

Just a small typo fix to make lsxl dtbs compile

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agocanfd: remove redundant CAN FD flag
Oliver Hartkopp [Mon, 6 Aug 2012 16:02:29 +0000 (18:02 +0200)]
canfd: remove redundant CAN FD flag

The first idea of the CAN FD implementation started with a new struct
canfd_frame to be used for both CAN FD frames and legacy CAN frames.
The now mainlined implementation supports both CAN frame types simultaneously
and distinguishes them only by their required sizes: CAN_MTU and CANFD_MTU.

Only the struct canfd_frame contains a flags element which is needed for the
additional CAN FD information. As CAN FD implicitly means that the 'Extened
Data Length' mode is enabled the formerly defined CANFD_EDL bit became
redundant and also confusing as an unset bit would be an error and would
always need to be tested.

This patch removes the obsolete CANFD_EDL bit and clarifies the documentation
for the use of struct canfd_frame and the CAN FD relevant flags.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agoigb: add delay to allow igb loopback test to succeed on 8086:10c9
Stefan Assmann [Tue, 7 Aug 2012 07:45:57 +0000 (00:45 -0700)]
igb: add delay to allow igb loopback test to succeed on 8086:10c9

Some 8086:10c9 NICs have a problem completing the ethtool loopback test.
The result looks like this:

ethtool -t eth1
The test result is FAIL
The test extra info:
Register test  (offline)         0
Eeprom test    (offline)         0
Interrupt test (offline)         0
Loopback test  (offline)         13
Link test   (on/offline)         0

A bisect clearly points to commit a95a07445ee97a2fef65befafbadcc30ca1bd145.
However that seems to only trigger the bug. While adding some printk the
problem disappeared, so this might be a timing issue. After some trial and
error I discovered that adding a small delay just before igb_write_phy_reg()
in igb_integrated_phy_loopback() allows the loopback test to succeed.
I was unable to figure out the root cause so far but I expect it to be
somewhere in the following executing path
igb_integrated_phy_loopback
->igb_write_phy_reg_igp
  ->igb_write_phy_reg_mdic
    ->igb_acquire_phy_82575
      ->igb_acquire_swfw_sync_82575

The problem could only be observed on 8086:10c9 NICs so far and not all
of them show the behaviour. I did not restrict the workaround to this
type of NIC as it should do no harm to other igb NICs.

With the patch below the loopback test succeeded 500 times in a row
using a NIC that would otherwise fail.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
11 years agoe1000e: 82571 Tx Data Corruption during Tx hang recovery
Tushar Dave [Wed, 1 Aug 2012 02:11:15 +0000 (02:11 +0000)]
e1000e: 82571 Tx Data Corruption during Tx hang recovery

A bus trace shows that while executing e1000e_down, TCTL is cleared except
for the PSP bit.  This occurs while in the middle of fetching a TSO packet
since the Tx packet buffer is full at that point. Before the device is
reset, the e1000_watchdog_task starts to run from the middle (it was
apparently pre-empted earlier, although that is not in the trace) and sets
TCTL.EN.  At that point, 82571 transmits the corrupted packet, apparently
because TCTL.MULR was cleared in the middle of fetching a packet, which is
forbidden.

Driver should just clear TCTL.EN in e1000_reset_hw_82571 instead of
clearing the entire register, so as not to change any settings in the
middle of fetching a packet.

Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
11 years agoe1000e: NIC goes up and immediately goes down
Tushar Dave [Tue, 31 Jul 2012 02:02:43 +0000 (02:02 +0000)]
e1000e: NIC goes up and immediately goes down

Found that commit d478eb44 was a bad commit.
If the link partner is transmitting codeword (even if NULL codeword),
then the RXCW.C bit will be set so check for RXCW.CW is unnecessary.
Ref: RH BZ 840642

Reported-by: Fabio Futigami <ffutigam@redhat.com>
Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
CC: Marcelo Ricardo Leitner <mleitner@redhat.com>
CC: stable <stable@vger.kernel.org> [2.6.38+]
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
11 years agoi.MX27: Fix emma-prp and csi clocks.
Javier Martin [Thu, 26 Jul 2012 11:20:34 +0000 (13:20 +0200)]
i.MX27: Fix emma-prp and csi clocks.

Naming of emma-prp related clocks for the i.MX27 is not correct.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
11 years agodrivers/gpio/gpio-langwell.c: fix error return code
Julia Lawall [Sun, 5 Aug 2012 09:52:34 +0000 (11:52 +0200)]
drivers/gpio/gpio-langwell.c: fix error return code

Convert a 0 error return code to a negative one, as returned elsewhere in the
function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@

(
if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
|
ret = 0
)
... when != ret = e1
*x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
... when != x = e2
    when != ret = e3
*if (x == NULL || ...)
{
  ... when != ret = e4
*  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpio: samsung: Fix off-by-one bug in gpio addresses
Sean Paul [Fri, 20 Jul 2012 20:58:59 +0000 (13:58 -0700)]
gpio: samsung: Fix off-by-one bug in gpio addresses

Move gpc4 to the end of the automatically processed gpio controllers so
we don't taint the automatic offset calculation.

This bug caused all controllers coming after gpc4 to map to the
incorrect address. The result is <&gpd1 0 0 0 0> would actually map to
GPIO 0 in gpd0.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Doug Anderson <dianders@chromium.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: dts: imx: add alias for gpio
Shawn Guo [Sun, 5 Aug 2012 06:01:28 +0000 (14:01 +0800)]
ARM: dts: imx: add alias for gpio

Add alias for gpio nodes, so that gpio driver can identify the port
number and then specify a sensible gpio base rather than using the
one dynamically allocated by gpio core.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpio/mxc: specify gpio base for device tree probe
Shawn Guo [Sun, 5 Aug 2012 06:01:26 +0000 (14:01 +0800)]
gpio/mxc: specify gpio base for device tree probe

Currently, unlike the non-DT probe where the gpio base is specified
with pdev->id, the DT probe uses the base dynamically allocated by
gpio core, which uses a completely different numbering scheme.  This
causes two issues to user space applications which access sysfs entry
/sys/class/gpio/gpioN.

* It breaks the compatibility with user space applications between
  non-DT and DT kernels.

* It's not intuitive and sometimes hard for users to map the Linux
  gpio number to the actual hardware pin.

Use alias to identify the gpio port/bank, and then the gpio base
can be specified with port id to solve above issues.  If alias is not
defined in device tree, the base number dynamically allocated by gpio
core will be used.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpio/mxc: remove redundant shadow variables initialization
Shawn Guo [Sun, 5 Aug 2012 06:01:25 +0000 (14:01 +0800)]
gpio/mxc: remove redundant shadow variables initialization

With commit 3e11f7b (gpio/generic: initialize basic_mmio_gpio shadow
variables properly) in place, the shadow variables initialization is
being done in generic driver bgpio_init call.

Remove the redundant shadow variables initialization from gpio-mxc
driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoALSA: hda - add dock support for Thinkpad X230
Felix Kaechele [Mon, 6 Aug 2012 21:02:01 +0000 (23:02 +0200)]
ALSA: hda - add dock support for Thinkpad X230

As with the ThinkPad Models X230 Tablet and T530 the X230 needs a qurik to
correctly set up the pins for the dock port.

Signed-off-by: Felix Kaechele <felix@fetzig.org>
Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agonet: ipv6: fix TCP early demux
Eric Dumazet [Mon, 6 Aug 2012 05:09:33 +0000 (05:09 +0000)]
net: ipv6: fix TCP early demux

IPv6 needs a cookie in dst_check() call.

We need to add rx_dst_cookie and provide a family independent
sk_rx_dst_set(sk, skb) method to properly support IPv6 TCP early demux.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Use PTR_RET rather than if(IS_ERR(.. [1]
Thomas Meyer [Mon, 6 Aug 2012 07:51:16 +0000 (07:51 +0000)]
net: Use PTR_RET rather than if(IS_ERR(.. [1]

The semantic patch that makes this change is available
in scripts/coccinelle/api/ptr_ret.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet_sched: act: Delete estimator in error path.
Hiroaki SHIMODA [Mon, 6 Aug 2012 05:45:48 +0000 (05:45 +0000)]
net_sched: act: Delete estimator in error path.

Some action modules free struct tcf_common in their error path
while estimator is still active. This results in est_timer()
dereference freed memory.
Add gen_kill_estimator() in ipt, pedit and simple action.

Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoip: fix error handling in ip_finish_output2()
Vasiliy Kulikov [Mon, 6 Aug 2012 03:55:29 +0000 (03:55 +0000)]
ip: fix error handling in ip_finish_output2()

__neigh_create() returns either a pointer to struct neighbour or PTR_ERR().
But the caller expects it to return either a pointer or NULL.  Replace
the NULL check with IS_ERR() check.

The bug was introduced in a263b3093641fb1ec377582c90986a7fd0625184
("ipv4: Make neigh lookups directly in output packet path.").

Signed-off-by: Vasily Kulikov <segoon@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agollc: free the right skb
Sorin Dumitru [Mon, 6 Aug 2012 02:35:58 +0000 (02:35 +0000)]
llc: free the right skb

We are freeing skb instead of nskb, resulting in a double
free on skb and a leak from nskb.

Signed-off-by: Sorin Dumitru <sdumitru@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoixp4xx_eth: fix ptp_ixp46x build failure
Arnaud Patard (Rtp) [Sun, 5 Aug 2012 10:30:11 +0000 (10:30 +0000)]
ixp4xx_eth: fix ptp_ixp46x build failure

When building with ixp4xx_eth and ptp_ixp46x as module, one is getting the
following error:

ERROR: "ixp46x_phc_index" [drivers/ptp/ptp_ixp46x.ko] undefined!

This has been introduced by commit 509a7c25729feab353502e1b544c614772a1d49a.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers/atm/iphase.c: fix error return code
Julia Lawall [Sat, 4 Aug 2012 23:52:36 +0000 (23:52 +0000)]
drivers/atm/iphase.c: fix error return code

Convert a 0 error return code to a negative one, as returned elsewhere in the
function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@

(
if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
|
ret = 0
)
... when != ret = e1
*x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
... when != x = e2
    when != ret = e3
*if (x == NULL || ...)
{
  ... when != ret = e4
*  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp_output: fix sparse warning for tcp_wfree
Silviu-Mihai Popescu [Sat, 4 Aug 2012 09:31:29 +0000 (09:31 +0000)]
tcp_output: fix sparse warning for tcp_wfree

Fix sparse warning:
* symbol 'tcp_wfree' was not declared. Should it be static?

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers/net/phy/mdio-mux-gpio.c: drop devm_kfree of devm_kzalloc'd data
Julia Lawall [Sat, 4 Aug 2012 06:50:49 +0000 (06:50 +0000)]
drivers/net/phy/mdio-mux-gpio.c: drop devm_kfree of devm_kzalloc'd data

devm_kfree should not have to be explicitly used.

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

// <smpl>
@@
expression x,d;
@@

x = devm_kzalloc(...)
...
?-devm_kfree(d,x);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobatman-adv: select an internet gateway if none was chosen
Marek Lindner [Sat, 4 Aug 2012 04:13:26 +0000 (04:13 +0000)]
batman-adv: select an internet gateway if none was chosen

This is a regression introduced by: 2265c141086474bbae55a5bb3afa1ebb78ccaa7c
("batman-adv: gateway election code refactoring")

Reported-by: Nicolás Echániz <nicoechaniz@codigosur.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomISDN: Bugfix for layer2 fixed TEI mode
Karsten Keil [Sat, 4 Aug 2012 00:14:25 +0000 (00:14 +0000)]
mISDN: Bugfix for layer2 fixed TEI mode

If a fixed TEI is used, the initial state of the layer 2 statmachine need to be
4 (TEI assigned). This was true only for Point to Point connections, but not
for the other fixed TEIs. It was not found before, because usually only the
TEI 0 is used as fixed TEI for PtP mode, but if you try X31 packet mode
connections with SAPI 16, TEI 1, it did fail.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
Cc: <stable@vger.kernel.org> # 3.5.x
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoiwlwifi: disable greenfield transmissions as a workaround
Johannes Berg [Sun, 5 Aug 2012 16:31:46 +0000 (18:31 +0200)]
iwlwifi: disable greenfield transmissions as a workaround

There's a bug that causes the rate scaling to get stuck
when it has to use single-stream rates with a peer that
can do GF and SGI; the two are incompatible so we can't
use them together, but that causes the algorithm to not
work at all, it always rejects updates.

Disable greenfield for now to prevent that problem.

Cc: stable@vger.kernel.org
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Tested-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort61pci: fix NULL pointer dereference in config_lna_gain
Stanislaw Gruszka [Fri, 3 Aug 2012 10:49:14 +0000 (12:49 +0200)]
rt61pci: fix NULL pointer dereference in config_lna_gain

We can not pass NULL libconf->conf->channel to rt61pci_config() as it
is dereferenced unconditionally in rt61pci_config_lna_gain() subroutine.

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=44361

Cc: stable@vger.kernel.org
Reported-and-tested-by: <dolohow@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agocfg80211: process pending events when unregistering net device
Daniel Drake [Thu, 2 Aug 2012 17:41:48 +0000 (18:41 +0100)]
cfg80211: process pending events when unregistering net device

libertas currently calls cfg80211_disconnected() when it is being
brought down. This causes an event to be allocated, but since the
wdev is already removed from the rdev by the time that the event
processing work executes, the event is never processed or freed.
http://article.gmane.org/gmane.linux.kernel.wireless.general/95666

Fix this leak, and other possible situations, by processing the event
queue when a device is being unregistered. Thanks to Johannes Berg for
the suggestion.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Cc: stable@vger.kernel.org
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoARM: integrator: use clk_prepare_enable() for timer
Linus Walleij [Sun, 5 Aug 2012 20:37:55 +0000 (22:37 +0200)]
ARM: integrator: use clk_prepare_enable() for timer

The Integrator timer is using the clock framework to get the
timer frequency, but missed to prepare the clock before enabling.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge branch 'mxs/fixes-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2...
Arnd Bergmann [Mon, 6 Aug 2012 17:53:48 +0000 (19:53 +0200)]
Merge branch 'mxs/fixes-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

* 'mxs/fixes-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: mxs: always build ocotp
  ARM: mxs: Remove MMAP_MIN_ADDR setting from mxs_defconfig
  ARM: mx28: Fix registers range
  ARM: mx23: Fix registers range

11 years agoMerge branch 'imx/fixes-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2...
Arnd Bergmann [Mon, 6 Aug 2012 17:52:26 +0000 (19:52 +0200)]
Merge branch 'imx/fixes-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

* 'imx/fixes-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: dts: imx: fix gpio interrupts property
  ARM: dts: imx53-ard: add regulators for lan9220
  ARM: imx: enable emi_slow_gate clock for imx5
  ARM: imx6q-sabrelite: Setup CLKO IOMUX

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agodrm/i915: make rc6 in sysfs functions conditional
Hunt Xu [Sun, 1 Jul 2012 03:45:07 +0000 (03:45 +0000)]
drm/i915: make rc6 in sysfs functions conditional

Commit 0136db586c028f71e7cc21cc183064ff0d5919c8 merges rc6 information
into the power group. However, when compiled with CONFIG_PM not set,
modprobing i915 would taint since power_group_name is defined as NULL.

This patch makes these rc6 in sysfs functions conditional upon the
definition of the CONFIG_PM macro to avoid the above-mentioned problem.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45181
Cc: stable@vger.kernel.org
Tested-by: Kris Karas <bugs-a12@moonlit-rail.com>
Signed-off-by: Hunt Xu <mhuntxu@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agofuse: verify all ioctl retry iov elements
Zach Brown [Tue, 24 Jul 2012 19:10:11 +0000 (12:10 -0700)]
fuse: verify all ioctl retry iov elements

Commit 7572777eef78ebdee1ecb7c258c0ef94d35bad16 attempted to verify that
the total iovec from the client doesn't overflow iov_length() but it
only checked the first element.  The iovec could still overflow by
starting with a small element.  The obvious fix is to check all the
elements.

The overflow case doesn't look dangerous to the kernel as the copy is
limited by the length after the overflow.  This fix restores the
intention of returning an error instead of successfully copying less
than the iovec represented.

I found this by code inspection.  I built it but don't have a test case.
I'm cc:ing stable because the initial commit did as well.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: <stable@vger.kernel.org> [2.6.37+]
11 years agoiommu/amd: Fix ACS path checking
Alex Williamson [Sat, 4 Aug 2012 18:09:03 +0000 (12:09 -0600)]
iommu/amd: Fix ACS path checking

SR-IOV can create buses without a bridge.  There may be other cases
where this happens as well.  In these cases skip to the parent bus
and continue testing devices there.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
11 years agoiommu/intel: Fix ACS path checking
Alex Williamson [Sat, 4 Aug 2012 18:08:55 +0000 (12:08 -0600)]
iommu/intel: Fix ACS path checking

SR-IOV can create buses without a bridge.  There may be other cases
where this happens as well.  In these cases skip to the parent bus
and continue testing devices there.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
11 years agoiommu/amd: Fix pci_request_acs() call-place
Joerg Roedel [Mon, 6 Aug 2012 12:18:42 +0000 (14:18 +0200)]
iommu/amd: Fix pci_request_acs() call-place

The pci_request_acs() function needs to be called before PCI
probing to be effective. So move it to another call-place to
ensure that.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
11 years agoMAINTAINERS: update entry for Linus Walleij
Linus Walleij [Mon, 6 Aug 2012 07:52:52 +0000 (09:52 +0200)]
MAINTAINERS: update entry for Linus Walleij

I prefer to use the Linaro mail address for the MAINTAINERS
entry due to heavy mail traffic. Take this opportunity to
update the wildcards, including removing the stmpe* drivers
from the ux500 entry since these are not specific to that
machine.

Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoALSA: hda - Fix regression of HDMI codec probing
Takashi Iwai [Mon, 6 Aug 2012 12:49:36 +0000 (14:49 +0200)]
ALSA: hda - Fix regression of HDMI codec probing

The commit c4bfe94a causes a regression on some codecs at probing.
Since this was just a workaround to shut up a kernel warning, it'd be
better to revert and fix properly.  So we ended up with re-adding the
cleanup callback.

Tested-and-reported-by: Matt Horan <matt@matthoran.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - add dock support for Thinkpad T430s
Philipp A. Mohrenweiser [Mon, 6 Aug 2012 11:14:18 +0000 (13:14 +0200)]
ALSA: hda - add dock support for Thinkpad T430s

Add a model/fixup string "lenovo-dock", for Thinkpad T430s, to allow
sound in docking station.

Tested on Lenovo T430s with ThinkPad Mini Dock Plus Series 3

Cc: stable@kernel.org
Signed-off-by: Philipp A. Mohrenweiser <phiamo@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agodrm/i915: Workaround hang with BSD and forcewake on SandyBridge
Chris Wilson [Sun, 15 Jul 2012 08:42:38 +0000 (09:42 +0100)]
drm/i915: Workaround hang with BSD and forcewake on SandyBridge

For reasons that are not apparent to anybody, 990bbdadaba (drm/i915:
Group the GT routines together in both code and vtable) breaks the use
of the BitStream Decoder ring on SandyBridge. The active ingredient of
that patch is the conversion from a udelay(10) to a udelay(1) in the
busy-wait loop of waiting for the forcewake acknowledge. If we restore
that udelay(10) or insert another udelay(1) afterwards (or any wait
longer than 250ns) everything works again. An alternative is also to
remove any delay from the busy-wait loop.

Given that in the atomic sections we want to complete the wait as quick
as possible to avoid blocking the CPU for too long, it makes sense to
remove the delay altogether and simply spin on the exit condition until
it completes. So we replace the udelay(1) with cpu_relax().

Papers over regression from

commit 990bbdadabaa51828e475eda86ee5720a4910cc3
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jul 2 11:51:02 2012 -0300

    drm/i915: Group the GT routines together in both code and vtable

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51738
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Make intel_panel_get_backlight static.
Stéphane Marchesin [Mon, 30 Jul 2012 20:51:38 +0000 (13:51 -0700)]
drm/i915: Make intel_panel_get_backlight static.

This function isn't used outside of intel_panel.c, so make it static.

Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoMerge branch 'fixes_for-3.6' into fixes
Vinod Koul [Mon, 6 Aug 2012 05:16:37 +0000 (10:46 +0530)]
Merge branch 'fixes_for-3.6' into fixes

11 years agoi915: don't map imported dma-bufs for dmar.
Dave Airlie [Tue, 31 Jul 2012 05:58:13 +0000 (15:58 +1000)]
i915: don't map imported dma-bufs for dmar.

The exporter should have given us pages in the correct place, avoid
the prepare object mapping phase on dmar systems.

This fixes an oops on a GM45/R600 machine, when running the intel/radeon
tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: remove unused variable
Devendra Naga [Sat, 28 Jul 2012 13:01:35 +0000 (18:46 +0545)]
drm/i915: remove unused variable

the following warning was produced,

drivers/gpu/drm/i915/i915_gem_context.c: In function ‘i915_switch_context’:
drivers/gpu/drm/i915/i915_gem_context.c:454:6: warning: unused variable ‘ret’ [-Wunused-variable]

fix up by removing it

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Don't forget to apply SNB PIPE_CONTROL GTT workaround.
Eric Anholt [Tue, 31 Jul 2012 22:35:01 +0000 (15:35 -0700)]
drm/i915: Don't forget to apply SNB PIPE_CONTROL GTT workaround.

If a buffer that was the target of a PIPE_CONTROL from userland was a
reused one that hadn't been evicted which had not previously had this
workaround applied, then the early return for a correct
presumed_offset in this function meant we would not bind it into the
GTT and the write would land somewhere else.

Fixes reproducible failures with GL_EXT_timer_query usage in apitrace,
and I also expect it to fix the intermittent OQ issues on snb that
danvet's been working on.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48019
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52932
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Carl Worth <cworth@cworth.org>
Tested-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoMerge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of git://git...
Linus Torvalds [Sun, 5 Aug 2012 19:28:49 +0000 (22:28 +0300)]
Merge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timers and perf fixes from Ingo Molnar:
 "Timers:
 - Fix another timekeeping bug

 Pef:
   - Make clean brace expansion fix for some shells, from Palmer Cox

   - Warn user just once per guest kernel when not finding kernel info,
     from David Ahern

   - perf test fix from Jiri Olsa

   - Fix error handling on event creation in perf top, from David Ahern

   - Fix check on perf_target__strnerror, from Namhyung Kim

   - Save the whole cmdline, from David Ahern

  There's this infrastructure change:

   - Prep work for the DWARF CFI post unwinder, so that it doesn't use
     perf_session in lots of places, just evlist/evsel is enough.

  which is a late infrastructure change that prepare for future feature
  work - we wanted it upstream to simplify the fixes/development patch
  flows."

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  time: Fix adjustment cleanup bug in timekeeping_adjust()

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf tools: Remove brace expansion from clean target
  perf kvm top: Limit guest kernel info message to once
  perf tools: Introduce intlist
  perf tools: Change strlist to use the new rblist
  perf tools: Introducing rblist
  perf kvm: Use strtol for walking guestmount directory
  perf tool: Save cmdline from user in file header vs what is passed to record
  perf top: Error handling for counter creation should parallel perf-record
  perf session: Remove no longer used synthesize_sample method
  perf evsel: Adopt parse_sample method from perf_event
  perf evlist: Introduce perf_evlist__parse_sample
  perf session: Use perf_evlist__id_hdr_size more extensively
  perf session: Use perf_evlist__sample_id_all more extensively
  perf session: Use perf_evlist__sample_type more extensively
  perf evsel: Precalculate the sample size
  perf target: Fix check on buffer size
  perf symbols: Fix array sizes for binary types arrays
  perf test: Fix parse events automated tests

11 years agoMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Sun, 5 Aug 2012 10:39:12 +0000 (12:39 +0200)]
Merge tag 'perf-core-for-mingo' of git://git./linux/kernel/git/acme/linux into perf/urgent

Pull perf/core fixes and some late updates from Arnaldo Carvalho de Melo:

 * Make clean brace expansion fix for some shells, from Palmer Cox

 * Warn user just once per guest kernel when not finding kernel info,
   from David Ahern

 * perf test fix from Jiri Olsa

 * Fix error handling on event creation in perf top, from David Ahern

 * Fix check on perf_target__strnerror, from Namhyung Kim

 * Save the whole cmdline, from David Ahern

 * Prep work for the DWARF CFI post unwinder, so that it doesn't
   uses perf_session in lots of places, just evlist/evsel is enough.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agotime: Fix adjustment cleanup bug in timekeeping_adjust()
Ingo Molnar [Sat, 4 Aug 2012 19:21:14 +0000 (21:21 +0200)]
time: Fix adjustment cleanup bug in timekeeping_adjust()

Tetsuo Handa reported that sporadically the system clock starts
counting up too quickly which is enough to confuse the hangcheck
timer to print a bogus stall warning.

Commit 2a8c0883 "time: Move xtime_nsec adjustment underflow handling
timekeeping_adjust" overlooked this exit path:

        } else
                return;

which should really be a proper exit sequence, fixing the bug as a
side effect.

Also make the flow more readable by properly balancing curly
braces.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: john.stultz@linaro.org
Cc: a.p.zijlstra@chello.nl
Cc: richardcochran@gmail.com
Cc: prarit@redhat.com
Link: http://lkml.kernel.org/r/20120804192114.GA28347@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agoGPIO: gpio-pxa: fix devicetree functions
Daniel Mack [Wed, 25 Jul 2012 15:35:39 +0000 (17:35 +0200)]
GPIO: gpio-pxa: fix devicetree functions

Provide an of_xlate function for the PXA GPIO chips and make it work for
devicetree environments.

Successfully tested on a PXA3xx board.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpio: msic: Fix calculating register address in msic_gpio_to_oreg()
Axel Lin [Tue, 24 Jul 2012 10:35:16 +0000 (18:35 +0800)]
gpio: msic: Fix calculating register address in msic_gpio_to_oreg()

In the case offset is 20 ... 23, the equation to get the register should be:
        INTEL_MSIC_GPIO1HV0CTLO - offset + 20

With above equation, we can get below mapping between offset and the register:
        offset is 20: INTEL_MSIC_GPIO1HV0CTLO
        offset is 21: INTEL_MSIC_GPIO1HV1CTLO
        offset is 22: INTEL_MSIC_GPIO1HV2CTLO
        offset is 23: INTEL_MSIC_GPIO1HV3CTLO

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpio-sch: Fix leak of resource
Alan Cox [Tue, 24 Jul 2012 12:55:10 +0000 (13:55 +0100)]
gpio-sch: Fix leak of resource

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl/pinctrl-u300: remove unneeded devm_kfree call
Devendra Naga [Sat, 21 Jul 2012 08:37:58 +0000 (14:22 +0545)]
pinctrl/pinctrl-u300: remove unneeded devm_kfree call

the allocated memory will be destroyed at the driver unload time,
automatically if driver uses the devm_ functions, so no need of
doing devm_kfree at the error path

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>