Received: by 10.192.165.148 with SMTP id m20csp564997imm; Wed, 25 Apr 2018 04:21:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx49vkb77GBi2zwKu6y++nGpBr10cQV6ASzGcuIbNAsM2uPD0H7gvD5kcGevhP765F6XcctLI X-Received: by 2002:a17:902:aa94:: with SMTP id d20-v6mr29737392plr.323.1524655290735; Wed, 25 Apr 2018 04:21:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524655290; cv=none; d=google.com; s=arc-20160816; b=X5ETodKn0okVDkiRQB9/RpTKyewHiiJ0US63v2/GKXaUB4m2fE1XPnJA7diGCGFl5e gyWWy8szPHzcNc+QhNMY5LC6shzwTmkTyWVWa8An2V7XEwOZ1UoagZ1ONIchpRLgEtys HamM2WHW9tUkI7RoKpDAZdcW9wKNaHKR4c9sfRK9WAi/0rXJyWCFqd2jtiS98xLMc/AM JaruS4meAf3383hIjOap0q3sF8+ubZKzfhyQzMX2gruUQQRknYkp1GqY4qynsqUOWaLl Oeak6ZZFpqAT15JQa97hfgWDS65ky4N4ilWoTU+sSvJ0E362xVsARE3pU+26qcTvxMjE ozBw== 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=6CGANYDVVNShh7Bm9VVObGWiT7qYF2N+QLHWGEZG4Po=; b=d6LlpqWoXATNWGoIobLHrRBAc/h+rWDhkkQBJWfCh5Kf2m0R9YNSceenRosCezc4tE o4Kb5IIBmvgNLOEzq4HrhEARikYx2DYyYGdTUd+VOficRRn5svJqjCJ6hP1URiIkrA7o 9X8ByF7nbLq06y2aumTZI7XDGRb6h63YiJHyDrzVPJkKDRfiRl/eikVO4bSGGrNK2k08 N8BgSL2RZkifo60Zxp5yFM3b58c5KTn2i3mS8uNDkWJBxGuvWesJ3NEW5QsKAo/DhVYk lqocAjZ+4JaMLIvfj0sfneR2ItIcvvqHckU5UUSMOHo+kxa1Vq43bkPH+vCaTEFSyuCm gdig== 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 n26si13884428pgc.677.2018.04.25.04.21.16; Wed, 25 Apr 2018 04:21:30 -0700 (PDT) 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 S1752262AbeDYLT7 (ORCPT + 99 others); Wed, 25 Apr 2018 07:19:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51980 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752953AbeDYKj4 (ORCPT ); Wed, 25 Apr 2018 06:39:56 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 92244272; Wed, 25 Apr 2018 10:39:55 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mustafa Ismail , Shiraz Saleem , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.14 035/183] i40iw: Free IEQ resources Date: Wed, 25 Apr 2018 12:34:15 +0200 Message-Id: <20180425103243.991423685@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@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: Mustafa Ismail [ Upstream commit f20d429511affab6a2a9129f46042f43e6ffe396 ] The iWARP Exception Queue (IEQ) resources are not freed when a QP is destroyed. Fix this by freeing IEQ resources when freeing QP resources. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/i40iw/i40iw_puda.c | 3 +-- drivers/infiniband/hw/i40iw/i40iw_puda.h | 1 + drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) --- a/drivers/infiniband/hw/i40iw/i40iw_puda.c +++ b/drivers/infiniband/hw/i40iw/i40iw_puda.c @@ -48,7 +48,6 @@ static void i40iw_ieq_tx_compl(struct i4 static void i40iw_ilq_putback_rcvbuf(struct i40iw_sc_qp *qp, u32 wqe_idx); static enum i40iw_status_code i40iw_puda_replenish_rq(struct i40iw_puda_rsrc *rsrc, bool initial); -static void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp); /** * i40iw_puda_get_listbuf - get buffer from puda list * @list: list to use for buffers (ILQ or IEQ) @@ -1480,7 +1479,7 @@ static void i40iw_ieq_tx_compl(struct i4 * @ieq: ieq resource * @qp: all pending fpdu buffers */ -static void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp) +void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp) { struct i40iw_puda_buf *buf; struct i40iw_pfpdu *pfpdu = &qp->pfpdu; --- a/drivers/infiniband/hw/i40iw/i40iw_puda.h +++ b/drivers/infiniband/hw/i40iw/i40iw_puda.h @@ -186,4 +186,5 @@ enum i40iw_status_code i40iw_cqp_qp_crea enum i40iw_status_code i40iw_cqp_cq_create_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_cq *cq); void i40iw_cqp_qp_destroy_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp); void i40iw_cqp_cq_destroy_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_cq *cq); +void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp); #endif --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -428,6 +428,7 @@ void i40iw_free_qp_resources(struct i40i { struct i40iw_pbl *iwpbl = &iwqp->iwpbl; + i40iw_ieq_cleanup_qp(iwdev->vsi.ieq, &iwqp->sc_qp); i40iw_dealloc_push_page(iwdev, &iwqp->sc_qp); if (qp_num) i40iw_free_resource(iwdev, iwdev->allocated_qps, qp_num);