]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix module EEPROM query
authorGal Pressman <gal@nvidia.com>
Sun, 16 Jan 2022 07:07:22 +0000 (09:07 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 2 Feb 2022 04:59:39 +0000 (20:59 -0800)
commitdf7092a67c72d273167557e63214860112fe6b85
tree224e2e801a156e0a9f9e8f168c0083be36446ad9
parent342a961258ae5705a658375e07729f1e8a52e912
net/mlx5e: Fix module EEPROM query

When querying the module EEPROM, there was a misusage of the 'offset'
variable vs the 'query.offset' field.
Fix that by always using 'offset' and assigning its value to
'query.offset' right before the mcia register read call.

While at it, the cross-pages read size adjustment was changed to be more
intuitive.

Fixes: 575c69607e39 ("net/mlx5: Refactor module EEPROM query")
Reported-by: Wang Yugui <wangyugui@e16-tech.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/port.c