ntb.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Niklas Cassel <cassel@kernel.org>
Cc: mani@kernel.org, allenbh@gmail.com, bhelgaas@google.com,
	dave.jiang@intel.com, imx@lists.linux.dev, jdmason@kudzu.us,
	kishon@kernel.org, kw@linux.com, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, lpieralisi@kernel.org,
	ntb@lists.linux.dev
Subject: Re: [PATCH v4 1/1] PCI: endpoint: pci-epf-vntb: Fix transfer failure for fixed size BARs
Date: Tue, 30 Jan 2024 15:30:30 -0500	[thread overview]
Message-ID: <ZblcZnfUD7ZcEI8z@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <ZblRXOabZWzRRWoT@x1-carbon>

On Tue, Jan 30, 2024 at 08:43:24PM +0100, Niklas Cassel wrote:
> On Thu, Jan 25, 2024 at 10:33:19AM -0500, Frank Li wrote:
> > On Mon, Jan 08, 2024 at 10:10:15AM -0500, Frank Li wrote:
> > > For the inbound MEM/IO TLPs, iATU on the endpoint expects the target
> > > address to be aligned to the size of the BAR. For configurable BARs, there
> > > is no issue because both host and endpoint will know the exact size of the
> > > BAR region. But for fixed size BARs available in some controllers, if the
> > > BAR size advertised by the endpoint is not same as of the actual BAR size
> > > used in the controller, then the MEM/IO TLPs generated by the host will not
> > > be translated properly by the endpoint iATU.
> > > 
> > > So if the fixed size BARs are available in endpoint controllers, always use
> > > the actual BAR size.
> > > 
> > > This only fixes doorbell (DB) BAR. A similar fix is needed for memory map
> > > windows(MW) BARs.
> > > 
> > > Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP")
> > > Cc: stable@vger.kernel.org
> > > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > ---
> > 
> > @lpieralisi:
> > 
> > 	Could you please pick this fix patch?
> 
> 
> Hello Frank, Lorenzo, Mani,
> 
> 
> Frank, sorry for not seeing this patch earlier.
> 
> Could you please see if this series fixes your issue:
> https://lore.kernel.org/linux-pci/20240130193214.713739-1-cassel@kernel.org/T/#t
> 
> I think it is nicer since:
> 1) It doesn't add copy pasted code from pci-epf-test.c to pci-epf-vntb.c.
> 2) I would expect it to handle both the doorbell BAR and the MW BARs.

Agree! Thanks

Frank
> 
> 
> Kind regards,
> Niklas

      reply	other threads:[~2024-01-30 20:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08 15:10 [PATCH v4 1/1] PCI: endpoint: pci-epf-vntb: Fix transfer failure for fixed size BARs Frank Li
2024-01-25 15:33 ` Frank Li
2024-01-30 19:43   ` Niklas Cassel
2024-01-30 20:30     ` Frank Li [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=ZblcZnfUD7ZcEI8z@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=allenbh@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=dave.jiang@intel.com \
    --cc=imx@lists.linux.dev \
    --cc=jdmason@kudzu.us \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=ntb@lists.linux.dev \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).