From patchwork Tue Aug 6 15:34:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vipul Pandya X-Patchwork-Id: 2839446 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 61190BF535 for ; Tue, 6 Aug 2013 15:42:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 55B5020190 for ; Tue, 6 Aug 2013 15:42:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4044520155 for ; Tue, 6 Aug 2013 15:42:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755747Ab3HFPmA (ORCPT ); Tue, 6 Aug 2013 11:42:00 -0400 Received: from stargate.chelsio.com ([67.207.112.58]:14023 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755607Ab3HFPmA (ORCPT ); Tue, 6 Aug 2013 11:42:00 -0400 Received: from maui.asicdesigners.com (maui.asicdesigners.com [10.192.180.15]) by stargate.chelsio.com (8.13.1/8.13.1) with SMTP id r76Ffvr8011155; Tue, 6 Aug 2013 08:41:57 -0700 Received: from strawberry.blr.asicdesigners.com.com ([10.193.185.96]) by maui.asicdesigners.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 6 Aug 2013 08:41:57 -0700 From: Vipul Pandya To: linux-rdma@vger.kernel.org Cc: roland@purestorage.com, divy@chelsio.com, swise@opengridcomputing.com, vipul@chelsio.com, nirranjan@chelsio.com Subject: [PATCH 8/8] RDMA/cxgb4: Issue RI.FINI before closing when entering TERM Date: Tue, 6 Aug 2013 21:04:40 +0530 Message-Id: <1375803280-7916-9-git-send-email-vipul@chelsio.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1375803280-7916-1-git-send-email-vipul@chelsio.com> References: <1375803280-7916-1-git-send-email-vipul@chelsio.com> X-OriginalArrivalTime: 06 Aug 2013 15:41:57.0540 (UTC) FILETIME=[7BE3F640:01CE92BB] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Steve Wise Signed-off-by: Steve Wise Signed-off-by: Vipul Pandya --- drivers/infiniband/hw/cxgb4/qp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 22d1f01..5829367 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -1350,9 +1350,14 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, qhp->attr.ecode = attrs->ecode; t4_set_wq_in_error(&qhp->wq); ep = qhp->ep; + disconnect = 1; if (!internal) terminate = 1; - disconnect = 1; + else { + ret = rdma_fini(rhp, qhp, ep); + if (ret) + goto err; + } c4iw_get_ep(&qhp->ep->com); break; case C4IW_QP_STATE_ERROR: