stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Sasha Levin <sashal@kernel.org>,
	Sowjanya Komatineni <skomatineni@nvidia.com>,
	thierry.reding@gmail.com, jonathanh@nvidia.com
Cc: wsa@the-dreams.de, peda@axentia.se, stable@vger.kernel.org
Subject: Re: [PATCH V18 3/6] i2c: tegra: fix maximum transfer size
Date: Mon, 11 Feb 2019 20:58:19 +0300	[thread overview]
Message-ID: <7784b5fb-0f09-c838-63a3-16b82d6c7c98@gmail.com> (raw)
In-Reply-To: <15526ece-3067-4a9e-ba32-9ef37116ee4c@gmail.com>

11.02.2019 20:42, Dmitry Osipenko пишет:
> 11.02.2019 20:26, Sasha Levin пишет:
>> Hi,
>>
>> [This is an automated email]
>>
>> This commit has been processed because it contains a -stable tag.
>> The stable tag indicates that it's relevant for the following trees: all
>>
>> The bot has tested the following trees: v4.20.7, v4.19.20, v4.14.98, v4.9.155, v4.4.173, v3.18.134.
>>
>> v4.20.7: Failed to apply! Possible dependencies:
>>     0604ee4aefa2 ("i2c: tegra: Add missing kerneldoc for some fields")
>>     b67d4530cdad ("i2c: tegra: Fix Maximum transfer size")
>>     c990bbafdb11 ("i2c: tegra: Cleanup kerneldoc comments")
>>
>> v4.19.20: Failed to apply! Possible dependencies:
>>     0604ee4aefa2 ("i2c: tegra: Add missing kerneldoc for some fields")
>>     b67d4530cdad ("i2c: tegra: Fix Maximum transfer size")
>>     c96c0f268380 ("i2c: tegra: use core to detect 'no zero length' quirk")
>>     c990bbafdb11 ("i2c: tegra: Cleanup kerneldoc comments")
>>
>> v4.14.98: Failed to apply! Possible dependencies:
>>     0604ee4aefa2 ("i2c: tegra: Add missing kerneldoc for some fields")
>>     b67d4530cdad ("i2c: tegra: Fix Maximum transfer size")
>>     c5907c6b96f1 ("i2c: tegra: Add support for Tegra194")
>>     c96c0f268380 ("i2c: tegra: use core to detect 'no zero length' quirk")
>>     c990bbafdb11 ("i2c: tegra: Cleanup kerneldoc comments")
>>
>> v4.9.155: Failed to apply! Possible dependencies:
>>     0604ee4aefa2 ("i2c: tegra: Add missing kerneldoc for some fields")
>>     6bec23bff914 ("i2c: mlxcpld: add master driver for mellanox systems")
>>     ae3923a284cc ("i2c: busses: make i2c_adapter_quirks const")
>>     b67d4530cdad ("i2c: tegra: Fix Maximum transfer size")
>>     c02b7bf532f7 ("i2c: mux: mellanox: add driver")
>>     c5907c6b96f1 ("i2c: tegra: Add support for Tegra194")
>>     c96c0f268380 ("i2c: tegra: use core to detect 'no zero length' quirk")
>>     c990bbafdb11 ("i2c: tegra: Cleanup kerneldoc comments")
>>
>> v4.4.173: Failed to apply! Possible dependencies:
>>     0194621b2253 ("IB/rdmavt: Create module framework and handle driver registration")
>>     0604ee4aefa2 ("i2c: tegra: Add missing kerneldoc for some fields")
>>     1f50ad2c86cd ("i2c: tegra: Add runtime power-management support")
>>     21e9efd92bb5 ("i2c: tegra: disable clock before returning error")
>>     497fbe24987b ("i2c: tegra: enable multi master mode for tegra210")
>>     50a5ba876908 ("i2c: mux: demux-pinctrl: add driver")
>>     685143a1598b ("i2c: tegra: use readl_poll_timeout after config_load reg programmed")
>>     6bec23bff914 ("i2c: mlxcpld: add master driver for mellanox systems")
>>     7f866986e705 ("leds: add PM8058 LEDs driver")
>>     8700e3e7c485 ("Soft RoCE driver")
>>     9d7cffaf99f5 ("leds: Add driver for the ISSI IS31FL32xx family of LED controllers")
>>     ae3923a284cc ("i2c: busses: make i2c_adapter_quirks const")
>>     b67d4530cdad ("i2c: tegra: Fix Maximum transfer size")
>>     be4fdf99fa4d ("leds: add driver for Mellanox systems LEDs")
>>     c02b7bf532f7 ("i2c: mux: mellanox: add driver")
>>     c5907c6b96f1 ("i2c: tegra: Add support for Tegra194")
>>     c96c0f268380 ("i2c: tegra: use core to detect 'no zero length' quirk")
>>     c990bbafdb11 ("i2c: tegra: Cleanup kerneldoc comments")
>>     f5076685b3aa ("i2c: tegra: Fix missing blank lines after declarations")
>>
>> v3.18.134: Failed to apply! Possible dependencies:
>>     1f50ad2c86cd ("i2c: tegra: Add runtime power-management support")
>>     21e9efd92bb5 ("i2c: tegra: disable clock before returning error")
>>     497fbe24987b ("i2c: tegra: enable multi master mode for tegra210")
>>     5b25b13ab08f ("sys_membarrier(): system-wide memory barrier (generic, x86)")
>>     685143a1598b ("i2c: tegra: use readl_poll_timeout after config_load reg programmed")
>>     6bec23bff914 ("i2c: mlxcpld: add master driver for mellanox systems")
>>     6f4664b2e2c2 ("i2c: tegra: update CONFIG_LOAD for new conifiguration")
>>     8700e3e7c485 ("Soft RoCE driver")
>>     93c1edb27f9e ("mlxsw: Introduce Mellanox switch driver core")
>>     a7405844da1c ("i2c: at91: make use of the new infrastructure for quirks")
>>     ae3923a284cc ("i2c: busses: make i2c_adapter_quirks const")
>>     b94c820f3780 ("i2c: cpm: make use of the new infrastructure for quirks")
>>     be4fdf99fa4d ("leds: add driver for Mellanox systems LEDs")
>>     c02b7bf532f7 ("i2c: mux: mellanox: add driver")
>>     c5907c6b96f1 ("i2c: tegra: Add support for Tegra194")
>>     c96c0f268380 ("i2c: tegra: use core to detect 'no zero length' quirk")
>>     d57f5dedde18 ("i2c: tegra: add support for fast plus (FM+) mode clock rate")
>>     d64a818859af ("i2c: at91: add support for runtime PM")
>>     f5076685b3aa ("i2c: tegra: Fix missing blank lines after declarations")
>>
>>
>> How should we proceed with this patch?
> 
> I guess it will be fine to either limit backporting down to just 5.0 or 4.20 (taking the kerneldoc dependency). Though probably most ideal variant will be to split the fix into two patches: first fixes the max transfer for older Tegra's and second for T194 specifically. Either way should be good enough since realistically none of upstream-supported devices should ever hit the bug (but that's not 100% of course).
> 

