dma:tegra: avoid int overflow for transferred cnt
authorChristopher Freeman <cfreeman@nvidia.com>
Tue, 6 May 2014 20:13:58 +0000 (13:13 -0700)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 8 Dec 2015 10:50:07 +0000 (02:50 -0800)
commit8be76069e0b0771733765d0a43d43e349d601343
tree899900a2fdb542470015d306b207d2424e41c6cf
parent0deb427dcd9363707106236f5211e57640860a89
dma:tegra: avoid int overflow for transferred cnt

bytes_transferred will overflow during long audio playbacks.  Since the
driver only ever consults this value modulo bytes_requested, store the value
modulo bytes_requested to prevent overflow.

BUG=chrome-os-partner:28376
TEST=Video/audio playback for >4 hours

Bug 200157067

Change-Id: I67ec972a6abcda0944728592c6c6ff319ea2486b
Reviewed-on: https://chromium-review.googlesource.com/198540
(cherry picked from commit a7ca1e2b0d1bbfa8ea480ac30fee73b85039881e)
Signed-off-by: Christopher Freeman <cfreeman@nvidia.com>
Signed-off-by: Diwakar Paliwal <dpaliwal@nvidia.com>
Reviewed-on: http://git-master/r/841406
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
drivers/dma/tegra20-apb-dma.c