]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge remote-tracking branch 'ux500-core/ux500-core'
Stephen Rothwell [Thu, 4 Aug 2011 00:58:18 +0000 (10:58 +1000)]
Merge remote-tracking branch 'ux500-core/ux500-core'

12 years agoMerge remote-tracking branch 's5p/for-next'
Stephen Rothwell [Thu, 4 Aug 2011 00:56:57 +0000 (10:56 +1000)]
Merge remote-tracking branch 's5p/for-next'

Conflicts:
arch/arm/mach-exynos4/Kconfig
arch/arm/mach-exynos4/mach-smdkc210.c

12 years agoMerge remote-tracking branch 'msm/for-next'
Stephen Rothwell [Thu, 4 Aug 2011 00:55:24 +0000 (10:55 +1000)]
Merge remote-tracking branch 'msm/for-next'

Conflicts:
arch/arm/mach-msm/io.c

12 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Thu, 4 Aug 2011 00:55:10 +0000 (10:55 +1000)]
Merge remote-tracking branch 'arm-soc/for-next'

Conflicts:
arch/arm/mach-exynos4/pm.c
arch/arm/mach-imx/mm-imx25.c
arch/arm/mach-imx/mm-imx31.c
arch/arm/mach-imx/mm-imx35.c
arch/arm/mach-mx5/mm.c
arch/arm/mach-omap2/cm-regbits-44xx.h

12 years agoMerge remote-tracking branch 'arm-lpae/for-next'
Stephen Rothwell [Thu, 4 Aug 2011 00:53:23 +0000 (10:53 +1000)]
Merge remote-tracking branch 'arm-lpae/for-next'

Conflicts:
arch/arm/include/asm/pgalloc.h
arch/arm/include/asm/pgtable.h
arch/arm/include/asm/proc-fns.h
arch/arm/include/asm/tlb.h
arch/arm/mm/context.c
arch/arm/mm/proc-v7.S

12 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Thu, 4 Aug 2011 00:52:00 +0000 (10:52 +1000)]
Merge remote-tracking branch 'arm/for-next'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Thu, 4 Aug 2011 00:48:54 +0000 (10:48 +1000)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'fbdev-current/fbdev-fixes-for-linus'
Stephen Rothwell [Thu, 4 Aug 2011 00:48:50 +0000 (10:48 +1000)]
Merge remote-tracking branch 'fbdev-current/fbdev-fixes-for-linus'

