提交 de773b6d 编写于 作者: S Sowjanya Komatineni 提交者: Xie XiuQi

i2c: tegra: fix maximum transfer size

commit f4e3f4ae 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: NDmitry Osipenko <digetx@gmail.com>
Signed-off-by: NSowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 2e3dbb93
...@@ -832,7 +832,7 @@ static const struct i2c_algorithm tegra_i2c_algo = { ...@@ -832,7 +832,7 @@ static const struct i2c_algorithm tegra_i2c_algo = {
/* payload size is only 12 bit */ /* payload size is only 12 bit */
static const struct i2c_adapter_quirks tegra_i2c_quirks = { static const struct i2c_adapter_quirks tegra_i2c_quirks = {
.max_read_len = 4096, .max_read_len = 4096,
.max_write_len = 4096, .max_write_len = 4096 - 12,
}; };
static const struct tegra_i2c_hw_feature tegra20_i2c_hw = { static const struct tegra_i2c_hw_feature tegra20_i2c_hw = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册