PCI: epf-test: Fix DMA transfer completion initialization
authorDamien Le Moal <dlemoal@kernel.org>
Sat, 15 Apr 2023 02:35:28 +0000 (11:35 +0900)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 23 Jun 2023 20:00:01 +0000 (15:00 -0500)
commit4aca56f8eae8aa44867ddd6aa107e06f7613226f
tree06dfd271e278e5b48938fc298fba8b97fca3900d
parentf6ec33979e9ae7fcc2b5582bd3bfdfaa1fc98a78
PCI: epf-test: Fix DMA transfer completion initialization

Reinitialize the transfer_complete DMA transfer completion before calling
tx_submit(), to avoid seeing the DMA transfer complete before the
completion is initialized, thus potentially losing the completion
notification.

Link: https://lore.kernel.org/r/20230415023542.77601-4-dlemoal@kernel.org
Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Cc: stable@vger.kernel.org
drivers/pci/endpoint/functions/pci-epf-test.c