Commit graph

456706 commits

Author SHA1 Message Date
H Hartley Sweeten
ba9d29fe10 staging: comedi: mite.h: remove mite_irq()
This inline function simply returns the 'irq' of the struct pci_dev pointer
that is stored in struct mite_struct. This pci_dev pointer is the same as
the one that is already available in the (*auto_attach) functions where
mite_irq() is used.

Use the pci_dev pointer directly to get the irq and remove the unnecessary
inline function to remove the indirection.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:59 -07:00
H Hartley Sweeten
d1296561a4 staging: comedi: ni_pcimio: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.

Regardless, the symbols are not used. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:59 -07:00
H Hartley Sweeten
b3d471e9bb staging: comedi: ni_mio_cs: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.

Regardless, the symbols are not used. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:59 -07:00
H Hartley Sweeten
e5cc90f8fc staging: comedi: ni_atmio: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.

Regardless, the symbols are not used. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:59 -07:00
H Hartley Sweeten
7239da2513 staging: comedi: ni_pcimio: remove DRV_NAME define
This define is not used ny the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:59 -07:00
H Hartley Sweeten
b674f9df20 staging: comedi: ni_stc.h: the boardinfo 'name' should be first
By convention, the first member of the boardinfo is a 'const char *' to
the board name, especially for those comedi drivers that rely on the
comedi core to set dev->board_ptr to the entry matching the board name
when doing a legacy (*attach) to a comedi driver.

Modify the ni_board_struct appropriately for consistency, although the
board name is only used for informational purposes by this driver (only
the driver name is matched by the comedi core).

For aesthetics, also move the members in the boardinfo declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:59 -07:00
H Hartley Sweeten
252948517c staging: comedi: ni_atmio: tidy up the boardinfo
For aesthetics, add some whitespace to the boardinfo declaration.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:59 -07:00
H Hartley Sweeten
bfc8049a65 staging: comedi: ni_mio_cs: remove NI_SIZE define
This define is not used by the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:59 -07:00
H Hartley Sweeten
551d793943 staging: comedi: ni_atmio: remove NI_SIZE define
This define is only used in the comedi_request_region() to specify the
size of the region. Remove the define and just open code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:58 -07:00
H Hartley Sweeten
050e2d3a3b staging: comedi: ni_atmio: remove '= 0' boardinfo data
Remove all the boardinfo data the is set to '0'. They will default
to that when the boardinfo is declared.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:58 -07:00
H Hartley Sweeten
1fa955ba35 staging: comedi: ni_mio_common.c: remove IRQ_POLARITY defines
Pass the irq_polarity to ni_E_init() and remove the defines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:58 -07:00
H Hartley Sweeten
32d878a285 staging: comedi: ni_mio_common drivers: remove NI_E_IRQ_FLAGS defines
These defines are only used in the request_irq() calls. Remove them
and just open code the values.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:58 -07:00
H Hartley Sweeten
614b5cf097 staging: comedi: ni_mio_common.c: remove interrupt_pin() macros
Pass the 'interrupt_pin' to ni_E_init() and remove the macros.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:58 -07:00
H Hartley Sweeten
a55e9067f3 staging: comedi: ni_pcimio: remove forward declarations
Move some functions to avoid the need for the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:17:58 -07:00
Linus Torvalds
4c834452aa Linux 3.16-rc3 2014-06-29 14:11:36 -07:00
Linus Torvalds
ef2e0391e5 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
 "Another round of ARM fixes.  The largest change here is the L2 changes
  to work around problems for the Armada 37x/380 devices, where most of
  the size comes down to comments rather than code.

  The other significant fix here is for the ptrace code, to ensure that
  rewritten syscalls work as intended.  This was pointed out by Kees
  Cook, but Will Deacon reworked the patch to be more elegant.

  The remainder are fairly trivial changes"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8087/1: ptrace: reload syscall number after secure_computing() check
  ARM: 8086/1: Set memblock limit for nommu
  ARM: 8085/1: sa1100: collie: add top boot mtd partition
  ARM: 8084/1: sa1100: collie: revert back to cfi_probe
  ARM: 8080/1: mcpm.h: remove unused variable declaration
  ARM: 8076/1: mm: add support for HW coherent systems in PL310 cache
