pandora-kernel.git
10 years agocrypto: camellia-x86-64 - replace commas by semicolons and adjust code alignment
Julia Lawall [Wed, 14 Aug 2013 13:52:57 +0000 (15:52 +0200)]
crypto: camellia-x86-64 - replace commas by semicolons and adjust code alignment

Adjust alignment and replace commas by semicolons in automatically
generated code.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agohwrng: tx4939 - simplify use of devm_ioremap_resource
Julia Lawall [Wed, 14 Aug 2013 09:11:13 +0000 (11:11 +0200)]
hwrng: tx4939 - simplify use of devm_ioremap_resource

Remove unneeded error handling on the result of a call to
platform_get_resource when the value is passed to devm_ioremap_resource.

Move the call to platform_get_resource adjacent to the call to
devm_ioremap_resource to make the connection between them more clear.

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

// <smpl>
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@

- res = platform_get_resource(pdev, IORESOURCE_MEM, n);
  ... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) }
  ... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n);
  e = devm_ioremap_resource(e1, res);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: nx - fix concurrency issue
Marcelo Cerri [Mon, 12 Aug 2013 21:49:37 +0000 (18:49 -0300)]
crypto: nx - fix concurrency issue

The NX driver uses the transformation context to store several fields
containing data related to the state of the operations in progress.
Since a single tfm can be used by different kernel threads at the same
time, we need to protect the data stored into the context.

This patch makes use of spin locks to protect the data where a race
condition can happen.

Reviewed-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: make tables used from assembler __visible
Andi Kleen [Sun, 11 Aug 2013 01:01:11 +0000 (18:01 -0700)]
crypto: make tables used from assembler __visible

Tables used from assembler should be marked __visible to let
the compiler know.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: crypto4xx - Staticize local symbols
Jingoo Han [Fri, 9 Aug 2013 07:59:57 +0000 (16:59 +0900)]
crypto: crypto4xx - Staticize local symbols

These local symbols are used only in this file.
Fix the following sparse warnings:

drivers/crypto/amcc/crypto4xx_alg.c:35:6: warning: symbol 'set_dynamic_sa_command_0' was not declared. Should it be static?
drivers/crypto/amcc/crypto4xx_alg.c:55:6: warning: symbol 'set_dynamic_sa_command_1' was not declared. Should it be static?

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: sahara - Staticize local symbol
Jingoo Han [Fri, 9 Aug 2013 07:57:48 +0000 (16:57 +0900)]
crypto: sahara - Staticize local symbol

This local symbol is used only in this file.
Fix the following sparse warnings:

drivers/crypto/sahara.c:420:6: warning: symbol 'sahara_watchdog' was not declared. Should it be static?

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agohwrng: pixocel - Staticize 'rng_dev'
Jingoo Han [Fri, 9 Aug 2013 05:53:50 +0000 (14:53 +0900)]
hwrng: pixocel - Staticize 'rng_dev'

'rng_dev' is used only in this file.
Fix the following sparse warning:

drivers/char/hw_random/picoxcell-rng.c:36:15: warning: symbol 'rng_dev' was not declared. Should it be static?

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: nx - saves chaining value from co-processor
Fionnuala Gunter [Wed, 7 Aug 2013 23:15:50 +0000 (18:15 -0500)]
crypto: nx - saves chaining value from co-processor

This patch fixes a bug that is triggered when cts(cbc(aes)) is used with
nx-crypto driver on input larger than 32 bytes.

The chaining value from co-processor was not being saved. This value is
needed because it is used as the IV by cts(cbc(aes)).

Signed-off-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Reviewed-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agohwrng: omap - Add OMAP4 TRNG support
Lokesh Vutla [Mon, 5 Aug 2013 14:47:23 +0000 (20:17 +0530)]
hwrng: omap - Add OMAP4 TRNG support

Add support for OMAP4 version of TRNG module
that is present on OMAP4, AM33xx and OMAP5 SoCs.

The modules have several differences including register
offsets, output size, triggering rng and how configuring
FROs. To handle these differences, a platform_data structure
is defined and contains routine pointers, register offsets. OMAP2
specific routines are prefixed with 'omap2_' and OMAP4
specific routines are prefixed with 'omap4_'.

Note: Few Hard coded values are from the TI AM33xx SDK.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agoARM: OMAP2+: Only manually add hwmod data when DT not used.
Lokesh Vutla [Mon, 5 Aug 2013 14:47:22 +0000 (20:17 +0530)]
ARM: OMAP2+: Only manually add hwmod data when DT not used.

The omap_init_rng() routine in devices.c only needs to be
called when there is no device tree present.

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agohwrng: omap - Add device tree support
Lokesh Vutla [Mon, 5 Aug 2013 14:47:21 +0000 (20:17 +0530)]
hwrng: omap - Add device tree support

Add Device Tree suport to the omap-rng driver.
Currently, only support for OMAP2 and OMAP3 is
being added but support for OMAP4 and OMAP5 will
be added in a subsequent patch.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agohwrng: omap - Remove duplicated function call
Lokesh Vutla [Mon, 5 Aug 2013 14:47:20 +0000 (20:17 +0530)]
hwrng: omap - Remove duplicated function call

platform_set_drvdata() is called twice in driver probe.
Removing the duplicated call.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agohwrng: omap - Convert to devm_kzalloc()
Lokesh Vutla [Mon, 5 Aug 2013 14:47:19 +0000 (20:17 +0530)]
hwrng: omap - Convert to devm_kzalloc()

Use devm_kzalloc() to make cleanup paths simpler.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agohwrng: omap - Use module_platform_driver macro
Lokesh Vutla [Mon, 5 Aug 2013 14:47:18 +0000 (20:17 +0530)]
hwrng: omap - Use module_platform_driver macro

module_platform_driver() makes the code simpler.
Using the macro in the driver.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: nx - fix limits to sg lists for SHA-2
Marcelo Cerri [Fri, 2 Aug 2013 12:09:52 +0000 (12:09 +0000)]
crypto: nx - fix limits to sg lists for SHA-2

The co-processor has several limits regarding the length of
scatter/gather lists and the total number of bytes in it. These limits
are available in the device tree, as following:

 - "ibm,max-sg-len": maximum number of bytes of each scatter/gather
   list.

 - "ibm,max-sync-cop": used for synchronous operations, it is an array
   of structures that contains information regarding the limits that
   must be considered for each mode and operation. The most important
   limits in it are:
    - The total number of bytes that a scatter/gather list can hold.
- The maximum number of elements that a scatter/gather list can
  have.

This patch updates the NX driver to perform several hyper calls if
needed in order to always respect the length limits for scatter/gather
lists.

Reviewed-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: nx - fix physical addresses added to sg lists
Marcelo Cerri [Fri, 2 Aug 2013 12:09:51 +0000 (12:09 +0000)]
crypto: nx - fix physical addresses added to sg lists

The co-processor receives data to be hashed through scatter/gather lists
pointing to physical addresses. When a vmalloc'ed data is given, the
driver must calculate the physical address to each page of the data.

However the current version of it just calculates the physical address
once and keeps incrementing it even when a page boundary is crossed.
This patch fixes this behaviour.

Reviewed-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: testmgr - remove double execution of the same test suite
Cristian Stoica [Thu, 18 Jul 2013 15:57:07 +0000 (18:57 +0300)]
crypto: testmgr - remove double execution of the same test suite

This patch removes redundant execution of the same test suite in cases
where alg and driver variables are the same (e.g. when alg_test is
called from tcrypt_test)

Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Reviewed-by: Horia Geanta <horia.geanta@freescale.com>
Reviewed-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: caam - Remove unused functions from Job Ring
Ruchika Gupta [Wed, 31 Jul 2013 10:18:56 +0000 (15:48 +0530)]
crypto: caam - Remove unused functions from Job Ring

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agomodules: add support for soft module dependencies
Andreas Robinson [Thu, 1 Aug 2013 00:55:34 +0000 (10:55 +1000)]
modules: add support for soft module dependencies

Additional and optional dependencies not found while building the kernel and
modules, can now be declared explicitly.

Signed-off-by: Andreas Robinson <andr345@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: omap-sham - Convert to devm_kzalloc()
Lokesh Vutla [Fri, 26 Jul 2013 06:59:17 +0000 (12:29 +0530)]
crypto: omap-sham - Convert to devm_kzalloc()

Use devm_kzalloc() to make cleanup paths simpler.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: omap-sham - Convert to devm_request_irq()
Lokesh Vutla [Fri, 26 Jul 2013 06:59:16 +0000 (12:29 +0530)]
crypto: omap-sham - Convert to devm_request_irq()

