linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@kudzu.us>
To: Alexander Fomichev <fomichev.ru@gmail.com>
Cc: linux-ntb <linux-ntb@googlegroups.com>,
	linux-pci@vger.kernel.org, linux@yadro.com,
	Logan Gunthorpe <logang@deltatee.com>,
	Kurt Schwemmer <kurt.schwemmer@microsemi.com>,
	Allen Hubbe <allenbh@gmail.com>,
	Dave Jiang <dave.jiang@intel.com>
Subject: Re: [PATCH RESEND] ntb_hw_switchtec: Fix ntb_mw_clear_trans returning error if size == 0
Date: Thu, 12 Mar 2020 19:39:02 -0400	[thread overview]
Message-ID: <CAPoiz9wAFfxSNh8MZo3N4hxJ9VMbF7qcx2SOOgq_1NDN=iVVQQ@mail.gmail.com> (raw)
In-Reply-To: <20200303123223.i3fvwfmbhklfq2l5@yadro.com>

On Tue, Mar 3, 2020 at 7:32 AM Alexander Fomichev <fomichev.ru@gmail.com> wrote:
>
> Ping?

Sorry, I missed this somehow  :(

I just pulled it in and it should be in my github tree in the next hour or so.

Thanks,
Jon

>
> CC: Jon Mason <jdmason@kudzu.us>
> CC: Dave Jiang <dave.jiang@intel.com>
> CC: Allen Hubbe <allenbh@gmail.com>
> CC: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
> CC: Logan Gunthorpe <logang@deltatee.com>
>
> On Wed, Jan 22, 2020 at 04:15:13PM +0300, Alexander Fomichev wrote:
> > Somehow this patch was lost. The problem is still actual.
> > Please, add to upstream.
> >
> > On Wed, Jul 10, 2019 at 11:44:27AM +0300, Alexander Fomichev wrote:
> > > ntb_mw_set_trans should work as ntb_mw_clear_trans when size == 0 and/or
> > > addr == 0. But error in xlate_pos checking condition prevents this.
> > > Fix the condition to make ntb_mw_clear_trans working.
> > >
> > > Signed-off-by: Alexander Fomichev <fomichev.ru@gmail.com>
> > > Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
> > > ---
> > >  drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
> > > index 1e2f627d3bac..19d46af19650 100644
> > > --- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
> > > +++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
> > > @@ -299,7 +299,7 @@ static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx,
> > >     if (widx >= switchtec_ntb_mw_count(ntb, pidx))
> > >             return -EINVAL;
> > >
> > > -   if (xlate_pos < 12)
> > > +   if (size != 0 && xlate_pos < 12)
> > >             return -EINVAL;
> > >
> > >     if (!IS_ALIGNED(addr, BIT_ULL(xlate_pos))) {
> > > --
> > > 2.17.1
> >
> > --
> > Regards,
> >   Alexander

  reply	other threads:[~2020-03-12 23:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10  8:44 [PATCH RESEND] ntb_hw_switchtec: Fix ntb_mw_clear_trans returning error if size == 0 Alexander Fomichev
2020-01-22 13:15 ` Alexander Fomichev
2020-03-03 12:32   ` Alexander Fomichev
2020-03-12 23:39     ` Jon Mason [this message]
2020-03-13  8:17       ` Alexander Fomichev

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='CAPoiz9wAFfxSNh8MZo3N4hxJ9VMbF7qcx2SOOgq_1NDN=iVVQQ@mail.gmail.com' \
    --to=jdmason@kudzu.us \
    --cc=allenbh@gmail.com \
    --cc=dave.jiang@intel.com \
    --cc=fomichev.ru@gmail.com \
    --cc=kurt.schwemmer@microsemi.com \
    --cc=linux-ntb@googlegroups.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=logang@deltatee.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).