Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3958334pxb; Mon, 4 Oct 2021 13:41:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzH224SN9yqv9/jkEgzg7fZW2IgXy0/GE/stiphDYoTVPkU0cuz5cBBX0U1UskAUaSqv/Yj X-Received: by 2002:a05:6402:19ad:: with SMTP id o13mr21215671edz.109.1633380085389; Mon, 04 Oct 2021 13:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633380085; cv=none; d=google.com; s=arc-20160816; b=ib8s+XSDVgp+bp+WHT1HIZckOvWovf4cUGEkvZ6xgR6h8kyie8MQbe5+cYTIVvBPee dWNXQp1VVa5KfBpb6dEref+IgCqTyskAnyhapfG31oHi8mrUs/xnoKzB+5G0mNPirYMM G1PGh7WQzTXV0zZHxUjnO4xZ3RGflwVTRLivTxWrbWzOJchaO/xvX0CcMGw2RvE/71Xv AZD0VeYONvmMi9qMnnlQuHqxCrSYKtU85zTmFqmVy3tUxUYXy5IocGl8cOKfXBCxoC+t HE/hkjGTrsnAlaZPy2h1fj+hmmtrYclkeOcMo6L+sQMrJ7BtLuM3+vhQgOxAY+jIVT9Y gU8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=V35MVY3o+ZfRVSlSRqKT2obfDkQWp/XAxMQFbDjCxAk=; b=Q4UE5YGurj3vurettz70VBEP9Dtp2xpiUIiBPPnq46pso5yE3/3Zz3Bofs1Ew67Q44 9FfpvSqX1E9VmKvBZHTVXDoaNbj6g3LfnxBBl9xJUC1SuDwd2TTWZsYbExHw5+6wBYw+ NjY5zvOiZ+Fms8OQiV144K+XufVPTVqjENkhMiT/u+Oz3j+ebqb0Ou3jILx4tYnlrz7i 4P01EtCdHtfhzf1KCGgzG6gNWxFUgPNJutWR+O4rBjOrtNDJWxhU+vb9JAEZvIUBXDEh 4FVpgnznwDdFCHODqY+CFO1mTjyE5Nqzk/bTrTAy9p4KPxh7gR+1mTql7EdKUsBvcxc0 fV2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CDSII0wR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si24162924edp.348.2021.10.04.13.41.01; Mon, 04 Oct 2021 13:41:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CDSII0wR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238087AbhJDNgK (ORCPT + 99 others); Mon, 4 Oct 2021 09:36:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:48748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235521AbhJDNdt (ORCPT ); Mon, 4 Oct 2021 09:33:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD36A6322B; Mon, 4 Oct 2021 13:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353328; bh=Dqz2fXU2VULe9GyuZdsrJvNn9LGCabjeyFI4wagCxNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CDSII0wRvBmR43cgzI1S1texReVLwBzkxH4JOi+gSClRD6q1D6EiQwzbzmKEEF7uQ DerT+khrTd/A/WrdxDXU3ScUaILz+8+HQ+Ybjk6k9TU7lk/DfZPowJtse6zXcOH5wV goE9B6wo2qayUSq6PWgJ0b0DwkqmK122tm7PGEcY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sindhu Devale , Shiraz Saleem , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.14 085/172] RDMA/irdma: Report correct WC error when there are MW bind errors Date: Mon, 4 Oct 2021 14:52:15 +0200 Message-Id: <20211004125047.732077293@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sindhu Devale [ Upstream commit 9f7fa37a6bd90f2749c67f8524334c387d972eb9 ] Report the correct WC error when MW bind error related asynchronous events are generated by HW. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://lore.kernel.org/r/20210916191222.824-5-shiraz.saleem@intel.com Signed-off-by: Sindhu Devale Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/irdma/hw.c | 5 +++++ drivers/infiniband/hw/irdma/user.h | 1 + drivers/infiniband/hw/irdma/verbs.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c index cb9a8e24e3b7..7de525a5ccf8 100644 --- a/drivers/infiniband/hw/irdma/hw.c +++ b/drivers/infiniband/hw/irdma/hw.c @@ -179,6 +179,11 @@ static void irdma_set_flush_fields(struct irdma_sc_qp *qp, case IRDMA_AE_LLP_TOO_MANY_RETRIES: qp->flush_code = FLUSH_RETRY_EXC_ERR; break; + case IRDMA_AE_AMP_MWBIND_INVALID_RIGHTS: + case IRDMA_AE_AMP_MWBIND_BIND_DISABLED: + case IRDMA_AE_AMP_MWBIND_INVALID_BOUNDS: + qp->flush_code = FLUSH_MW_BIND_ERR; + break; default: qp->flush_code = FLUSH_FATAL_ERR; break; diff --git a/drivers/infiniband/hw/irdma/user.h b/drivers/infiniband/hw/irdma/user.h index 267102d1049d..3dcbb1fbf2c6 100644 --- a/drivers/infiniband/hw/irdma/user.h +++ b/drivers/infiniband/hw/irdma/user.h @@ -103,6 +103,7 @@ enum irdma_flush_opcode { FLUSH_LOC_LEN_ERR, FLUSH_FATAL_ERR, FLUSH_RETRY_EXC_ERR, + FLUSH_MW_BIND_ERR, }; enum irdma_cmpl_status { diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 3960c872ff76..fa393c5ea397 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -3360,6 +3360,8 @@ static enum ib_wc_status irdma_flush_err_to_ib_wc_status(enum irdma_flush_opcode return IB_WC_WR_FLUSH_ERR; case FLUSH_RETRY_EXC_ERR: return IB_WC_RETRY_EXC_ERR; + case FLUSH_MW_BIND_ERR: + return IB_WC_MW_BIND_ERR; case FLUSH_FATAL_ERR: default: return IB_WC_FATAL_ERR; -- 2.33.0