summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2019-01-09 22:22:30 +0300
committerJon Mason <jdmason@kudzu.us>2020-06-06 03:02:08 +0300
commita9c4211ac918ade1522aced6b5acfbe824722f7d (patch)
treee7a6b3a80d3f3d1370221bfa8105b0b0b1614857 /drivers
parentca93c45755da98302c93abdd788fc09113baf9e0 (diff)
downloadlinux-a9c4211ac918ade1522aced6b5acfbe824722f7d.tar.xz
NTB: perf: Don't require one more memory window than number of peers
ntb_perf should not require more than one memory window per peer. This was probably an off-by-one error. Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Acked-by: Allen Hubbe <allenbh@gmail.com> Tested-by: Alexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers')
-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 42b8a8dea2b3..ec87a28ae239 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -654,7 +654,7 @@ static int perf_init_service(struct perf_ctx *perf)
{
u64 mask;
- if (ntb_peer_mw_count(perf->ntb) < perf->pcnt + 1) {
+ if (ntb_peer_mw_count(perf->ntb) < perf->pcnt) {
dev_err(&perf->ntb->dev, "Not enough memory windows\n");
return -EINVAL;
}