Commit 02525b0c authored by Noa Osherovich's avatar Noa Osherovich Committed by Kamal Mostafa

IB/mlx5: Return PORT_ERR in Active to Initializing tranisition

BugLink: http://bugs.launchpad.net/bugs/1615620

commit 2788cf3b upstream.

FW port-change events are fired on Active <-> non Active port state
transitions only.
When the port state changes from Active to Initializing (Active ->
Down -> Initializing), a single event is fired.
The HCA transitions from Down to Initializing unless prevented from
doing so, hence the driver should also propagate events when the port
state is Initializing to consumers so they'll be aware that the port
is no longer Active and act accordingly.

Fixes: e126ba97 ('mlx5: Add driver for Mellanox Connect-IB...')
Signed-off-by: default avatarNoa Osherovich <noaos@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent cd57c6ce
...@@ -963,14 +963,11 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, void *context, ...@@ -963,14 +963,11 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, void *context,
break; break;
case MLX5_DEV_EVENT_PORT_DOWN: case MLX5_DEV_EVENT_PORT_DOWN:
case MLX5_DEV_EVENT_PORT_INITIALIZED:
ibev.event = IB_EVENT_PORT_ERR; ibev.event = IB_EVENT_PORT_ERR;
port = (u8)param; port = (u8)param;
break; break;
case MLX5_DEV_EVENT_PORT_INITIALIZED:
/* not used by ULPs */
return;
case MLX5_DEV_EVENT_LID_CHANGE: case MLX5_DEV_EVENT_LID_CHANGE:
ibev.event = IB_EVENT_LID_CHANGE; ibev.event = IB_EVENT_LID_CHANGE;
port = (u8)param; port = (u8)param;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment