summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx5/mlx5_ib.h
diff options
context:
space:
mode:
authorMoni Shoua <monis@mellanox.com>2017-05-30 09:56:05 +0300
committerDoug Ledford <dledford@redhat.com>2017-07-24 17:29:18 +0300
commitfd65f1b8eefdd20bd70cc920a7306e1e1b113d81 (patch)
tree2078f9fac6593c3cd61931f409d37f80f9d0cc7b /drivers/infiniband/hw/mlx5/mlx5_ib.h
parent2c43c5a036be7d03232a2b28f4a440a8cafe699f (diff)
downloadlinux-fd65f1b8eefdd20bd70cc920a7306e1e1b113d81.tar.xz
IB/mlx5: Change logic for dispatching IB events for port state
The old logic ignored link state. This led to missing IB events like when link goes down on the switch while admin state is up or to redundant events like when admin state goes up while link is down. To fix that, probe the port state on NETDEV events and compare to last known state to decide if IB events needs to be dispatched. FIxes: 5ec8c83e3ad3 ("IB/mlx5: Port events in RoCE now rely on netdev events") Signed-off-by: Moni Shoua <monis@mellanox.com> Reviewed-by: Noa Osherovich <noaos@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mlx5_ib.h')
-rw-r--r--drivers/infiniband/hw/mlx5/mlx5_ib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index d2b27647f939..5fb4547bbcb8 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -616,6 +616,7 @@ struct mlx5_roce {
struct net_device *netdev;
struct notifier_block nb;
atomic_t next_port;
+ enum ib_port_state last_port_state;
};
struct mlx5_ib_dev {