summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay R Mehta <sanju.mehta@amd.com>2019-02-15 04:20:30 -0500
committerJon Mason <jdmason@kudzu.us>2019-06-13 08:58:01 -0400
commitb1ee5998a5d2bb16fb2bb9a03a30a83a55012b92 (patch)
tree74e8b6b1ef5974282f2257232fc7e75c21ab6d84
parent8b2f033631c2ec735c10846030fad44f3bfdaf07 (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>
-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 5ed84376ae56..32a70b6491cd 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)
734{ 734{
735 int pidx; 735 int pidx;
736 736
737 ntb_link_disable(perf->ntb);
738
739 if (perf->cmd_send == perf_msg_cmd_send) { 737 if (perf->cmd_send == perf_msg_cmd_send) {
740 u64 inbits; 738 u64 inbits;
741 739
@@ -752,6 +750,8 @@ static void perf_disable_service(struct perf_ctx *perf)
752 750
753 for (pidx = 0; pidx < perf->pcnt; pidx++) 751 for (pidx = 0; pidx < perf->pcnt; pidx++)
754 flush_work(&perf->peers[pidx].service); 752 flush_work(&perf->peers[pidx].service);
753
754 ntb_link_disable(perf->ntb);
755} 755}
756 756
757/*============================================================================== 757/*==============================================================================