2014-06-29 13:40:08 -07:00
Randy Dunlap
97be078b87 MAINTAINERS: exceptions for Documentation maintainer
Note that I don't maintain Documentation/ABI/,
Documentation/devicetree/, or the language translation files.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-29 13:38:33 -07:00
Dan Carpenter
7d19e91b52 Documentation: add section about git to email-clients.txt
These days most people use git to send patches so I have added a section
about that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-29 13:38:33 -07:00
Greg Kroah-Hartman
3dc50c1af3 Second round of new drivers and cleanups for IIO in the 3.17 cycle.
New drivers
 * mcp4902, mcp4912 and mcp4922 SPI DAC driver.
 * max1027, max1029 and max1031 SPI ADC driver.
 
 Cleanups
 * cm32181 - use devm APIs to simplify error paths.
 * ak8975 - use devm APIs to simplify error paths.
 * ad9850 - drop some unused defines and an unnecessary goto.
 * hmc5843 - add missing devices to the device id table and the documentation.
 * ad9832 - small formatting cleanups.
 * sca3000 - hide direct use of the stufftoread element by adding a
     data_available function.  This is a precursor for the addition of buffer
     watermarks to the subsystem but stands as a good cleanup on its own.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJTsCi1AAoJEFSFNJnE9BaIncoP/i6vgt+l+jM7qCvD8xCa4Kto
 hwwXrtYEmAekAYcdcKesR/xBMw6Y1njjtPvnuOOXkxNcqLLhDUvvCGPvC2hsqNs1
 sZfq/KdzmgLNiy6FlprnVYAtoWL8yWiSdPa/aG7FAD/swOnrjQ+Dch/Kw0ha82dF
 CaoTLzLwwBr4V0m8XY4c6Uvgb+ywjYGsVspu69WKlMxnP9gGsb/e9QnqZteGwwxa
 D3ooy3dXdKzl3lc5y9HXqVDwFaennBxSiWtEHJZWUWt9QTeomeoSQuEa/6sJU9Fd
 MjOHiFuiiHF+fSCzvOKKudi3PFW//ztJjQQHlFbf7AojUH6uAnKuHzQ6mCM7dkH2
 h3pCidScC+nnPvJ4rF9uKHtj7kbch2vS0eT38BK04pCUiEOhv/55xIzFxLO58xFf
 d1a7Jlfyx498x0AVffPe+R/4a4/2cJWThB1lpPPKjq0Mm9Q5hdvHLTwloGCWfmVT
 k6y43xw0fC1DoNrXRe5aH8j7ih8CF1RaZowyWeEplIWDTrLixFqiZsVB6LwFjNxN
 ggTLK2rHfGlKEumqq7RlZGPSpkBs5a86KsuREEd169QCZYt2KCu5sZhW7+XKYPqa
 yIuGBfYXYAaaz71kK621jxKUhB3V61blUOX2/R1Cu4Mg02i441FibR04LquVReFy
 YNIGv95sgAsqXnfXHqfV
 =3Fhy
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.17b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second round of new drivers and cleanups for IIO in the 3.17 cycle.

New drivers
* mcp4902, mcp4912 and mcp4922 SPI DAC driver.
* max1027, max1029 and max1031 SPI ADC driver.

Cleanups
* cm32181 - use devm APIs to simplify error paths.
* ak8975 - use devm APIs to simplify error paths.
* ad9850 - drop some unused defines and an unnecessary goto.
* hmc5843 - add missing devices to the device id table and the documentation.
* ad9832 - small formatting cleanups.
* sca3000 - hide direct use of the stufftoread element by adding a
    data_available function.  This is a precursor for the addition of buffer
    watermarks to the subsystem but stands as a good cleanup on its own.
