From: Sanjay R Mehta Date: Fri, 15 Feb 2019 09:20:30 +0000 (+0000) Subject: NTB: ntb_perf: Disable NTB link after clearing peer XLAT registers X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b1ee5998a5d2bb16fb2bb9a03a30a83a55012b92;p=linux.git 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 Acked-by: Allen Hubbe Acked-by: Logan Gunthorpe Acked-by: Serge Semin Signed-off-by: Jon Mason --- diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 5ed84376ae565..32a70b6491cd7 100644 --- a/drivers/ntb/test/ntb_perf.c +++ b/drivers/ntb/test/ntb_perf.c @@ -734,8 +734,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; @@ -752,6 +750,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); } /*==============================================================================