Sowjanya,

So the first patch could looks like this:

-----------
 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,
 };
-----------

And then you should change the stable tag to "Cc: stable@vger.kernel.org # 4.4+"

The second patch will be somewhat like this:

-----------
+/* Packet header size in bytes */
+#define I2C_PACKET_HEADER_SIZE			12
+
#define I2C_MST_FIFO_STATUS			0x0b8
#define I2C_MST_FIFO_STATUS_RX_MASK		0xff
#define I2C_MST_FIFO_STATUS_RX_SHIFT		0
#define I2C_MST_FIFO_STATUS_TX_MASK		0xff0000
#define I2C_MST_FIFO_STATUS_TX_SHIFT		16

@@ -899,12 +902,13 @@ static const struct i2c_algorithm tegra_i2c_algo = {
 /* payload size is only 12 bit */
 static const struct i2c_adapter_quirks tegra_i2c_quirks = {
 	.flags = I2C_AQ_NO_ZERO_LEN,
-	.max_read_len = 4096,
-	.max_write_len = 4096 - 12,
+	.max_read_len = SZ_4K,
+	.max_write_len = SZ_4K - I2C_PACKET_HEADER_SIZE,
 };
 
 static const struct i2c_adapter_quirks tegra194_i2c_quirks = {
 	.flags = I2C_AQ_NO_ZERO_LEN,
+	.max_write_len = SZ_64K - I2C_PACKET_HEADER_SIZE,
 };
 
 static const struct tegra_i2c_hw_feature tegra20_i2c_hw = {
-----------

And then the stable tag for the second patch will be: "Cc: stable@vger.kernel.org # 4.20+".

  reply	other threads:[~2019-02-11 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1549652382-5476-1-git-send-email-skomatineni@nvidia.com>
2019-02-08 18:59 ` [PATCH V18 3/6] i2c: tegra: fix maximum transfer size Sowjanya Komatineni
     [not found]   ` <20190211172603.0CE06222A2@mail.kernel.org>
2019-02-11 17:42     ` Dmitry Osipenko
2019-02-11 17:58       ` Dmitry Osipenko [this message]
2019-02-11 21:54         ` Sowjanya Komatineni

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=7784b5fb-0f09-c838-63a3-16b82d6c7c98@gmail.com \
    --to=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=peda@axentia.se \
    --cc=sashal@kernel.org \
    --cc=skomatineni@nvidia.com \
    --cc=stable@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).