Skip to contentSkip to conversation

iw_cxgb4: initialize ibdev.iwcm->ifname for port mapping

PATCH New Steve Wise 1 participant 1 message Apr 12, 2016

Subsystems (2)
lore
Share & tools
lore

Steve Wise

author
#0 lore raw

PATCH 1/3 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")
---
 drivers/infiniband/hw/cxgb4/provider.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/infiniband/hw/cxgb4/provider.c +2 -0
index 124682d..7574f394 100644
@@ -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)
Signature · 6 lines
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html