]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Fix VF mac handling in RoCE
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 11 Sep 2014 11:11:20 +0000 (14:11 +0300)
committerRoland Dreier <roland@purestorage.com>
Mon, 22 Sep 2014 16:46:53 +0000 (09:46 -0700)
commiteb2151ee60cab0fe079da324b2fd09037d611f9f
tree4af5f11721425482801bf298bd96f85d9309e298
parent07d7a6a87ffb8260ee580bd5b7e0b2e65712f566
IB/mlx4: Fix VF mac handling in RoCE

We had several problems here.  First, a race condition on QP1 mac
handling between mlx4_ib_update_qps and mlx4_ib_modify_qp, which is
fixed by taking the qp mutex in mlx4_ib_update_qps.

Also, qp->pri.smac_port was not updated in mlx4_ib_update_qps.

Last, in __mlx4_ib_modify_qp we did not properly handle the case where
the mac is zero, but port is non-zero.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx4/qp.c