From patchwork Thu Jan 12 19:07:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9513997 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 B0FF260762 for ; Thu, 12 Jan 2017 19:09:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1E30286DC for ; Thu, 12 Jan 2017 19:09:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 970AB28716; Thu, 12 Jan 2017 19:09:04 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, URIBL_BLACK 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 C9354286DC for ; Thu, 12 Jan 2017 19:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751167AbdALTIn (ORCPT ); Thu, 12 Jan 2017 14:08:43 -0500 Received: from mail-sn1nam01on0082.outbound.protection.outlook.com ([104.47.32.82]:44780 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750907AbdALTIK (ORCPT ); Thu, 12 Jan 2017 14:08:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HLlHm4vx1cxJvUZT/vSiBO+vl2gRnxI1nd0SbAS++2c=; b=jmayJOJCPmyNK020kBWjiCGVhqOf5BogheABujRI1V1QLilJdwWMmOo9Sjc28OITonzDiAK2LXhsKK6ZflPxYhR38mXIU+QBF3fbXzQenSq3QFUAkFKE3btghGJp1OOfbMg5TgiKIth4/bU0wA5ep1jMztd1LsEEILji7FFhjYs= Received: from BN6PR02CA0051.namprd02.prod.outlook.com (10.175.94.141) by BY2PR02MB044.namprd02.prod.outlook.com (10.242.44.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Thu, 12 Jan 2017 19:08:06 +0000 Received: from BL2FFO11FD024.protection.gbl (2a01:111:f400:7c09::136) by BN6PR02CA0051.outlook.office365.com (2603:10b6:404:f9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12 via Frontend Transport; Thu, 12 Jan 2017 19:08:07 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BL2FFO11FD024.mail.protection.outlook.com (10.173.161.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Thu, 12 Jan 2017 19:08:06 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 22.A0.65426.961D7785; Thu, 12 Jan 2017 10:56:41 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Thu, 12 Jan 2017 11:07:58 -0800 X-AuditID: 0ac94369-b62949800001ff92-eb-5877d1696934 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 7E.DF.09762.E04D7785; Thu, 12 Jan 2017 11:07:58 -0800 (PST) From: Bart Van Assche To: Doug Ledford CC: , , "Greg Kroah-Hartman" , Bart Van Assche Subject: [PATCH v2 18/26] IB/isert: Inline ib_dma_map_*() functions Date: Thu, 12 Jan 2017 11:07:10 -0800 Message-ID: <20170112190718.6728-19-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170112190718.6728-1-bart.vanassche@sandisk.com> References: <20170112190718.6728-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsXCddJ5kW7mxfIIg6mHrC1env/AatG8eD2b xeVdc9gsnh3qZXFg8dg/dw27x/t9V9k8Pm+SC2CO4rJJSc3JLEst0rdL4MpY/5uv4HN4xdKd W9gbGFd6dTFyckgImEi8bL3G1MXIxSEksJRJYt/ZVmYIZxujRE/XaUaYqtUzJ7BAJDYyStxd t5IJJMEmYCTx7f1MFhBbREBNYtOrRewgRcwCixkl2k8vYwZJCAs4S5y7doANxGYRUJX4f3YB WAOvgL3Em9WfWSA2yEvsarvICmJzAsW//b8EtllIwE5i14H/YJslBP6xSHxYNpkZollQ4uTM J2DNzAISEgdfvGCGaFCXOLlkPtMERqFZSMpmISlbwMi0ilEsNzOnODc9tcDQVK84MS8lszhb Lzk/dxMjJKQzdzDefeJ9iFGAg1GJh3eHTVmEEGtiWXFl7iFGCQ5mJRHeWefLI4R4UxIrq1KL 8uOLSnNSiw8xSnOwKInzut37EiYkkJ5YkpqdmlqQWgSTZeLglGpg9DH5f7VPKWfP0Wrd34t2 rjY9sWJyRcN0hfOyLt+e6JjNE9ite6/BzfLaTkvDY3+Skp1UJhg1LfK1s1ogsuXJnpl+xqYn XjjNrHtw7OThU+8PNF9O0k05HbYvr//rM5ZD5vbFBek78vwzTrclRvAyCgf6srLzP3636svh b7ksf3iMM73fdj9YrsRSnJFoqMVcVJwIACPLk2hlAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAJMWRmVeSWpSXmKPExsXCtZGTTZfvSnmEwan1FhYHf7YxWrw8/4HV onnxejaLy7vmsFk8O9TL4sDqsX/uGnaP9/uusnlMW3OeyePzJrkAligum5TUnMyy1CJ9uwSu jPW/+Qo+h1cs3bmFvYFxpVcXIyeHhICJxOqZE1i6GLk4hATWM0osP3aNHSTBJmAk8e39TBYQ W0RATWLTq0VgcWaBhYwSE39JgdjCAs4S564dYAOxWQRUJf6fXQBWzytgL3Hy51p2iAXyErva LrKC2JxA8W//LzGC2EICdhK7DvxnmcDIvYCRYRWjWG5mTnFuemaBoZFecWJeSmZxtl5yfu4m RkgYRO1gvD7R/BAjEwenVAPjzPvXj6bE7J56a/YGsxfWj3oK/FRsjpzeZvNZVvFPerZIc4XR wxcXjio0ZnyukV57O8Yg4slNp6JYqS+Hwmt0rQsdvSP/CcYvtVfb8+Gd+UMLXeGU6QoxT4R/ FwXf+2hx9V/EuhmFRVtf6Jf5Lzx5z6H/9UOj8zqJ623+m/3me7Tmm/DH4NVxSizFGYmGWsxF xYkAeafYZ7MBAAA= MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39450400003)(39860400002)(39840400002)(39410400002)(39850400002)(2980300002)(438002)(199003)(189002)(69596002)(4326007)(77096006)(2906002)(106466001)(76176999)(4001430100002)(6916009)(47776003)(68736007)(305945005)(50466002)(48376002)(2950100002)(110136003)(50986999)(33646002)(189998001)(54906002)(36756003)(107886002)(81156014)(6666003)(356003)(1076002)(8936002)(86362001)(8676002)(92566002)(38730400001)(50226002)(5660300001)(5003940100001)(81166006)(97736004)(626004)(2270400002)(50929005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB044; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD024; 1:nXRZlWrsIohSybvrQ2ziKGSz4pUlmhffCg+OdQATtm1e1m+lVZLRj+MqFZjPQpNV46+TxxWe8avoxfwZDb2qEPTFpc8lOiNY9jbFqL26y3z8hFK8RBaPUOh42Aq172J/8d2gg3mtRVy1/4ael8XYSw0iYE4iKZvP6mvY5QqijyRjDCd9+e9hcAdMt3zrIinzjIxsvxT0HwkcUa3p3gvk8ZNQMPzYkqraGp+jDpXEMMK8vlH015fpbzDthB8QbRkd2kix0TND3xzgmZSxvDfrurI1nf0h+VTAJ1Rns/fgrmEwNWAD6KpELWQgvN+bZu93pC/cA3I/xhrUTtqblk3injN9GNWgUBLBvTge+YbClS5G7ntYvDccxPN0it6G3fHbJQFjfmaK6UYE2mv7Kym6wuzNW2OgtQublauVbncWxEhvZ5CD+0KR5x6LtH11PgusPxV8qSQ3kpg7bX5ryEaZKw== X-MS-Office365-Filtering-Correlation-Id: 65e01a46-cd49-45be-a1a9-08d43b1e5769 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BY2PR02MB044; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB044; 3:5mERFQ1zIAUdmKqOyCVwP0x0xmq/ZzWyjTym3za0JWzoZmGyeWT0/2HS2pYycPIP5cDRW13rngDFU4Jckg6YnfyC3Kjup61OqCqadMZt1DB0vxshYmv639D11IHma7ziELPUYQK0N3OTOyUBpNWq28fqxivh60kMPaXhwKe1dI5NJ3t18hoslxQWif19ps4SgpiaKU7EQJ7c0X6czLlGwVv2WG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+nqOVfEBX+YLGL7o/61dCKc1UsFHrCeMiDS1ZvGwNW7cCC2+2aFXpQBDtY5SBIZf3MAHjeZXPNcXLlSPxDD5JB+eMMd6Qa8Zg+37zxaUGokhWnTJDTApW8DYJVmEJm54W+97KgQOv47Z2RnPakFhX+9wD/1D25sgE3UuIxzI9cjkJwQz8w80Vi4BwVIqBNvy6XjH6zsAxCSlCrihfcbzZmVzEdpdI6AhzwoDQ1FsxHvu800NA1Iok/1+7ply1VAjb4dJQKjiBlsMtaaA/6swSc6RergcmqHn0L3DtCNkcyZ2aK106AUi9wbGwQovBTippP3JK8LRn6fJp0bw+Ijc8yd9Ovd5eH5aXyrFEr/yS+v0T/qoB7OG4f0+DbuhwUEUTsZrouoFdO/BWE/qPRX96EMMBjLhklVuUiAt X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569)(235219596079481); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(10201501046)(3002001)(6055026)(2002001)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:BY2PR02MB044; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB044; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB044; 4:EcPG34DZtfHpy5Tj5eeK3shHI2H6vvi3o93dibGDX+u2dfdj2CaoUIgJJ8U2h8i1VAJlslDFOsNOEL87ONnZkkRvi6fBj5GZt0+FYDlIusinH4aIPFHY8ioQ6Z9b9FpdMgNf+DGyHqcPQdF7I5QluWweMn9nj3jdYJihPVyE8jwv78h/91nwg7cR0GWhFhHWWLZM8284oCVjH4NOV5pI7kh+gZHBf0v7/bP3osHPDCwvM8DH367qDQD+GRyz4DwGUOR7HhhDnJqDeFo8RmX2ZFXoIaBTczbJrgJznznViiYAOFoG6p49N6iVXWyW/1jlcgPRWmmJdAViFUTfTabZ41gb2IyiQkYKK1mXlJ56iRi9W3SeOcaMad7HyJbe8J+IyWFLs4RpriTUgypHCKjGKeuSJpJ+49ACo7yAu/DsXibK0nhCx0VsGXMS7DHueZYJ1NcBsaZXbQoFTIP104EOGKkM7xFBLovxcryQqIyPUmJ3qSE90G3f/VxwfYlhNpM9VEJALxj/tQibkuS4YjYG09WpRosZdyPVYAnih86clEBskqggfbE8OMK+a20jo+rnDNbQOLANxm4cK8rgtlRfyobMDITaKFVmYbW/eSW3FxS/wVtotnanW1LcSCHi9DRV1gS+czIt8BiSn8sbVhWGDBMw0ylWOD5HtLuMB68ec3N3YDpXPg4j7r9LGcUNz4p0Ahp2hG9nusaHmf9Gj09vMLtupYW7f/WaJ9cCRWKry/w= X-Forefront-PRVS: 018577E36E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR02MB044; 23:vH2Au/sTE/jEh14tW17xPOcyxTwZQi34SmcaGHbN4G?= =?us-ascii?Q?X+p46U4905CvW9hFd8kfyqaHrsqVDQ4az7WjbTLPqTgrwDQSXcbMBJNvoxpH?= =?us-ascii?Q?qMslawGw2JxWDTUj2uLjt+UckCduiAXYXJfEQM14syReInAoifCnzt1nmkxj?= =?us-ascii?Q?eDKa5DBm1Ysd3Si1T4e4TZ8PWaKYwCXBo1AWGOWwmKeDTc75Zo1KFywWeUhj?= =?us-ascii?Q?CgvtbkfFWlHlEBm7Q5pZ02OJQaD4EXMm29oJaCH+ZTDMuEJba0xvxy5ehg3b?= =?us-ascii?Q?L8MdXVk2rB+Mv1dWBtG9qkjElf+xehtzxqh9wc+o7SYyTfT0ICdZDq6kzek7?= =?us-ascii?Q?q6HIrLFfX90JjRTiZ+tvqqDsK7xVEkSUYIOp20K/wg2KwH5uB/Hq9HZJiY3W?= =?us-ascii?Q?xrPN5s70/u4CiORifYZ5kQKt+VwZ8lBb+8+eektXG+pjh13FukW/dCARUEFQ?= =?us-ascii?Q?ysIBoqt1FkTWxuhnwXO1tYQtVMTTnyA7HZ9aeHEFbTjt8Ls8seDidrtn3rD+?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XfDigCZUIcYFTuJpbitrY9Y+fVGMEXl/lzmQCst6w== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 19:08:06.0504 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB044 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 Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Acked-by: Sagi Grimberg --- drivers/infiniband/ulp/isert/ib_isert.c | 120 +++++++++++++++++--------------- 1 file changed, 63 insertions(+), 57 deletions(-) diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 314e95516068..ca919d472bd5 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -189,9 +189,10 @@ isert_alloc_rx_descriptors(struct isert_conn *isert_conn) rx_desc = isert_conn->rx_descs; for (i = 0; i < ISERT_QP_MAX_RECV_DTOS; i++, rx_desc++) { - dma_addr = ib_dma_map_single(ib_dev, (void *)rx_desc, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); - if (ib_dma_mapping_error(ib_dev, dma_addr)) + dma_addr = dma_map_single(ib_dev->dma_device, rx_desc, + ISER_RX_PAYLOAD_SIZE, + DMA_FROM_DEVICE); + if (dma_mapping_error(ib_dev->dma_device, dma_addr)) goto dma_map_fail; rx_desc->dma_addr = dma_addr; @@ -208,8 +209,8 @@ isert_alloc_rx_descriptors(struct isert_conn *isert_conn) dma_map_fail: rx_desc = isert_conn->rx_descs; for (j = 0; j < i; j++, rx_desc++) { - ib_dma_unmap_single(ib_dev, rx_desc->dma_addr, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); + dma_unmap_single(ib_dev->dma_device, rx_desc->dma_addr, + ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); } kfree(isert_conn->rx_descs); isert_conn->rx_descs = NULL; @@ -229,8 +230,8 @@ isert_free_rx_descriptors(struct isert_conn *isert_conn) rx_desc = isert_conn->rx_descs; for (i = 0; i < ISERT_QP_MAX_RECV_DTOS; i++, rx_desc++) { - ib_dma_unmap_single(ib_dev, rx_desc->dma_addr, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); + dma_unmap_single(ib_dev->dma_device, rx_desc->dma_addr, + ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); } kfree(isert_conn->rx_descs); @@ -410,13 +411,12 @@ isert_free_login_buf(struct isert_conn *isert_conn) { struct ib_device *ib_dev = isert_conn->device->ib_device; - ib_dma_unmap_single(ib_dev, isert_conn->login_rsp_dma, - ISER_RX_PAYLOAD_SIZE, DMA_TO_DEVICE); + dma_unmap_single(ib_dev->dma_device, isert_conn->login_rsp_dma, + ISER_RX_PAYLOAD_SIZE, DMA_TO_DEVICE); kfree(isert_conn->login_rsp_buf); - ib_dma_unmap_single(ib_dev, isert_conn->login_req_dma, - ISER_RX_PAYLOAD_SIZE, - DMA_FROM_DEVICE); + dma_unmap_single(ib_dev->dma_device, isert_conn->login_req_dma, + ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); kfree(isert_conn->login_req_buf); } @@ -431,10 +431,11 @@ isert_alloc_login_buf(struct isert_conn *isert_conn, if (!isert_conn->login_req_buf) return -ENOMEM; - isert_conn->login_req_dma = ib_dma_map_single(ib_dev, - isert_conn->login_req_buf, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); - ret = ib_dma_mapping_error(ib_dev, isert_conn->login_req_dma); + isert_conn->login_req_dma = dma_map_single(ib_dev->dma_device, + isert_conn->login_req_buf, + ISER_RX_PAYLOAD_SIZE, + DMA_FROM_DEVICE); + ret = dma_mapping_error(ib_dev->dma_device, isert_conn->login_req_dma); if (ret) { isert_err("login_req_dma mapping error: %d\n", ret); isert_conn->login_req_dma = 0; @@ -447,10 +448,11 @@ isert_alloc_login_buf(struct isert_conn *isert_conn, goto out_unmap_login_req_buf; } - isert_conn->login_rsp_dma = ib_dma_map_single(ib_dev, - isert_conn->login_rsp_buf, - ISER_RX_PAYLOAD_SIZE, DMA_TO_DEVICE); - ret = ib_dma_mapping_error(ib_dev, isert_conn->login_rsp_dma); + isert_conn->login_rsp_dma = dma_map_single(ib_dev->dma_device, + isert_conn->login_rsp_buf, + ISER_RX_PAYLOAD_SIZE, + DMA_TO_DEVICE); + ret = dma_mapping_error(ib_dev->dma_device, isert_conn->login_rsp_dma); if (ret) { isert_err("login_rsp_dma mapping error: %d\n", ret); isert_conn->login_rsp_dma = 0; @@ -462,8 +464,8 @@ isert_alloc_login_buf(struct isert_conn *isert_conn, out_free_login_rsp_buf: kfree(isert_conn->login_rsp_buf); out_unmap_login_req_buf: - ib_dma_unmap_single(ib_dev, isert_conn->login_req_dma, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); + dma_unmap_single(ib_dev->dma_device, isert_conn->login_req_dma, + ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); out_free_login_req_buf: kfree(isert_conn->login_req_buf); return ret; @@ -854,8 +856,8 @@ isert_login_post_send(struct isert_conn *isert_conn, struct iser_tx_desc *tx_des struct ib_send_wr send_wr, *send_wr_failed; int ret; - ib_dma_sync_single_for_device(ib_dev, tx_desc->dma_addr, - ISER_HEADERS_LEN, DMA_TO_DEVICE); + dma_sync_single_for_device(ib_dev->dma_device, tx_desc->dma_addr, + ISER_HEADERS_LEN, DMA_TO_DEVICE); tx_desc->tx_cqe.done = isert_login_send_done; @@ -881,8 +883,8 @@ isert_create_send_desc(struct isert_conn *isert_conn, struct isert_device *device = isert_conn->device; struct ib_device *ib_dev = device->ib_device; - ib_dma_sync_single_for_cpu(ib_dev, tx_desc->dma_addr, - ISER_HEADERS_LEN, DMA_TO_DEVICE); + dma_sync_single_for_cpu(ib_dev->dma_device, tx_desc->dma_addr, + ISER_HEADERS_LEN, DMA_TO_DEVICE); memset(&tx_desc->iser_header, 0, sizeof(struct iser_ctrl)); tx_desc->iser_header.flags = ISCSI_CTRL; @@ -903,10 +905,10 @@ isert_init_tx_hdrs(struct isert_conn *isert_conn, struct ib_device *ib_dev = device->ib_device; u64 dma_addr; - dma_addr = ib_dma_map_single(ib_dev, (void *)tx_desc, - ISER_HEADERS_LEN, DMA_TO_DEVICE); - if (ib_dma_mapping_error(ib_dev, dma_addr)) { - isert_err("ib_dma_mapping_error() failed\n"); + dma_addr = dma_map_single(ib_dev->dma_device, (void *)tx_desc, + ISER_HEADERS_LEN, DMA_TO_DEVICE); + if (dma_mapping_error(ib_dev->dma_device, dma_addr)) { + isert_err("dma_mapping_error() failed\n"); return -ENOMEM; } @@ -992,13 +994,15 @@ isert_put_login_tx(struct iscsi_conn *conn, struct iscsi_login *login, if (length > 0) { struct ib_sge *tx_dsg = &tx_desc->tx_sg[1]; - ib_dma_sync_single_for_cpu(ib_dev, isert_conn->login_rsp_dma, - length, DMA_TO_DEVICE); + dma_sync_single_for_cpu(ib_dev->dma_device, + isert_conn->login_rsp_dma, + length, DMA_TO_DEVICE); memcpy(isert_conn->login_rsp_buf, login->rsp_buf, length); - ib_dma_sync_single_for_device(ib_dev, isert_conn->login_rsp_dma, - length, DMA_TO_DEVICE); + dma_sync_single_for_device(ib_dev->dma_device, + isert_conn->login_rsp_dma, + length, DMA_TO_DEVICE); tx_dsg->addr = isert_conn->login_rsp_dma; tx_dsg->length = length; @@ -1397,8 +1401,8 @@ isert_recv_done(struct ib_cq *cq, struct ib_wc *wc) return; } - ib_dma_sync_single_for_cpu(ib_dev, rx_desc->dma_addr, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); + dma_sync_single_for_cpu(ib_dev->dma_device, rx_desc->dma_addr, + ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); isert_dbg("DMA: 0x%llx, iSCSI opcode: 0x%02x, ITT: 0x%08x, flags: 0x%02x dlen: %d\n", rx_desc->dma_addr, hdr->opcode, hdr->itt, hdr->flags, @@ -1432,8 +1436,8 @@ isert_recv_done(struct ib_cq *cq, struct ib_wc *wc) isert_rx_opcode(isert_conn, rx_desc, read_stag, read_va, write_stag, write_va); - ib_dma_sync_single_for_device(ib_dev, rx_desc->dma_addr, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); + dma_sync_single_for_device(ib_dev->dma_device, rx_desc->dma_addr, + ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); } static void @@ -1447,8 +1451,8 @@ isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc) return; } - ib_dma_sync_single_for_cpu(ib_dev, isert_conn->login_req_dma, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); + dma_sync_single_for_cpu(ib_dev->dma_device, isert_conn->login_req_dma, + ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); isert_conn->login_req_len = wc->byte_len - ISER_HEADERS_LEN; @@ -1463,8 +1467,9 @@ isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc) complete(&isert_conn->login_req_comp); mutex_unlock(&isert_conn->mutex); - ib_dma_sync_single_for_device(ib_dev, isert_conn->login_req_dma, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); + dma_sync_single_for_device(ib_dev->dma_device, + isert_conn->login_req_dma, + ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); } static void @@ -1571,8 +1576,8 @@ isert_unmap_tx_desc(struct iser_tx_desc *tx_desc, struct ib_device *ib_dev) { if (tx_desc->dma_addr != 0) { isert_dbg("unmap single for tx_desc->dma_addr\n"); - ib_dma_unmap_single(ib_dev, tx_desc->dma_addr, - ISER_HEADERS_LEN, DMA_TO_DEVICE); + dma_unmap_single(ib_dev->dma_device, tx_desc->dma_addr, + ISER_HEADERS_LEN, DMA_TO_DEVICE); tx_desc->dma_addr = 0; } } @@ -1583,8 +1588,8 @@ isert_completion_put(struct iser_tx_desc *tx_desc, struct isert_cmd *isert_cmd, { if (isert_cmd->pdu_buf_dma != 0) { isert_dbg("unmap single for isert_cmd->pdu_buf_dma\n"); - ib_dma_unmap_single(ib_dev, isert_cmd->pdu_buf_dma, - isert_cmd->pdu_buf_len, DMA_TO_DEVICE); + dma_unmap_single(ib_dev->dma_device, isert_cmd->pdu_buf_dma, + isert_cmd->pdu_buf_len, DMA_TO_DEVICE); isert_cmd->pdu_buf_dma = 0; } @@ -1841,10 +1846,10 @@ isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd) hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length); pdu_len = cmd->se_cmd.scsi_sense_length + padding; - isert_cmd->pdu_buf_dma = ib_dma_map_single(ib_dev, - (void *)cmd->sense_buffer, pdu_len, - DMA_TO_DEVICE); - if (ib_dma_mapping_error(ib_dev, isert_cmd->pdu_buf_dma)) + isert_cmd->pdu_buf_dma = dma_map_single(ib_dev->dma_device, + cmd->sense_buffer, + pdu_len, DMA_TO_DEVICE); + if (dma_mapping_error(ib_dev->dma_device, isert_cmd->pdu_buf_dma)) return -ENOMEM; isert_cmd->pdu_buf_len = pdu_len; @@ -1970,10 +1975,10 @@ isert_put_reject(struct iscsi_cmd *cmd, struct iscsi_conn *conn) isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); hton24(hdr->dlength, ISCSI_HDR_LEN); - isert_cmd->pdu_buf_dma = ib_dma_map_single(ib_dev, - (void *)cmd->buf_ptr, ISCSI_HDR_LEN, - DMA_TO_DEVICE); - if (ib_dma_mapping_error(ib_dev, isert_cmd->pdu_buf_dma)) + isert_cmd->pdu_buf_dma = dma_map_single(ib_dev->dma_device, + cmd->buf_ptr, ISCSI_HDR_LEN, + DMA_TO_DEVICE); + if (dma_mapping_error(ib_dev->dma_device, isert_cmd->pdu_buf_dma)) return -ENOMEM; isert_cmd->pdu_buf_len = ISCSI_HDR_LEN; tx_dsg->addr = isert_cmd->pdu_buf_dma; @@ -2013,9 +2018,10 @@ isert_put_text_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn) struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1]; void *txt_rsp_buf = cmd->buf_ptr; - isert_cmd->pdu_buf_dma = ib_dma_map_single(ib_dev, - txt_rsp_buf, txt_rsp_len, DMA_TO_DEVICE); - if (ib_dma_mapping_error(ib_dev, isert_cmd->pdu_buf_dma)) + isert_cmd->pdu_buf_dma = + dma_map_single(ib_dev->dma_device, txt_rsp_buf, + txt_rsp_len, DMA_TO_DEVICE); + if (dma_mapping_error(ib_dev->dma_device, isert_cmd->pdu_buf_dma)) return -ENOMEM; isert_cmd->pdu_buf_len = txt_rsp_len;