Received: by 10.223.185.116 with SMTP id b49csp944246wrg; Wed, 21 Feb 2018 09:24:49 -0800 (PST) X-Google-Smtp-Source: AH8x226iRkZa7g+hV9vSkUCFKEzMxA9b/+KlBnzXyi+9LouCJIVBmYZbINkuSubfts5uun35Iy+k X-Received: by 10.98.60.15 with SMTP id j15mr4011269pfa.7.1519233889022; Wed, 21 Feb 2018 09:24:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519233888; cv=none; d=google.com; s=arc-20160816; b=EiQXQo44AF6119SfS8nZ5IlvnPPyk7/v3SWDTY4hMglMccD/1LdQc4ejz3iZ7u2Vsz a3m4XgxFAkch2DzcbNHQGEIuDrGMggoRpbB1RgJ3wZmN8PhETRl3GwR2qGyrAY7uHImS w/B9OKgfqmw3rAvad4RE4XBSIH/ygZfqG1txGGp1bfwbDBgT0cmzEAnSlZEc3ypLmsNE sJXE9Jh7FR/9XHSbilLfU2kxVM11r90iW6tnRPeEK+9uFE54++fWdQqQtMr+g7yft10T BA9morJXUoh2DPjHIuICszaYHfV5A3x2wnceW/wznGPqEKzaqgkLz7loopin9Xdp57Eu GI2g== 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=WzxRa4jOFXKoz3akqAi7X+9IesgJWJLBBYeIsQdUpvs=; b=V8HpYazrYa4fXXuodmLfSqp954DcvfQf0RWM5QrBHD/Cj0v2p5ThWnKvA6V3NzmFvP 0Aemytb6i+cQ992oVdyJBrGtDWieLJ4cCvU4x6fTqAWlkTrH6av8CCBFgLurDiO1eYS7 NvI7XwWbTcoAxpHPO8ZutW55d1+bHPg6m1zP8baTdPl2XUxYL2D008cuwKb2PvA3ZhXN VfKJPB9Y947VZEvIb3IiqoK6G3qTJm+LTsWYzOIVaIpYEIFi+NV2u6gcrpEn/SUHSxOA TKP5ay0PPy+gQriiRrU29AII2qqf89Ap79X+K5T/ZIxdz5DE5bu7vQBB296t8hgmURgB qJ3g== 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 g19si763671pgn.813.2018.02.21.09.24.35; Wed, 21 Feb 2018 09:24:48 -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 S935026AbeBUM7D (ORCPT + 99 others); Wed, 21 Feb 2018 07:59:03 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36366 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935011AbeBUM7A (ORCPT ); Wed, 21 Feb 2018 07:59:00 -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 96DB0FE1; Wed, 21 Feb 2018 12:58:59 +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.14 004/167] IB/qib: Fix comparison error with qperf compare/swap test Date: Wed, 21 Feb 2018 13:46:55 +0100 Message-Id: <20180221124524.874583902@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124524.639039577@linuxfoundation.org> References: <20180221124524.639039577@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.14-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 @@ -434,13 +434,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);