From patchwork Tue Feb 5 16:52:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 10797745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F1EF13B4 for ; Tue, 5 Feb 2019 17:02:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FC2C2C708 for ; Tue, 5 Feb 2019 17:02:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 144932C702; Tue, 5 Feb 2019 17:02:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A80712C702 for ; Tue, 5 Feb 2019 17:02:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728463AbfBERCN (ORCPT ); Tue, 5 Feb 2019 12:02:13 -0500 Received: from opengridcomputing.com ([72.48.214.68]:46076 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727544AbfBERCN (ORCPT ); Tue, 5 Feb 2019 12:02:13 -0500 Received: by smtp.opengridcomputing.com (Postfix, from userid 503) id AE2C822794; Tue, 5 Feb 2019 11:02:12 -0600 (CST) Message-Id: From: Steve Wise Date: Tue, 5 Feb 2019 08:52:29 -0800 Subject: [PATCH rdma-core] cxgb4: remove update_qp_state() To: dledford@redhat.com, jgg@mellanox.com Cc: linux-rdma@vger.kernel.org Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove it because it is not needed. If we're flushing the qp, it is because we've had a fatal error, so just set the user qp state to ERR and continue on. Signed-off-by: Steve Wise --- providers/cxgb4/qp.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/providers/cxgb4/qp.c b/providers/cxgb4/qp.c index 11a411393821..fd028d5e1b7b 100644 --- a/providers/cxgb4/qp.c +++ b/providers/cxgb4/qp.c @@ -766,20 +766,6 @@ int c4iw_post_receive(struct ibv_qp *ibqp, struct ibv_recv_wr *wr, return err; } -static void update_qp_state(struct c4iw_qp *qhp) -{ - struct ibv_query_qp cmd; - struct ibv_qp_attr attr; - struct ibv_qp_init_attr iattr; - int ret; - - ret = ibv_cmd_query_qp(&qhp->ibv_qp, &attr, IBV_QP_STATE, &iattr, - &cmd, sizeof cmd); - assert(!ret); - if (!ret) - qhp->ibv_qp.state = attr.qp_state; -} - void c4iw_flush_qp(struct c4iw_qp *qhp) { struct c4iw_cq *rchp, *schp; @@ -815,7 +801,7 @@ void c4iw_flush_qp(struct c4iw_qp *qhp) if (srqidx) c4iw_flush_srqidx(qhp, srqidx); - update_qp_state(qhp); + qhp->ibv_qp.state = IBV_QPS_ERR; c4iw_flush_hw_cq(rchp, qhp); if (!qhp->srq) {