All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: "Saleem, Shiraz" <shiraz.saleem@intel.com>
Cc: Kamal Heib <kamalheib1@gmail.com>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"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 14:34:08 -0300	[thread overview]
Message-ID: <20191004173408.GB13988@ziepe.ca> (raw)
In-Reply-To: <9DD61F30A802C4429A01CA4200E302A7B5CD869B@fmsmsx124.amr.corp.intel.com>

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@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
> > > +++ 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?

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

      reply	other threads:[~2019-10-04 17:34 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
2019-10-04 17:34     ` Jason Gunthorpe [this message]

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=20191004173408.GB13988@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dledford@redhat.com \
    --cc=kamalheib1@gmail.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=shiraz.saleem@intel.com \
    /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.