From: Jack Morgenstein Date: Thu, 11 Sep 2014 11:11:18 +0000 (+0300) Subject: IB/mlx4: Don't update QP1 in native mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d24d9f43384b5933867a5786934e130efa8b5c92;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git IB/mlx4: Don't update QP1 in native mode For native functions (non-SR-IOV), there's no reason to update the smac_index, as QP1 is a GSI QP. Signed-off-by: Jack Morgenstein Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 657ce0f810fd..6ad7f7a0e464 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -1645,6 +1645,10 @@ static void mlx4_ib_update_qps(struct mlx4_ib_dev *ibdev, atomic64_set(&ibdev->iboe.mac[port - 1], new_smac); + /* no need for update QP1 and mac registration in non-SRIOV */ + if (!mlx4_is_mfunc(ibdev->dev)) + return; + mutex_lock(&ibdev->qp1_proxy_lock[port - 1]); qp = ibdev->qp1_proxy[port - 1]; if (qp) {