> 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@xxxxxxxxxxxxxxx # 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@xxxxxxxxxxxxxxx # 4.20+". OK, Will split into 2 patches as you suggested above ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------