Using devm_request_irq() rather than request_irq().
So removing free_irq() calls from the probe error
path and the remove handler.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: omap-sham - Add OMAP5/AM43XX SHAM Support
Lokesh Vutla [Fri, 26 Jul 2013 06:59:15 +0000 (12:29 +0530)]
crypto: omap-sham - Add OMAP5/AM43XX SHAM Support

Add support for the OMAP5 version of the SHAM module
that is present on OMAP5 and AM43xx SoCs.

This module is very simialar to OMAP4 version of SHAM module,
and adds SHA384 SHA512 hardware-accelerated hash functions to it.
To handle the higher digest size of SHA512, few SHA512_DIGEST_i
(i=1-16, and first 8 registers are duplicated from SHA_DIGEST_i
registers) registers are added at the end of register set.
So adding the above register offsets and module info in pdata.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: omap-sham - Add SHA384 and SHA512 Support
Lokesh Vutla [Fri, 26 Jul 2013 06:59:14 +0000 (12:29 +0530)]
crypto: omap-sham - Add SHA384 and SHA512 Support

Adding support for SHA348 and SHA512 in addition to MD5, SHA1, SHA224
SHA256 that the omap sha module supports.

In order to add the support
- Removed hard coded register offsets and passing offsets from pdata
- Updating Flag offsets so that they can be used for SHA256 and SHA512
- Adding the algo info.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agohwrng: mxc-rnga - Check the return value from clk_prepare_enable()
Fabio Estevam [Sun, 21 Jul 2013 17:41:38 +0000 (14:41 -0300)]
hwrng: mxc-rnga - Check the return value from clk_prepare_enable()

clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: ux500 - Fix logging, make arrays const, neatening
Joe Perches [Tue, 16 Jul 2013 21:06:48 +0000 (14:06 -0700)]
crypto: ux500 - Fix logging, make arrays const, neatening

Logging messages without newlines are possibly interleaved
with other messages.  Add terminating newlines to avoid
this.

Other miscellaneous changes:

Make arrays const to reduce data size
Add pr_fmt to prefix pr_<level>, remove now unused DEV_DBG_NAME
Coalesce formats, align arguments
Remove unnecessary OOM messages as dump_stack is already done
Remove unnecessary cast of void *
Change kzalloc(sizeof(struct)...) to kzalloc(sizeof(*var), ...)
Reduce indents in struct definitions

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: caam - RNG instantiation by directly programming DECO
Ruchika Gupta [Thu, 4 Jul 2013 05:56:03 +0000 (11:26 +0530)]
crypto: caam - RNG instantiation by directly programming DECO

Remove the dependency of RNG instantiation on Job Ring. Now
RNG instantiation for devices with RNG version > 4 is done
by directly programming DECO 0.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agocrypto: caam - Moved macro DESC_JOB_IO_LEN to desc_constr.h
Vakul Garg [Wed, 10 Jul 2013 06:27:21 +0000 (06:27 +0000)]
crypto: caam - Moved macro DESC_JOB_IO_LEN to desc_constr.h

DESC_JOB_IO_LEN is a generic macro which indicates the space required in
the descriptor for placing SEQIN/OUT commands, job descriptor header,
shared descriptor pointer. Moving it to descriptor construction file
which can be supposedly included by different algo offload files.

