Received: by 10.223.185.116 with SMTP id b49csp721577wrg; Wed, 21 Feb 2018 05:58:22 -0800 (PST) X-Google-Smtp-Source: AH8x227nfzAUsJMuc4HBw9kuxJRVlGpeX5+ti5jx6npdkQHDcXhdJZz724v0w8eYvWNDTJQjsqD5 X-Received: by 2002:a17:902:402:: with SMTP id 2-v6mr3168242ple.353.1519221502431; Wed, 21 Feb 2018 05:58:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519221502; cv=none; d=google.com; s=arc-20160816; b=czYQ91k7qhQ8x3e/rczghF4F8GyECU4Z5RumDdnqsW1tEoUTx9+c3S7BRwq4vE4dhy Jax76CIAiz/jMev1l7gJrf5MadKYRbUIqS15CzGqrGdy8+Vg4h3p6ejN+R7hUPC+Jpta oBB9b6FVeXTQ/zJd5k+7bLPjqF7fRBzNXRhKwOfYF13061ekOsOMWodYJ4bYEK9KqJGd 6cgl0iuk6Mw/C3fOJ2H7LsjanGB8xFQcXoPZttgFEqX2QQJ0ydS+Y2do2EWmiUr1IoOc WUi/c2AS9RP/GRgs/u6vmoEDCr8nAZWstHXORyDJ8Bifxky9wGUOe1ofNDVg9dTMa6ST YfRw== 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=jnf6geqSmWqeBaocx+cVBi6uheApCGhqm1zm52cAgMo=; b=ie2BVNMQPK6eeTMNoLyLpQZjb5Nmdnd7bIEqUwrCyaQUC1/pGIG6BAgJzjqKpK5SGO sP21i2Ftw+vtUotBbstOnGC38ETyRm3s5uJTNlWpZ1l4Xj6aM92NErjxzanZgxBk2F9A iBApMHjWUVurp0F5Ib/g/4DW4ZtmIPEGxifaMT3lPiS9Yzb7udu41yraXLoe3IByd0nw /UF6YJqf0Rcf0AAKB/PGoZcSsdHhRyYxnmv+X1VHJpuIPX/xaitQYSZIwM6KxKVagxud GCtW4ztBHRy2OjzyeFM9ANAe13xvglHjUQidydp+dQqdpysYbhbVgwxPxN0m+WQM0Nfn Py1g== 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 q24si1391611pfh.90.2018.02.21.05.58.08; Wed, 21 Feb 2018 05:58:22 -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 S936046AbeBUNGW (ORCPT + 99 others); Wed, 21 Feb 2018 08:06:22 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40676 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933437AbeBUNGT (ORCPT ); Wed, 21 Feb 2018 08:06:19 -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 47CF111CE; Wed, 21 Feb 2018 13:06:18 +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.15 003/163] IB/qib: Fix comparison error with qperf compare/swap test Date: Wed, 21 Feb 2018 13:47:12 +0100 Message-Id: <20180221124530.140974532@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@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.15-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);