Re: [PATCH v2 0/3] PCI: endpoint: Add PCI DMA endpoint function (part 3/3)

From: Niklas Cassel

Date: Mon May 25 2026 - 16:40:54 EST


On 25 May 2026 16:03:35 CEST, Koichiro Den <den@xxxxxxxxxxxxx> wrote:
>On Mon, May 25, 2026 at 10:35:46AM +0200, Niklas Cassel wrote:
>> On Mon, May 25, 2026 at 04:05:02PM +0900, Koichiro Den wrote:
>>
>> If so, but do really all endpoint controllers / endpoint controller drivers
>> support binding to multiple EPFs?
>
>No. For example, R-Car S4's PCIe controller supports multi-functions, while
>RK3588's PCIe controller seems not. So with this scheme, RK3588 would not
>support the NTB transport backed by PCI EP DMA.

I guess it depends on 'max-functions' being set in device tree or not:
https://github.com/torvalds/linux/blob/master/drivers/pci/controller/dwc/pcie-designware-ep.c#L1365-L1367

AFAICT, this value depends on how the DWC PCI controller hardware configuration.


>
>That restriction should be documented with the new NTB transport, which I will
>submit if the direction taken by this series is acceptable.

This is easy for me to say, since I am not the NTB maintainer, but it would be nice if we could somehow come up with a design where we don't only support EPCs that have 'max-functions' != 1, because IIRC, most PCI EPCs have 'max-functions' == 1.


Kind regards,
Nikla