From patchwork Mon Nov 9 21:31:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vu Pham X-Patchwork-Id: 58839 X-Patchwork-Delegate: dave@thedillows.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA9LVYMB026063 for ; Mon, 9 Nov 2009 21:32:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754479AbZKIVbz (ORCPT ); Mon, 9 Nov 2009 16:31:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754491AbZKIVbz (ORCPT ); Mon, 9 Nov 2009 16:31:55 -0500 Received: from p02c11o142.mxlogic.net ([208.65.144.75]:43384 "EHLO p02c11o142.mxlogic.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754479AbZKIVby (ORCPT ); Mon, 9 Nov 2009 16:31:54 -0500 Received: from unknown [63.251.237.3] (EHLO mtiexch01.mti.com) by p02c11o142.mxlogic.net(mxl_mta-6.4.0-2) with ESMTP id e4a88fa4.0.177065.00-002.398218.p02c11o142.mxlogic.net (envelope-from ); Mon, 09 Nov 2009 14:32:00 -0700 (MST) X-MXL-Hash: 4af88a503449505f-59483f2fcaab74acc85e3e79bc2694e438f8b452 Received: from [10.2.1.145] ([10.2.1.145]) by mtiexch01.mti.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Nov 2009 13:35:07 -0800 Message-ID: <4AF88A4E.4040307@mellanox.com> Date: Mon, 09 Nov 2009 13:31:58 -0800 From: Vu Pham User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Linux RDMA list CC: Roland Dreier Subject: [linux-rdma][PATCH 2/6] SRP disconnects connection without wait X-OriginalArrivalTime: 09 Nov 2009 21:35:07.0656 (UTC) FILETIME=[81E89080:01CA6184] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2009110601)] X-MAIL-FROM: X-SOURCE-IP: [63.251.237.3] X-AnalysisOut: [v=1.0 c=1 a=p3dghrx78tYA:10 a=xupnbh4h0YLOHZnncC45HQ==:17 ] X-AnalysisOut: [a=CbDCq_QkAAAA:8 a=q3xu7xDuXWjfMPl-8FMA:9 a=ySnFOnxPkhJ9L4] X-AnalysisOut: [fJ3G_1otERvnoA:4 a=E3yz0KKPV6YA:10 a=RK7uVSmTU46iolEp4nAA:] X-AnalysisOut: [9 a=jpcctf8lPNcwSArs3n4A:7 a=LbzAZmWgs4rhz_LeovyJm2hePiIA:] X-AnalysisOut: [4] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 54c8fe2..dfa14de 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -415,13 +415,11 @@ static void srp_disconnect_target(struct srp_target_port *target) { /* XXX should send SRP_I_LOGOUT request */ - init_completion(&target->done); if (ib_send_cm_dreq(target->cm_id, NULL, 0)) { shost_printk(KERN_DEBUG, target->scsi_host, PFX "Sending CM DREQ failed\n"); return; } - wait_for_completion(&target->done); } static void srp_remove_work(struct work_struct *work) @@ -1301,7 +1299,6 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) shost_printk(KERN_ERR, target->scsi_host, PFX "connection closed\n"); - comp = 1; target->status = 0; break;