IB/cma: Fix RDMA port validation for iWarp
authorMatan Barak <matanb@mellanox.com>
Thu, 7 Jan 2016 09:19:29 +0000 (11:19 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 19 Jan 2016 18:33:47 +0000 (13:33 -0500)
commit649367735ee5dedb128d9fac0b86ba7e0fe7ae3b
tree2f8ea043dc286fd69b796a6c90bd9d2cb6638e1c
parent09dc9cd6528f5b52bcbd3292a6312e762c85260f
IB/cma: Fix RDMA port validation for iWarp

cma_validate_port wrongly assumed that Ethernet devices are RoCE
devices and thus their ndev should be matched in the GID table.
This broke the iWarp support. Fixing that matching the ndev only if
we work on a RoCE port.

Cc: <stable@vger.kernel.org> # 4.4.x-
Fixes: abae1b71dd37 ('IB/cma: cma_validate_port should verify the port
     and netdevice')
Reported-by: Hariprasad Shenai <hariprasad@chelsio.com>
Tested-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cma.c