iw_cxgb4: initialize ibdev.iwcm->ifname for port mapping
Subsystems (2)
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")
Signed-off-by Steve Wise <[email protected]>
--- drivers/infiniband/hw/cxgb4/provider.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/infiniband/hw/cxgb4/provider.c +2 -0
@@ -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