lkml.org 
[lkml]   [2016]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 149/305] IB/mlx5: Return PORT_ERR in Active to Initializing tranisition
    3.16.37-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Noa Osherovich <noaos@mellanox.com>

    commit 2788cf3bd90af3791c3195c52391bcf34fa67b40 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: e126ba97dba9e ('mlx5: Add driver for Mellanox Connect-IB...')
    Signed-off-by: Noa Osherovich <noaos@mellanox.com>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    [bwh: Backported to 3.16: adjust context]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/infiniband/hw/mlx5/main.c | 5 +----
    1 file changed, 1 insertion(+), 4 deletions(-)

    --- a/drivers/infiniband/hw/mlx5/main.c
    +++ b/drivers/infiniband/hw/mlx5/main.c
    @@ -1002,14 +1002,11 @@ static void mlx5_ib_event(struct mlx5_co
    break;

    case MLX5_DEV_EVENT_PORT_DOWN:
    + case MLX5_DEV_EVENT_PORT_INITIALIZED:
    ibev.event = IB_EVENT_PORT_ERR;
    port = *(u8 *)data;
    break;

    - case MLX5_DEV_EVENT_PORT_INITIALIZED:
    - /* not used by ULPs */
    - return;
    -
    case MLX5_DEV_EVENT_LID_CHANGE:
    ibev.event = IB_EVENT_LID_CHANGE;
    port = *(u8 *)data;
    \
     
     \ /
      Last update: 2016-09-17 09:56    [W:4.019 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site