]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge branches 'sirf/devel', 'at91/devel', 'imx/devel' and 'davinci/devel' into next...
Arnd Bergmann [Fri, 7 Oct 2011 19:59:57 +0000 (21:59 +0200)]
Merge branches 'sirf/devel', 'at91/devel', 'imx/devel' and 'davinci/devel' into next/devel

12 years agoMerge branch 'imx/cleanup' into imx/devel
Arnd Bergmann [Fri, 7 Oct 2011 19:57:31 +0000 (21:57 +0200)]
Merge branch 'imx/cleanup' into imx/devel

This helps resolve the conflicts between the imx cleanups and the
new code that has gone into the imx tree.
Conflict resolution was originally done by Sascha Hauer.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoARM: mx5: fix clock usage for suspend
Arnaud Patard (Rtp) [Sat, 27 Aug 2011 13:21:12 +0000 (15:21 +0200)]
ARM: mx5: fix clock usage for suspend

While suspending, we're enabling a clock in ->suspend() but we're in atomic
context, leading to this :

[30803.667305] PM: late suspend of devices complete after 1.237 msecs
[30803.667449] BUG: sleeping function called from invalid context at kernel/mutex.c:271
[30803.667464] in_atomic(): 0, irqs_disabled(): 128, pid: 4941, name: pm-suspend
[30803.667474] INFO: lockdep is turned off.
[30803.667483] irq event stamp: 0
[30803.667489] hardirqs last  enabled at (0): [<  (null)>]   (null)
[30803.667503] hardirqs last disabled at (0): [<c001e4a8>] copy_process.part.48+0x1e0/0xa7c
[30803.667543] softirqs last  enabled at (0): [<c001e4a8>] copy_process.part.48+0x1e0/0xa7c
[30803.667562] softirqs last disabled at (0): [<  (null)>]   (null)
[30803.667574] Backtrace:
[30803.667611] [<c0010e00>] (dump_backtrace+0x0/0x110) from [<c0424c00>] (dump_stack+0x18/0x1c)
[30803.667624]  r6:00000000 r5:00000000 r4:d9648000 r3:d9648000
[30803.667652] [<c0424be8>] (dump_stack+0x0/0x1c) from [<c0424eec>] (__might_sleep.part.101+0x90/0xa8)
[30803.667673] [<c0424e5c>] (__might_sleep.part.101+0x0/0xa8) from [<c001a5c4>] (__might_sleep+0x80/0x94)
[30803.667686]  r4:c05d58c0
[30803.667705] [<c001a544>] (__might_sleep+0x0/0x94) from [<c043230c>] (mutex_lock_nested+0x2c/0x30c)
[30803.667735] [<c04322e0>] (mutex_lock_nested+0x0/0x30c) from [<c0017834>] (clk_enable+0x28/0x50)
[30803.667747]  r8:c0438464 r7:00000003 r6:00000000 r5:00000000 r4:c05d2e98
[30803.667780] [<c001780c>] (clk_enable+0x0/0x50) from [<c0017260>] (mx5_suspend_enter+0x1c/0x98)
[30803.667792]  r4:00000003 r3:c060dfe0
[30803.667821] [<c0017244>] (mx5_suspend_enter+0x0/0x98) from [<c0059b48>] (suspend_enter+0xec/0x15c)
[30803.667833]  r4:00000003 r3:c0017244
[30803.667856] [<c0059a5c>] (suspend_enter+0x0/0x15c) from [<c0059c4c>] (suspend_devices_and_enter+0x94/0x130)
[30803.667868]  r6:00000000 r5:00000003 r4:c0c0af00 r3:00002710
[30803.667897] [<c0059bb8>] (suspend_devices_and_enter+0x0/0x130) from [<c0059db0>] (enter_state+0xc8/0x130)
[30803.667909]  r6:00000000 r5:00000003 r4:c05286e4
[30803.667934] [<c0059ce8>] (enter_state+0x0/0x130) from [<c00592d4>] (state_store+0xac/0xc0)
[30803.667945]  r6:00000003 r5:00000003 r4:df39d000 r3:00000003
[30803.667978] [<c0059228>] (state_store+0x0/0xc0) from [<c01b0100>] (kobj_attr_store+0x1c/0x28)
[30803.668009] [<c01b00e4>] (kobj_attr_store+0x0/0x28) from [<c00e435c>] (sysfs_write_file+0x88/0xbc)
[30803.668032] [<c00e42d4>] (sysfs_write_file+0x0/0xbc) from [<c0091fa0>] (vfs_write+0xbc/0x138)
[30803.668051] [<c0091ee4>] (vfs_write+0x0/0x138) from [<c0092204>] (sys_write+0x44/0x70)
[30803.668062]  r8:00000000 r7:00000004 r6:00000003 r5:002694d0 r4:d966acc0
[30803.668094] [<c00921c0>] (sys_write+0x0/0x70) from [<c000db00>] (ret_fast_syscall+0x0/0x3c)
[30803.668106]  r9:d9648000 r8:c000dcc4 r6:00000001 r5:002694d0 r4:00000003
[30803.669927] PM: early resume of devices complete after 0.972 msecs

Just move the clk_enable/disable in ->prepare() and ->finish()

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
12 years agoMerge branches 'cleanups/mx3-mm-v2' and 'cleanups/mxs' into imx-cleanup
Sascha Hauer [Tue, 4 Oct 2011 08:55:53 +0000 (10:55 +0200)]
Merge branches 'cleanups/mx3-mm-v2' and 'cleanups/mxs' into imx-cleanup

12 years agoarm/imx: remove cpu_is_xxx() check from __imx_ioremap()
Shawn Guo [Wed, 28 Sep 2011 09:16:07 +0000 (17:16 +0800)]
arm/imx: remove cpu_is_xxx() check from __imx_ioremap()

This patch adds an ioremap hook imx_ioremap to be called in
__imx_ioremap().  Any soc that needs a customized ioremap other
than __arm_ioremap() can set up this hook in soc specific call.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoarm/imx: remove cpu_is_xxx() from arch_idle()
Shawn Guo [Wed, 28 Sep 2011 09:16:06 +0000 (17:16 +0800)]
arm/imx: remove cpu_is_xxx() from arch_idle()

This patch adds an idle hook imx_idle to be called in arch_idle().
Any soc that needs a customized idle implementation other than
cpu_do_idle() can set up this hook in soc specific call.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM: mxs: Consolidate mm-mx23.c and mm-mx28.c into a single file
Fabio Estevam [Fri, 30 Sep 2011 16:03:24 +0000 (13:03 -0300)]
ARM: mxs: Consolidate mm-mx23.c and mm-mx28.c into a single file

Consolidate mm-mx23.c and mm-mx28.c into a single file.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoMerge branches 'features/assorted', 'features/imx-pata' and 'features/imx-multi-irq...
Sascha Hauer [Thu, 29 Sep 2011 08:40:29 +0000 (10:40 +0200)]
Merge branches 'features/assorted', 'features/imx-pata' and 'features/imx-multi-irq-v2' into imx-features

