Skip to content

Commit

Permalink
IB/core: Search GID only for IB link layer
Browse files Browse the repository at this point in the history
Even though API is only used by IPoIB driver, its incorrect to refer
RoCE GID table property to search for GID.

Look for only IB link layer to search for the GID.

Fixes: dbb1256 ("IB/{core, ipoib}: Simplify ib_find_gid to search only for IB link layer")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Parav Pandit authored and Jason Gunthorpe committed Mar 27, 2018
1 parent 4ab7cb4 commit 22d24f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ int ib_find_gid(struct ib_device *device, union ib_gid *gid,
int ret, port, i;

for (port = rdma_start_port(device); port <= rdma_end_port(device); ++port) {
if (rdma_cap_roce_gid_table(device, port))
if (!rdma_protocol_ib(device, port))
continue;

for (i = 0; i < device->port_immutable[port].gid_tbl_len; ++i) {
Expand Down

0 comments on commit 22d24f7

Please sign in to comment.