]> git.baikalelectronics.ru Git - kernel.git/commit
NTB: perf: Fix race condition when run with ntb_test
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 9 Jan 2019 19:22:32 +0000 (12:22 -0700)
committerJon Mason <jdmason@kudzu.us>
Sat, 6 Jun 2020 00:02:09 +0000 (20:02 -0400)
commit4db2f83e3c72247bcf03507d84961d4260f50c45
treef179c45744e4bd503aa59e0b00ee0c2a25c2003c
parentddc9846cd00cdcc69a417ccd8e6eefdfae07dc16
NTB: perf: Fix race condition when run with ntb_test

When running ntb_test, the script tries to run the ntb_perf test
immediately after probing the modules. Since adding multi-port support,
this fails seeing the new initialization procedure in ntb_perf
can not complete instantly.

To fix this we add a completion which is waited on when a test is
started. In this way, run can be written any time after the module is
loaded and it will wait for the initialization to complete instead of
sending an error.

Fixes: 0b3ef3801f3f ("NTB: ntb_perf: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Allen Hubbe <allenbh@gmail.com>
Tested-by: Alexander Fomichev <fomichev.ru@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/test/ntb_perf.c