On Fri, Oct 04, 2019 at 04:00:13PM +0000, Saleem, Shiraz wrote: > > Subject: Re: [PATCH for-5.4] RDMA/i40iw: Associate ibdev to netdev before IB > > device registration > > > > > > > > On 9/25/19 7:45 PM, Shiraz Saleem wrote: > > > From: "Shiraz, Saleem" <shiraz.saleem@xxxxxxxxx> > > > > > > i40iw IB device registration fails with ENODEV. > > > > > > ib_register_device > > > setup_device/setup_port_data > > > i40iw_port_immutable > > > ib_query_port > > > iw_query_port > > > ib_device_get_netdev(ENODEV) > > > > > > ib_device_get_netdev() does not have a netdev associated with the > > > ibdev and thus fails. > > > Use ib_device_set_netdev() to associate netdev to ibdev in i40iw > > > before IB device registration. > > > > > > Fixes: 4929116bdf72 ("RDMA/core: Add common iWARP query port") > > > Signed-off-by: Shiraz, Saleem <shiraz.saleem@xxxxxxxxx> > > > drivers/infiniband/hw/i40iw/i40iw_verbs.c | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c > > > b/drivers/infiniband/hw/i40iw/i40iw_verbs.c > > > index 8056930..cd9ee166 100644 > > > +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c > > > @@ -2773,6 +2773,10 @@ int i40iw_register_rdma_device(struct i40iw_device > > *iwdev) > > > return -ENOMEM; > > > iwibdev = iwdev->iwibdev; > > > rdma_set_device_sysfs_group(&iwibdev->ibdev, &i40iw_attr_group); > > > + ret = ib_device_set_netdev(&iwibdev->ibdev, iwdev->netdev, 1); > > > + if (ret) > > > + goto error; > > > + > > > ret = ib_register_device(&iwibdev->ibdev, "i40iw%d"); > > > if (ret) > > > goto error; > > > > > > > Thanks! > > > > Reviewed-by: Kamal Heib <kamalheib1@xxxxxxxxx> > > Hi Jason or Doug - This was a regression introduced in 5.4 which > breaks i40iw. Can you pick this up for 5.4-rc? I was going to complain that this shouldn't have been done without also deleting i40iw_find_netdev(), but it seems that is doing something else. Ok applied to for-rc Jason