[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZblRXOabZWzRRWoT@x1-carbon>
Date: Tue, 30 Jan 2024 20:43:24 +0100
From: Niklas Cassel <cassel@...nel.org>
To: Frank Li <Frank.li@....com>
Cc: mani@...nel.org, allenbh@...il.com, bhelgaas@...gle.com,
dave.jiang@...el.com, imx@...ts.linux.dev, jdmason@...zu.us,
kishon@...nel.org, kw@...ux.com, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, lpieralisi@...nel.org,
ntb@...ts.linux.dev
Subject: Re: [PATCH v4 1/1] PCI: endpoint: pci-epf-vntb: Fix transfer failure
for fixed size BARs
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@...r.kernel.org
> > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
> > Signed-off-by: Frank Li <Frank.Li@....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.
Kind regards,
Niklas
Powered by blists - more mailing lists