Received: by 10.223.185.116 with SMTP id b49csp1031070wrg; Wed, 21 Feb 2018 10:52:57 -0800 (PST) X-Google-Smtp-Source: AH8x226gtMo98M0bv8ZO1+DuZS8QC5hI8AL7ojMshEZ2Sp4ME9zZN/waD4fBbU4wU1+ZddMAagNf X-Received: by 2002:a17:902:a517:: with SMTP id s23-v6mr4024741plq.1.1519239177319; Wed, 21 Feb 2018 10:52:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519239177; cv=none; d=google.com; s=arc-20160816; b=rMvw+b0tgoIOaBMWdECITZLJ/KTSPtrghqhbvkwRDlCThBngwXF9WZCqxhnPCNJA6m cbbXJsz6I+iDbv1nYI2SzJFw6AqmRzOM3dUpm+8+yQAy5HIsJSbPZ+OE1PSvK8Xy86s+ dkSiJ0korXmONzpG552gwvG9mWJnlG3C64Wk90zUHTqUixQL/yW2yuySKy55UPjOwHMM aXeef0Qe+u8cgB1bok++yMq82FrV/gLhOecroUO4y9Rchlzy2yZkoHxAmf6mjs7RdiWb IO8YjKgDSvByuy98VUVKdjKFm//fVTzHIFcjAU3auX7/Cw5fLtG0LPHRLdSQzZCrCMZp c/Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=DKsUhQAO6fD3zNex/xe9Q2MNOY/13cq5FXLpUmqBCiU=; b=JFCy8zEcX+rT+fNJWOGI8iX6nVH0U2s1W48fMcKoPffk6zWUa6EbNw8XfBdVen7/k1 JltHPu9MS7ZX1+iJEwf88wk7Xapwj+lqr5l67S2iCY/8UnDz5ncuT7mCOYpVS17L/O6s pq3CmUqZhBSExH/VCa87gGRK3RUh2wdrbMI+Zdpdh0YLOEs7IuDgM5liCr5NpNmm/sFz NZxIihi6BXvbuu+Bf0Bez/4754bt87W1O7gNY6JcxuJoURW1oeUdRkrONjjso/VdZ4uj Gde5/jsljqMwFzGjlKmY3Y0AFkd62BQ1VNzGZvhVnBA6rxCYOhwkEW0vMDedMLmVVMQG 2J7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f35-v6si1349475plh.18.2018.02.21.10.52.43; Wed, 21 Feb 2018 10:52:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937705AbeBUOfM (ORCPT + 99 others); Wed, 21 Feb 2018 09:35:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:34486 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932659AbeBUMzf (ORCPT ); Wed, 21 Feb 2018 07:55:35 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B0E751180; Wed, 21 Feb 2018 12:55:34 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Michael J. Ruhl" , Mike Marciniszyn , Dennis Dalessandro , Jason Gunthorpe Subject: [PATCH 4.9 35/77] IB/qib: Fix comparison error with qperf compare/swap test Date: Wed, 21 Feb 2018 13:48:44 +0100 Message-Id: <20180221124433.654956196@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124432.172390020@linuxfoundation.org> References: <20180221124432.172390020@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mike Marciniszyn commit 87b3524cb5058fdc7c2afdb92bdb2e079661ddc4 upstream. This failure exists with qib: ver_rc_compare_swap: mismatch, sequence 2, expected 123456789abcdef, got 0 The request builder was using the incorrect inlines to build the request header resulting in incorrect data in the atomic header. Fix by using the appropriate inlines to create the request. Fixes: 261a4351844b ("IB/qib,IB/hfi: Use core common header file") Reviewed-by: Michael J. Ruhl Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/qib/qib_rc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/infiniband/hw/qib/qib_rc.c +++ b/drivers/infiniband/hw/qib/qib_rc.c @@ -443,13 +443,13 @@ no_flow_control: qp->s_state = OP(COMPARE_SWAP); put_ib_ateth_swap(wqe->atomic_wr.swap, &ohdr->u.atomic_eth); - put_ib_ateth_swap(wqe->atomic_wr.compare_add, - &ohdr->u.atomic_eth); + put_ib_ateth_compare(wqe->atomic_wr.compare_add, + &ohdr->u.atomic_eth); } else { qp->s_state = OP(FETCH_ADD); put_ib_ateth_swap(wqe->atomic_wr.compare_add, &ohdr->u.atomic_eth); - put_ib_ateth_swap(0, &ohdr->u.atomic_eth); + put_ib_ateth_compare(0, &ohdr->u.atomic_eth); } put_ib_ateth_vaddr(wqe->atomic_wr.remote_addr, &ohdr->u.atomic_eth);