Conflicts:
arch/arm/plat-mxc/avic.c
arch/arm/plat-mxc/include/mach/common.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoarm/imx: change mxc_init_l2x0() to an imx31/35 specific call
Shawn Guo [Wed, 28 Sep 2011 09:16:05 +0000 (17:16 +0800)]
arm/imx: change mxc_init_l2x0() to an imx31/35 specific call

The mxc_init_l2x0() should really be an imx31/35 specific call.
The patch removes early_initcall from mxc_init_l2x0() and get imx31
and imx35 soc specific function calls mxc_init_l2x0(), so that it's
not necessarily to be called for all imx socs when we build single
image for multiple imx socs.

Thus the function can be renamed to imx3_init_l2x0() and put into
mm-imx3.c.  It also changes the return type from integer to void.
From what I see, the integer was picked just to satisfy early_initcall
prototype.

With the patch 'ARM: l2x0: add empty l2x0_of_init' applied, the code
compiles even without CONFIG_CACHE_L2X0 enabled.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoarm/imx: rename mm-imx31.c to mm-imx3.c
Shawn Guo [Wed, 28 Sep 2011 09:16:04 +0000 (17:16 +0800)]
arm/imx: rename mm-imx31.c to mm-imx3.c

Since mm-imx31.c now is shared between imx31 and imx35, the patch
renames mm-imx31.c to mm-imx3.c.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoarm/imx: merge mm-imx35.c into mm-imx31.c
Shawn Guo [Wed, 28 Sep 2011 09:16:03 +0000 (17:16 +0800)]
arm/imx: merge mm-imx35.c into mm-imx31.c

As imx31 and imx35 have much in common at soc level, this patch merges
mm-imx35.c into mm-imx31.c, so that the common functions between imx31
and imx35 can be added in one file later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM i.MX entry-macro.S: remove now unused code
Sascha Hauer [Tue, 20 Sep 2011 12:32:21 +0000 (14:32 +0200)]
ARM i.MX entry-macro.S: remove now unused code

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM i.MX boards: use CONFIG_MULTI_IRQ_HANDLER
Sascha Hauer [Tue, 20 Sep 2011 12:31:24 +0000 (14:31 +0200)]
ARM i.MX boards: use CONFIG_MULTI_IRQ_HANDLER

Also, add handle_irq callbacks to machine descriptors.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM i.MX tzic: add handle_irq function
Sascha Hauer [Tue, 20 Sep 2011 12:28:39 +0000 (14:28 +0200)]
ARM i.MX tzic: add handle_irq function

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM i.MX avic: add handle_irq function
Sascha Hauer [Tue, 20 Sep 2011 12:28:17 +0000 (14:28 +0200)]
ARM i.MX avic: add handle_irq function

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM: mx25: Add the missing IIM base definition
Jason Liu [Mon, 29 Aug 2011 13:13:44 +0000 (21:13 +0800)]
ARM: mx25: Add the missing IIM base definition

This fix the mx25 building issue of no IIM base definition

Signed-off-by: Jason Liu <jason.hui@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM i.MX avic: convert to use generic irq chip
Hui Wang [Thu, 22 Sep 2011 09:40:08 +0000 (17:40 +0800)]
ARM i.MX avic: convert to use generic irq chip

Convert i.MX avic irq handler to use generic irq chip. This not only
provides a cleanup implementation of irq chip handler, but also
implements suspend/resume interface with the help of generic irq chip
interface.

Change mxc_irq_chip to a new structure mxc_extra_irq to handle fiq
and priority functions.

Signed-off-by: Hui Wang <jason77.wang@gmail.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agomx31moboard: Add poweroff support
Philippe Rétornaz [Tue, 20 Sep 2011 08:57:43 +0000 (10:57 +0200)]
mx31moboard: Add poweroff support

This patch add poweroff support on mx31moboard platform.
A watchdog timeout is generated while enabling the watchdog
reset IO to trigger a PMIC poweroff.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoMerge branches 'cleanups/assorted' and 'cleanups/mm-tzic' into imx-cleanup
Sascha Hauer [Tue, 20 Sep 2011 08:09:08 +0000 (10:09 +0200)]
Merge branches 'cleanups/assorted' and 'cleanups/mm-tzic' into imx-cleanup

Conflicts:
arch/arm/mach-mx5/Makefile

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM: mx5/mm: consolidate TZIC map code
Jason Liu [Fri, 9 Sep 2011 09:17:49 +0000 (17:17 +0800)]
ARM: mx5/mm: consolidate TZIC map code

Use a static mapping for TZIC to get rid of the duplicated code for
ioremap and the corresponding error handling. This is already done on
i.MX50.

This patch also removes TZIC mapping for i.mx51 TO1 since
there is no support for TO1 now since the following commit:
9ab4650 (ARM: imx: Get the silicon version from the IIM module)

Signed-off-by: Jason Liu <jason.hui@linaro.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
12 years agoARM: mx5/mm: Remove MX51_DEBUG related mapping
Jason Liu [Fri, 9 Sep 2011 09:17:48 +0000 (17:17 +0800)]
ARM: mx5/mm: Remove MX51_DEBUG related mapping

MX51_DEBUG related mapping is dead code, no-one uses it

Signed-off-by: Jason Liu <jason.hui@linaro.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
12 years agoARM: mx5/mm: move i.MX50 mm stuff into mm.c
Jason Liu [Fri, 9 Sep 2011 09:17:47 +0000 (17:17 +0800)]
ARM: mx5/mm: move i.MX50 mm stuff into mm.c

i.MX50 is similar enough to i.MX51/53 to handle it in a single file.
No functional change.

Signed-off-by: Jason Liu <jason.hui@linaro.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
12 years agoARM: mach-mxs/mx28evk: Only register devices if their GPIO requests succeeded
Fabio Estevam [Wed, 14 Sep 2011 13:20:25 +0000 (10:20 -0300)]
ARM: mach-mxs/mx28evk: Only register devices if their GPIO requests succeeded

Currently framebuffer and MMC devices are registered even if their associated
GPIO pins fail to be requested.

Change the logic so that the registration of such devices only occurs if their
GPIO requests succeeded.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM: mach-qong: Add watchdog support
Fabio Estevam [Mon, 19 Sep 2011 13:59:46 +0000 (10:59 -0300)]
ARM: mach-qong: Add watchdog support

Add watchdog support for mach-qong target.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by : Stefano Babic <sbabic@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM: davinci: AM18x: Add wl1271/wlan support
Ido Yariv [Thu, 4 Aug 2011 07:51:23 +0000 (10:51 +0300)]
ARM: davinci: AM18x: Add wl1271/wlan support

The wl1271 daughter card for AM18x EVMs is a combo wireless connectivity
add-on card, based on the LS Research TiWi module with Texas
Instruments' wl1271 solution.
It is a 4-wire, 1.8V, embedded SDIO WLAN device with an external IRQ
line and is power-controlled by a GPIO-based fixed regulator.

Add support for the WLAN capabilities of this expansion board.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
12 years agommc: davinci: Add support for set_power callback
Ido Yariv [Thu, 28 Jul 2011 20:49:09 +0000 (20:49 +0000)]
mmc: davinci: Add support for set_power callback

Some devices connected to the MMC bus are power controlled by external
means. For instance, an SDIO device may be powered down/up by an
external gpio line.

In order to avoid toggling power from within the MMC host driver, add a
set_power callback function, which will be called by set_ios upon
powering down/up.