2014-06-29 09:49:28 -07:00
Greg Kroah-Hartman
6b64168de8 Second set of IIO fixes for the 3.16 cycle.
* A fix for a bug in setting threshold levels within the ad799x driver
   which prevents correct setting of the thresholds.
 * In ad7291 fix an case where a ERR_PTR value was returned directly
   instead of having PTR_ERR applied.  Hence it would report success
   instead of failure.
 * of_iio_channel_get_by_name returned a non null pointer if it fails
   and the callee was expecting NULL to indicate failure.  Fixed by
   returning NULL in the error cases.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJTsCLrAAoJEFSFNJnE9BaI0VYQAKLnNrpueb63Yuh+GHg0Qpps
 8sOUzPYf3x4NYHoQ4iI/ZTMVRneY1tO9AdweTnHlDJrtUnzBvpi53ctxu5dG0e+P
 FvarQ7cMni0lWumC9VeBMaBZclT6ReyWEpQQKfPI+EeCaatlBtgzfe76SpRqSaMc
 9lSwFTVCU0S3wSWIfa24rLTt0YPmNfLe31htjoY7nqdi2FRGTeARySCaIR9KAMmt
 uZDcFNcZ0b5FvO8EZIXzp0Y9GqkLqjYeBMeuduOAIB/ukgTKV4z41vZG/zAy034O
 EE0XTp1wyR1sHAk2xnYzAd8kpCsqGHYxJc287MsgQAfS1nuayzRByraxA+7XhLIy
 kWHT8qXT3OvQ39iq/xQH2xL3V3NGXF/h+apRlEdNOnXDP8xVTI4ue4IdoiLNG4z0
 UdybXjJshsWUOWZS6sVITPmj2RCnTqoPsO+fJRHA0Ws9sGDFpM+B1D3SONudfU/a
 I3B7C3rJfGdONS99sDqq0i+cyTe5LzSl1Yb9es+iUfrtQ7NVmX1jbtT33wgTzgqZ
 mbf0PBr+QWCS6KeWVl7zUJDv1iN7m0jX8gfjWHdWRWDJMriM2d23O4YLXjR7nMYM
 uOr80Tg1yHPs9uAv3Qfa0iG2ippZ68M0dEKbButDbwg2ex1tmghnR3qjGag+Yeme
 dxnW1PLYQpGQaEilYByZ
 =a4UI
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-3.16b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

Second set of IIO fixes for the 3.16 cycle.

* A fix for a bug in setting threshold levels within the ad799x driver
  which prevents correct setting of the thresholds.
* In ad7291 fix an case where a ERR_PTR value was returned directly
  instead of having PTR_ERR applied.  Hence it would report success
  instead of failure.
* of_iio_channel_get_by_name returned a non null pointer if it fails
  and the callee was expecting NULL to indicate failure.  Fixed by
  returning NULL in the error cases.
2014-06-29 09:43:23 -07:00
Josselin Costanzi
9dd4694daf iio: staging: sca3000: hide stufftoread logic
Change sca3000_ring implementation so that it exports a data_available
function to iio.

Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-29 14:43:38 +01:00
Federico Di Pierro
f1b07cdf6b staging: iio: Coding style issues fix.
Fix some little style issues in drivers/staging/iio/frequency/ad9832.c .
This is my latest task of the eudyptula challenge (third attempt!)

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-29 14:37:10 +01:00
Beomho Seo
a845a3aab8 iio: magnetometer: ak8975: Use devm_* APIs
This patch use devm_* APIs make driver simpler.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-29 12:03:45 +01:00
Marek Belisko
cfcd185e70 Documentation: iio: Extend documentation for hmc5843 bindings.
Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-29 11:56:32 +01:00
Marek Belisko
af690ce9d7 staging: iio: hmc5843: Add all available models to device tree id table.
Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-29 11:56:30 +01:00
Guillaume Morin
87a46909b3 staging: iio: ad9850.c: code cleanup
checkpath.pl was complaining about value_mask:
ERROR: Macros with complex values should be enclosed in parenthesis