12 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Thu, 4 Aug 2011 00:48:34 +0000 (10:48 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

12 years agoMerge remote-tracking branch 'staging.current/staging-linus'
Stephen Rothwell [Thu, 4 Aug 2011 00:48:32 +0000 (10:48 +1000)]
Merge remote-tracking branch 'staging.current/staging-linus'

12 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Thu, 4 Aug 2011 00:48:31 +0000 (10:48 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

12 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Thu, 4 Aug 2011 00:48:29 +0000 (10:48 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

12 years agoMerge remote-tracking branch 'net-current/master'
Stephen Rothwell [Thu, 4 Aug 2011 00:48:27 +0000 (10:48 +1000)]
Merge remote-tracking branch 'net-current/master'

12 years agoMerge remote-tracking branch 'sparc-current/master'
Stephen Rothwell [Thu, 4 Aug 2011 00:48:24 +0000 (10:48 +1000)]
Merge remote-tracking branch 'sparc-current/master'

12 years agoMerge remote-tracking branch 'fixes/fixes'
Stephen Rothwell [Thu, 4 Aug 2011 00:42:09 +0000 (10:42 +1000)]
Merge remote-tracking branch 'fixes/fixes'

12 years agotpm_tis: fix build when ACPI is not enabled
Randy Dunlap [Wed, 3 Aug 2011 23:21:11 +0000 (16:21 -0700)]
tpm_tis: fix build when ACPI is not enabled

Fix tpm_tis.c build when CONFIG_ACPI is not enabled by providing a stub
function.  Fixes many build errors/warnings:

drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of '__mptr'
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of '__mptr'
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:90: error: dereferencing pointer to incomplete type

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Leendert van Doorn <leendert@watson.ibm.com>
Cc: James Morris <jmorris@namei.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agostaging: zcache: include module.h for MODULE_LICENSE
Thadeu Lima de Souza Cascardo [Wed, 3 Aug 2011 14:00:40 +0000 (11:00 -0300)]
staging: zcache: include module.h for MODULE_LICENSE

The oncoming cleanup of module.h usage requires the explicit inclusion
of module.h when it was otherwise being included indirectly. Otherwise,
building zcache will fail.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agobnx2x: Clear MDIO access warning during first driver load
Yaniv Rosner [Tue, 2 Aug 2011 23:00:12 +0000 (23:00 +0000)]
bnx2x: Clear MDIO access warning during first driver load

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix BCM578xx MAC test
Yaniv Rosner [Tue, 2 Aug 2011 23:00:06 +0000 (23:00 +0000)]
bnx2x: Fix BCM578xx MAC test

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix BCM54618se invalid link indication
Yaniv Rosner [Tue, 2 Aug 2011 23:00:00 +0000 (23:00 +0000)]
bnx2x: Fix BCM54618se invalid link indication

After resetting BCM54618se, link partner would still see link since the PHY wasn't put into low-power state.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix BCM84833 link
Yaniv Rosner [Tue, 2 Aug 2011 22:59:53 +0000 (22:59 +0000)]
bnx2x: Fix BCM84833 link

BCM84833 fail to link due to incorrect auto-negotiation setting.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix link issue with DAC over 578xx
Yaniv Rosner [Tue, 2 Aug 2011 22:59:47 +0000 (22:59 +0000)]
bnx2x: Fix link issue with DAC over 578xx

Fix no-link issue on BCM578xx when direct attached cable is connected since Warpcore microcode restart was missing to re-read the new mode.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix LED behavior
Yaniv Rosner [Tue, 2 Aug 2011 22:59:40 +0000 (22:59 +0000)]
bnx2x: Fix LED behavior

This fix resolve two problems seen regarding LED:
1. LED doesn't flash during port identification.
2. Traffic LED sometimes do not blink.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix BCM578xx-B0 MDIO access
Yaniv Rosner [Tue, 2 Aug 2011 22:59:32 +0000 (22:59 +0000)]
bnx2x: Fix BCM578xx-B0 MDIO access

Fix MDIO access to Warpcore on new chip version of 578xx.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix remote fault handling
Yaniv Rosner [Tue, 2 Aug 2011 22:59:25 +0000 (22:59 +0000)]
bnx2x: Fix remote fault handling

Fix couple of issues of remote fault detection and handling:
Link may go down due to remote fault indications during link establishment.
Possible link down after primary function migration.
Remote fault was not detected on 578xx.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix chip hanging due to TX pipe stall.
Yaniv Rosner [Tue, 2 Aug 2011 22:59:18 +0000 (22:59 +0000)]
bnx2x: Fix chip hanging due to TX pipe stall.

Fix a problem in which the 578xx chip hangs after running traffic, and then pulling the network cable.
This occurs since TX pipe is stalled due to missing XON indication towards the NIG.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix missing pause on for 578xx
Yaniv Rosner [Tue, 2 Aug 2011 22:59:10 +0000 (22:59 +0000)]
bnx2x: Fix missing pause on for 578xx

When link speed is 1G and below, pause weren't sent due to missing pause setting in the UMAC.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
Linus Torvalds [Wed, 3 Aug 2011 07:14:05 +0000 (21:14 -1000)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (31 commits)
  Btrfs: don't call writepages from within write_full_page
  Btrfs: Remove unused variable 'last_index' in file.c
  Btrfs: clean up for find_first_extent_bit()
  Btrfs: clean up for wait_extent_bit()
  Btrfs: clean up for insert_state()
  Btrfs: remove unused members from struct extent_state
  Btrfs: clean up code for merging extent maps
  Btrfs: clean up code for extent_map lookup
  Btrfs: clean up search_extent_mapping()
  Btrfs: remove redundant code for dir item lookup
  Btrfs: make acl functions really no-op if acl is not enabled
  Btrfs: remove remaining ref-cache code
  Btrfs: remove a BUG_ON() in btrfs_commit_transaction()
  Btrfs: use wait_event()
  Btrfs: check the nodatasum flag when writing compressed files
  Btrfs: copy string correctly in INO_LOOKUP ioctl
  Btrfs: don't print the leaf if we had an error
  btrfs: make btrfs_set_root_node void
  Btrfs: fix oops while writing data to SSD partitions
  Btrfs: Protect the readonly flag of block group
  ...

Fix up trivial conflicts (due to acl and writeback cleanups) in
 - fs/btrfs/acl.c
 - fs/btrfs/ctree.h
 - fs/btrfs/extent_io.c

12 years agoMerge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Wed, 3 Aug 2011 06:49:57 +0000 (20:49 -1000)]
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6

* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6:
  MAINTAINERS: Add keyword match for of_match_table to device tree section
  of: constify property name parameters for helper functions
  input: xilinx_ps2: Add missing of_address.h header
  of: address: use resource_size helper

12 years agoMerge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Wed, 3 Aug 2011 06:49:38 +0000 (20:49 -1000)]
Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6

* 'spi/next' of git://git.secretlab.ca/git/linux-2.6:
  spi/pl022: remove function cannot exit

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
Linus Torvalds [Wed, 3 Aug 2011 06:49:21 +0000 (20:49 -1000)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm

* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (34 commits)
  dm table: set flush capability based on underlying devices
  dm crypt: optionally support discard requests
  dm raid: add md raid1 support
  dm raid: support metadata devices
  dm raid: add write_mostly parameter
  dm raid: add region_size parameter
  dm raid: improve table parameters documentation
  dm ioctl: forbid multiple device specifiers
  dm ioctl: introduce __get_dev_cell
  dm ioctl: fill in device parameters in more ioctls
  dm flakey: add corrupt_bio_byte feature
  dm flakey: add drop_writes
  dm flakey: support feature args
  dm flakey: use dm_target_offset and support discards
  dm table: share target argument parsing functions
  dm snapshot: skip reading origin when overwriting complete chunk
  dm: ignore merge_bvec for snapshots when safe
  dm table: clean dm_get_device and move exports
  dm raid: tidy includes
  dm ioctl: prevent empty message
  ...

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog
Linus Torvalds [Wed, 3 Aug 2011 06:48:47 +0000 (20:48 -1000)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog:
  watchdog: Cleanup WATCHDOG_CORE help text
  watchdog: Fix POST failure on ASUS P5N32-E SLI and similar boards
  watchdog: shwdt: fix usage of mod_timer

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Wed, 3 Aug 2011 06:48:22 +0000 (20:48 -1000)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: asihpi - Clarify adapter index validity check
  ALSA: asihpi - Don't leak firmware if mem alloc fails
  ALSA: rtctimer.c needs module.h
  ASoC: Fix txx9aclc.c build
  ALSA: hdspm - Add firmware revision 0xcc for RME MADI
  ALSA: hdspm - Fix reported external sample rate on RME MADI and MADIface
  ALSA: hdspm - Provide MADI speed mode selector on RME MADI and MADIface
  ALSA: sound/core/pcm_compat.c: adjust array index

12 years agoInput: ad7879 - fix deficient device disable
Michael Hennerich [Tue, 2 Aug 2011 22:41:37 +0000 (15:41 -0700)]
Input: ad7879 - fix deficient device disable

Input close or device disable should not interact with the exported
gpiolib functionality. However that's the case. __ad7879_disable()
clears the entire AD7879_REG_CTRL2, while it should just power down
the ADC and its reference.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: gpio_keys - fix two typos in devicetree documentation
Tobias Klauser [Tue, 2 Aug 2011 22:40:22 +0000 (15:40 -0700)]
Input: gpio_keys - fix two typos in devicetree documentation

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agor8169 : MAC address change fix for the 8168e-vl.
françois romieu [Tue, 2 Aug 2011 03:53:43 +0000 (03:53 +0000)]
r8169 : MAC address change fix for the 8168e-vl.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=39252

Hayes suggested that the usual MAC{0, 4} register writes be completed
with writes to extended GigaMAC registers :
- 0xe0 .. 0xe5
- 0xf2 .. 0xf7

Registers 0xf0 and 0xf1 should be set to 0.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrivers/staging/hv/blkvsc_drv.c: eliminate NULL pointer dereference
Julia Lawall [Sat, 9 Jul 2011 19:23:26 +0000 (21:23 +0200)]
drivers/staging/hv/blkvsc_drv.c: eliminate NULL pointer dereference

In this code, blkvsc_req is allocated in the cache blkdev->request_pool,
but freed in the first case to the cache blkvsc_req->dev->request_pool.
blkvsc_req->dev is subsequently initialized to blkdev, making these the
same at the second call to kmem_cache_free.  But at the point of the first
call, blkvsc_req->dev is NULL.  The second call is changed too, for
uniformity.

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

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

x = \(kmem_cache_alloc\|kmem_cache_zalloc\)(e1,e2)
... when != x = e
(
kmem_cache_free(e1,x);
|
?-kmem_cache_free(e3,x);
+kmem_cache_free(e1,x);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: KY Srinivasan <kys@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: Add clk API note to nvec/TODO
Russell King [Mon, 1 Aug 2011 10:45:49 +0000 (11:45 +0100)]
Staging: Add clk API note to nvec/TODO

Add a note about the abuse of the clk API to the nvec/TODO list.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c: adjust array index
Julia Lawall [Thu, 28 Jul 2011 12:46:04 +0000 (14:46 +0200)]
drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c: adjust array index

Convert array index from the loop bound to the loop index.

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

// <smpl>
@@
expression e1,e2,ar;
@@

for(e1 = 0; e1 < e2; e1++) { <...
  ar[
- e2
+ e1
  ]
  ...> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: more missing slab.h inclusions
Andrew Morton [Thu, 28 Jul 2011 20:59:38 +0000 (13:59 -0700)]
staging: more missing slab.h inclusions

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging/solo6x10/p2m.c needs slab.h
Andrew Morton [Thu, 28 Jul 2011 20:59:37 +0000 (13:59 -0700)]
drivers/staging/solo6x10/p2m.c needs slab.h

alpha allmodconfig:

drivers/staging/solo6x10/p2m.c:52: error: implicit declaration of function 'kzalloc'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging/solo6x10/core.c needs slab.h
Andrew Morton [Thu, 28 Jul 2011 20:59:37 +0000 (13:59 -0700)]
drivers/staging/solo6x10/core.c needs slab.h

alpha allmodconfig:

drivers/staging/solo6x10/core.c:140: error: implicit declaration of function 'kzalloc'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging/dt3155v4l/dt3155v4l.c needs slab.h
Andrew Morton [Thu, 28 Jul 2011 20:59:36 +0000 (13:59 -0700)]
drivers/staging/dt3155v4l/dt3155v4l.c needs slab.h

alpha allmodconfig:

drivers/staging/dt3155v4l/dt3155v4l.c:434: error: implicit declaration of function 'kzalloc'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging/speakup/devsynth.c: fix "buffer size is not provably correct" error
Andrew Morton [Thu, 28 Jul 2011 20:59:35 +0000 (13:59 -0700)]
drivers/staging/speakup/devsynth.c: fix "buffer size is not provably correct" error

x86_64 allmodconfig:

In file included from arch/x86/include/asm/uaccess.h:572,
                 from include/linux/uaccess.h:5,
                 from drivers/staging/speakup/devsynth.c:4:
In function 'copy_from_user',
    inlined from 'speakup_file_write' at drivers/staging/speakup/devsynth.c:28:
arch/x86/include/asm/uaccess_64.h:64: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct

I'm not sure what was unprovable about it, but size_t is the correct type
anyway.

Also replace needless min_t() with min()

Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: iio: add some unlocks to raw_read() functions
Dan Carpenter [Sat, 30 Jul 2011 08:45:09 +0000 (11:45 +0300)]
Staging: iio: add some unlocks to raw_read() functions

This code was cut and pasted in several places.  It's missing some
unlocks on error.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: ft1000_proc needs asm/io.h for inw/outw on sparc
Paul Gortmaker [Sun, 31 Jul 2011 06:44:05 +0000 (02:44 -0400)]
staging: ft1000_proc needs asm/io.h for inw/outw on sparc

Seen during an allmodconfig build for sparc:

  CC [M]  drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.o
In file included from drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:26:
drivers/staging/ft1000/ft1000-pcmcia/ft1000.h: In function 'ft1000_read_reg':
drivers/staging/ft1000/ft1000-pcmcia/ft1000.h:80: error: implicit declaration of function 'inw'
drivers/staging/ft1000/ft1000-pcmcia/ft1000.h: In function 'ft1000_write_reg':
drivers/staging/ft1000/ft1000-pcmcia/ft1000.h:86: error: implicit declaration of function 'outw'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: rtl8192u: declare MODULE_FIRMWARE
Stefan Lippers-Hollmann [Tue, 2 Aug 2011 20:17:25 +0000 (22:17 +0200)]
staging: rtl8192u: declare MODULE_FIRMWARE

declaring MODULE_FIRMWARE has apparently forgotten while removing the embedded
firmware arrays in 0a8692b534e18fcec6eac07551bb37a22659f5c7 (rtl8192u_usb:
Remove built-in firmware images).

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Cc: stable <stable@kernel.org> [2.6.39+]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agogma500: Fix clashes with DRM updates
Alan Cox [Tue, 26 Jul 2011 16:15:50 +0000 (17:15 +0100)]
gma500: Fix clashes with DRM updates

The private object support has migrated from gma500 into the DRM core,
remove our now clashing copy so -next can build.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: zcache: module is GPL
Thadeu Lima de Souza Cascardo [Tue, 2 Aug 2011 17:20:27 +0000 (14:20 -0300)]
staging: zcache: module is GPL

This avoids tainting the kernel as if a proprietary module was loaded.
The kernel will still be tainted because this is a staging driver.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: fix zcache building
Thadeu Lima de Souza Cascardo [Tue, 2 Aug 2011 17:20:26 +0000 (14:20 -0300)]
staging: fix zcache building

zcache is only building tmem.c and not building zcache.c. To keep the
module name, zcache.c must be renamed if symbols from tmem.c are to
remain unexported.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoMAINTAINERS: Add keyword match for of_match_table to device tree section
Mark Brown [Tue, 2 Aug 2011 05:13:26 +0000 (14:13 +0900)]
MAINTAINERS: Add keyword match for of_match_table to device tree section

If a patch is working with an of_match_table it's probably adding an OF
binding to a driver in which case the binding ought to be reviewed by the
device tree folks to make sure that things like the device matches are set
up correctly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoPCI: export pcie_bus_configure_settings symbol
Jon Mason [Tue, 2 Aug 2011 05:01:18 +0000 (00:01 -0500)]
PCI: export pcie_bus_configure_settings symbol

pcie_bus_configure_settings needs to be exported if the PCI hotplug
driver is being compiled as a module.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
12 years agoof: constify property name parameters for helper functions
Jamie Iles [Tue, 2 Aug 2011 14:45:07 +0000 (15:45 +0100)]
of: constify property name parameters for helper functions

The helper functions for reading u32 integers, u32 arrays and strings
should have the property name as a const pointer.

Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agospi/pl022: remove function cannot exit
Linus Walleij [Tue, 2 Aug 2011 09:29:24 +0000 (11:29 +0200)]
spi/pl022: remove function cannot exit

The remove function in the PL022 driver cannot abort the remove
function any way, so restructure the code so as not to make that
assumption. Remove will now proceed no matter whether it can
stop the transfer queue or not.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agodm table: set flush capability based on underlying devices
Mike Snitzer [Tue, 2 Aug 2011 11:32:08 +0000 (12:32 +0100)]
dm table: set flush capability based on underlying devices

DM has always advertised both REQ_FLUSH and REQ_FUA flush capabilities
regardless of whether or not a given DM device's underlying devices
also advertised a need for them.

Block's flush-merge changes from 2.6.39 have proven to be more costly
for DM devices.  Performance regressions have been reported even when
DM's underlying devices do not advertise that they have a write cache.

Fix the performance regressions by configuring a DM device's flushing
capabilities based on those of the underlying devices' capabilities.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm crypt: optionally support discard requests
Milan Broz [Tue, 2 Aug 2011 11:32:08 +0000 (12:32 +0100)]
dm crypt: optionally support discard requests

Add optional parameter field to dmcrypt table and support
"allow_discards" option.

Discard requests bypass crypt queue processing. Bio is simple remapped
to underlying device.

Note that discard will be never enabled by default because of security
consequences.  It is up to the administrator to enable it for encrypted
devices.

(Note that userspace cryptsetup does not understand new optional
parameters yet.  Support for this will come later.  Until then, you
should use 'dmsetup' to enable and disable this.)

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm raid: add md raid1 support
Jonathan Brassow [Tue, 2 Aug 2011 11:32:07 +0000 (12:32 +0100)]
dm raid: add md raid1 support

Support the MD RAID1 personality through dm-raid.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm raid: support metadata devices
Jonathan Brassow [Tue, 2 Aug 2011 11:32:07 +0000 (12:32 +0100)]
dm raid: support metadata devices

Add the ability to parse and use metadata devices to dm-raid.  Although
not strictly required, without the metadata devices, many features of
RAID are unavailable.  They are used to store a superblock and bitmap.

The role, or position in the array, of each device must be recorded in
its superblock.  This is to help with fault handling, array reshaping,
and sanity checks.  RAID 4/5/6 devices must be loaded in a specific order:
in this way, the 'array_position' field helps validate the correctness
of the mapping when it is loaded.  It can be used during reshaping to
identify which devices are added/removed.  Fault handling is impossible
without this field.  For example, when a device fails it is recorded in
the superblock.  If this is a RAID1 device and the offending device is
removed from the array, there must be a way during subsequent array
assembly to determine that the failed device was the one removed.  This
is done by correlating the 'array_position' field and the bit-field
variable 'failed_devices'.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm raid: add write_mostly parameter
Jonathan Brassow [Tue, 2 Aug 2011 11:32:07 +0000 (12:32 +0100)]
dm raid: add write_mostly parameter

Add the write_mostly parameter to RAID1 dm-raid tables.

This allows the user to set the WriteMostly flag on a RAID1 device that
should normally be avoided for read I/O.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm raid: add region_size parameter
Jonathan Brassow [Tue, 2 Aug 2011 11:32:07 +0000 (12:32 +0100)]
dm raid: add region_size parameter

Allow the user to specify the region_size.

Ensures that the supplied value meets md's constraints, viz. the number of
regions does not exceed 2^21.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm raid: improve table parameters documentation
Jonathan Brassow [Tue, 2 Aug 2011 11:32:06 +0000 (12:32 +0100)]
dm raid: improve table parameters documentation

Add more information about some dm-raid table parameters and clarify how
parameters are printed when 'dmsetup table' is issued.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm ioctl: forbid multiple device specifiers
Mikulas Patocka [Tue, 2 Aug 2011 11:32:06 +0000 (12:32 +0100)]
dm ioctl: forbid multiple device specifiers

Exactly one of name, uuid or device must be specified when referencing
an existing device.  This removes the ambiguity (risking the wrong
device being updated) if two conflicting parameters were specified.
Previously one parameter got used and any others were ignored silently.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm ioctl: introduce __get_dev_cell
Mikulas Patocka [Tue, 2 Aug 2011 11:32:06 +0000 (12:32 +0100)]
dm ioctl: introduce __get_dev_cell

Move logic to find device based on major/minor number to a separate
function __get_dev_cell (similar to __get_uuid_cell and __get_name_cell).
This makes the function __find_device_hash_cell more straightforward.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm ioctl: fill in device parameters in more ioctls
Mikulas Patocka [Tue, 2 Aug 2011 11:32:06 +0000 (12:32 +0100)]
dm ioctl: fill in device parameters in more ioctls

Move parameter filling from find_device to __find_device_hash_cell.

This patch causes ioctls using __find_device_hash_cell
(DM_DEV_REMOVE_CMD, DM_DEV_SUSPEND_CMD - resume, DM_TABLE_CLEAR_CMD)
to return device parameters, bringing them into line with the other
ioctls.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm flakey: add corrupt_bio_byte feature
Mike Snitzer [Tue, 2 Aug 2011 11:32:06 +0000 (12:32 +0100)]
dm flakey: add corrupt_bio_byte feature

Add corrupt_bio_byte feature to simulate corruption by overwriting a byte at a
specified position with a specified value during intervals when the device is
"down".

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm flakey: add drop_writes
Mike Snitzer [Tue, 2 Aug 2011 11:32:05 +0000 (12:32 +0100)]
dm flakey: add drop_writes

Add 'drop_writes' option to drop writes silently while the
device is 'down'.  Reads are not touched.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm flakey: support feature args
Mike Snitzer [Tue, 2 Aug 2011 11:32:05 +0000 (12:32 +0100)]
dm flakey: support feature args

Add the ability to specify arbitrary feature flags when creating a
flakey target.  This code uses the same target argument helpers that
the multipath target does.

Also remove the superfluous 'dm-flakey' prefixes from the error messages,
as they already contain the prefix 'flakey'.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm flakey: use dm_target_offset and support discards
Mike Snitzer [Tue, 2 Aug 2011 11:32:05 +0000 (12:32 +0100)]
dm flakey: use dm_target_offset and support discards

Use dm_target_offset() and support discards.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm table: share target argument parsing functions
Mike Snitzer [Tue, 2 Aug 2011 11:32:04 +0000 (12:32 +0100)]
dm table: share target argument parsing functions

Move multipath target argument parsing code into dm-table so other
targets can share it.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm snapshot: skip reading origin when overwriting complete chunk
Mikulas Patocka [Tue, 2 Aug 2011 11:32:04 +0000 (12:32 +0100)]
dm snapshot: skip reading origin when overwriting complete chunk

If we write a full chunk in the snapshot, skip reading the origin device
because the whole chunk will be overwritten anyway.

This patch changes the snapshot write logic when a full chunk is written.
In this case:
  1. allocate the exception
  2. dispatch the bio (but don't report the bio completion to device mapper)
  3. write the exception record
  4. report bio completed

Callbacks must be done through the kcopyd thread, because callbacks must not
race with each other.  So we create two new functions:

  dm_kcopyd_prepare_callback: allocate a job structure and prepare the callback.
  (This function must not be called from interrupt context.)

  dm_kcopyd_do_callback: submit callback.
  (This function may be called from interrupt context.)

Performance test (on snapshots with 4k chunk size):
  without the patch:
    non-direct-io sequential write (dd):    17.7MB/s
    direct-io sequential write (dd):        20.9MB/s
    non-direct-io random write (mkfs.ext2): 0.44s

  with the patch:
    non-direct-io sequential write (dd):    26.5MB/s
    direct-io sequential write (dd):        33.2MB/s
    non-direct-io random write (mkfs.ext2): 0.27s

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: ignore merge_bvec for snapshots when safe
Mikulas Patocka [Tue, 2 Aug 2011 11:32:04 +0000 (12:32 +0100)]
dm: ignore merge_bvec for snapshots when safe

Add a new flag DMF_MERGE_IS_OPTIONAL to struct mapped_device to indicate
whether the device can accept bios larger than the size its merge
function returns.  When set, use this to send large bios to snapshots
which can split them if necessary.  Snapshot I/O may be significantly
fragmented and this approach seems to improve peformance.

Before the patch, dm_set_device_limits restricted bio size to page size
if the underlying device had a merge function and the target didn't
provide a merge function.  After the patch, dm_set_device_limits
restricts bio size to page size if the underlying device has a merge
function, doesn't have DMF_MERGE_IS_OPTIONAL flag and the target doesn't
provide a merge function.

The snapshot target can't provide a merge function because when the merge
function is called, it is impossible to determine where the bio will be
remapped.  Previously this led us to impose a 4k limit, which we can
now remove if the snapshot store is located on a device without a merge
function.  Together with another patch for optimizing full chunk writes,
it improves performance from 29MB/s to 40MB/s when writing to the
filesystem on snapshot store.

If the snapshot store is placed on a non-dm device with a merge function
(such as md-raid), device mapper still limits all bios to page size.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm table: clean dm_get_device and move exports
Mike Snitzer [Tue, 2 Aug 2011 11:32:04 +0000 (12:32 +0100)]
dm table: clean dm_get_device and move exports

There is no need for __table_get_device to be factored out.
Also move the exports to the end of their respective functions.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm raid: tidy includes
Alasdair G Kergon [Tue, 2 Aug 2011 11:32:03 +0000 (12:32 +0100)]
dm raid: tidy includes

A dm target only needs to use include/linux dm headers.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm ioctl: prevent empty message
Alasdair G Kergon [Tue, 2 Aug 2011 11:32:03 +0000 (12:32 +0100)]
dm ioctl: prevent empty message

Detect invalid empty messages in core dm instead of requiring every target to
check this.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm raid: cleanup parameter handling
Jonathan Brassow [Tue, 2 Aug 2011 11:32:03 +0000 (12:32 +0100)]
dm raid: cleanup parameter handling

Re-order the parameters so they are handled consistently in the same order
where defined, parsed and output.

Only include rebuild parameters in the STATUSTYPE_TABLE output if they were
supplied in the original table line.

Correct the parameter count when outputting rebuild: there are two words,
not one.

Use case-independent checks for keywords (as in other device-mapper targets).

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm snapshot: style cleanups
Jonathan Brassow [Tue, 2 Aug 2011 11:32:03 +0000 (12:32 +0100)]
dm snapshot: style cleanups

Coding style cleanups.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
12 years agodm snapshot: remove unused definitions
Mikulas Patocka [Tue, 2 Aug 2011 11:32:03 +0000 (12:32 +0100)]
dm snapshot: remove unused definitions

Remove a couple of unused #defines.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm kcopyd: remove nr_pages field from job structure
Mikulas Patocka [Tue, 2 Aug 2011 11:32:02 +0000 (12:32 +0100)]
dm kcopyd: remove nr_pages field from job structure

The nr_pages field in struct kcopyd_job is only used temporarily in
run_pages_job() to count the number of required pages.
We can use a local variable instead.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm kcopyd: remove offset field from job structure
Mikulas Patocka [Tue, 2 Aug 2011 11:32:02 +0000 (12:32 +0100)]
dm kcopyd: remove offset field from job structure

The offset field in struct kcopyd_job is always zero so remove it.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: use vzalloc
Joe Perches [Tue, 2 Aug 2011 11:32:02 +0000 (12:32 +0100)]
dm: use vzalloc

Use vzalloc() instead of vmalloc()+memset().

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm log: userspace use list_move
Kirill A. Shutemov [Tue, 2 Aug 2011 11:32:02 +0000 (12:32 +0100)]
dm log: userspace use list_move

Replace list_del() followed by list_add() with list_move().

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm log: clean up bit little endian bitops
Akinobu Mita [Tue, 2 Aug 2011 11:32:01 +0000 (12:32 +0100)]
dm log: clean up bit little endian bitops

Using __test_and_{set,clear}_bit_le() with ignoring its return value
can be replaced with __{set,clear}_bit_le().

This also removes unnecessary casts.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm table: fix discard support
Mike Snitzer [Tue, 2 Aug 2011 11:32:01 +0000 (12:32 +0100)]
dm table: fix discard support

Remove 'discards_supported' from the dm_table structure.  The same
information can be easily discovered from the table's target(s) in
dm_table_supports_discards().

Before this fix dm_table_supports_discards() would skip checking the
individual targets' 'discards_supported' flag if any one target in the
table didn't set num_discard_requests > 0.  Now the per-target
'discards_supported' flag is effective at insuring the final DM device
advertises discard support.  But, to be clear, targets that don't
support discards (!num_discard_requests) will not receive discard
requests.

Also DMWARN if a target sets 'discards_supported' override but forgets
to set 'num_discard_requests'.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: suppress endian warnings
Alasdair G Kergon [Tue, 2 Aug 2011 11:32:01 +0000 (12:32 +0100)]
dm: suppress endian warnings

Suppress sparse warnings about cpu_to_le32() by using __le32 types for
on-disk data etc.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: fix idr leak on module removal
Alasdair G Kergon [Tue, 2 Aug 2011 11:32:01 +0000 (12:32 +0100)]
dm: fix idr leak on module removal

Destroy _minor_idr when unloading the core dm module.  (Found by kmemleak.)

Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm io: flush cpu cache with vmapped io
Mikulas Patocka [Tue, 2 Aug 2011 11:32:01 +0000 (12:32 +0100)]
dm io: flush cpu cache with vmapped io

For normal kernel pages, CPU cache is synchronized by the dma layer.
However, this is not done for pages allocated with vmalloc. If we do I/O
to/from vmallocated pages, we must synchronize CPU cache explicitly.

Prior to doing I/O on vmallocated page we must call
flush_kernel_vmap_range to flush dirty cache on the virtual address.
After finished read we must call invalidate_kernel_vmap_range to
invalidate cache on the virtual address, so that accesses to the virtual
address return newly read data and not stale data from CPU cache.

This patch fixes metadata corruption on dm-snapshots on PA-RISC and
possibly other architectures with caches indexed by virtual address.

Cc: stable <stable@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm mpath: fix potential NULL pointer in feature arg processing
Mike Snitzer [Tue, 2 Aug 2011 11:32:00 +0000 (12:32 +0100)]
dm mpath: fix potential NULL pointer in feature arg processing

Avoid dereferencing a NULL pointer if the number of feature arguments
supplied is fewer than indicated.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org
12 years agodm snapshot: flush disk cache when merging
Mikulas Patocka [Tue, 2 Aug 2011 11:32:00 +0000 (12:32 +0100)]
dm snapshot: flush disk cache when merging

This patch makes dm-snapshot flush disk cache when writing metadata for
merging snapshot.

Without cache flushing the disk may reorder metadata write and other
data writes and there is a possibility of data corruption in case of
power fault.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agobnx2x: Prevent restarting Tx during bnx2x_nic_unload
Vladislav Zolotarov [Tue, 2 Aug 2011 08:35:43 +0000 (01:35 -0700)]
bnx2x: Prevent restarting Tx during bnx2x_nic_unload

Tx queues were stopped before  bp->state was changed to a value different
from BNX2X_STATE_OPEN, which allowed the bnx2x_tx_int() called from the
NAPI context to re-enable it. This then allowed the netdev->ndo_start_xmit()
to be called in the middle of the function reset and rings freeing.

This patch changes bp->state to a value different
from BNX2X_STATE_OPEN BEFORE disabling the Tx queues in order to restore the
broken protection against the above race in the bnx2x_tx_int().

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agowatchdog: Cleanup WATCHDOG_CORE help text
Josh Boyer [Sat, 30 Jul 2011 14:18:48 +0000 (10:18 -0400)]
watchdog: Cleanup WATCHDOG_CORE help text

The newly added WATCHDOG_CORE option is a bool, but the help text suggests
it can be built as a module.  Fix it up.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: Fix POST failure on ASUS P5N32-E SLI and similar boards
Mart Gerrits [Sat, 30 Jul 2011 14:59:12 +0000 (16:59 +0200)]
watchdog: Fix POST failure on ASUS P5N32-E SLI and similar boards

At present the module does not unset the NO_REBOOT bit upon shutdown, this
causes the BIOS to fail the POST once and reset. During the next boot it
displays the following error message:

***** Warning: System BOOT Fail *****
Your system last boot fail or POST interrupted.
Please enter setup to load default and reboot again.
Press F1 to continue, DEL to enter SETUP

With this patch the NO_REBOOT flag will be unset on shutdown and thus stop
this failure from occurring.

Tested on 'ASUS P5N32-E SLI with BIOS revision 1801' and
          'ASUS P5N32-E SLI PLUS with BIOS revision 1502'.

Signed-off-by: Mart Gerrits <mart1987@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: shwdt: fix usage of mod_timer
David Engraf [Wed, 20 Jul 2011 13:03:39 +0000 (15:03 +0200)]
watchdog: shwdt: fix usage of mod_timer

Fix the usage of mod_timer() and make the driver usable. mod_timer() must
be called with an absolute timeout in jiffies. The old implementation
used a relative timeout thus the hardware watchdog was never triggered.

Signed-off-by: David Engraf <david.engraf@sysgo.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Wim Van sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: stable <stable@kernel.org>
12 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Tue, 2 Aug 2011 08:08:54 +0000 (10:08 +0200)]
Merge branch 'fix/asoc' into for-linus

12 years agoALSA: asihpi - Clarify adapter index validity check
Eliot Blennerhassett [Mon, 1 Aug 2011 21:44:24 +0000 (09:44 +1200)]
ALSA: asihpi - Clarify adapter index validity check

Avoids assigning possibly invalid address to pa, even if it
is never dereferenced.
Correct error response to reflect request object/function ids.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agooom: task->mm == NULL doesn't mean the memory was freed
Oleg Nesterov [Sat, 30 Jul 2011 14:35:02 +0000 (16:35 +0200)]
oom: task->mm == NULL doesn't mean the memory was freed

exit_mm() sets ->mm == NULL then it does mmput()->exit_mmap() which
frees the memory.

However select_bad_process() checks ->mm != NULL before TIF_MEMDIE,
so it continues to kill other tasks even if we have the oom-killed
task freeing its memory.

Change select_bad_process() to check ->mm after TIF_MEMDIE, but skip
the tasks which have already passed exit_notify() to ensure a zombie
with TIF_MEMDIE set can't block oom-killer. Alternatively we could
probably clear TIF_MEMDIE after exit_mmap().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agonet: add kerneldoc to skb_copy_bits()
Eric Dumazet [Fri, 29 Jul 2011 18:37:31 +0000 (18:37 +0000)]
net: add kerneldoc to skb_copy_bits()

Since skb_copy_bits() is called from assembly, add a fat comment to make
clear we should think twice before changing its prototype.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoDocumentation/bonding.txt: Update to 3.x version numbers
Jesper Juhl [Tue, 2 Aug 2011 00:59:44 +0000 (17:59 -0700)]
Documentation/bonding.txt: Update to 3.x version numbers

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodoc: Update the email address for Paul Moore in various source files
Paul Moore [Mon, 1 Aug 2011 11:10:33 +0000 (11:10 +0000)]
doc: Update the email address for Paul Moore in various source files

My @hp.com will no longer be valid starting August 5, 2011 so an update is
necessary.  My new email address is employer independent so we don't have
to worry about doing this again any time soon.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodoc: Update the MAINTAINERS info for Paul Moore
Paul Moore [Mon, 1 Aug 2011 11:10:26 +0000 (11:10 +0000)]
doc: Update the MAINTAINERS info for Paul Moore

My @hp.com will no longer be valid starting August 5, 2011 so an update is
necessary.  My new email address is employer independent so we don't have
to worry about doing this again any time soon.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: br2864: sent packets truncated in VC routed mode
Chas Williams [Tue, 2 Aug 2011 00:56:14 +0000 (17:56 -0700)]
atm: br2864: sent packets truncated in VC routed mode

Reported-by: Pascal Hambourg <pascal@plouf.fr.eu.org>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>