Commit b1ee5998 authored by Sanjay R Mehta's avatar Sanjay R Mehta Committed by Jon Mason

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: default avatarSanjay R Mehta <sanju.mehta@amd.com>
Acked-by: default avatarAllen Hubbe <allenbh@gmail.com>
Acked-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Acked-by: default avatarSerge Semin <fancer.lancer@gmail.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent 8b2f0336
...@@ -734,8 +734,6 @@ static void perf_disable_service(struct perf_ctx *perf) ...@@ -734,8 +734,6 @@ static void perf_disable_service(struct perf_ctx *perf)
{ {
int pidx; int pidx;
ntb_link_disable(perf->ntb);
if (perf->cmd_send == perf_msg_cmd_send) { if (perf->cmd_send == perf_msg_cmd_send) {
u64 inbits; u64 inbits;
...@@ -752,6 +750,8 @@ static void perf_disable_service(struct perf_ctx *perf) ...@@ -752,6 +750,8 @@ static void perf_disable_service(struct perf_ctx *perf)
for (pidx = 0; pidx < perf->pcnt; pidx++) for (pidx = 0; pidx < perf->pcnt; pidx++)
flush_work(&perf->peers[pidx].service); flush_work(&perf->peers[pidx].service);
ntb_link_disable(perf->ntb);
} }
/*============================================================================== /*==============================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment