IB/hns: Modify the condition of notifying hardware loopback
authorLijun Ou <oulijun@huawei.com>
Wed, 23 Nov 2016 19:41:03 +0000 (19:41 +0000)
committerDoug Ledford <dledford@redhat.com>
Sat, 3 Dec 2016 19:20:42 +0000 (14:20 -0500)
commit80596c6717a7b0e9969ffbd03c7e1dd33112f7e9
treeb3d2ea8fbec1101c47b648cf907f419903aa5b7e
parent543bfe6c3c1602d1781504047795a4266076233b
IB/hns: Modify the condition of notifying hardware loopback

This patch modified the condition of notifying hardware loopback.

In hip06, RoCE Engine has several ports, one QP is related
to one port. hardware only support loopback in the same port,
not in the different ports.

So, If QP related to port N, the dmac in the QP context equals
the smac of the local port N or the loop_idc is 1, we should
set loopback bit in QP context to notify hardware.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_hw_v1.c