I fixed this by simply removing it since it's not used (as well as another
macro).  Got rid of the un-necessary error_ret label as well.

Signed-off-by: Guillaume Morin <guillaume@morinfr.org>
Reported-by: Michael Welling <mwelling@ieee.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-29 11:51:56 +01:00
Will Deacon
42309ab450 ARM: 8087/1: ptrace: reload syscall number after secure_computing() check
On the syscall tracing path, we call out to secure_computing() to allow
seccomp to check the syscall number being attempted. As part of this, a
SIGTRAP may be sent to the tracer and the syscall could be re-written by
a subsequent SET_SYSCALL ptrace request. Unfortunately, this new syscall
is ignored by the current code unless TIF_SYSCALL_TRACE is also set on
the current thread.

This patch slightly reworks the enter path of the syscall tracing code
so that we always reload the syscall number from
current_thread_info()->syscall after the potential ptrace traps.

Acked-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-06-29 10:29:35 +01:00
Laura Abbott
6980c3e251 ARM: 8086/1: Set memblock limit for nommu
Commit 1c2f87c (ARM: 8025/1: Get rid of meminfo) changed find_limits
to use memblock_get_current_limit for calculating the max_low pfn.
nommu targets never actually set a limit on memblock though which
means memblock_get_current_limit will just return the default
value. Set the memblock_limit to be the end of DDR to make sure
bounds are calculated correctly.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-06-29 10:29:34 +01:00
Andrea Adami
3abe742339 ARM: 8085/1: sa1100: collie: add top boot mtd partition
The CFI mapping is now perfect so we can expose the top block, read only.
There isn't much to read, though, just the sharpsl_params values.

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-06-29 10:29:34 +01:00
Andrea Adami
92183103d8 ARM: 8084/1: sa1100: collie: revert back to cfi_probe
Reverts commit d26b17edaf
ARM: sa1100: collie.c: fall back to jedec_probe flash detection

Unfortunately the detection was challenged on the defective unit used for tests:
one of the NOR chips did not respond to the CFI query.
Moreover that bad device needed extra delays on erase-suspend/resume cycles.

Tested personally on 3 different units and with feedback of two other users.

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-06-29 10:29:33 +01:00
Nicolas Pitre
d0ba7cc02c ARM: 8080/1: mcpm.h: remove unused variable declaration
The sync_phys variable has been replaced by link time computation in
mcpm_head.S before the code was submitted upstream.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-06-29 10:29:32 +01:00
Thomas Petazzoni
98ea2dba65 ARM: 8076/1: mm: add support for HW coherent systems in PL310 cache
When a PL310 cache is used on a system that provides hardware
coherency, the outer cache sync operation is useless, and can be
skipped. Moreover, on some systems, it is harmful as it causes
deadlocks between the Marvell coherency mechanism, the Marvell PCIe
controller and the Cortex-A9.

To avoid this, this commit introduces a new Device Tree property
'arm,io-coherent' for the L2 cache controller node, valid only for the
PL310 cache. It identifies the usage of the PL310 cache in an I/O
coherent configuration. Internally, it makes the driver disable the
outer cache sync operation.

Note that technically speaking, a fully coherent system wouldn't
require any of the other .outer_cache operations. However, in
practice, when booting secondary CPUs, these are not yet coherent, and
therefore a set of cache maintenance operations are necessary at this
point. This explains why we keep the other .outer_cache operations and
only ->sync is disabled.

While in theory any write to a PL310 register could cause the
deadlock, in practice, disabling ->sync is sufficient to workaround
the deadlock, since the other cache maintenance operations are only
used in very specific situations.

