]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: endpoint: pci-epf-test: Fix check for DMA MEMCPY test
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 16 Jan 2025 17:16:47 +0000 (22:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:04 +0000 (10:02 +0100)
commit110751f28f53e58d7fac52f57e01bf058d4e4068
treed2c2446093fbdc771fe8a3ba5e2957c4bcbc0720
parent02f2ba5c1e684c2ba13c378bec592dccca3eba8b
PCI: endpoint: pci-epf-test: Fix check for DMA MEMCPY test

[ Upstream commit 235c2b197a8de2887f13990094a3343d2392155b ]

Currently, if DMA MEMCPY test is requested by the host, and if the endpoint
DMA controller supports DMA_PRIVATE, the test will fail. This is not
correct since there is no check for DMA_MEMCPY capability and the DMA
controller can support both DMA_PRIVATE and DMA_MEMCPY.

Fix the check and also reword the error message.

Link: https://lore.kernel.org/r/20250116171650.33585-2-manivannan.sadhasivam@linaro.org
Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
Reported-by: Niklas Cassel <cassel@kernel.org>
Closes: https://lore.kernel.org/linux-pci/Z3QtEihbiKIGogWA@ryzen
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/endpoint/functions/pci-epf-test.c