From: Sowjanya Komatineni <skomatineni@nvidia.com>
To: thierry.reding@gmail.com, jonathanh@nvidia.com,
mkarthik@nvidia.com, smohammed@nvidia.com, talho@nvidia.com,
skomatineni@nvidia.com
Cc: wsa@the-dreams.de, peda@axentia.se, digetx@gmail.com,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-i2c@vger.kernel.org
Subject: [PATCH V19 3/7] i2c: tegra: fix maximum transfer size
Date: Tue, 12 Feb 2019 11:06:44 -0800 [thread overview]
Message-ID: <1549998408-9137-3-git-send-email-skomatineni@nvidia.com> (raw)
In-Reply-To: <1549998408-9137-1-git-send-email-skomatineni@nvidia.com>
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>
---
[V19] : Splitted maximum transfer limit patch into 2 separate patches to
allow this fix for old Tegra chips and next patch in this series for
Tegra194.
[V18] : Using Max of SZ_64K (65536) size for dma buffer instead of 65535
[V16/V17] : I2C core max message size is 65535. So, max_read_len of 65535 is NOP.
Removed it leaving max_write_len
[V15] : This is new patch in this series.
drivers/i2c/busses/i2c-tegra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index a46446dbc48a..036cab795426 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -901,7 +901,7 @@ static const struct i2c_algorithm tegra_i2c_algo = {
static const struct i2c_adapter_quirks tegra_i2c_quirks = {
.flags = I2C_AQ_NO_ZERO_LEN,
.max_read_len = 4096,
- .max_write_len = 4096,
+ .max_write_len = 4096 - 12,
};
static const struct i2c_adapter_quirks tegra194_i2c_quirks = {
--
2.7.4
next prev parent reply other threads:[~2019-02-12 19:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 19:06 [PATCH V19 1/7] i2c: tegra: sort all the include headers alphabetically Sowjanya Komatineni
2019-02-12 19:06 ` [PATCH V19 2/7] i2c: tegra: add bus clear Master Support Sowjanya Komatineni
2019-02-12 19:06 ` Sowjanya Komatineni [this message]
2019-02-12 19:06 ` [PATCH V19 4/7] i2c: tegra: update maximum transfer size Sowjanya Komatineni
2019-02-12 19:06 ` [PATCH V19 5/7] i2c: tegra: Add DMA support Sowjanya Komatineni
2019-02-14 16:53 ` Wolfram Sang
2019-02-20 18:02 ` Jon Hunter
2019-02-20 18:05 ` Dmitry Osipenko
2019-02-12 19:06 ` [PATCH V19 6/7] i2c: tegra: update transfer timeout Sowjanya Komatineni
2019-02-12 19:06 ` [PATCH V19 7/7] i2c: tegra: add i2c interface timing support Sowjanya Komatineni
2019-02-12 21:00 ` [PATCH V19 1/7] i2c: tegra: sort all the include headers alphabetically Peter Rosin
2019-02-12 21:15 ` Dmitry Osipenko
2019-02-13 8:35 ` Wolfram Sang
2019-02-13 13:13 ` Dmitry Osipenko
2019-02-13 14:55 ` Wolfram Sang
2019-02-13 23:45 ` Sowjanya Komatineni
2019-02-14 16:51 ` Wolfram Sang
2019-02-14 16:51 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1549998408-9137-3-git-send-email-skomatineni@nvidia.com \
--to=skomatineni@nvidia.com \
--cc=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkarthik@nvidia.com \
--cc=peda@axentia.se \
--cc=smohammed@nvidia.com \
--cc=talho@nvidia.com \
--cc=thierry.reding@gmail.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox