summaryrefslogtreecommitdiff
path: root/drivers/ntb/test
diff options
context:
space:
mode:
authorSanjay R Mehta <sanju.mehta@amd.com>2019-03-29 14:32:50 +0300
committerJon Mason <jdmason@kudzu.us>2019-09-24 00:20:27 +0300
commitae89339b08f3fe02457ec9edd512ddc3d246d0f8 (patch)
tree58a4c012a925cebe47c7e44416da18a5f8dabf1e /drivers/ntb/test
parent4d856f72c10ecb060868ed10ff1b1453943fc6c8 (diff)
downloadlinux-ae89339b08f3fe02457ec9edd512ddc3d246d0f8.tar.xz
ntb: point to right memory window index
second parameter of ntb_peer_mw_get_addr is pointing to wrong memory window index by passing "peer gidx" instead of "local gidx". For ex, "local gidx" value is '0' and "peer gidx" value is '1', then on peer side ntb_mw_set_trans() api is used as below with gidx pointing to local side gidx which is '0', so memroy window '0' is chosen and XLAT '0' will be programmed by peer side. ntb_mw_set_trans(perf->ntb, peer->pidx, peer->gidx, peer->inbuf_xlat, peer->inbuf_size); Now, on local side ntb_peer_mw_get_addr() is been used as below with gidx pointing to "peer gidx" which is '1', so pointing to memory window '1' instead of memory window '0'. ntb_peer_mw_get_addr(perf->ntb, peer->gidx, &phys_addr, &peer->outbuf_size); So this patch pass "local gidx" as parameter to ntb_peer_mw_get_addr(). Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb/test')
-rw-r--r--drivers/ntb/test/ntb_perf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index d028331558ea..e9b7c2dfc730 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -1378,7 +1378,7 @@ static int perf_setup_peer_mw(struct perf_peer *peer)
int ret;
/* Get outbound MW parameters and map it */
- ret = ntb_peer_mw_get_addr(perf->ntb, peer->gidx, &phys_addr,
+ ret = ntb_peer_mw_get_addr(perf->ntb, perf->gidx, &phys_addr,
&peer->outbuf_size);
if (ret)
return ret;