summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com.com>2016-04-12 06:54:54 -0700
committerDoug Ledford <dledford@redhat.com>2016-04-26 12:46:54 -0400
commit851d7b6b8a954b28f85e62a53cbba472907e21e4 (patch)
tree645c9102aad810f519028787269f8b17d7d8051d
parent42235f80ab205bf5020cf33cb3e94455410abe36 (diff)
downloadlinux-851d7b6b8a954b28f85e62a53cbba472907e21e4.tar.gz
linux-851d7b6b8a954b28f85e62a53cbba472907e21e4.tar.bz2
linux-851d7b6b8a954b28f85e62a53cbba472907e21e4.zip
iw_cxgb4: initialize ibdev.iwcm->ifname for port mapping
The IWCM uses ibdev.iwcm->ifname for registration with the iwarp port map daemon. But iw_cxgb4 did not initialize this field which causes intermittent registration failures based on the contents of the uninitialized memory. Fixes: 170003c894d9 ("iw_cxgb4: remove port mapper related code") Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/hw/cxgb4/provider.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c
index 124682dc5709..7574f394fdac 100644
--- a/drivers/infiniband/hw/cxgb4/provider.c
+++ b/drivers/infiniband/hw/cxgb4/provider.c
@@ -580,6 +580,8 @@ int c4iw_register_device(struct c4iw_dev *dev)
dev->ibdev.iwcm->add_ref = c4iw_qp_add_ref;
dev->ibdev.iwcm->rem_ref = c4iw_qp_rem_ref;
dev->ibdev.iwcm->get_qp = c4iw_get_qp;
+ memcpy(dev->ibdev.iwcm->ifname, dev->rdev.lldi.ports[0]->name,
+ sizeof(dev->ibdev.iwcm->ifname));
ret = ib_register_device(&dev->ibdev, NULL);
if (ret)