From patchwork Mon Oct 18 13:10:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Dillow X-Patchwork-Id: 261971 X-Patchwork-Delegate: dave@thedillows.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9IE0IUg014009 for ; Mon, 18 Oct 2010 14:00:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756062Ab0JROAR (ORCPT ); Mon, 18 Oct 2010 10:00:17 -0400 Received: from emroute3.ornl.gov ([160.91.4.110]:44644 "EHLO emroute3.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755903Ab0JROAQ (ORCPT ); Mon, 18 Oct 2010 10:00:16 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 18 Oct 2010 14:00:19 +0000 (UTC) X-Greylist: delayed 3133 seconds by postgrey-1.27 at vger.kernel.org; Mon, 18 Oct 2010 10:00:15 EDT Received: from emroute3.ornl.gov ([127.0.0.1]) by emroute3.ornl.gov (PMDF V6.5-x1 #31823) with ESMTP id <0LAH006FQLWZ76@emroute3.ornl.gov> for linux-rdma@vger.kernel.org; Mon, 18 Oct 2010 09:10:11 -0400 (EDT) Received: from CONVERSION-DAEMON.emroute3.ornl.gov by emroute3.ornl.gov (PMDF V6.5-x1 #31823) id <0LAH00601LWZNV@emroute3.ornl.gov>; Mon, 18 Oct 2010 09:10:11 -0400 (EDT) Received: from [160.91.210.54] (lap75545.ornl.gov [160.91.210.54]) by emroute3.ornl.gov (PMDF V6.5-x1 #31823) with ESMTP id <0LAH0063ILWZCG@emroute3.ornl.gov>; Mon, 18 Oct 2010 09:10:11 -0400 (EDT) Date: Mon, 18 Oct 2010 09:10:10 -0400 From: David Dillow Subject: Re: [PATCH 2/5] IB/srp: implement SRP_CRED_REQ and SRP_AER_REQ In-reply-to: To: Bart Van Assche Cc: "rolandd@cisco.com" , "linux-rdma@vger.kernel.org" Message-id: <1287407410.10438.46.camel@lap75545.ornl.gov> Organization: Oak Ridge National Laboratory MIME-version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit References: <1287285925-11710-1-git-send-email-dillowda@ornl.gov> <1287285925-11710-3-git-send-email-dillowda@ornl.gov> 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 9b4bc5a..cfc1d65 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1442,6 +1442,7 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) static int srp_send_tsk_mgmt(struct srp_target_port *target, struct srp_request *req, u8 func) { + struct ib_device *dev = target->srp_host->srp_dev->dev; struct srp_iu *iu; struct srp_tsk_mgmt *tsk_mgmt; @@ -1459,6 +1460,8 @@ static int srp_send_tsk_mgmt(struct srp_target_port *target, if (!iu) goto out; + ib_dma_sync_single_for_cpu(dev, iu->dma, sizeof *tsk_mgmt, + DMA_TO_DEVICE); tsk_mgmt = iu->buf; memset(tsk_mgmt, 0, sizeof *tsk_mgmt); @@ -1468,6 +1471,8 @@ static int srp_send_tsk_mgmt(struct srp_target_port *target, tsk_mgmt->tsk_mgmt_func = func; tsk_mgmt->task_tag = req->index; + ib_dma_sync_single_for_device(dev, iu->dma, sizeof *tsk_mgmt, + DMA_TO_DEVICE); if (__srp_post_send(target, iu, sizeof *tsk_mgmt)) goto out;