mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
net/mlx4_core: Fix wrong index in propagating port change event to VFs
[ Upstream commit1c1bf34951] The port-change event processing in procedure mlx4_eq_int() uses "slave" as the vf_oper array index. Since the value of "slave" is the PF function index, the result is that the PF link state is used for deciding to propagate the event for all the VFs. The VF link state should be used, so the VF function index should be used here. Fixes:948e306d7d('net/mlx4: Add VF link state support') Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
90ec7452b5
commit
f75d70aa24
@@ -573,7 +573,7 @@ static int mlx4_eq_int(struct mlx4_dev *dev, struct mlx4_eq *eq)
|
||||
continue;
|
||||
mlx4_dbg(dev, "%s: Sending MLX4_PORT_CHANGE_SUBTYPE_DOWN to slave: %d, port:%d\n",
|
||||
__func__, i, port);
|
||||
s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
|
||||
s_info = &priv->mfunc.master.vf_oper[i].vport[port].state;
|
||||
if (IFLA_VF_LINK_STATE_AUTO == s_info->link_state) {
|
||||
eqe->event.port_change.port =
|
||||
cpu_to_be32(
|
||||
@@ -608,7 +608,7 @@ static int mlx4_eq_int(struct mlx4_dev *dev, struct mlx4_eq *eq)
|
||||
continue;
|
||||
if (i == mlx4_master_func_num(dev))
|
||||
continue;
|
||||
s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state;
|
||||
s_info = &priv->mfunc.master.vf_oper[i].vport[port].state;
|
||||
if (IFLA_VF_LINK_STATE_AUTO == s_info->link_state) {
|
||||
eqe->event.port_change.port =
|
||||
cpu_to_be32(
|
||||
|
||||
Reference in New Issue
Block a user