Contrary to previous versions of this patch, this new version does not
simply NULL-ify the ->sync member, because the l2c_init_data
structures are now 'const' and therefore cannot be modified, which is
a good thing. Therefore, this patch introduces a separate
l2c_init_data instance, called of_l2c310_coherent_data.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-06-29 10:26:37 +01:00
Kristina Martšenko
ac4ddad67a staging: winbond: remove driver
The driver hasn't been cleaned up and nobody is working to do so, so
remove it.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-28 15:37:02 -07:00
Josef Bacik
472b909ff6 btrfs: only unlock block in verify_parent_transid if we locked it
This is a regression from my patch a26e8c9f75, we
need to only unlock the block if we were the one who locked it.  Otherwise this
will trip BUG_ON()'s in locking.c  Thanks,

cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
2014-06-28 13:48:47 -07:00
Filipe Manana
46c4e71e9b Btrfs: assert send doesn't attempt to start transactions
When starting a transaction just assert that current->journal_info
doesn't contain a send transaction stub, since send isn't supposed
to start transactions and when it finishes (either successfully or
not) it's supposed to set current->journal_info to NULL.

This is motivated by the change titled:

    Btrfs: fix crash when starting transaction

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Chris Mason <clm@fb.com>
2014-06-28 13:48:46 -07:00
Sergey Senozhatsky
c39aa7056f btrfs compression: reuse recently used workspace
Add compression `workspace' in free_workspace() to
`idle_workspace' list head, instead of tail. So we have
better chances to reuse most recently used `workspace'.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-06-28 13:48:46 -07:00
Liu Bo
5588383ece Btrfs: fix crash when mounting raid5 btrfs with missing disks
The reproducer is

$ mkfs.btrfs D1 D2 D3 -mraid5
$ mkfs.ext4 D2 && mkfs.ext4 D3
$ mount D1 /btrfs -odegraded

-------------------

[   87.672992] ------------[ cut here ]------------
[   87.673845] kernel BUG at fs/btrfs/raid56.c:1828!
...
[   87.673845] RIP: 0010:[<ffffffff813efc7e>]  [<ffffffff813efc7e>] __raid_recover_end_io+0x4ae/0x4d0
...
[   87.673845] Call Trace:
[   87.673845]  [<ffffffff8116bbc6>] ? mempool_free+0x36/0xa0
[   87.673845]  [<ffffffff813f0255>] raid_recover_end_io+0x75/0xa0
[   87.673845]  [<ffffffff81447c5b>] bio_endio+0x5b/0xa0
[   87.673845]  [<ffffffff81447cb2>] bio_endio_nodec+0x12/0x20
[   87.673845]  [<ffffffff81374621>] end_workqueue_fn+0x41/0x50
[   87.673845]  [<ffffffff813ad2aa>] normal_work_helper+0xca/0x2c0
[   87.673845]  [<ffffffff8108ba2b>] process_one_work+0x1eb/0x530
[   87.673845]  [<ffffffff8108b9c9>] ? process_one_work+0x189/0x530
[   87.673845]  [<ffffffff8108c15b>] worker_thread+0x11b/0x4f0
[   87.673845]  [<ffffffff8108c040>] ? rescuer_thread+0x290/0x290
[   87.673845]  [<ffffffff810939c4>] kthread+0xe4/0x100
[   87.673845]  [<ffffffff810938e0>] ? kthread_create_on_node+0x220/0x220
[   87.673845]  [<ffffffff817e7c7c>] ret_from_fork+0x7c/0xb0
[   87.673845]  [<ffffffff810938e0>] ? kthread_create_on_node+0x220/0x220

-------------------

It's because that we miscalculate @rbio->bbio->error so that it doesn't
reach maximum of tolerable errors while it should have.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Tested-by: Satoru Takeuchi<takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
2014-06-28 13:48:45 -07:00
Anand Jain
b2373f255c btrfs: create sprout should rename fsid on the sysfs as well
Creating sprout will change the fsid of the mounted root.
do the same on the sysfs as well.

reproducer:
 mount /dev/sdb /btrfs (seed disk)
 btrfs dev add /dev/sdc /btrfs
 mount -o rw,remount /btrfs
 btrfs dev del /dev/sdb /btrfs
 mount /dev/sdb /btrfs

Error:
kobject_add_internal failed for fe350492-dc28-4051-a601-e017b17e6145 with -EEXIST, don't try to register things with the same name in the same directory.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-06-28 13:48:44 -07:00
Anand Jain
49c6f736f3 btrfs: dev replace should replace the sysfs entry
when we replace the device its corresponding sysfs
entry has to be replaced as well

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-06-28 13:48:44 -07:00
Anand Jain
0d39376aa2 btrfs: dev add should add its sysfs entry
we would need the device links to be created,
when device is added.

Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-06-28 13:48:43 -07:00
Anand Jain
99994cde9c btrfs: dev delete should remove sysfs entry
when we delete the device from the mounted btrfs,
we would need its corresponding sysfs enty to
be removed as well.

Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-06-28 13:48:42 -07:00
Anand Jain
9b4eaf43f4 btrfs: rename add_device_membership to btrfs_kobj_add_device
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-06-28 13:48:41 -07:00
Linus Torvalds
24b414d5a7 spi: Fixes for v3.16
A few driver specific fixes, the biggest one being a fix for the newly
 added Qualcomm SPI controller driver to make it not use its internal
 chip select due to hardware bugs, replacing it with GPIOs.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTrr4lAAoJELSic+t+oim9/30P/3wie8c4eNjRQLPYrNmq9y1t
 S9sF6U6ur3mDD1GXol1hoe3FU3aaF9TiNU8sq8wtj2TCvmB6BLlH70uKdIIbKB4B
 b1WVNoclBTZYE3v8FdsJce5eyBjaNY90cRJ5TGwwIWowSNuWwo0/+1zWWzzyH9AF
 u2STutPSZAJL99RRnUZj+5zx9cspTnc+TNX5UFIXbRcvLPnYkg8TeQvXFUAH9CgL
 p0sbveu8C3ZS2es5h1Py/f9v0/Pv00fGCVNW073JA82I5viUAogI5+63e65kKZcm
 xjdY4yIrIrsORjbpUny7YjkgdxdpAWjO4IFnFdPT4GZBe9Ad7ACYKfiox/q/EO7O
 H8z8v6Ebq/6+wV9uvZtSTIWd2PRV7YUsYijTZGFN02+f4QQq5OckgQMD0ODOBb4k
 uI1qiTcd11g1gXlExne23fzvBzpCfD1h2N8h/DyXRBhlyb9NupaABjqVP/fkds5g
 k5j6VuYcGy3UZeGmSOrx85d5pWgOBp/hDJ8DwWo9AUGPrnDx9HgAerxhNMXaJcQA
 PFypfT2L23ACxbTSZmAj2uRbKv4zyiqM+xtxdLmY/KrvpuDoKAlDGtZV1TFeNo7c
 4H3c96fAc/i0BsinY3b1weQ+oGNcNWv9nvdqVGxuBvWs862HkvUcP5mB5ki5BGxh
 h3uVSfQeETPizC+3w52A
 =Jdak
 -----END PGP SIGNATURE-----

Merge tag 'spi-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few driver specific fixes, the biggest one being a fix for the newly
  added Qualcomm SPI controller driver to make it not use its internal
  chip select due to hardware bugs, replacing it with GPIOs"

* tag 'spi-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: qup: Remove chip select function
  spi: qup: Fix order of spi_register_master
  spi: sh-sci: fix use-after-free in sh_sci_spi_remove()
  spi/pxa2xx: fix incorrect SW mode chipselect setting for BayTrail LPSS SPI
2014-06-28 11:32:32 -07:00
Linus Torvalds
4194976b09 regulator: Fixes for v3.16
Several driver specific fixes here, the palmas fixes being especially
 important for a range of boards - the recent updates to support new
 devices have introduced several regressions.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTrsM3AAoJELSic+t+oim9ACIP/RIatlNlq0ALnWaYqaGCkQIF
 /kQJkBmInCIZ9e7zumnOxpE39OQIcfhqpQeH1aeVlQA6FabGhjdss8AJoM0VbUNS
 Cj46QnvADMruuow/ZQ4er2Na2w0lzO7CGffnrK+J1N2K3mivkJbBDomtYyJ93/kw
 rgqEWahszvIvHFD+yFITDhFW7I1f6YaKGj7oTIh844XD3kmphXxCRgQuojYaw7Xa
 qwLou8OfQL7NZv+z5suffO6n6ga3FgxNge+zynPXSx9lUgnUL/DZzf4tbE42GyXk
 wPANjTg2JBAwyb/X6zvb7hU7ag5clZhpfvOZRtmYHeyQDQcdUYfVKadBZE9ZAqQv
 1B6q5XJQeE/XzHicQav0WN+FI/lOdf/ePyRRL2kGqAdQkDqnBM3lpRvM8c7uAhLT
 r75z822QBug7pw9HSUN3CIhTMpHxdmXq3tVLGOULLXdBxDPNOvXEKqjj3khj+NZm
 5JJEcCYsu0PgbyJKdSF/yIeCFLY0slXNfnuWUvoMlOcpY3EgxwUi+FOxjmPxhq5v
 df47PJ4vcRXh/wHeA1oZQ1NDUEMfP1iX4ysUktQfaUUKq1QjdIegj4aykRHriVfc
 OQGJ4S3Dco8FDeWZtpmaFnA68cJR4nFCMzZOqLiK/wHadpF7qcgEKNync0QAvKK3
 Y15h23vpcq+OWdHGnObL
 =K0Hp
 -----END PGP SIGNATURE-----

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

Pull regulator fixes from Mark Brown:
 "Several driver specific fixes here, the palmas fixes being especially
  important for a range of boards - the recent updates to support new
  devices have introduced several regressions"

* tag 'regulator-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: tps65218: Correct the the config register for LDO1
  regulator: tps65218: Add the missing of_node assignment in probe
  regulator: palmas: fix typo in enable_reg calculation
  regulator: bcm590xx: fix vbus name
  regulator: palmas: Fix SMPS enable/disable/is_enabled
2014-06-28 11:31:58 -07:00
Linus Torvalds
eb477e03fe Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
 "Mostly minor fixes this time around.  The highlights include:

   - iscsi-target CHAP authentication fixes to enforce explicit key
     values (Tejas Vaykole + rahul.rane)
   - fix a long-standing OOPs in target-core when a alua configfs
     attribute is accessed after port symlink has been removed.
     (Sebastian Herbszt)
   - fix a v3.10.y iscsi-target regression causing the login reject
     status class/detail to be ignored (Christoph Vu-Brugier)
   - fix a v3.10.y iscsi-target regression to avoid rejecting an
     existing ITT during Data-Out when data-direction is wrong (Santosh
     Kulkarni + Arshad Hussain)
   - fix a iscsi-target related shutdown deadlock on UP kernels (Mikulas
     Patocka)
   - fix a v3.16-rc1 build issue with vhost-scsi + !CONFIG_NET (MST)"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  iscsi-target: fix iscsit_del_np deadlock on unload
  iovec: move memcpy_from/toiovecend to lib/iovec.c
  iscsi-target: Avoid rejecting incorrect ITT for Data-Out
  tcm_loop: Fix memory leak in tcm_loop_submission_work error path
  iscsi-target: Explicily clear login response PDU in exception path
  target: Fix left-over se_lun->lun_sep pointer OOPs
  iscsi-target; Enforce 1024 byte maximum for CHAP_C key value
  iscsi-target: Convert chap_server_compute_md5 to use kstrtoul
2014-06-28 09:43:58 -07:00
Mark Brown
7216a41839 Merge remote-tracking branches 'spi/fix/pxa2xx', 'spi/fix/qup' and 'spi/fix/sh-sci' into spi-linus 2014-06-28 14:01:23 +01:00
Mark Brown
11767484b8 Merge remote-tracking branches 'regulator/fix/bcm590xx', 'regulator/fix/palmas' and 'regulator/fix/tps65218' into regulator-linus 2014-06-28 14:01:04 +01:00
Philippe Reynes
fc167f6248 iio: add support of the max1027
This driver add partial support of the
maxim 1027/1029/1031. Differential mode is not
supported.

It was tested on armadeus apf27 board.

Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-28 09:54:14 +01:00
Mikulas Patocka
81a9c5e72b iscsi-target: fix iscsit_del_np deadlock on unload
On uniprocessor preemptible kernel, target core deadlocks on unload. The
following events happen:
* iscsit_del_np is called
* it calls send_sig(SIGINT, np->np_thread, 1);
* the scheduler switches to the np_thread
* the np_thread is woken up, it sees that kthread_should_stop() returns
  false, so it doesn't terminate
* the np_thread clears signals with flush_signals(current); and goes back
  to sleep in iscsit_accept_np
* the scheduler switches back to iscsit_del_np
* iscsit_del_np calls kthread_stop(np->np_thread);
* the np_thread is waiting in iscsit_accept_np and it doesn't respond to
  kthread_stop

The deadlock could be resolved if the administrator sends SIGINT signal to
the np_thread with killall -INT iscsi_np

The reproducible deadlock was introduced in commit
db6077fd0b, but the thread-stopping code was
racy even before.

This patch fixes the problem. Using kthread_should_stop to stop the
np_thread is unreliable, so we test np_thread_state instead. If
np_thread_state equals ISCSI_NP_THREAD_SHUTDOWN, the thread exits.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2014-06-27 23:23:35 -07:00
Linus Torvalds
3e7b256cba IOMMU Fixes for Linux v3.16-rc1
* Fix VT-d regression with handling multiple RMRR entries per
 	  device
 	* Fix a small race that was left in the mmu_notifier handling in
 	  the AMD IOMMUv2 driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTqTeIAAoJECvwRC2XARrjL0gQAMLPRDWaXPsVxlq3pAMb+My4
 AzqB5jBWV4sNNt/jg/qa81FI6MvDknkNlAO2iCJa71nBnuGQFD6V9Rwp5wzWTJpe
 M29UV3ZDaUgH6ox3oPHUtnNtsSJhJ8E23qL/q5gBPIL8eM21Gworau/CkNfGf3DA
 K/ut3KhyqHHcGlST27CAKwH2QyvcdXOpwL4xLLB1buv3SWW2EjVqeXA8c5YqybQy
 a9ucoLKp8MrosTvrzSYgZzYfOJCaSpzfVwEC2G2Hrh2IHdrRNE5GcFu07qrR2cLC
 1QKBVaCgK5PSPQAd8fhg0lfwzIUPi0ZrxjPhdQlG+E+V1SNFU5tcVdn0p8TmljLN
 3vGdRS90o3XM2pkdv6h1pkzEd6aukBw5LkORYcMJwDEn40S2lSYW2za+sOkyAltH
 jgHDQDtRCMnJpj7fa6x5Nk3VkWBRbdpuyJLPmqzMwhUzGq1FUrM1PSIo9962u3nk
 BhRP0A5/emaH/Fc94S+sspfOHYVnpqr/wtRrMln7xbIrKSxyQh3MX9J7vHxpw/Wl
 qWGYFV4RfG+JT9dGF+SAZTVFLTpgnh32gpKHJgUkahAyxHQVuckmk99XD1ScpDCD
 fArbvL+SCo/i35aScAvzP0+lXJggfeaeslGKPHQx8FLY+zrV2krYEBh3hBlXibJT
 turjVNs8gAwE6uzp1+Cv
 =ZWyp
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:

 - fix VT-d regression with handling multiple RMRR entries per device

 - fix a small race that was left in the mmu_notifier handling in the
   AMD IOMMUv2 driver

* tag 'iommu-fixes-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: Fix small race between invalidate_range_end/start
  iommu/vt-d: fix bug in handling multiple RMRRs for the same PCI device
2014-06-27 19:00:45 -07:00