summaryrefslogtreecommitdiff
path: root/drivers/ntb
diff options
context:
space:
mode:
authorSanjay R Mehta <sanju.mehta@amd.com>2019-02-15 09:20:30 +0000
committerJon Mason <jdmason@kudzu.us>2019-03-20 13:53:36 -0400
commitbeb9fb8eefc41afdaa5e185872dd48754070cd91 (patch)
tree40be86eb02619f773892f6cacce68368a21172e8 /drivers/ntb
parentc780b663d91f3a06e869c197e08f165fcffe8f7d (diff)
NTB: ntb_perf: Disable NTB link after clearing peer XLAT registers
If ntb link disabled before clearing peer's XLAT register, the clearing won't have any effect since the link is already down. So modified the sequence so that the link is down only towards the end of the function after clearing the XLAT register Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Acked-by: Allen Hubbe <allenbh@gmail.com> Acked-by: Logan Gunthorpe <logang@deltatee.com> Acked-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb')
-rw-r--r--drivers/ntb/test/ntb_perf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index a828d0e64c47..4a3fba4d87e4 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -737,8 +737,6 @@ static void perf_disable_service(struct perf_ctx *perf)
{
int pidx;
- ntb_link_disable(perf->ntb);
-
if (perf->cmd_send == perf_msg_cmd_send) {
u64 inbits;
@@ -755,6 +753,8 @@ static void perf_disable_service(struct perf_ctx *perf)
for (pidx = 0; pidx < perf->pcnt; pidx++)
flush_work(&perf->peers[pidx].service);
+
+ ntb_link_disable(perf->ntb);
}
/*==============================================================================