summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2016-04-12 12:58:14 +0100
committerBen Hutchings <ben@decadent.org.uk>2016-06-15 21:29:23 +0100
commite5bb0548c1ddab65ed675df65be6632f83374ec3 (patch)
tree06367bc2890ca287a7e08d759d51e76f3beae7dc /include
parentcfb3474f6849b53d0b68e8e3b22ea2ce392b9fd8 (diff)
spi: spi-ti-qspi: Handle truncated frames properly
commit 1ff7760ff66b98ef244bf0e5e2bd5310651205ad upstream. We clamp frame_len_words to a maximum of 4096, but do not actually limit the number of words written or read through the DATA registers or the length added to spi_message::actual_length. This results in silent data corruption for commands longer than this maximum. Recalculate the length of each transfer, taking frame_len_words into account. Use this length in qspi_{read,write}_msg(), and to increment spi_message::actual_length. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org> [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions