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 21:32:27 +0000 (13:32 -0800)
commit83d0c11c30091dac57f76692c46e65e8a0aadedb
tree4a5dcfc206a35572cc8e6796aa54cf2f1eac6a4a
parent1a1d81ccf47de68b59c798cb7448e655a59372bc
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