]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Fix query port failure in RoCE
authorEli Cohen <eli@mellanox.com>
Sat, 4 Jun 2016 12:15:18 +0000 (15:15 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 7 Jun 2016 13:50:52 +0000 (09:50 -0400)
commit789de5ec8790d0d8d00788861ce04f07616a98ed
tree1b21abb92c85ae3dcdfc9f14493548c76660f85b
parent925b5a840d5793740a39d37b8de09222cfc9a055
IB/core: Fix query port failure in RoCE

Currently ib_query_port always attempts to to read the subnet prefix by
calling ib_query_gid(). For RoCE/iWARP there is no subnet manager and no
subnet prefix. Fix this by querying GID[0] only for IB networks.

Fixes: 4e944213f7ef ('IB/core: Add subnet prefix to port info')
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/device.c