Change-Id: Ic8900990d465e9079827b0c7fcacc61766d7efb6
Signed-off-by: Vakul Garg <vakul@freescale.com>
Reviewed-by: Geanta Neag Horia Ioan-B05471 <horia.geanta@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 5 Jul 2013 19:12:33 +0000 (12:12 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

Pull crypto update from Herbert Xu:
 - Do not idle omap device between crypto operations in one session.
 - Added sha224/sha384 shims for SSSE3.
 - More optimisations for camellia-aesni-avx2.
 - Removed defunct blowfish/twofish AVX2 implementations.
 - Added unaligned buffer self-tests.
 - Added PCLMULQDQ optimisation for CRCT10DIF.
 - Added support for Freescale's DCP co-processor
 - Misc fixes.

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (44 commits)
  crypto: testmgr - test hash implementations with unaligned buffers
  crypto: testmgr - test AEADs with unaligned buffers
  crypto: testmgr - test skciphers with unaligned buffers
  crypto: testmgr - check that entries in alg_test_descs are in correct order
  Revert "crypto: twofish - add AVX2/x86_64 assembler implementation of twofish cipher"
  Revert "crypto: blowfish - add AVX2/x86_64 implementation of blowfish cipher"
  crypto: camellia-aesni-avx2 - tune assembly code for more performance
  hwrng: bcm2835 - fix MODULE_LICENSE tag
  hwrng: nomadik - use clk_prepare_enable()
  crypto: picoxcell - replace strict_strtoul() with kstrtoul()
  crypto: dcp - Staticize local symbols
  crypto: dcp - Use NULL instead of 0
  crypto: dcp - Use devm_* APIs
  crypto: dcp - Remove redundant platform_set_drvdata()
  hwrng: use platform_{get,set}_drvdata()
  crypto: omap-aes - Don't idle/start AES device between Encrypt operations
  crypto: crct10dif - Use PTR_RET
  crypto: ux500 - Cocci spatch "resource_size.spatch"
  crypto: sha256_ssse3 - add sha224 support
  crypto: sha512_ssse3 - add sha384 support
  ...

10 years agoMerge tag 'upstream-3.11-rc1' of git://git.infradead.org/linux-ubi
Linus Torvalds [Fri, 5 Jul 2013 19:09:48 +0000 (12:09 -0700)]
Merge tag 'upstream-3.11-rc1' of git://git.infradead.org/linux-ubi

Pull ubi fixes from Artem Bityutskiy:
 "A couple of fixes and clean-ups, allow for assigning user-defined UBI
  device numbers when attaching MTD devices by using the "mtd=" module
  parameter"

* tag 'upstream-3.11-rc1' of git://git.infradead.org/linux-ubi:
  UBI: support ubi_num on mtd.ubi command line
  UBI: fastmap break out of used PEB search
  UBI: document UBI_IOCVOLUP better in user header
  UBI: do not abort init when ubi.mtd devices cannot be found
  UBI: drop redundant "UBI error" string

10 years agoMerge tag 'upstream-3.11-rc1' of git://git.infradead.org/linux-ubifs
Linus Torvalds [Fri, 5 Jul 2013 19:08:47 +0000 (12:08 -0700)]
Merge tag 'upstream-3.11-rc1' of git://git.infradead.org/linux-ubifs

Pull ubifs fix from Artem Bityutskiy:
 "Only a single patch which fixes a message"

* tag 'upstream-3.11-rc1' of git://git.infradead.org/linux-ubifs:
  UBIFS: correct mount message

10 years agoMerge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux
Linus Torvalds [Thu, 4 Jul 2013 22:51:45 +0000 (15:51 -0700)]
Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux

Pull device tree updates from Grant Likely:
 "This branch contains the following changes:
   - Removal of CONFIG_OF_DEVICE, it is always enabled by CONFIG_OF
   - Remove #ifdef from linux/of_platform.h to increase compiler syntax
     coverage
   - Bug fix for address decoding on Bimini and js2x powerpc platforms.
   - miscellaneous binding changes

  One note on the above.  The binding changes going in from all kinds of
  different trees has gotten rather out of hand.  I picked up some
  during this cycle, but even going though my tree isn't a great fit.

  Ian Campbell has prototyped splitting the bindings and .dtb files into
  a separate repository.  The plan is to migrate to using that sometime
  in the next few kernel releases which should get rid of a lot of the
  churn on binding docs and .dts files"

* tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
  of: Fix address decoding on Bimini and js2x machines
  of: remove CONFIG_OF_DEVICE
  usb: chipidea: depend on CONFIG_OF instead of CONFIG_OF_DEVICE
  of: remove of_platform_driver
  ibmebus: convert of_platform_driver to platform_driver
  driver core: move to_platform_driver to platform_device.h
  mfd: DT bindings for the palmas family MFD
  ARM: dts: omap3-devkit8000: fix NAND memory binding
  of/base: fix typos
  of: remove #ifdef from linux/of_platform.h

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Thu, 4 Jul 2013 22:35:08 +0000 (15:35 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:
 "First round of updates for the input subsystem.

  You will get a new touchsreen driver for Cypress 4th generation
  devices, a driver for a special controller implementing PS/2 protocol
  in OLPC devices, and a driver for power key for SiRFprimaII PWRC.

  HID and bcm5497 now support for the 2013 MacBook Air.

  EVIOCGKEY and the rest of evdev ioctls now flush events of matching
  type from the client's event queue so that clients can be sure any
  events received after issuing EVIOCG* ioctl are new events.

  And a host of cleanups and improvements in other drivers"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (87 commits)
  Input: cyttsp4 - kfree xfer_buf on error path in probe()
  Input: tps6507x-ts - select INPUT_POLLDEV
  Input: bcm5974 - add support for the 2013 MacBook Air
  HID: apple: Add support for the 2013 Macbook Air
  Input: cyttsp4 - leak on error path in probe()
  Input: cyttsp4 - silence NULL dereference warning
  Input: cyttsp4 - silence shift wrap warning
  Input: tps6507x-ts - convert to polled input device infrastructure
  ARM: davinci: da850-evm: remove vref from touchscreen platform data
  Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices
  Input: cyttsp4 - I2C driver for Cypress TMA4XX touchscreen devices
  Input: cyttsp4 - add core driver for Cypress TMA4XX touchscreen devices
  Input: cyttsp - I2C driver split into two modules
  Input: add OLPC AP-SP driver
  Input: nspire-keypad - remove redundant dev_err call in nspire_keypad_probe()
  Input: tps6507x-ts - remove vref from platform data
  Input: tps6507x-ts - use bool for booleans
  Input: tps6507x-ts - remove bogus unreachable code
  Input: samsung-keypad - let device core setup the default pin configuration
  Input: wacom_i2c - implement hovering capability
  ...

10 years agoInput: cyttsp4 - kfree xfer_buf on error path in probe()
Ferruh Yigit [Thu, 4 Jul 2013 21:02:45 +0000 (14:02 -0700)]
Input: cyttsp4 - kfree xfer_buf on error path in probe()

If probe() fails after cd->xfer_buf allocated, it will not freed.
Added kfree(cd->xfer_buf) with and error label.

Signed-off-by: Ferruh Yigit <fery@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoMerge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Thu, 4 Jul 2013 21:02:09 +0000 (14:02 -0700)]
Merge branch 'i2c/for-next' of git://git./linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 - new drivers: Kontron PLD, Wondermedia VT
 - mv64xxx driver gained sun4i support and a bigger cleanup
 - duplicate driver 'intel-mid' removed
 - added generic device tree binding for sda holding time (and
   designware driver already uses it)
 - we tried to allow driver probing with only device tree and no i2c
   ids, but I had to revert it because of side effects.  Needs some
   rethinking.
 - driver bugfixes, cleanups...

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (34 commits)
  i2c-designware: use div_u64 to fix link
  i2c: Kontron PLD i2c bus driver
  i2c: iop3xxx: fix build failure after waitqueue changes
  i2c-designware: make SDA hold time configurable
  i2c: mv64xxx: Set bus frequency to 100kHz if clock-frequency is not provided
  i2c: imx: allow autoloading on dt ids
  i2c: mv64xxx: Fix transfer error code
  i2c: i801: SMBus patch for Intel Coleto Creek DeviceIDs
  i2c: omap: correct usage of the interrupt enable register
  i2c-pxa: prepare clock before use
  Revert "i2c: core: make it possible to match a pure device tree driver"
  i2c: nomadik: allocate adapter number dynamically
  i2c: nomadik: support elder Nomadiks
  i2c: mv64xxx: Add Allwinner sun4i compatible
  i2c: mv64xxx: make the registers offset configurable
  i2c: mv64xxx: Add macros to access parts of registers
  i2c: vt8500: Add support for I2C bus on Wondermedia SoCs
  i2c: designware: fix race between subsequent xfers
  i2c: bfin-twi: Read and write the FIFO in loop
  i2c: core: make it possible to match a pure device tree driver
  ...

10 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Thu, 4 Jul 2013 19:30:30 +0000 (12:30 -0700)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull first round of SCSI updates from James Bottomley:
 "The patch set is mostly driver updates (usf, zfcp, lpfc, mpt2sas,
  megaraid_sas, bfa, ipr) and a few bug fixes.  Also of note is that the
  Buslogic driver has been rewritten to a better coding style and 64 bit
  support added.  We also removed the libsas limitation on 16 bytes for
  the command size (currently no drivers make use of this)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (101 commits)
  [SCSI] megaraid: minor cut and paste error fixed.
  [SCSI] ufshcd-pltfrm: remove unnecessary dma_set_coherent_mask() call
  [SCSI] ufs: fix register address in UIC error interrupt handling
  [SCSI] ufshcd-pltfrm: add missing empty slot in ufs_of_match[]
  [SCSI] ufs: use devres functions for ufshcd
  [SCSI] ufs: Fix the response UPIU length setting
  [SCSI] ufs: rework link start-up process
  [SCSI] ufs: remove version check before IS reg clear
  [SCSI] ufs: amend interrupt configuration
  [SCSI] ufs: wrap the i/o access operations
  [SCSI] storvsc: Update the storage protocol to win8 level
  [SCSI] storvsc: Increase the value of scsi timeout for storvsc devices
  [SCSI] MAINTAINERS: Add myself as the maintainer for BusLogic SCSI driver
  [SCSI] BusLogic: Port driver to 64-bit.
  [SCSI] BusLogic: Fix style issues
  [SCSI] libiscsi: Added new boot entries in the session sysfs
  [SCSI] aacraid: Fix for arrays are going offline in the system. System hangs
  [SCSI] ipr: IOA Status Code(IOASC) update
  [SCSI] sd: Update WRITE SAME heuristics
  [SCSI] fnic: potential dead lock in fnic_is_abts_pending()
  ...

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Linus Torvalds [Thu, 4 Jul 2013 18:40:58 +0000 (11:40 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/trivial

Pull trivial tree updates from Jiri Kosina:
 "The usual stuff from trivial tree"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
  treewide: relase -> release
  Documentation/cgroups/memory.txt: fix stat file documentation
  sysctl/net.txt: delete reference to obsolete 2.4.x kernel
  spinlock_api_smp.h: fix preprocessor comments
  treewide: Fix typo in printk
  doc: device tree: clarify stuff in usage-model.txt.
  open firmware: "/aliasas" -> "/aliases"
  md: bcache: Fixed a typo with the word 'arithmetic'
  irq/generic-chip: fix a few kernel-doc entries
  frv: Convert use of typedef ctl_table to struct ctl_table
  sgi: xpc: Convert use of typedef ctl_table to struct ctl_table
  doc: clk: Fix incorrect wording
  Documentation/arm/IXP4xx fix a typo
  Documentation/networking/ieee802154 fix a typo
  Documentation/DocBook/media/v4l fix a typo
  Documentation/video4linux/si476x.txt fix a typo
  Documentation/virtual/kvm/api.txt fix a typo
  Documentation/early-userspace/README fix a typo
  Documentation/video4linux/soc-camera.txt fix a typo
  lguest: fix CONFIG_PAE -> CONFIG_x86_PAE in comment
  ...

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Thu, 4 Jul 2013 18:39:00 +0000 (11:39 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

Pull HID updates from Jiri Kosina:
 - HID battery handling cleanup by David Herrmann
 - ELO 4000/4500 driver, which has been finally ported to be proper HID
   driver by Jiri Slaby
 - ps3remote driver functionality is now provided by generic sony
   driver, by Jiri Kosina
 - PS2/3 Buzz controllers support, by Colin Leitner
 - rework of wiimote driver including full extensions hotpluggin
   support, sub-device modularization and speaker support by David
   Herrmann

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (55 commits)
  HID: wacom: Intuos4 battery charging changes
  HID: i2c-hid: support sending HID output reports using the output register
  HID: kye: Add report fixup for Genius Gila Gaming mouse
  HID: wiimote: support Nintendo Wii U Pro Controller
  Input: make gamepad API keycodes more clear
  input: document gamepad API and add extra keycodes
  HID: explain out-of-range check better
  HID: fix false positive out of range values
  HID: wiimote: fix coccinelle warnings
  HID: roccat: check cdev_add return value
  HID: fold ps3remote driver into generic Sony driver
  HID: hyperv: convert alloc+memcpy to memdup
  HID: core: fix reporting of raw events
  HID: wiimote: discard invalid EXT data reports
  HID: wiimote: fix classic controller parsing
  HID: wiimote: init EXT/MP during device detection
  HID: wiimote: fix DRM debug-attr to correctly parse input
  HID: wiimote: add MP quirks
  HID: wiimote: remove old static extension support
  HID: wiimote: add "bboard_calib" attribute
  ...

10 years agoMerge tag 'md-3.11' of git://neil.brown.name/md
Linus Torvalds [Thu, 4 Jul 2013 18:36:50 +0000 (11:36 -0700)]
Merge tag 'md-3.11' of git://neil.brown.name/md

Pull md updates from NeilBrown:
 "Mostly fixes, with a few minor features (eg 'last_sync_action' sysfs
  file)

  A couple marked for -stable including one recent bug which causes a
  RAID10 reshape to complete without moving any data :-(

  A couple more bugfixes (at least) to come, but haven't confirmed the
  right solution yet."

* tag 'md-3.11' of git://neil.brown.name/md:
  md/raid10: fix bug which causes all RAID10 reshapes to move no data.
  md/raid5: allow 5-device RAID6 to be reshaped to 4-device.
  md/raid10: fix two bugs affecting RAID10 reshape.
  md: remove doubled description for sync_max, merging it within sync_min/sync_max
  MD: Remember the last sync operation that was performed
  md: fix buglet in RAID5 -> RAID0 conversion.
  md/raid10: check In_sync flag in 'enough()'.
  md/raid10: locking changes for 'enough()'.
  md: replace strict_strto*() with kstrto*()
  md: Wait for md_check_recovery before attempting device removal.
  dm-raid: silence compiler warning on rebuilds_per_group.
  DM RAID: Fix raid_resume not reviving failed devices in all cases
  DM RAID: Break-up untidy function
  DM RAID: Add ability to restore transiently failed devices on resume

10 years agoMerge branch 'kconfig-diet' from Dave Hansen
Linus Torvalds [Thu, 4 Jul 2013 18:25:51 +0000 (11:25 -0700)]
Merge branch 'kconfig-diet' from Dave Hansen

Merge Kconfig menu diet patches from Dave Hansen:
 "I think the "Kernel Hacking" menu has gotten a bit out of hand.  It is
  over 120 lines long on my system with everything enabled and options
  are scattered around it haphazardly.

        http://sr71.net/~dave/linux/kconfig-horror.png

  Let's try to introduce some sanity.  This set takes that 120 lines
  down to 55 and makes it vastly easier to find some things.  It's a
  start.

  This set stands on its own, but there is plenty of room for follow-up
  patches.  The arch-specific debug options still end up getting stuck
  in the top-level "kernel hacking" menu.  OPTIMIZE_INLINING, for
  instance, could obviously go in to the "compiler options" menu, but
  the fact that it is defined in arch/ in a separate Kconfig file keeps
  it on its own for the moment.

  The Signed-off-by's in here look funky.  I changed employers while
  working on this set, so I have signoffs from both email addresses"

* emailed patches from Dave Hansen <dave@sr71.net>:
  hang and lockup detection menu
  kconfig: consolidate printk options
  group locking debugging options
  consolidate compilation option configs
  consolidate runtime testing configs
  order memory debugging Kconfig options
  consolidate per-arch stack overflow debugging options

10 years agohang and lockup detection menu
Dave Hansen [Mon, 1 Jul 2013 20:04:50 +0000 (13:04 -0700)]
hang and lockup detection menu

The hard/softlockup and hung-task entries take up 6 lines
of screen real-estate when enabled.  I bet folks don't
mess with these _that_ often, so move them in a group
down a level.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agokconfig: consolidate printk options
Dave Hansen [Mon, 1 Jul 2013 20:04:49 +0000 (13:04 -0700)]
kconfig: consolidate printk options

Same deal, take the printk-related things and hide them in a menu.
This takes another 4 items out of the top-level menu.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agogroup locking debugging options
Dave Hansen [Mon, 1 Jul 2013 20:04:47 +0000 (13:04 -0700)]
group locking debugging options

Original posting:

http://lkml.kernel.org/r/20121214184208.D9E5804D@kernel.stglabs.ibm.com

There are quite a few of these, and we want to make sure that
there is one-stop-shopping for lock debugging.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoconsolidate compilation option configs
Dave Hansen [Mon, 1 Jul 2013 20:04:46 +0000 (13:04 -0700)]
consolidate compilation option configs

Original Post:

http://lkml.kernel.org/r/20121214184207.6E00DDEC@kernel.stglabs.ibm.com

Again, trying to come up with some common themes of the stuff in
the kernel hacking menu...  There are quite a few options to
tweak compilation in some way, or perform extra compile-time
checks.  Give them their own menu.

The diff here looks a bit funny... makes it look like I'm
moving debugfs even though I'm actually moving the options on
either side of it.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoconsolidate runtime testing configs
Dave Hansen [Mon, 1 Jul 2013 20:04:44 +0000 (13:04 -0700)]
consolidate runtime testing configs

Original posting:

http://lkml.kernel.org/r/20121214184206.FC11422F@kernel.stglabs.ibm.com

These runtime tests are great, except that there are a lot of them,
and they are very rarely needed.  Give them their own menu so that
only the folks who need them will have to go looking for them.

Note that there are some other runtime tests that are not in here,
like for RCU or locking.  This menu should only be used for tests
that do not have a more appropriate home.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoorder memory debugging Kconfig options
Dave Hansen [Mon, 1 Jul 2013 20:04:43 +0000 (13:04 -0700)]
order memory debugging Kconfig options

Original posting:

http://lkml.kernel.org/r/20121214184203.37E6C724@kernel.stglabs.ibm.com

There are a *LOT* of memory debugging options.  They are just scattered
all over the "Kernel Hacking" menu.  Sure, "memory debugging" is a very
vague term and it's going to be hard to make absolute rules about what
goes in here, but this has to be better than what we had before.

This does, however, leave out the architecture-specific memory
debugging options (like x86's DEBUG_SET_MODULE_RONX).  There would need
to be some substantial changes to move those in here.  Kconfig can not
easily mix arch-specific and generic options together: it really
requires a file per-architecture, and I think having an
arch/foo/Kconfig.debug-memory might be taking things a bit too far

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoconsolidate per-arch stack overflow debugging options
Dave Hansen [Mon, 1 Jul 2013 20:04:42 +0000 (13:04 -0700)]
consolidate per-arch stack overflow debugging options

Original posting:

http://lkml.kernel.org/r/20121214184202.F54094D9@kernel.stglabs.ibm.com

Several architectures have similar stack debugging config options.
They all pretty much do the same thing, some with slightly
differing help text.

This patch changes the architectures to instead enable a Kconfig
boolean, and then use that boolean in the generic Kconfig.debug
to present the actual menu option.  This removes a bunch of
duplication and adds consistency across arches.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com> [for tile]
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge branch 'hpfs' from Mikulas Patocka
Linus Torvalds [Thu, 4 Jul 2013 18:22:55 +0000 (11:22 -0700)]
Merge branch 'hpfs' from Mikulas Patocka

Merge hpfs patches from Mikulas Patocka.

* emailed patches from Mikulas Patocka <mpatocka@artax.karlin.mff.cuni.cz>:
  hpfs: implement prefetch to improve performance
  hpfs: use mpage
  hpfs: better test for errors

10 years agohpfs: implement prefetch to improve performance
Mikulas Patocka [Thu, 4 Jul 2013 17:04:01 +0000 (19:04 +0200)]
hpfs: implement prefetch to improve performance

This patch implements prefetch to improve performance.  It helps mostly
when scanning the bitmaps to calculate free space.

Signed-off-by: Mikulas Patocka <mpatocka@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agohpfs: use mpage
Mikulas Patocka [Thu, 4 Jul 2013 16:44:27 +0000 (18:44 +0200)]
hpfs: use mpage

Use the mpage interface to improve performance.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agohpfs: better test for errors
Mikulas Patocka [Thu, 4 Jul 2013 16:42:29 +0000 (18:42 +0200)]
hpfs: better test for errors

The test if bitmap access is out of bound could errorneously pass if the
device size is divisible by 16384 sectors and we are asking for one bitmap
after the end.

Check for invalid size in the superblock. Invalid size could cause integer
overflows in the rest of the code.

Signed-off-by: Mikulas Patocka <mpatocka@artax.karlin.mff.cuni.cz>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 4 Jul 2013 17:29:23 +0000 (10:29 -0700)]
Merge branch 'next' of git://git./linux/kernel/git/benh/powerpc

Pull powerpc updates from Ben Herrenschmidt:
 "This is the powerpc changes for the 3.11 merge window.  In addition to
  the usual bug fixes and small updates, the main highlights are:

   - Support for transparent huge pages by Aneesh Kumar for 64-bit
     server processors.  This allows the use of 16M pages as transparent
     huge pages on kernels compiled with a 64K base page size.

   - Base VFIO support for KVM on power by Alexey Kardashevskiy

   - Wiring up of our nvram to the pstore infrastructure, including
     putting compressed oopses in there by Aruna Balakrishnaiah

   - Move, rework and improve our "EEH" (basically PCI error handling
     and recovery) infrastructure.  It is no longer specific to pseries
     but is now usable by the new "powernv" platform as well (no
     hypervisor) by Gavin Shan.

   - I fixed some bugs in our math-emu instruction decoding and made it
     usable to emulate some optional FP instructions on processors with
     hard FP that lack them (such as fsqrt on Freescale embedded
     processors).

   - Support for Power8 "Event Based Branch" facility by Michael
     Ellerman.  This facility allows what is basically "userspace
     interrupts" for performance monitor events.

   - A bunch of Transactional Memory vs.  Signals bug fixes and HW
     breakpoint/watchpoint fixes by Michael Neuling.

  And more ...  I appologize in advance if I've failed to highlight
  something that somebody deemed worth it."

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (156 commits)
  pstore: Add hsize argument in write_buf call of pstore_ftrace_call
  powerpc/fsl: add MPIC timer wakeup support
  powerpc/mpic: create mpic subsystem object
  powerpc/mpic: add global timer support
  powerpc/mpic: add irq_set_wake support
  powerpc/85xx: enable coreint for all the 64bit boards
  powerpc/8xx: Erroneous double irq_eoi() on CPM IRQ in MPC8xx
  powerpc/fsl: Enable CONFIG_E1000E in mpc85xx_smp_defconfig
  powerpc/mpic: Add get_version API both for internal and external use
  powerpc: Handle both new style and old style reserve maps
  powerpc/hw_brk: Fix off by one error when validating DAWR region end
  powerpc/pseries: Support compression of oops text via pstore
  powerpc/pseries: Re-organise the oops compression code
  pstore: Pass header size in the pstore write callback
  powerpc/powernv: Fix iommu initialization again
  powerpc/pseries: Inform the hypervisor we are using EBB regs
  powerpc/perf: Add power8 EBB support
  powerpc/perf: Core EBB support for 64-bit book3s
  powerpc/perf: Drop MMCRA from thread_struct
  powerpc/perf: Don't enable if we have zero events
  ...

10 years agoof: Fix address decoding on Bimini and js2x machines
Benjamin Herrenschmidt [Wed, 3 Jul 2013 06:01:10 +0000 (16:01 +1000)]
of: Fix address decoding on Bimini and js2x machines

 Commit:

  e38c0a1fbc5803cbacdaac0557c70ac8ca5152e7
  of/address: Handle #address-cells > 2 specially

broke real time clock access on Bimini, js2x, and similar powerpc
machines using the "maple" platform. That code was indirectly relying
on the old (broken) behaviour of the translation for the hypertransport
to ISA bridge.

This fixes it by treating hypertransport as a PCI bus

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
10 years agoMerge branches 'for-3.11/wacom-fixed' and 'for-3.11/wiimote' into for-linus
Jiri Kosina [Thu, 4 Jul 2013 13:05:02 +0000 (15:05 +0200)]
Merge branches 'for-3.11/wacom-fixed' and 'for-3.11/wiimote' into for-linus

10 years agoHID: wacom: Intuos4 battery charging changes
Przemo Firszt [Sat, 29 Jun 2013 09:57:13 +0000 (10:57 +0100)]
HID: wacom: Intuos4 battery charging changes

Intuos4 WL is separately reporting power supply and battery
charging status - now hid-wacom is using that information.
Previously hid-wacom was wrongly treating "battery charging" bit
as "power supply connected". Now it should report battery charging,
battery discharging, battery full and power supply status.

Intuos4 WL sends reports when is in use (obvious) and when unplugging
power supply. If means that if the device is being charged, but it's not
being used it will never report "battery full". The same problem happens
after the device has been connected, but it's not in use - the
battery/ac status will be incorrect. Currently there is no mechanism to
ask the device to send a report containing battery/ac status.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoMerge branches 'for-3.11/multitouch', 'for-3.11/sony' and 'for-3.11/upstream' into...
Jiri Kosina [Thu, 4 Jul 2013 13:02:26 +0000 (15:02 +0200)]
Merge branches 'for-3.11/multitouch', 'for-3.11/sony' and 'for-3.11/upstream' into for-linus

Conflicts:
drivers/hid/hid-core.c

10 years agoMerge branches 'for-3.11/battery', 'for-3.11/elo', 'for-3.11/holtek' and 'for-3.11...
Jiri Kosina [Thu, 4 Jul 2013 13:01:01 +0000 (15:01 +0200)]
Merge branches 'for-3.11/battery', 'for-3.11/elo', 'for-3.11/holtek' and 'for-3.11/i2c-hid-fixed' into for-linus

10 years agoHID: i2c-hid: support sending HID output reports using the output register
Andrew Duggan [Mon, 17 Jun 2013 23:15:06 +0000 (16:15 -0700)]
HID: i2c-hid: support sending HID output reports using the output register

The current i2c hid driver does not support sending HID output reports using
the output register for devices which support receiving reports through this
method. This patch determines which method to use to send output reports based
 on the value of wMaxOutputLength in the device's HID descriptor.

Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agomd/raid10: fix bug which causes all RAID10 reshapes to move no data.
NeilBrown [Thu, 4 Jul 2013 06:41:53 +0000 (16:41 +1000)]
md/raid10: fix bug which causes all RAID10 reshapes to move no data.

The recent comment:
commit 7e83ccbecd608b971f340e951c9e84cd0343002f
    md/raid10: Allow skipping recovery when clean arrays are assembled

Causes raid10 to skip a recovery in certain cases where it is safe to
do so.  Unfortunately it also causes a reshape to be skipped which is
never safe.  The result is that an attempt to reshape a RAID10 will
appear to complete instantly, but no data will have been moves so the
array will now contain garbage.
(If nothing is written, you can recovery by simple performing the
reverse reshape which will also complete instantly).

Bug was introduced in 3.10, so this is suitable for 3.10-stable.

Cc: stable@vger.kernel.org (3.10)
Cc: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
10 years agomd/raid5: allow 5-device RAID6 to be reshaped to 4-device.
NeilBrown [Thu, 4 Jul 2013 06:38:16 +0000 (16:38 +1000)]
md/raid5: allow 5-device RAID6 to be reshaped to 4-device.

There is a bug in 'check_reshape' for raid5.c  To checks
that the new minimum number of devices is large enough (which is
good), but it does so also after the reshape has started (bad).

This is bad because
 - the calculation is now wrong as mddev->raid_disks has changed
   already, and
 - it is pointless because it is now too late to stop.

So only perform that test when reshape has not been committed to.

Signed-off-by: NeilBrown <neilb@suse.de>
10 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Thu, 4 Jul 2013 02:56:35 +0000 (19:56 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 - new driver to support GMT G762/G763 pwm fan controllers
 - add support for DS1631, DS1721, and DS1731 to ds1621 driver
 - remove detect function from ds1621 driver as unreliable
 - bug fixes in nct6775, iio_hwmon, and adm1021 drivers
 - remove redundant platform_set_drvdata in various drivers
 - add device tree support to ina2xx driver

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (ds1621) Fix temperature rounding operations
  hwmon: (nct6775) Drop unsupported fan alarm attributes for NCT6775
  hwmon: (nct6775) Fix temperature alarm attributes
  Add support for GMT G762/G763 PWM fan controllers
  hwmon: (ina2xx) Add device tree support to pass the shunt resistor
  hwmon: (ds1621) Update documentation
  hwmon: (ds1621) Add DS1731 chip support to ds1621 driver
  hwmon: (iio_hwmon) add alias table
  hwmon: (adm1021) Do not create min sysfs attributes for LM84
  hwmon: (ds1621) Remove detect function
  hwmon: (ds1621) Add ds1631 chip support to ds1621 driver and documentation
  hwmon: (ds1621) Add ds1721 update interval sysfs attribute
  hwmon: (ds1621) Add ds1721 chip support
  hwmon: (w83627ehf) Remove redundant platform_set_drvdata()
  hwmon: (ntc_thermistor) Remove redundant platform_set_drvdata()
  hwmon: (i5k_amb) Remove redundant platform_set_drvdata()
  hwmon: (coretemp) Remove redundant platform_set_drvdata()
  hwmon: (abituguru3) Remove redundant platform_set_drvdata()

10 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Thu, 4 Jul 2013 02:55:33 +0000 (19:55 -0700)]
Merge branch 'for-next' of git://git./linux/kernel/git/cooloney/linux-leds

Pull LED subsystem updates from Bryan Wu:
 - lp55xx device tree updates
 - mc13xxx driver updates
 - some clean up

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: mc13783: Fix "uninitialized variable" warning
  leds: Convert led class driver from legacy pm ops to dev_pm_ops
  leds: leds-mc13783: Add MC13892 LED support
  leds: leds-mc13783: Prepare driver to support MC13892 LEDs
  leds: renesas-tpu: cleanup a small type issue
  leds: use platform_{get,set}_drvdata()
  leds: leds-gpio: Let device core handle pinctrl
  leds: lp5562: Properly setup of_device_id table
  leds: lp5523: Properly setup of_device_id table
  leds: lp5521: Properly setup of_device_id table
  leds: lp5562: support the device tree feature
  leds: lp55xx: support dynamic channel settings in the device tree structure
  leds: leds-ns2: remove unnecessary platform_set_drvdata()
  leds: leds-mc13783: remove unnecessary platform_set_drvdata()
  leds: leds-gpio: remove unnecessary platform_set_drvdata()
  leds: atmel-pwm: remove unnecessary platform_set_drvdata()
  leds: lp55xx: add support for Device Tree bindings

10 years agoMerge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Thu, 4 Jul 2013 02:52:22 +0000 (19:52 -0700)]
Merge tag 'sound-3.11' of git://git./linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "A relative calm release at this time with a flat diffstat.  The only
  significant change in the ALSA core side is the support for more than
  32 card instances, configurable via kconfig.  Other than that, in both
  ASoC and other parts, mostly some improvements and fixes on the driver
  side.

   - hda: More quirks for ALC269-variants on Dell & co, VIA codec fixes
   - hda: Haswell HDMI audio fixes, runtime PM improvements
   - hda: Intel BayTrail support, ALC5505 DSP support
   - es1968: MediaForte M56VAP support
   - usb-audio: Improved support for Yamaha/Roland devices
   - usb-audio: M2Tech hiFace, Audio Advantage Micro II support
   - hdspm: wordclock fixes
   - ASoC: Pending fixes for WM8962
   - ASoC: Cleanups and fixes for Blackfin, SGTL5000 and UX500
   - ASoC: Generalisation of the Bluetooth and HDMI stub drivers
   - ASoC: SSM2518 and RT5640 codec drivers.
   - ASoC: Tegra CPUs with RT5640 machine driver
   - ASoC: AC'97 refactoring bug fixes
   - ASoC: ADAU1701 driver fixes
   - Clean up of *_set_drvdata() in a wide range of drivers"

* tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (284 commits)
  ALSA: vmaster: Fix the regression of missing vmaster hook call
  ALSA: hda - Add Dell SSID to support Headset Mic recording
  ASoC: adau1701: remove control_data assignment
  ASoC: adau1701: more direct regmap usage
  ASoC: ac97: fixup multi-platform AC'97 module build failure
  ASoC: pxa2xx: fixup multi-platform AC'97 build failures
  ASoC: tegra20-ac97: Remove unused variable
  ASoC: tegra20-ac97: Remove duplicate error message
  ALSA: usb-audio: Add Audio Advantage Micro II
  ASoC: tas5086: fix Mid-Z implementation
  ASoC: tas5086: fix TAS5086_CLOCK_CONTROL register size
  ALSA: Replace the magic number 44 with const
  ALSA: hda - Fix the max length of control name in generic parser
  ALSA: hda - Guess what, it's two more Dell headset mic quirks
  ALSA: hda - Yet another Dell headset mic quirk
  ALSA: hda - Add support for ALC5505 DSP power-save mode
  ASoC: mfld: Remove unused variable
  ALSA: usb-audio: add quirks for Roland QUAD/OCTO-CAPTURE
  ALSA: usb-audio: claim autodetected PCM interfaces all at once
  ALSA: usb-audio: remove superfluous Roland quirks
  ...

10 years agoMerge branch 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Linus Torvalds [Thu, 4 Jul 2013 02:49:46 +0000 (19:49 -0700)]
Merge branch 'for-3.11' of git://git./linux/kernel/git/tj/libata

Pull libata updates from Tejun Heo:
 "Overview of changes:

   - The rest of maintainer email address updates.

   - Some core updates - more robust default behavior for port
     multipliers, better error reporting for SG_IO commands, and a way
     to better work around now ancient and probably pretty rare PATA ->
     SATA bridges with ATAPI devices.

   - sata_rcar stabilization.

   - Some hardware PCI ID additions and one-off low level driver
     updates."

* 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (22 commits)
  AHCI: use ATA_BUSY
  libata-zpodd: must use ata_tf_init()
  ahci: AHCI-mode SATA patch for Intel Coleto Creek DeviceIDs
  ata_piix: IDE-mode SATA patch for Intel Coleto Creek DeviceIDs
  libata: cleanup SAT error translation
  ahci: sata: add support for exynos5440 sata
  libata: skip SRST for all SIMG [34]7x port-multipliers
  ahci: remove pmp link online check in FBS EH
  sata highbank: add bit-banged SGPIO driver support
  ahci: make ahci_transmit_led_message into a function pointer
  sata_rcar: fix compilation warning in sata_rcar_thaw()
  sata_highbank: increase retry count but shorten duration for Calxeda controller
  ata: use pci_get_drvdata()
  ipr: qc_fill_rtf() method should not store alternate status register
  sata_rcar: add 'base' local variable to some functions
  sata_rcar: correct 'sata_rcar_sht'
  sata_rcar: kill superfluous code in sata_rcar_bmdma_fill_sg()
  libata: do not limit R-Car SATA driver to shmobile
  ata: use platform_{get,set}_drvdata()
  AHCI: Make distinct names for ports in /proc/interrupts
  ...

10 years agoMerge branch 'akpm' (updates from Andrew Morton)
Linus Torvalds [Thu, 4 Jul 2013 00:12:13 +0000 (17:12 -0700)]
Merge branch 'akpm' (updates from Andrew Morton)

Merge first patch-bomb from Andrew Morton:
 - various misc bits
 - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
   distracted.  There has been quite a bit of activity.
 - About half the MM queue
 - Some backlight bits
 - Various lib/ updates
 - checkpatch updates
 - zillions more little rtc patches
 - ptrace
 - signals
 - exec
 - procfs
 - rapidio
 - nbd
 - aoe
 - pps
 - memstick
 - tools/testing/selftests updates

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (445 commits)
  tools/testing/selftests: don't assume the x bit is set on scripts
  selftests: add .gitignore for kcmp
  selftests: fix clean target in kcmp Makefile
  selftests: add .gitignore for vm
  selftests: add hugetlbfstest
  self-test: fix make clean
  selftests: exit 1 on failure
  kernel/resource.c: remove the unneeded assignment in function __find_resource
  aio: fix wrong comment in aio_complete()
  drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
  drivers/memstick/host/r592.c: convert to module_pci_driver
  drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
  pps-gpio: add device-tree binding and support
  drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
  drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
  drivers/parport/share.c: use kzalloc
  Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
  aoe: update internal version number to v83
  aoe: update copyright date
  aoe: perform I/O completions in parallel
  ...

10 years agoMerge tag 'pci-v3.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Wed, 3 Jul 2013 23:31:35 +0000 (16:31 -0700)]
Merge tag 'pci-v3.11-changes' of git://git./linux/kernel/git/helgaas/pci

Pull PCI changes from Bjorn Helgaas:
 "PCI device hotplug
    - Add pci_alloc_dev() interface (Gu Zheng)
    - Add pci_bus_get()/put() for reference counting (Jiang Liu)
    - Fix SR-IOV reference count issues (Jiang Liu)
    - Remove unused acpi_pci_roots list (Jiang Liu)

  MSI
    - Conserve interrupt resources on x86 (Alexander Gordeev)

  AER
    - Force fatal severity when component has been reset (Betty Dall)
    - Reset link below Root Port as well as Downstream Port (Betty Dall)
    - Fix "Firmware first" flag setting (Bjorn Helgaas)
    - Don't parse HEST for non-PCIe devices (Bjorn Helgaas)

  ASPM
    - Warn when we can't disable ASPM as driver requests (Bjorn Helgaas)

  Miscellaneous
    - Add CircuitCo PCI IDs (Darren Hart)
    - Add AMD CZ SATA and SMBus PCI IDs (Shane Huang)
    - Work around Ivytown NTB BAR size issue (Jon Mason)
    - Detect invalid initial BAR values (Kevin Hao)
    - Add pcibios_release_device() (Sebastian Ott)
    - Fix powerpc & sparc PCI_UNKNOWN power state usage (Bjorn Helgaas)"

* tag 'pci-v3.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits)
  MAINTAINERS: Add ACPI folks for ACPI-related things under drivers/pci
  PCI: Add CircuitCo vendor ID and subsystem ID
  PCI: Use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
  PCI: Return early on allocation failures to unindent mainline code
  PCI: Simplify IOV implementation and fix reference count races
  PCI: Drop redundant setting of bus->is_added in virtfn_add_bus()
  unicore32/PCI: Remove redundant call of pci_bus_add_devices()
  m68k/PCI: Remove redundant call of pci_bus_add_devices()
  PCI / ACPI / PM: Use correct power state strings in messages
  PCI: Fix comment typo for pcie_pme_remove()
  PCI: Rename pci_release_bus_bridge_dev() to pci_release_host_bridge_dev()
  PCI: Fix refcount issue in pci_create_root_bus() error recovery path
  ia64/PCI: Clean up pci_scan_root_bus() usage
  PCI/AER: Reset link for devices below Root Port or Downstream Port
  ACPI / APEI: Force fatal AER severity when component has been reset
  PCI/AER: Remove "extern" from function declarations
  PCI/AER: Move AER severity defines to aer.h
  PCI/AER: Set dev->__aer_firmware_first only for matching devices
  PCI/AER: Factor out HEST device type matching
  PCI/AER: Don't parse HEST table for non-PCIe devices
  ...

10 years agotools/testing/selftests: don't assume the x bit is set on scripts
Andrew Morton [Wed, 3 Jul 2013 22:09:23 +0000 (15:09 -0700)]
tools/testing/selftests: don't assume the x bit is set on scripts

The x bit can easily get lost (patch(1) loses it, for example).

Reported-by: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Dave Young <dyoung@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoselftests: add .gitignore for kcmp
Ramkumar Ramachandra [Wed, 3 Jul 2013 22:09:22 +0000 (15:09 -0700)]
selftests: add .gitignore for kcmp

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Dave Young <dyoung@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoselftests: fix clean target in kcmp Makefile
Ramkumar Ramachandra [Wed, 3 Jul 2013 22:09:21 +0000 (15:09 -0700)]
selftests: fix clean target in kcmp Makefile

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Dave Young <dyoung@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoselftests: add .gitignore for vm
Ramkumar Ramachandra [Wed, 3 Jul 2013 22:09:20 +0000 (15:09 -0700)]
selftests: add .gitignore for vm

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Dave Young <dyoung@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoselftests: add hugetlbfstest
Joern Engel [Wed, 3 Jul 2013 22:09:19 +0000 (15:09 -0700)]
selftests: add hugetlbfstest

As the confusing naming indicates, this test has some overlap with
pre-existing tests.  Would be nice to merge them eventually.  But since it
is only test code, cleanliness is much less important than mere existence.

Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoself-test: fix make clean
Joern Engel [Wed, 3 Jul 2013 22:09:18 +0000 (15:09 -0700)]
self-test: fix make clean

thuge-gen was forgotten.  Fix it by removing the duplication, so we don't
get too many repeats.

Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoselftests: exit 1 on failure
Joern Engel [Wed, 3 Jul 2013 22:09:17 +0000 (15:09 -0700)]
selftests: exit 1 on failure

In case this ever gets scripted, it should return 0 on success and 1 on
failure.  Parsing the output should be left to meatbags.

Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agokernel/resource.c: remove the unneeded assignment in function __find_resource
Kevin Hao [Wed, 3 Jul 2013 22:09:16 +0000 (15:09 -0700)]
kernel/resource.c: remove the unneeded assignment in function __find_resource

This line was introduced by fcb11918 ("resources: add arch hook for
preventing allocation in reserved areas").  But the struct tmp was already
assigned to *new in the above line, so this seems superfluous.  Just
remove it.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoaio: fix wrong comment in aio_complete()
Tang Chen [Wed, 3 Jul 2013 22:09:16 +0000 (15:09 -0700)]
aio: fix wrong comment in aio_complete()

ctx->ctx_lock should be ctx->completion_lock.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agodrivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
Jean-Francois Dagenais [Wed, 3 Jul 2013 22:09:15 +0000 (15:09 -0700)]
drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode

Power-up timing

The DS2408 is sensitive to the power-on slew rate and can inadvertently
power up with a test mode feature enabled.  When this occurs, the P0 port
does not respond to the Channel Access Write command.  For most reliable
operation, it is recommended to disable the test mode after every power-on
reset using the Disable Test Mode sequence shown below.  The 64-bit ROM
code must be transmitted in the same bit sequence as with the Match ROM
command, i.e., least significant bit first.  This precaution is
recommended in parasite power mode (VCC pin connected to GND) as well as
with VCC power.

Disable Test Mode:
RST,PD,96h,<64-bit DS2408 ROM Code>,3Ch,RST,PD

[akpm@linux-foundation.org: don't use kerenldoc token to introduce a non-kerneldoc comment, tweak whitespace]
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agodrivers/memstick/host/r592.c: convert to module_pci_driver
Libo Chen [Wed, 3 Jul 2013 22:09:14 +0000 (15:09 -0700)]
drivers/memstick/host/r592.c: convert to module_pci_driver

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agodrivers/memstick/host/jmb38x_ms: convert to module_pci_driver
Libo Chen [Wed, 3 Jul 2013 22:09:13 +0000 (15:09 -0700)]
drivers/memstick/host/jmb38x_ms: convert to module_pci_driver

Use module_pci_driver instead of init/exit, make code clean.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agopps-gpio: add device-tree binding and support
Jan Luebbe [Wed, 3 Jul 2013 22:09:12 +0000 (15:09 -0700)]
pps-gpio: add device-tree binding and support

Instead of allocating a struct pps_gpio_platform_data in the DT case,
store the necessary information in struct pps_gpio_device_data itself.
This avoids an additional allocation and the ifdef.  It also gets rid of
some indirection.

Also use dev_err instead of pr_err in the changed code.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agodrivers/pps/clients/pps-gpio.c: convert to module_platform_driver
Jan Luebbe [Wed, 3 Jul 2013 22:09:10 +0000 (15:09 -0700)]
drivers/pps/clients/pps-gpio.c: convert to module_platform_driver

This removes some boilerplate code (no functional changes).

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agodrivers/pps/clients/pps-gpio.c: convert to devm_* helpers
Jan Luebbe [Wed, 3 Jul 2013 22:09:10 +0000 (15:09 -0700)]
drivers/pps/clients/pps-gpio.c: convert to devm_* helpers

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agodrivers/parport/share.c: use kzalloc
Alexandru Gheorghiu [Wed, 3 Jul 2013 22:09:09 +0000 (15:09 -0700)]
drivers/parport/share.c: use kzalloc

Replaced calls to kmalloc and memset with kzalloc.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoDocumentation/accounting/getdelays.c: avoid strncpy in accounting tool
Kees Cook [Wed, 3 Jul 2013 22:09:08 +0000 (15:09 -0700)]
Documentation/accounting/getdelays.c: avoid strncpy in accounting tool

Avoid strncpy anti-pattern.

[akpm@linux-foundation.org: remove the str[cpy|dup] altogether]
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Cc: Rob Landley <rob@landley.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoaoe: update internal version number to v83
Ed Cashin [Wed, 3 Jul 2013 22:09:07 +0000 (15:09 -0700)]
aoe: update internal version number to v83

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoaoe: update copyright date
Ed Cashin [Wed, 3 Jul 2013 22:09:06 +0000 (15:09 -0700)]
aoe: update copyright date

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoaoe: perform I/O completions in parallel
Ed Cashin [Wed, 3 Jul 2013 22:09:05 +0000 (15:09 -0700)]
aoe: perform I/O completions in parallel

Some users have a large AoE target while others like to use many AoE
targets at the same time.  In the latter case, there is an opportunity to
greatly improve aggregate throughput by allowing different threads to
complete the I/O associated with each target.  For 36 targets, 4 KiB read
throughput roughly doubles, for example, with these changes in place.

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agonbd: correct disconnect behavior
Paul Clements [Wed, 3 Jul 2013 22:09:04 +0000 (15:09 -0700)]
nbd: correct disconnect behavior

Currently, when a disconnect is requested by the user (via NBD_DISCONNECT
ioctl) the return from NBD_DO_IT is undefined (it is usually one of
several error codes).  This means that nbd-client does not know if a
manual disconnect was performed or whether a network error occurred.
Because of this, nbd-client's persist mode (which tries to reconnect after
error, but not after manual disconnect) does not always work correctly.

This change fixes this by causing NBD_DO_IT to always return 0 if a user
requests a disconnect.  This means that nbd-client can correctly either
persist the connection (if an error occurred) or disconnect (if the user
requested it).

Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Acked-by: Rob Landley <rob@landley.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agonbd: remove bogus BUG_ON in NBD_CLEAR_QUE
Michal Belczyk [Wed, 3 Jul 2013 22:09:03 +0000 (15:09 -0700)]
nbd: remove bogus BUG_ON in NBD_CLEAR_QUE

The NBD_CLEAR_QUE ioctl has been deprecated for quite some time (its job
is now done by two other ioctls).  We should stop trying to make bogus
assertions in it.  Also, user-level code should remove calls to
NBD_CLEAR_QUE, ASAP.

Signed-off-by: Michal Belczyk <belczyk@bsd.krakow.pl>
Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agokernel/pid.c: move statement
Raphael S. Carvalho [Wed, 3 Jul 2013 22:09:02 +0000 (15:09 -0700)]
kernel/pid.c: move statement

Move statement to static initilization of init_pid_ns.

Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agorapidio: change endpoint device name format
Alexandre Bounine [Wed, 3 Jul 2013 22:09:01 +0000 (15:09 -0700)]
rapidio: change endpoint device name format

Change endpoint device name format to use a component tag value instead of
device destination ID.

RapidIO specification defines a component tag to be a unique identifier
for devices in a network.  RapidIO switches already use component tag as
part of their device name and also use it for device identification when
processing error management event notifications.

Forming an endpoint's device name using its component tag instead of
destination ID allows to keep sysfs device directories unchanged in case
if a routing process dynamically changes endpoint's destination ID as a
result of route optimization.

This change should not affect any existing users because a valid device
destination ID always should be obtained by reading "destid" attribute and
not by parsing device name.

This patch also removes switchid member from struct rio_switch because it
simply duplicates the component tag and does not have other use than in
device name generation.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agorapidio: documentation update
Alexandre Bounine [Wed, 3 Jul 2013 22:08:59 +0000 (15:08 -0700)]
rapidio: documentation update

Update RapidIO documentation files to reflect modularization changes.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agorapidio: add udev notification
Alexandre Bounine [Wed, 3 Jul 2013 22:08:58 +0000 (15:08 -0700)]
rapidio: add udev notification

Add RapidIO-specific modalias generation to enable udev notifications
about RapidIO-specific events.

The RapidIO modalias string format is shown below:

"rapidio:vNNNNdNNNNavNNNNadNNNN"

Where:
v  - Device Vendor ID (16 bit),
d  - Device ID (16 bit),
av - Assembly Vendor ID (16 bit),
ad - Assembly ID (16 bit),

as they are reported in corresponding Capability Registers (CARs)
of each RapidIO device.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agorapidio: add modular build option for the subsystem core
Alexandre Bounine [Wed, 3 Jul 2013 22:08:56 +0000 (15:08 -0700)]
rapidio: add modular build option for the subsystem core

Add a configuration option to build RapidIO subsystem core code as a
loadable kernel module.  Currently this option is available only for
x86-based platforms, with the additional patch for PowerPC planned to be
provided later.

This patch replaces kernel command line parameter "riohdid=" with its
module-specific analog "rapidio.hdid=".

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agorapidio/tsi721: convert to modular mport driver
Alexandre Bounine [Wed, 3 Jul 2013 22:08:55 +0000 (15:08 -0700)]
rapidio/tsi721: convert to modular mport driver

This patch adds an option to build device driver for Tsi721 PCIe-to-SRIO
bridge device as a kernel module.

Currently this module cannot be unloaded because the existing RapidIO
subsystem code does not support dynamic removal of local RapidIO
controllers (TODO).

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agorapidio: update enumerator registration mechanism
Alexandre Bounine [Wed, 3 Jul 2013 22:08:53 +0000 (15:08 -0700)]
rapidio: update enumerator registration mechanism

Update enumeration/discovery method registration mechanism to allow
loading enumeration/discovery methods before all mports are registered.

Existing statically linked RapidIO subsystem expects that all available
RapidIO mport devices are initialized and registered before the
enumeration/discovery method is registered.  Switching to loadable mport
device drivers creates situation when mport device driver can be loaded
after enumeration/discovery method is attached (e.g., loadable mport
driver in a system with statically linked RapidIO core and enumerator).
This also will happen in a system with hot-pluggable RapidIO controllers.

To remove the dependency on the initialization/registration order this
patch introduces enumeration/discovery registration mechanism that
supports arbitrary registration order of mports and enumerator/discovery
methods.

The following registration rules are implemented:
- only one enumeration/discovery method can be registered for given mport ID
  (including RIO_MPORT_ANY);
- when new enumeration/discovery methods tries to attach to the registered mport
  device, method with matching mport ID will replace a default method previously
  registered for given mport (if any);
- enumeration/discovery method with target ID=RIO_MPORT_ANY will be attached
  only to mports that do not have another enumerator attached to them;
- when new mport device is registered with RapidIO subsystem, registration
  routine searches for the enumeration/discovery method with the best matching
  mport ID;

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agorapidio/rionet: rework driver initialization and removal
Alexandre Bounine [Wed, 3 Jul 2013 22:08:52 +0000 (15:08 -0700)]
rapidio/rionet: rework driver initialization and removal

Rework probe/remove routines to prevent rionet driver from monopolizing
target RapidIO devices.  Fix conflict with modular RapidIO switch drivers.

Using one of RapidIO messaging channels rionet driver provides a service
layer common to all endpoint devices in a system's RapidIO network.  These
devices may also require their own specific device driver which will be
blocked from attaching to the target device by rionet (or block rionet if
loaded earlier).  To avoid conflict with device-specific drivers, the
rionet driver is reworked to be registered as a subsystem interface on the
RapidIO bus.

The reworked rio_remove_dev() and rionet_exit() routines also include
handling of individual rionet peer device removal which was not supported
before.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agorapidio: convert switch drivers to modules
Alexandre Bounine [Wed, 3 Jul 2013 22:08:50 +0000 (15:08 -0700)]
rapidio: convert switch drivers to modules

Rework RapidIO switch drivers to add an option to build them as loadable
kernel modules.

This patch removes RapidIO-specific vmlinux section and converts switch
drivers to be compatible with LDM driver registration method.  To simplify
registration of device-specific callback routines this patch introduces
rio_switch_ops data structure.  The sw_sysfs() callback is removed from
the list of device-specific operations because under the new structure its
functions can be handled by switch driver's probe() and remove() routines.

If a specific switch device driver is not loaded the RapidIO subsystem
core will use default standard-based operations to configure a switch.
Because the current implementation of RapidIO enumeration/discovery method
relies on availability of device-specific operations for error management,
switch device drivers must be loaded before the RapidIO
enumeration/discovery starts.

This patch also moves several common routines from enumeration/discovery
module into the RapidIO core code to make switch-specific operations
accessible to all components of RapidIO subsystem.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agodrivers/rapidio/rio-scan.c: make functions static
Wu Fengguang [Wed, 3 Jul 2013 22:08:49 +0000 (15:08 -0700)]
drivers/rapidio/rio-scan.c: make functions static

sparse warnings:

drivers/rapidio/rio-scan.c:1143:5: sparse: symbol 'rio_enum_mport' was not declared. Should it be static?
drivers/rapidio/rio-scan.c:1246:5: sparse: symbol 'rio_disc_mport' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agorapidio/switches: remove tsi500 driver
Alexandre Bounine [Wed, 3 Jul 2013 22:08:48 +0000 (15:08 -0700)]
rapidio/switches: remove tsi500 driver

Remove the driver for Tsi500 Parallel RapidIO switch because this device
has not been available for several years.  Since the first introduction of
Tsi500, the parallel RapidIO interface was replaced by the serial RapidIO
(sRIO) and therefore there is no value in keeping this driver.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoidr: print a stack dump after ida_remove warning
Jean Delvare [Wed, 3 Jul 2013 22:08:47 +0000 (15:08 -0700)]
idr: print a stack dump after ida_remove warning

We print a dump stack after idr_remove warning.  This is useful to find
the faulty piece of code.  Let's do the same for ida_remove, as it would
be equally useful there.

[akpm@linux-foundation.org: convert the open-coded printk+dump_stack into WARN()]
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agos390: remove setting for saved_max_pfn
Zhang Yanfei [Wed, 3 Jul 2013 22:08:45 +0000 (15:08 -0700)]
s390: remove setting for saved_max_pfn

The only user of saved_max_pfn in s390 is read_oldmem interface but we
have removed that interface, so saved_max_pfn is now unneeded in s390, and
we needn't set it anymore.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dave Hansen <dave@sr71.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>