net/mlx5: Parse module mapping using mlx5_ifc
authorGal Pressman <gal@nvidia.com>
Mon, 17 Jan 2022 13:53:06 +0000 (15:53 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 11 Mar 2022 07:38:25 +0000 (23:38 -0800)
commitfcb610a86c53dfcfbb2aa62e704481112752f367
treee2808d1a98724766557f198a691aacfe7112bbe3
parent271907ee2f29cd1078fd219f0778fd824fb1971c
net/mlx5: Parse module mapping using mlx5_ifc

The assumption that the first byte in the module mapping dword is the
module number shouldn't be hard-coded in the driver, but come from
mlx5_ifc structs.

While at it, fix the incorrect width for the 'rx_lane' and 'tx_lane'
fields.

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
include/linux/mlx5/mlx5_ifc.h
include/linux/mlx5/port.h