]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix pfnum in devlink port attribute
authorParav Pandit <parav@mellanox.com>
Fri, 3 Apr 2020 08:57:30 +0000 (03:57 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 8 Apr 2020 22:46:49 +0000 (15:46 -0700)
commit04a88f7b27a4da93f7bae01a85cbc1b626d10202
treed6ca87797d147171024e5d98e86182ff0058710b
parent9c42b6138ad2f7aab74471c7c94f422ffce40c25
net/mlx5e: Fix pfnum in devlink port attribute

Cited patch missed to extract PCI pf number accurately for PF and VF
port flavour. It considered PCI device + function number.
Due to this, device having non zero device number shown large pfnum.

Hence, use only PCI function number; to avoid similar errors, derive
pfnum one time for all port flavours.

Fixes: d944cdf476de ("net/mlx5e: Register devlink ports for physical link, PCI PF, VFs")
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c