summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Pasternak <vadimp@nvidia.com>2023-08-24 15:43:09 +0200
committerDavid S. Miller <davem@davemloft.net>2023-08-25 10:53:37 +0100
commitd7248f1cc835bd80e936dc5b2d94b149bdd0077d (patch)
treeeb19810caf00e5ed47a9c5e6a453b91c9d8d3d57 /include
parent146c7c330507c0384bf29d567186632bfe975927 (diff)
mlxsw: i2c: Limit single transaction buffer size
Maximum size of buffer is obtained from underlying I2C adapter and in case adapter allows I2C transaction buffer size greater than 100 bytes, transaction will fail due to firmware limitation. As a result driver will fail initialization. Limit the maximum size of transaction buffer by 100 bytes to fit to firmware. Remove unnecessary calculation: max_t(u16, MLXSW_I2C_BLK_DEF, quirk_size). This condition can not happened. Fixes: 3029a693beda ("mlxsw: i2c: Allow flexible setting of I2C transactions size") Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions