]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit4a08a131351e375a2969b98e46df260ed04dcba7
tree224e2e801a156e0a9f9e8f168c0083be36446ad9
parenta2446bc77a16cefd27de712d28af2396d6287593
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: e19b0a3474ab ("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