Signed-off-by: Ido Yariv <ido@wizery.com>
CC: Chris Ball <cjb@laptop.org>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
12 years agoARM: davinci: DA850: Add GPIO pinmux configuration for wl1271
Ido Yariv [Sun, 10 Jul 2011 13:14:38 +0000 (16:14 +0300)]
ARM: davinci: DA850: Add GPIO pinmux configuration for wl1271

The wl1271 daughter board makes use of a few GPIOs:
GPIO6_9 is used for powering down/up the WLAN functionality.
GPIO6_10 is used as an input IRQ line from the WLAN chip.

Add the required pinmux configuration for these GPIOs.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
12 years agoARM: davinci: DA850: Add MMC/SD1 pinmux configuration
Ido Yariv [Sun, 10 Jul 2011 13:14:37 +0000 (16:14 +0300)]
ARM: davinci: DA850: Add MMC/SD1 pinmux configuration

AM18x has two MMC slots. Add the required pinmux configuration for the
second slot.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
12 years agoLinux 3.1-rc6 v3.1-rc6
Linus Torvalds [Mon, 12 Sep 2011 21:02:02 +0000 (14:02 -0700)]
Linux 3.1-rc6

12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Mon, 12 Sep 2011 20:49:07 +0000 (13:49 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm: Remove duplicate "return" statement
  drm/nv04/crtc: Bail out if FB is not bound to crtc
  drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs
  drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate
  drm/nouveau: fix oops on pre-semaphore hardware
  drm/nv50/crtc: Bail out if FB is not bound to crtc
  drm/radeon/kms: fix DP detect and EDID fetch for DP bridges

12 years agoMerge branch 'fixes' of git://git.linaro.org/people/arnd/arm-soc
Linus Torvalds [Mon, 12 Sep 2011 18:51:35 +0000 (11:51 -0700)]
Merge branch 'fixes' of git://git.linaro.org/people/arnd/arm-soc

* 'fixes' of git://git.linaro.org/people/arnd/arm-soc:
  ARM: CSR: add missing sentinels to of_device_id tables
  ARM: cns3xxx: Fix newly introduced warnings in the PCIe code
  ARM: cns3xxx: Fix compile error caused by hardware.h removed
  ARM: davinci: fix cache flush build error
  ARM: davinci: correct MDSTAT_STATE_MASK
  ARM: davinci: da850 EVM: read mac address from SPI flash
  OMAP: omap_device: fix !CONFIG_SUSPEND case in _noirq handlers
  OMAP2430: hwmod: musb: add missing terminator to omap2430_usbhsotg_addrs[]
  OMAP3: clock: indicate that gpt12_fck and wdt1_fck are in the WKUP clockdomain
  OMAP4: clock: fix compile warning
  OMAP4: clock: re-enable previous clockdomain enable/disable sequence
  OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup
  OMAP: powerdomains: Make all powerdomain target states as ON at init

12 years agoioctl: register LTTng ioctl
Mathieu Desnoyers [Sun, 11 Sep 2011 21:59:04 +0000 (17:59 -0400)]
ioctl: register LTTng ioctl

The LTTng 2.0 kernel tracer (stand-alone module package, available at
http://lttng.org) uses the 0xF6 ioctl range for tracer control and
transport operations.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://github.com/chrismason/linux
Linus Torvalds [Mon, 12 Sep 2011 18:47:49 +0000 (11:47 -0700)]
Merge branch 'for-linus' of git://github.com/chrismason/linux

* 'for-linus' of git://github.com/chrismason/linux:
  Btrfs: add dummy extent if dst offset excceeds file end in
  Btrfs: calc file extent num_bytes correctly in file clone
  btrfs: xattr: fix attribute removal
  Btrfs: fix wrong nbytes information of the inode
  Btrfs: fix the file extent gap when doing direct IO
  Btrfs: fix unclosed transaction handle in btrfs_cont_expand
  Btrfs: fix misuse of trans block rsv
  Btrfs: reset to appropriate block rsv after orphan operations
  Btrfs: skip locking if searching the commit root in csum lookup
  btrfs: fix warning in iput for bad-inode
  Btrfs: fix an oops when deleting snapshots

12 years agofuse: fix memory leak
Miklos Szeredi [Mon, 12 Sep 2011 07:38:03 +0000 (09:38 +0200)]
fuse: fix memory leak

kmemleak is reporting that 32 bytes are being leaked by FUSE:

  unreferenced object 0xe373b270 (size 32):
  comm "fusermount", pid 1207, jiffies 4294707026 (age 2675.187s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<b05517d7>] kmemleak_alloc+0x27/0x50
    [<b0196435>] kmem_cache_alloc+0xc5/0x180
    [<b02455be>] fuse_alloc_forget+0x1e/0x20
    [<b0245670>] fuse_alloc_inode+0xb0/0xd0
    [<b01b1a8c>] alloc_inode+0x1c/0x80
    [<b01b290f>] iget5_locked+0x8f/0x1a0
    [<b0246022>] fuse_iget+0x72/0x1a0
    [<b02461da>] fuse_get_root_inode+0x8a/0x90
    [<b02465cf>] fuse_fill_super+0x3ef/0x590
    [<b019e56f>] mount_nodev+0x3f/0x90
    [<b0244e95>] fuse_mount+0x15/0x20
    [<b019d1bc>] mount_fs+0x1c/0xc0
    [<b01b5811>] vfs_kern_mount+0x41/0x90
    [<b01b5af9>] do_kern_mount+0x39/0xd0
    [<b01b7585>] do_mount+0x2e5/0x660
    [<b01b7966>] sys_mount+0x66/0xa0

This leak report is consistent and happens once per boot on
3.1.0-rc5-dirty.

This happens if a FORGET request is queued after the fuse device was
released.

Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agofuse: fix flock breakage
Miklos Szeredi [Mon, 12 Sep 2011 07:31:49 +0000 (09:31 +0200)]
fuse: fix flock breakage

Commit 37fb3a30b4 ("fuse: fix flock") added in 3.1-rc4 caused flock() to
fail with ENOSYS with the kernel ABI version 7.16 or earlier.

Fix by falling back to testing FUSE_POSIX_LOCKS for ABI versions 7.16
and earlier.

Reported-by: Martin Ziegler <ziegler@email.mathematik.uni-freiburg.de>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Martin Ziegler <ziegler@email.mathematik.uni-freiburg.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for_3.1/pm-fixes-2' of git://gitorious.org/khilman/linux-omap-pm into...
Arnd Bergmann [Mon, 12 Sep 2011 18:30:22 +0000 (20:30 +0200)]
Merge branch 'for_3.1/pm-fixes-2' of git://gitorious.org/khilman/linux-omap-pm into fixes

12 years agoMerge branch 'sirf/fixes' into fixes
Arnd Bergmann [Mon, 12 Sep 2011 14:59:37 +0000 (14:59 +0000)]
Merge branch 'sirf/fixes' into fixes

12 years agoMerge branch 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus
Linus Torvalds [Sun, 11 Sep 2011 21:58:47 +0000 (14:58 -0700)]
Merge branch 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus

* 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus:
  [media] vp7045: fix buffer setup
  [media] nuvoton-cir: simplify raw IR sample handling
  [media] [Resend] viacam: Don't explode if pci_find_bus() returns NULL
  [media] v4l2: Fix documentation of the codec device controls
  [media] gspca - sonixj: Fix the darkness of sensor om6802 in 320x240
  [media] gspca - sonixj: Fix wrong register mask for sensor om6802
  [media] gspca - ov519: Fix LED inversion of some ov519 webcams
  [media] pwc: precedence bug in pwc_init_controls()

12 years agoMerge branch 'for-linus' of git://openrisc.net/~jonas/linux
Linus Torvalds [Sun, 11 Sep 2011 21:55:43 +0000 (14:55 -0700)]
Merge branch 'for-linus' of git://openrisc.net/~jonas/linux

* 'for-linus' of git://openrisc.net/~jonas/linux:
  Add missing DMA ops
  openrisc: don't use pt_regs in struct sigcontext

12 years agoBtrfs: add dummy extent if dst offset excceeds file end in
Li Zefan [Sun, 11 Sep 2011 14:52:25 +0000 (10:52 -0400)]
Btrfs: add dummy extent if dst offset excceeds file end in

You can see there's no file extent with range [0, 4096]. Check this by
btrfsck:

 # btrfsck /dev/sda7
 root 5 inode 258 errors 100
 ...

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: calc file extent num_bytes correctly in file clone
Li Zefan [Sun, 11 Sep 2011 14:52:25 +0000 (10:52 -0400)]
Btrfs: calc file extent num_bytes correctly in file clone

num_bytes should be 4096 not 12288.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agobtrfs: xattr: fix attribute removal
David Sterba [Sun, 11 Sep 2011 14:52:25 +0000 (10:52 -0400)]
btrfs: xattr: fix attribute removal

An attribute is not removed by 'setfattr -x attr file' and remains
visible in attr list. This makes xfstests/062 pass again.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix wrong nbytes information of the inode
Miao Xie [Sun, 11 Sep 2011 14:52:25 +0000 (10:52 -0400)]
Btrfs: fix wrong nbytes information of the inode

If we write some data into the data hole of the file(no preallocation for this
hole), Btrfs will allocate some disk space, and update nbytes of the inode, but
the other element--disk_i_size needn't be updated. At this condition, we must
update inode metadata though disk_i_size is not changed(btrfs_ordered_update_i_size()
return 1).

 # mkfs.btrfs /dev/sdb1
 # mount /dev/sdb1 /mnt
 # touch /mnt/a
 # truncate -s 856002 /mnt/a
 # dd if=/dev/zero of=/mnt/a bs=4K count=1 conv=nocreat,notrunc
 # umount /mnt
 # btrfsck /dev/sdb1
 root 5 inode 257 errors 400
 found 32768 bytes used err is 1

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix the file extent gap when doing direct IO
Miao Xie [Sun, 11 Sep 2011 14:52:24 +0000 (10:52 -0400)]
Btrfs: fix the file extent gap when doing direct IO

When we write some data to the place that is beyond the end of the file
in direct I/O mode, a data hole will be created. And Btrfs should insert
a file extent item that point to this hole into the fs tree. But unfortunately
Btrfs forgets doing it.

The following is a simple way to reproduce it:
 # mkfs.btrfs /dev/sdc2
 # mount /dev/sdc2 /test4
 # touch /test4/a
 # dd if=/dev/zero of=/test4/a seek=8 count=1 bs=4K oflag=direct conv=nocreat,notrunc
 # umount /test4
 # btrfsck /dev/sdc2
 root 5 inode 257 errors 100

Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Tested-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix unclosed transaction handle in btrfs_cont_expand
Miao Xie [Sun, 11 Sep 2011 14:52:24 +0000 (10:52 -0400)]
Btrfs: fix unclosed transaction handle in btrfs_cont_expand

The function - btrfs_cont_expand() forgot to close the transaction handle before
it jump out the while loop. Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix misuse of trans block rsv
Liu Bo [Sun, 11 Sep 2011 14:52:24 +0000 (10:52 -0400)]
Btrfs: fix misuse of trans block rsv

At the beginning of create_pending_snapshot, trans->block_rsv is set
to pending->block_rsv and is used for snapshot things, however, when
it is done, we do not recover it as will.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: reset to appropriate block rsv after orphan operations
Liu Bo [Sun, 11 Sep 2011 14:52:24 +0000 (10:52 -0400)]
Btrfs: reset to appropriate block rsv after orphan operations

While truncating free space cache, we forget to change trans->block_rsv
back to the original one, but leave it with the orphan_block_rsv, and
then with option inode_cache enable, it leads to countless warnings of
btrfs_alloc_free_block and btrfs_orphan_commit_root:

WARNING: at fs/btrfs/extent-tree.c:5711 btrfs_alloc_free_block+0x180/0x350 [btrfs]()
...
WARNING: at fs/btrfs/inode.c:2193 btrfs_orphan_commit_root+0xb0/0xc0 [btrfs]()

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: skip locking if searching the commit root in csum lookup
Josef Bacik [Sun, 11 Sep 2011 14:52:24 +0000 (10:52 -0400)]
Btrfs: skip locking if searching the commit root in csum lookup

It's not enough to just search the commit root, since we could be cow'ing the
very block we need to search through, which would mean that its locked and we'll
still deadlock.  So use path->skip_locking as well.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agobtrfs: fix warning in iput for bad-inode
Sergei Trofimovich [Sun, 11 Sep 2011 14:52:24 +0000 (10:52 -0400)]
btrfs: fix warning in iput for bad-inode

iput() shouldn't be called for inodes in I_NEW state.
We need to mark inode as constructed first.

WARNING: at fs/inode.c:1309 iput+0x20b/0x210()
Call Trace:
 [<ffffffff8103e7ba>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff8103e805>] warn_slowpath_null+0x15/0x20
 [<ffffffff810eaf0b>] iput+0x20b/0x210
 [<ffffffff811b96fb>] btrfs_iget+0x1eb/0x4a0
 [<ffffffff811c3ad6>] btrfs_run_defrag_inodes+0x136/0x210
 [<ffffffff811ad55f>] cleaner_kthread+0x17f/0x1a0
 [<ffffffff81035b7d>] ? sub_preempt_count+0x9d/0xd0
 [<ffffffff811ad3e0>] ? transaction_kthread+0x280/0x280
 [<ffffffff8105af86>] kthread+0x96/0xa0
 [<ffffffff814336d4>] kernel_thread_helper+0x4/0x10
 [<ffffffff8105aef0>] ? kthread_worker_fn+0x190/0x190
 [<ffffffff814336d0>] ? gs_change+0xb/0xb

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
CC: Konstantin Khlebnikov <khlebnikov@openvz.org>
Tested-by: David Sterba <dsterba@suse.cz>
CC: Josef Bacik <josef@redhat.com>
CC: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix an oops when deleting snapshots
Liu Bo [Sun, 11 Sep 2011 14:52:24 +0000 (10:52 -0400)]
Btrfs: fix an oops when deleting snapshots

We can reproduce this oops via the following steps:

$ mkfs.btrfs /dev/sdb7
$ mount /dev/sdb7 /mnt/btrfs
$ for ((i=0; i<3; i++)); do btrfs sub snap /mnt/btrfs /mnt/btrfs/s_$i; done
$ rm -fr /mnt/btrfs/*
$ rm -fr /mnt/btrfs/*

then we'll get
------------[ cut here ]------------
kernel BUG at fs/btrfs/inode.c:2264!
[...]
Call Trace:
 [<ffffffffa05578c7>] btrfs_rmdir+0xf7/0x1b0 [btrfs]
 [<ffffffff81150b95>] vfs_rmdir+0xa5/0xf0
 [<ffffffff81153cc3>] do_rmdir+0x123/0x140
 [<ffffffff81145ac7>] ? fput+0x197/0x260
 [<ffffffff810aecff>] ? audit_syscall_entry+0x1bf/0x1f0
 [<ffffffff81153d0d>] sys_unlinkat+0x2d/0x40
 [<ffffffff8147896b>] system_call_fastpath+0x16/0x1b
RIP  [<ffffffffa054f7b9>] btrfs_orphan_add+0x179/0x1a0 [btrfs]

When it comes to btrfs_lookup_dentry, we may set a snapshot's inode->i_ino
to BTRFS_EMPTY_SUBVOL_DIR_OBJECTID instead of BTRFS_FIRST_FREE_OBJECTID,
while the snapshot's location.objectid remains unchanged.

However, btrfs_ino() does not take this into account, and returns a wrong ino,
and causes the oops.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years ago[media] vp7045: fix buffer setup
Florian Mickler [Wed, 10 Aug 2011 10:05:20 +0000 (07:05 -0300)]
[media] vp7045: fix buffer setup

dvb_usb_device_init calls the frontend_attach method of this driver which
uses vp7045_usb_ob. In order to have a buffer ready in vp7045_usb_op, it has to
be allocated before that happens.

Luckily we can use the whole private data as the buffer as it gets separately
allocated on the heap via kzalloc in dvb_usb_device_init and is thus apt for
use via usb_control_msg.

This fixes a
BUG: unable to handle kernel paging request at 0000000000001e78

reported by Tino Keitel and diagnosed by Dan Carpenter.

Cc: stable@kernel.org # For v3.0 and upper
Tested-by: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] nuvoton-cir: simplify raw IR sample handling
Jarod Wilson [Mon, 8 Aug 2011 20:20:40 +0000 (17:20 -0300)]
[media] nuvoton-cir: simplify raw IR sample handling

The nuvoton-cir driver was storing up consecutive pulse-pulse and
space-space samples internally, for no good reason, since
ir_raw_event_store_with_filter() already merges back to back like
samples types for us. This should also fix a regression introduced late
in 3.0 that related to a timeout change, which actually becomes correct
when coupled with this change. Tested with RC6 and RC5 on my own
nuvoton-cir hardware atop vanilla 3.0.0, after verifying quirky
behavior in 3.0 due to the timeout change.

Reported-by: Stephan Raue <sraue@openelec.tv>
CC: Stephan Raue <sraue@openelec.tv>
CC: stable@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [Resend] viacam: Don't explode if pci_find_bus() returns NULL
Jesper Juhl [Mon, 1 Aug 2011 21:39:17 +0000 (18:39 -0300)]
[media] [Resend] viacam: Don't explode if pci_find_bus() returns NULL

In the unlikely case that pci_find_bus() should return NULL
viacam_serial_is_enabled() is going to dereference a NULL pointer and
blow up. Better safe than sorry, so be defensive and check the
pointer.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2: Fix documentation of the codec device controls
Kamil Debski [Tue, 2 Aug 2011 15:53:49 +0000 (12:53 -0300)]
[media] v4l2: Fix documentation of the codec device controls

Fixed missing ids of the codec controls description in the controls.xml file.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - sonixj: Fix the darkness of sensor om6802 in 320x240
Jean-François Moine [Tue, 9 Aug 2011 18:13:50 +0000 (15:13 -0300)]
[media] gspca - sonixj: Fix the darkness of sensor om6802 in 320x240

The images are clearer with a lower bridge clock.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - sonixj: Fix wrong register mask for sensor om6802
Luiz Carlos Ramos [Tue, 9 Aug 2011 17:36:57 +0000 (14:36 -0300)]
[media] gspca - sonixj: Fix wrong register mask for sensor om6802

The bug was introduced by git commit 0e4d413af1a9d, giving very dark images.

Signed-off-by: Luiz Carlos Ramos <lramos.prof@yahoo.com.br>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - ov519: Fix LED inversion of some ov519 webcams
Jean-François Moine [Tue, 9 Aug 2011 08:28:17 +0000 (05:28 -0300)]
[media] gspca - ov519: Fix LED inversion of some ov519 webcams

The list of the webcams which have LED inversion was rebuild scanning
ms-win .inf files.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: precedence bug in pwc_init_controls()
Dan Carpenter [Sat, 23 Jul 2011 18:53:03 +0000 (15:53 -0300)]
[media] pwc: precedence bug in pwc_init_controls()

'!' has higher precedence than '&' so we need parenthesis here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd missing DMA ops
Jonas Bonn [Mon, 5 Sep 2011 11:47:10 +0000 (13:47 +0200)]
Add missing DMA ops

For the initial architecture submission, not all of the DMA ops were
implemented.  This patch adds the *map_page and *map_sg variants of the
DMA mapping ops.

This patch is currently of interest mainly to some drivers that haven't
been submitted upstream yet.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
12 years agoARM: CSR: add rtc i/o bridge interface for SiRFprimaII
Zhiwu Song [Wed, 31 Aug 2011 02:20:34 +0000 (19:20 -0700)]
ARM: CSR: add rtc i/o bridge interface for SiRFprimaII

The module is a bridge between the RTC clock domain and the CPU interface
clock domain. ARM access the register of SYSRTC, GPSRTC and PWRC through
this module.

Signed-off-by: Zhiwu Song <zhiwu.song@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
12 years agoARM: CSR: IRQ: add simple irq_domain so that hw irq can map to Linux
Barry Song [Mon, 5 Sep 2011 05:15:18 +0000 (22:15 -0700)]
ARM: CSR: IRQ: add simple irq_domain so that hw irq can map to Linux

Signed-off-by: Barry Song <Baohua.Song@csr.com>
12 years agoARM: CSR: extend the compatibility of gpio controller to pinmux in dts
Barry Song [Mon, 5 Sep 2011 05:15:17 +0000 (22:15 -0700)]
ARM: CSR: extend the compatibility of gpio controller to pinmux in dts

gpio controller handles the switch of gpio and pinmux. And drivers/pinctrl/pinmux-sirf.c
will contain both gpio and pinmux.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
12 years agoARM: CSR: add lost Resource Sharing Control(RSC) node in dts
Barry Song [Mon, 5 Sep 2011 05:15:16 +0000 (22:15 -0700)]
ARM: CSR: add lost Resource Sharing Control(RSC) node in dts

Signed-off-by: Barry Song <Baohua.Song@csr.com>
12 years agoARM: CSR: add missing sentinels to of_device_id tables
Jamie Iles [Mon, 1 Aug 2011 20:09:36 +0000 (21:09 +0100)]
ARM: CSR: add missing sentinels to of_device_id tables

The of_device_id tables used for matching should be terminated with
empty sentinel values.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Barry Song <baohua.song@csr.com>
12 years agoscsi: qla4xxx driver depends on NET
Randy Dunlap [Sun, 11 Sep 2011 00:13:34 +0000 (17:13 -0700)]
scsi: qla4xxx driver depends on NET

When CONFIG_NET is disabled, SCSI_QLA_ISCSI selects SCSI_ISCSI_ATTRS,
which uses network interfaces, so the build fails with multiple errors:

  warning: (ISCSI_TCP && SCSI_CXGB3_ISCSI && SCSI_CXGB4_ISCSI && SCSI_QLA_ISCSI && INFINIBAND_ISER) selects SCSI_ISCSI_ATTRS which has unmet direct dependencies (SCSI && NET)

  ERROR: "skb_trim" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
  ERROR: "netlink_kernel_create" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
  ERROR: "netlink_kernel_release" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
  ...

so make SCSI_QLA_ISCSI also depend on NET to prevent the build errors.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Ravi Anand <ravi.anand@qlogic.com>
Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Cc: iscsi-driver@qlogic.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur...
Linus Torvalds [Sun, 11 Sep 2011 00:28:46 +0000 (17:28 -0700)]
Merge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm

* 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
  ARM: 7088/1: entry: fix wrong parameter name used in do_thumb_abort
  ARM: 7080/1: l2x0: make sure I&D are not locked down on init
  ARM: 7081/1: mach-integrator: fix the clocksource
  NET: am79c961: fix race in link status code
  ARM: 7067/1: mm: keep significant bits in pfn_valid

12 years agoARM: 7088/1: entry: fix wrong parameter name used in do_thumb_abort
Janusz Krzysztofik [Thu, 8 Sep 2011 17:45:40 +0000 (18:45 +0100)]
ARM: 7088/1: entry: fix wrong parameter name used in do_thumb_abort

Commit be020f8618ca, "ARM: entry: abort-macro: specify registers to be
used for macros", while replacing register numbers with macro parameter
names, mismatched the name used for r1. For me, this resulted in user
space built for EABI with -march=armv4t -mtune=arm920t -mthumb-interwork
-mthumb broken on my OMAP1510 based Amstrad Delta (old ABI and no thumb
still worked for me though).

Fix this by using correct parameter name fsr instead of mismatched psr,
used by callers for another purpose.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMerge branches 'cns3xxx/fixes', 'omap/fixes' and 'davinci/fixes' into fixes
Arnd Bergmann [Sat, 10 Sep 2011 21:20:25 +0000 (23:20 +0200)]
Merge branches 'cns3xxx/fixes', 'omap/fixes' and 'davinci/fixes' into fixes

12 years agoat91: at91-ohci: configure overcurrent pins as input GPIOs
Thomas Petazzoni [Wed, 13 Jul 2011 09:29:18 +0000 (11:29 +0200)]
at91: at91-ohci: configure overcurrent pins as input GPIOs

As a new overcurrent_pin[] array has been added to the at91_usbh_data
structure, those pins must be muxed to work properly. This commit
implements this muxing for all AT91 SoCs that support the AT91 OHCI.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[nicolas.ferre@atmel.com: added i variable declaration for the loop]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoat91: at91-ohci: support overcurrent notification
Thomas Petazzoni [Wed, 13 Jul 2011 09:29:17 +0000 (11:29 +0200)]
at91: at91-ohci: support overcurrent notification

Several USB power switches (AIC1526 or MIC2026) have a digital output
that is used to notify that an overcurrent situation is taking
place. This digital outputs are typically connected to GPIO inputs of
the processor and can be used to be notified of those overcurrent
situations.

Therefore, we add a new overcurrent_pin[] array in the at91_usbh_data
structure so that boards can tell the AT91 OHCI driver which pins are
used for the overcurrent notification, and an overcurrent_supported
boolean to tell the driver whether overcurrent is supported or not.

The code has been largely borrowed from ohci-da8xx.c and
ohci-s3c2410.c.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoat91: ohci-at91: add vbus_pin_inverted platform attribute
Thomas Petazzoni [Wed, 13 Jul 2011 09:29:16 +0000 (11:29 +0200)]
at91: ohci-at91: add vbus_pin_inverted platform attribute

The existing OHCI AT91 driver made the assumption that the enable
input of the USB power switch was active low. However, some USB power
switches such as the Micrel MIC2026-1 [1] have an active high input to
enable the power. A new vbus_pin_inverted attribute is added to the
at91_usbh_data structure so that board files can tell the OHCI driver
if the vbus pin logic is active low or active high.

[1] http://www.micrel.com/page.do?page=product-info/products/mic2026.shtml

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoat91: ohci-at91: always provide all the clocks
Jean-Christophe PLAGNIOL-VILLARD [Tue, 30 Aug 2011 01:29:28 +0000 (03:29 +0200)]
at91: ohci-at91: always provide all the clocks

Remove the cpu_is_at91xxxx() macros in the ohci-at91 driver.
SoCs at91sam9261 and at91sam9g10 expect one additional clock: hck0.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agobacklight: Declare backlight_types[] const
Bart Van Assche [Sat, 10 Sep 2011 18:13:01 +0000 (20:13 +0200)]
backlight: Declare backlight_types[] const

Since backlight_types[] isn't modified, let's declare it const.  That
was probably the intention of the author of commit bb7ca747f8d6
("backlight: add backlight type"), via which the "const char const *"
construct was introduced.  The duplicate const was detected by sparse.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Sat, 10 Sep 2011 17:19:15 +0000 (10:19 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: Fix handling for devices from 2TB to 4TB in 0.90 metadata.
  md/raid1,10: Remove use-after-free bug in make_request.
  md/raid10: unify handling of write completion.
  Avoid dereferencing a 'request_queue' after last close.

12 years agomd: Fix handling for devices from 2TB to 4TB in 0.90 metadata.
NeilBrown [Sat, 10 Sep 2011 07:21:28 +0000 (17:21 +1000)]
md: Fix handling for devices from 2TB to 4TB in 0.90 metadata.

0.90 metadata uses an unsigned 32bit number to count the number of
kilobytes used from each device.
This should allow up to 4TB per device.
However we multiply this by 2 (to get sectors) before casting to a
larger type, so sizes above 2TB get truncated.

Also we allow rdev->sectors to be larger than 4TB, so it is possible
for the array to be resized larger than the metadata can handle.
So make sure rdev->sectors never exceeds 4TB when 0.90 metadata is in
used.

Also the sanity check at the end of super_90_load should include level
1 as it used ->size too. (RAID0 and Linear don't use ->size at all).

Reported-by: Pim Zandbergen <P.Zandbergen@macroscoop.nl>
Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid1,10: Remove use-after-free bug in make_request.
NeilBrown [Sat, 10 Sep 2011 07:21:23 +0000 (17:21 +1000)]
md/raid1,10: Remove use-after-free bug in make_request.

A single request to RAID1 or RAID10 might result in multiple
requests if there are known bad blocks that need to be avoided.

To detect if we need to submit another write request we test:
  if (sectors_handled < (bio->bi_size >> 9)) {

However this is after we call **_write_done() so the 'bio' no longer
belongs to us - the writes could have completed and the bio freed.

So move the **_write_done call until after the test against
bio->bi_size.

This addresses https://bugzilla.kernel.org/show_bug.cgi?id=41862

Reported-by: Bruno Wolff III <bruno@wolff.to>
Tested-by: Bruno Wolff III <bruno@wolff.to>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid10: unify handling of write completion.
NeilBrown [Sat, 10 Sep 2011 07:21:17 +0000 (17:21 +1000)]
md/raid10: unify handling of write completion.

A write can complete at two different places:
1/ when the last member-device write completes, through
   raid10_end_write_request
2/ in make_request() when we remove the initial bias from ->remaining.

These two should do exactly the same thing and the comment says they
do, but they don't.

So factor the correct code out into a function and call it in both
places.  This makes the code much more similar to RAID1.

The difference is only significant if there is an error, and they
usually take a while, so it is unlikely that there will be an error
already when make_request is completing, so this is unlikely to cause
real problems.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoAvoid dereferencing a 'request_queue' after last close.
NeilBrown [Sat, 10 Sep 2011 07:20:21 +0000 (17:20 +1000)]
Avoid dereferencing a 'request_queue' after last close.

On the last close of an 'md' device which as been stopped, the device
is destroyed and in particular the request_queue is freed.  The free
is done in a separate thread so it might happen a short time later.

__blkdev_put calls bdev_inode_switch_bdi *after* ->release has been
called.

Since commit f758eeabeb96f878c860e8f110f94ec8820822a9
bdev_inode_switch_bdi will dereference the 'old' bdi, which lives
inside a request_queue, to get a spin lock.  This causes the last
close on an md device to sometime take a spin_lock which lives in
freed memory - which results in an oops.

So move the called to bdev_inode_switch_bdi before the call to
->release.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoPCI: Remove MRRS modification from MPS setting code
Jon Mason [Thu, 8 Sep 2011 21:41:18 +0000 (16:41 -0500)]
PCI: Remove MRRS modification from MPS setting code

Modifying the Maximum Read Request Size to 0 (value of 128Bytes) has
massive negative ramifications on some devices.  Without knowing which
devices have this issue, do not modify from the default value when
walking the PCI-E bus in pcie_bus_safe mode.  Also, make pcie_bus_safe
the default procedure.

Tested-by: Sven Schnelle <svens@stackframe.org>
Tested-by: Simon Kirby <sim@hostway.ca>
Tested-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reported-and-tested-by: Eric Dumazet <eric.dumazet@gmail.com>
Reported-and-tested-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
References: https://bugzilla.kernel.org/show_bug.cgi?id=42162
Signed-off-by: Jon Mason <mason@myri.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoFix pointer dereference before call to pcie_bus_configure_settings
Shyam Iyer [Thu, 8 Sep 2011 21:41:17 +0000 (16:41 -0500)]
Fix pointer dereference before call to pcie_bus_configure_settings

Commit b03e7495a862 ("PCI: Set PCI-E Max Payload Size on fabric")
introduced a potential NULL pointer dereference in calls to
pcie_bus_configure_settings due to attempts to access pci_bus self
variables when the self pointer is NULL.

To correct this, verify that the self pointer in pci_bus is non-NULL
before dereferencing it.

Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Shyam Iyer <shyam_iyer@dell.com>
Signed-off-by: Jon Mason <mason@myri.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://dev.laptop.org/users/cjb/mmc
Linus Torvalds [Fri, 9 Sep 2011 22:50:25 +0000 (15:50 -0700)]
Merge branch 'for-linus' of git://dev.laptop.org/users/cjb/mmc

* 'for-linus' of git://dev.laptop.org/users/cjb/mmc:
  mmc: sdhci-s3c: Fix mmc card I/O problem
  mmc: sd: UHS-I bus speed should be set last in UHS initialization
  mmc: sdhi: initialise mmc_data->flags before use
  mmc: core: use non-reentrant workqueue for clock gating
  mmc: core: prevent aggressive clock gating racing with ios updates
  mmc: rename mmc_host_clk_{ungate|gate} to mmc_host_clk_{hold|release}
  mmc: sdhci-esdhc-imx: add missing inclusion of linux/module.h

12 years agoMerge branch 'for-linus' of git://ceph.newdream.net/git/ceph-client
Linus Torvalds [Fri, 9 Sep 2011 22:48:34 +0000 (15:48 -0700)]
Merge branch 'for-linus' of git://ceph.newdream.net/git/ceph-client

* 'for-linus' of git://ceph.newdream.net/git/ceph-client:
  libceph: fix leak of osd structs during shutdown
  ceph: fix memory leak
  ceph: fix encoding of ino only (not relative) paths
  libceph: fix msgpool

12 years agovfs: automount should ignore LOOKUP_FOLLOW
Miklos Szeredi [Mon, 5 Sep 2011 16:06:26 +0000 (18:06 +0200)]
vfs: automount should ignore LOOKUP_FOLLOW

Prior to 2.6.38 automount would not trigger on either stat(2) or
lstat(2) on the automount point.

After 2.6.38, with the introduction of the ->d_automount()
infrastructure, stat(2) and others would start triggering automount
while lstat(2), etc. still would not.  This is a regression and a
userspace ABI change.

Problem originally reported here:

  http://thread.gmane.org/gmane.linux.kernel.autofs/6098

It appears that there was an attempt at fixing various userspace tools
to not trigger the automount.  But since the stat system call is
rather common it is impossible to "fix" all userspace.

This patch reverts the original behavior, which is to not trigger on
stat(2) and other symlink following syscalls.

[ It's not really clear what the right behavior is.  Apparently Solaris
  does the "automount on stat, leave alone on lstat".  And some programs
  can get unhappy when "stat+open+fstat" ends up giving a different
  result from the fstat than from the initial stat.

  But the change in 2.6.38 resulted in problems for some people, so
  we're going back to old behavior.  Maybe we can re-visit this
  discussion at some future date  - Linus ]

Reported-by: Leonardo Chiquitto <leonardo.lists@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Ian Kent <raven@themaw.net>
Cc: David Howells <dhowells@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoARM: cns3xxx: Fix newly introduced warnings in the PCIe code
Anton Vorontsov [Fri, 9 Sep 2011 19:18:00 +0000 (23:18 +0400)]
ARM: cns3xxx: Fix newly introduced warnings in the PCIe code

commit d5341942d784134f2997b3ff82cd63cf71d1f932 ("PCI: Make the struct
pci_dev * argument of pci_fixup_irqs const") did not change argument
of pdev_to_cnspci(), and thus introduced the following warnings:

  CHECK   arch/arm/mach-cns3xxx/pcie.c
pcie.c:177:60: warning: incorrect type in argument 1 (different modifiers)
pcie.c:177:60:    expected struct pci_dev *dev
pcie.c:177:60:    got struct pci_dev const *dev
  CC      arch/arm/mach-cns3xxx/pcie.o
pcie.c: In function 'cns3xxx_pcie_map_irq':
pcie.c:177: warning: passing argument 1 of 'pdev_to_cnspci' discards qualifiers from pointer target type
pcie.c:52: note: expected 'struct pci_dev *' but argument is of type 'const struct pci_dev *'

This patch fixes the issue.

Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
12 years agoARM: cns3xxx: Fix compile error caused by hardware.h removed
Tommy Lin [Thu, 28 Jul 2011 17:14:46 +0000 (01:14 +0800)]
ARM: cns3xxx: Fix compile error caused by hardware.h removed

Commit c9d95fbe59e426eed7f16e7cac812e46ac4772d0 "ARM: convert PCI defines
to variables" deleted cns3xxx' hardware.h, but didn't remove references
for it, so do it now.

This patch removes lines that refer to hardware.h.

Signed-off-by: Tommy Lin <tommy.lin.1101@gmail.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
12 years agodrm: Remove duplicate "return" statement
Lin Ming [Wed, 7 Sep 2011 14:58:09 +0000 (22:58 +0800)]
drm: Remove duplicate "return" statement

Remove the duplicate "return" statement in drm_fb_helper_panic().

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Fri, 9 Sep 2011 08:10:04 +0000 (09:10 +0100)]
Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-test

* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nv04/crtc: Bail out if FB is not bound to crtc
  drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs
  drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate
  drm/nouveau: fix oops on pre-semaphore hardware
  drm/nv50/crtc: Bail out if FB is not bound to crtc

12 years agodrm/nv04/crtc: Bail out if FB is not bound to crtc
Emil Velikov [Thu, 25 Aug 2011 20:36:51 +0000 (21:36 +0100)]
drm/nv04/crtc: Bail out if FB is not bound to crtc

This commit resolves a possible 'NULL pointer dereference'
It uses the same approach as radeon, intel and nouveau/nv50

Fixes bug 'Nouveau: Kernel oops when unplugging external monitor'
https://bugs.freedesktop.org/show_bug.cgi?id=40336

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs
Marcin Slusarz [Mon, 22 Aug 2011 21:22:13 +0000 (23:22 +0200)]
drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs

nv04_sgdma_bind binds the same page multiple times on
architectures where PAGE_SIZE != 4096.
Let's fix it.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: properly handle allocation failure in nouveau_sgdma_populate
Marcin Slusarz [Mon, 22 Aug 2011 21:14:05 +0000 (23:14 +0200)]
drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate

Not cleaning after alloc failure would result in crash on destroy,
because nouveau_sgdma_clear assumes "ttm_alloced" to be not null when
"pages" is not null.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: fix oops on pre-semaphore hardware
Ben Skeggs [Tue, 23 Aug 2011 00:23:11 +0000 (10:23 +1000)]
drm/nouveau: fix oops on pre-semaphore hardware

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/crtc: Bail out if FB is not bound to crtc
Emil Velikov [Sun, 21 Aug 2011 21:48:12 +0000 (22:48 +0100)]
drm/nv50/crtc: Bail out if FB is not bound to crtc

Fixes possbile NULL pointer dereference
Resolves 'kernel crash in nv50_crtc_do_mode_set_base during shutdown'
https://bugs.freedesktop.org/show_bug.cgi?id=40005

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Thu, 8 Sep 2011 23:49:32 +0000 (16:49 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine/ste_dma40: fix memory leak due to prepared descriptors
  dmaengine/ste_dma40: fix Oops due to double free of client descriptor
  dmaengine/ste_dma40: remove duplicate call to d40_pool_lli_free().
  dmaengine/ste_dma40: add missing kernel doc for pending_queue

12 years agoMerge branch 'for-linus' of git://opensource.wolfsonmicro.com/regmap
Linus Torvalds [Thu, 8 Sep 2011 23:47:52 +0000 (16:47 -0700)]
Merge branch 'for-linus' of git://opensource.wolfsonmicro.com/regmap

* 'for-linus' of git://opensource.wolfsonmicro.com/regmap:
  regmap: Remove bitrotted module_put()s

12 years agoMerge branch 'for-linus' of git://twin.jikos.cz/jikos/hid
Linus Torvalds [Thu, 8 Sep 2011 23:45:37 +0000 (16:45 -0700)]
Merge branch 'for-linus' of git://twin.jikos.cz/jikos/hid

* 'for-linus' of git://twin.jikos.cz/jikos/hid:
  HID: wacom: Unregister sysfs attributes on remove
  HID: wacom: Fix error path of power-supply initialization
  HID: add support for HuiJia USB Gamepad connector
  HID: magicmouse: ignore 'ivalid report id' while switching modes, v2
  HID: magicmouse: Set resolution of touch surfaces

12 years agoMerge branch 'for-31-rc5/i2c-fixes' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Thu, 8 Sep 2011 23:42:34 +0000 (16:42 -0700)]
Merge branch 'for-31-rc5/i2c-fixes' of git://git.fluff.org/bjdooks/linux

* 'for-31-rc5/i2c-fixes' of git://git.fluff.org/bjdooks/linux:
  i2c-tegra: fix possible race condition after tx
  i2c-tegra: add I2C_FUNC_SMBUS_EMUL
  i2c-tegra: Add of_match_table
  i2c-pxa2xx: return proper error code in ce4100_i2c_probe error paths

12 years agoMerge branch 'amd/fixes' of git://git.8bytes.org/scm/iommu
Linus Torvalds [Thu, 8 Sep 2011 23:39:47 +0000 (16:39 -0700)]
Merge branch 'amd/fixes' of git://git.8bytes.org/scm/iommu

* 'amd/fixes' of git://git.8bytes.org/scm/iommu:
  iommu/amd: Don't take domain->lock recursivly
  iommu/amd: Make sure iommu->need_sync contains correct value

12 years agoregulator: fix kernel-doc warning in consumer.h
Randy Dunlap [Thu, 8 Sep 2011 17:16:47 +0000 (10:16 -0700)]
regulator: fix kernel-doc warning in consumer.h

Fix kernel-doc warning about internal/private data by marking it
as "private:" so that kernel-doc will ignore it.

  Warning(include/linux/regulator/consumer.h:128): No description found for parameter 'ret'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agowireless: fix kernel-doc warning in net/cfg80211.h
Randy Dunlap [Thu, 8 Sep 2011 17:16:50 +0000 (10:16 -0700)]
wireless: fix kernel-doc warning in net/cfg80211.h

Fix kernel-doc warning in net/cfg80211.h:

  Warning(include/net/cfg80211.h:1884): No description found for parameter 'registered'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'timers-fixes-for-linus' of git://tesla.tglx.de/git/linux-2.6-tip
Linus Torvalds [Wed, 7 Sep 2011 20:03:48 +0000 (13:03 -0700)]
Merge branch 'timers-fixes-for-linus' of git://tesla.tglx.de/git/linux-2.6-tip

* 'timers-fixes-for-linus' of git://tesla.tglx.de/git/linux-2.6-tip:
  rtc: twl: Fix registration vs. init order
  rtc: Initialized rtc_time->tm_isdst
  rtc: Fix RTC PIE frequency limit
  rtc: rtc-twl: Remove lockdep related local_irq_enable()
  rtc: rtc-twl: Switch to using threaded irq
  rtc: ep93xx: Fix 'rtc' may be used uninitialized warning
  alarmtimers: Avoid possible denial of service with high freq periodic timers
  alarmtimers: Memset itimerspec passed into alarm_timer_get
  alarmtimers: Avoid possible null pointer traversal