VME: Correct read/write alignment algorithm
authorMartyn Welch <martyn.welch@ge.com>
Fri, 7 Feb 2014 15:48:56 +0000 (15:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Feb 2014 20:41:28 +0000 (12:41 -0800)
commitc7677684ab70aff2f5f514f8827d315833bc6ac3
tree15bc63040d295c2cd68d4c5d607551595256b1d6
parent24a509100434799c6ba7d92e9cc37c5ba53fafaf
VME: Correct read/write alignment algorithm

commit f0342e66b397947ed8c3eef8c37b5ca2d5b1bb50 upstream.

In order to ensure the correct width cycles on the VME bus, the VME bridge
drivers implement an algorithm to utilise the largest possible width reads and
writes whilst maintaining natural alignment constraints. The algorithm
currently looks at the start address rather than the current read/write address
when determining whether a 16-bit width cycle is required to get to 32-bit
alignment.  This results in incorrect alignment,

Reported-by: Jim Strouth <james.strouth@ge.com>
Tested-by: Jim Strouth <james.strouth@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vme/bridges/vme_ca91cx42.c
drivers/vme/bridges/vme_tsi148.c