]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.21/ib-qib-fix-comparison-error-with-qperf-compare-swap-test.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.14.21 / ib-qib-fix-comparison-error-with-qperf-compare-swap-test.patch
1 From 87b3524cb5058fdc7c2afdb92bdb2e079661ddc4 Mon Sep 17 00:00:00 2001
2 From: Mike Marciniszyn <mike.marciniszyn@intel.com>
3 Date: Tue, 14 Nov 2017 04:34:52 -0800
4 Subject: IB/qib: Fix comparison error with qperf compare/swap test
5
6 From: Mike Marciniszyn <mike.marciniszyn@intel.com>
7
8 commit 87b3524cb5058fdc7c2afdb92bdb2e079661ddc4 upstream.
9
10 This failure exists with qib:
11
12 ver_rc_compare_swap:
13 mismatch, sequence 2, expected 123456789abcdef, got 0
14
15 The request builder was using the incorrect inlines to
16 build the request header resulting in incorrect data
17 in the atomic header.
18
19 Fix by using the appropriate inlines to create the request.
20
21 Fixes: 261a4351844b ("IB/qib,IB/hfi: Use core common header file")
22 Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
23 Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
24 Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
25 Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27
28 ---
29 drivers/infiniband/hw/qib/qib_rc.c | 6 +++---
30 1 file changed, 3 insertions(+), 3 deletions(-)
31
32 --- a/drivers/infiniband/hw/qib/qib_rc.c
33 +++ b/drivers/infiniband/hw/qib/qib_rc.c
34 @@ -434,13 +434,13 @@ no_flow_control:
35 qp->s_state = OP(COMPARE_SWAP);
36 put_ib_ateth_swap(wqe->atomic_wr.swap,
37 &ohdr->u.atomic_eth);
38 - put_ib_ateth_swap(wqe->atomic_wr.compare_add,
39 - &ohdr->u.atomic_eth);
40 + put_ib_ateth_compare(wqe->atomic_wr.compare_add,
41 + &ohdr->u.atomic_eth);
42 } else {
43 qp->s_state = OP(FETCH_ADD);
44 put_ib_ateth_swap(wqe->atomic_wr.compare_add,
45 &ohdr->u.atomic_eth);
46 - put_ib_ateth_swap(0, &ohdr->u.atomic_eth);
47 + put_ib_ateth_compare(0, &ohdr->u.atomic_eth);
48 }
49 put_ib_ateth_vaddr(wqe->atomic_wr.remote_addr,
50 &ohdr->u.atomic_eth);