]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
IB/mlx4: Don't update QP1 for native functions
authorMatan Barak <matanb@mellanox.com>
Mon, 28 Apr 2014 15:46:13 +0000 (18:46 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 21:45:20 +0000 (14:45 -0700)
For native functions, there's no reason to update
the smac_index, as QP1 is a GSI QP.

Signed-off-by: Matan Barak <matanb@mellanox.com>
(Ported from Mellanox OFED 2.4)

Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
drivers/infiniband/hw/mlx4/main.c

index 0092e0acbf1358f90e86dc2be4dfec96c12059fb..864751d91e381eea565de8983317b8911856081a 100644 (file)
@@ -1794,6 +1794,10 @@ static void mlx4_ib_update_qps(struct mlx4_ib_dev *ibdev,
        u64 release_mac = MLX4_IB_INVALID_MAC;
        struct mlx4_ib_qp *qp;
 
+       /* No need to do anything for native */
+       if (!mlx4_is_mfunc(ibdev->dev))
+               return;
+
        read_lock(&dev_base_lock);
        new_smac = mlx4_mac_to_u64(dev->dev_addr);
        read_unlock(&dev_base_lock);