From patchwork Mon Jun 13 06:53:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 9176371 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4441D6021C for ; Tue, 14 Jun 2016 17:53:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A09E2656B for ; Tue, 14 Jun 2016 17:53:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E97028236; Tue, 14 Jun 2016 17:53:36 +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=-5.6 required=2.0 tests=BAYES_00, DATE_IN_PAST_24_48, 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 CF73D2656B for ; Tue, 14 Jun 2016 17:53:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752502AbcFNRxe (ORCPT ); Tue, 14 Jun 2016 13:53:34 -0400 Received: from smtp.opengridcomputing.com ([72.48.136.20]:41868 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbcFNRxe (ORCPT ); Tue, 14 Jun 2016 13:53:34 -0400 Received: from smtp.ogc.us (build2.ogc.int [10.10.0.32]) by smtp.opengridcomputing.com (Postfix) with ESMTP id 9A68129E7B; Tue, 14 Jun 2016 12:53:33 -0500 (CDT) Received: by smtp.ogc.us (Postfix, from userid 503) id 853CCE0753; Tue, 14 Jun 2016 12:53:33 -0500 (CDT) From: Steve Wise Date: Sun, 12 Jun 2016 23:53:17 -0700 Subject: [PATCH] nvme-rdma: don't use IB-CM status code in reject path To: Christoph Hellwig Cc: linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, Sagi Grimberg Message-Id: <20160614175333.853CCE0753@smtp.ogc.us> 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 Instead, check the private data length to determine if there is private data in the reject. Signed-off-by: Steve Wise --- drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 7506431..e1205c0 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1208,7 +1208,7 @@ out_destroy_queue_ib: static int nvme_rdma_conn_rejected(struct nvme_rdma_queue *queue, struct rdma_cm_event *ev) { - if (ev->status == IB_CM_REJ_CONSUMER_DEFINED) { + if (ev->param.conn.private_data_len) { struct nvme_rdma_cm_rej *rej = (struct nvme_rdma_cm_rej *)ev->param.conn.private_data;