IB/cma: Fix erroneous validation of supported default GID type
authorLeon Romanovsky <leonro@mellanox.com>
Thu, 17 Aug 2017 12:50:32 +0000 (15:50 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 24 Aug 2017 20:15:32 +0000 (16:15 -0400)
commit5ab2d89b85a6c5c2d7604c9674f77a68f3d24f91
tree32297346a387dcabaf069e870d8fb3cd8f3974bd
parent732912c7386120179bf8f666febc232922e3ee17
IB/cma: Fix erroneous validation of supported default GID type

When rdma_cm is initializing a cma_device it checks if this device
supports the preferred default GID type. This check was done in a wrong way
and therefore sometimes rdma_cm is coming up with default GID type that is
not supported by the device.

Fix that by checking for supported GID type properly.

Fixes: 3c7f67d1880d ("IB/cma: Fix default RoCE type setting")
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cma.c