public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] PCI endpoint test: Add support for capabilities
@ 2024-12-03  6:38 Niklas Cassel
  2024-12-03  6:38 ` [PATCH v3 1/2] PCI: endpoint: pci-epf-test: " Niklas Cassel
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Niklas Cassel @ 2024-12-03  6:38 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I
  Cc: Damien Le Moal, linux-pci, Frank Li, Niklas Cassel

Hello all,

The pci-epf-test driver recently moved to the pci_epc_mem_map() API.
This API call handle unaligned addresses seamlessly, if the EPC driver
being used has implemented the .align_addr callback.

This means that pci-epf-test no longer need any special padding to the
buffers that is allocated on the host side. (This was only done in order
to satisfy the EPC's alignment requirements.)

In fact, to test that the pci_epc_mem_map() API is working as intended,
it is important that the host side does not only provide buffers that
are nicely aligned.

However, since not all EPC drivers have implemented the .align_addr
callback, add support for capabilities in pci-epf-test, and if the
EPC driver implements the .align_addr callback, set a new
CAP_UNALIGNED_ACCESS capability. If CAP_UNALIGNED_ACCESS is set, do not
allocate overly sized buffers on the host side.

For EPC drivers that have not implemented the .align_addr callback, this
series will not introduce any functional changes.


Kind regards,
Niklas


Changes since v2:
-Picked up tags
-Changed debug print to dump the CAPS register instead of having a print
 per capability.


Niklas Cassel (2):
  PCI: endpoint: pci-epf-test: Add support for capabilities
  misc: pci_endpoint_test: Add support for capabilities

 drivers/misc/pci_endpoint_test.c              | 19 +++++++++++++++++++
 drivers/pci/endpoint/functions/pci-epf-test.c | 19 +++++++++++++++++++
 2 files changed, 38 insertions(+)

-- 
2.47.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-01-20 16:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03  6:38 [PATCH v3 0/2] PCI endpoint test: Add support for capabilities Niklas Cassel
2024-12-03  6:38 ` [PATCH v3 1/2] PCI: endpoint: pci-epf-test: " Niklas Cassel
2025-01-18 20:34   ` Bjorn Helgaas
2025-01-20 12:00     ` Niklas Cassel
2025-01-20 15:44       ` Manivannan Sadhasivam
2025-01-20 16:07         ` Niklas Cassel
2024-12-03  6:38 ` [PATCH v3 2/2] misc: pci_endpoint_test: " Niklas Cassel
2024-12-12  8:52 ` [PATCH v3 0/2] PCI endpoint test: " Niklas Cassel
2024-12-19 14:20   ` Niklas Cassel
2024-12-22 20:58 ` Krzysztof Wilczyński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox