]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: bcm2835: BUG: fix wrong use of PAGE_MASK
authorMartin Sperl <kernel@martin.sperl.org>
Thu, 10 Sep 2015 09:32:14 +0000 (09:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:49:20 +0000 (14:49 -0700)
commit3a06f82c3e6264c903491f3743a306b447af20bc
tree5e338e17e585c1668d1a14f0dd98f1cdca7c9a3f
parent980f841e9b92f3cbe7f5034c2c7359f9d03dfbe6
spi: bcm2835: BUG: fix wrong use of PAGE_MASK

commit 2a3fffd45822070309bcf0b1e1dae624d633824a upstream.

There is a bug in the alignment checking of transfers,
that results in DMA not being used for un-aligned
transfers that do not cross page-boundries, which is valid.

This is due to a missconception of the meaning PAGE_MASK
when implementing that check originally - (PAGE_SIZE - 1)
should have been used instead.

Also fixes a copy/paste error.

Reported-by: <robert@axium.co.nz>
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-bcm2835.c