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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jul 2023 11:49:36 +0000 (13:49 +0200)
commitbcd276f1431e058bafcbb5a85cc0034607f9db1b
tree3af2c319c399c747e379c5f5d9060f36c7f225f4
parentcf0d7b72707dcaa21e4c685721072d1234a87162
PCI: epf-test: Fix DMA transfer completion initialization

commit 4aca56f8eae8aa44867ddd6aa107e06f7613226f upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/endpoint/functions/pci-epf-test.c