All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Saleem, Shiraz" <shiraz.saleem@intel.com>
To: Kamal Heib <kamalheib1@gmail.com>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: RE: [PATCH for-5.4] RDMA/i40iw: Associate ibdev to netdev before IB device registration
Date: Fri, 4 Oct 2019 16:00:13 +0000	[thread overview]
Message-ID: <9DD61F30A802C4429A01CA4200E302A7B5CD869B@fmsmsx124.amr.corp.intel.com> (raw)
In-Reply-To: <327441aa-3991-b55b-aa71-7deff4ad6ed2@gmail.com>

> 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@intel.com>
> >
> > 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@intel.com>
> > ---
> >  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
> > --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> > +++ 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@gmail.com>

Hi Jason or Doug - This was a regression introduced in 5.4 which breaks i40iw. Can you pick this up for 5.4-rc?

Shiraz

  reply	other threads:[~2019-10-04 16:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 16:45 [PATCH for-5.4] RDMA/i40iw: Associate ibdev to netdev before IB device registration Shiraz Saleem
2019-09-25 18:50 ` Kamal Heib
2019-10-04 16:00   ` Saleem, Shiraz [this message]
2019-10-04 17:34     ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9DD61F30A802C4429A01CA4200E302A7B5CD869B@fmsmsx124.amr.corp.intel.com \
    --to=shiraz.saleem@intel.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=kamalheib1@gmail.com \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.