i2c: tegra: fix maximum transfer size
authorSowjanya Komatineni <skomatineni@nvidia.com>
Tue, 12 Feb 2019 19:06:44 +0000 (11:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:10:05 +0000 (20:10 +0100)
commit5f9614d0540b35b018a4ddb21d1a184e098f6758
tree9e9a758ef639cc444ef83ad1941743e0eebd6bd7
parent25970b517db1a6a12ca410c20321c6160d70f07a
i2c: tegra: fix maximum transfer size

commit f4e3f4ae1d9c9330de355f432b69952e8cef650c upstream.

Tegra186 and prior supports maximum 4K bytes per packet transfer
including 12 bytes of packet header.

This patch fixes max write length limit to account packet header
size for transfers.

Cc: stable@vger.kernel.org # 4.4+
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-tegra.c