From patchwork Thu Jan 12 19:07:09 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: 9514045 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 626E3601E7 for ; Thu, 12 Jan 2017 19:12:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 538AF286DB for ; Thu, 12 Jan 2017 19:12:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 485DE2870C; Thu, 12 Jan 2017 19:12: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=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,URIBL_BLACK autolearn=unavailable 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 81CE7286DB for ; Thu, 12 Jan 2017 19:12:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751318AbdALTLc (ORCPT ); Thu, 12 Jan 2017 14:11:32 -0500 Received: from mail-dm3nam03on0054.outbound.protection.outlook.com ([104.47.41.54]:56639 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751031AbdALTIQ (ORCPT ); Thu, 12 Jan 2017 14:08:16 -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=8zrvq4vbDyt1eBUZaVowkvIHhoO75EGtPRbcxELXQOk=; b=RsC3eGdJJL0M/X/2OEvTz3lPYkBEsrgLTNcPI1RnDzd4tXwma3YSFF6FufYjEhRmAmuvsmJr9t3sgrBc7EoMutC4L9JrPtzEygK16O5+RKWZiAwT/CYir1bYsGfeY7pnSctka9YQu1gfVIsdc/GYFliGmk1G0jNoxy/+3lS3jBQ= Received: from BN6PR02CA0036.namprd02.prod.outlook.com (10.173.146.150) by SN1PR02MB1423.namprd02.prod.outlook.com (10.162.0.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:07 +0000 Received: from BN1AFFO11FD005.protection.gbl (2a01:111:f400:7c10::106) by BN6PR02CA0036.outlook.office365.com (2603:10b6:404:5f::22) 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.225) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BN1AFFO11FD005.mail.protection.outlook.com (10.58.52.65) 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:05 +0000 Received: from MILHUBIP03.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.7B.01420.5F1D7785; Thu, 12 Jan 2017 10:59:01 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Thu, 12 Jan 2017 11:07:58 -0800 X-AuditID: 0ac94371-7ee9b9800001058c-cd-5877d1f5b7be Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 1E.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 17/26] IB/iser: Inline ib_dma_map_*() functions Date: Thu, 12 Jan 2017 11:07:09 -0800 Message-ID: <20170112190718.6728-18-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+NgFrrALMWRmVeSWpSXmKPExsXCddJ5ke7Xi+URBuf+yVu8PP+B1aJ58Xo2 i8u75rBZPDvUy+LA4rF/7hp2j/f7rrJ5fN4kF8AcxWWTkpqTWZZapG+XwJXx/n52waWYimV3 2pgaGD/7djFyckgImEi8XdDHCmILCSxlknj9xrWLkQvI3sEoMXvBSiaYogmLnjFBFG1klHg0 yw7EZhMwkvj2fiYLiC0ioCax6dUidpBmZoHFjBLtp5cxgySEBZwk9r9ezAhiswioSsz8so8d xOYVsJc49KqREWKBvMSutotgV3ACxb/9v8QIscxOYteB/ywgQyUE/rFIvJw7kxmiWVDi5Mwn YJuZBSQkDr54wQzRoC5xcsl8pgmMQrOQlM1CUraAkWkVo1huZk5xbnpqgaGJXnFiXkpmcbZe cn7uJkZIOBfuYHx92/sQowAHoxIP7w6bsggh1sSy4srcQ4wSHMxKIryzzpdHCPGmJFZWpRbl xxeV5qQWH2KU5mBREue9GP0xTEggPbEkNTs1tSC1CCbLxMEp1cDIZrUx36BuuW9pelRjuca0 xrTCTRppp+9ZaneYMM8u7b3K83PO967/wucN9W22ni1/3sGxQHnJLu9l7Bn7EkU1i2adNS64 VFNVmtbKVH/EnmmnVsCBP9ceaBSedTnxONv/qGNs9ZzYuG2yx53N1u0q+qufJcJx3Djq9sTS HPcNDy7cdUsJ+arEUpyRaKjFXFScCAADC5U2YwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAJMWRmVeSWpSXmKPExsXCtZGTTZfvSnmEwcR3ZhYHf7YxWrw8/4HV onnxejaLy7vmsFk8O9TL4sDqsX/uGnaP9/uusnlMW3OeyePzJrkAligum5TUnMyy1CJ9uwSu jPf3swsuxVQsu9PG1MD42beLkZNDQsBEYsKiZ0xdjFwcQgLrGSUubL7IDJJgEzCS+PZ+JguI LSKgJrHp1SJ2EJtZYCGjxMRfUiC2sICTxP7XixlBbBYBVYmZX/aB1fAK2EvsPLyTDWKBvMSu tousIDYnUPzb/0tg9UICdhK7DvxnmcDIvYCRYRWjWG5mTnFuemaBoZFecWJeSmZxtl5yfu4m RkgYRO1gvD7R/BAjEwenVANj2PPZX84dWFQZyNufIJPrcX3t8Q3p1syfLk1VEG779vSk3P4N LGlKCcWl2Sy6byrc91yUipFU16is8Ho2pdH0Z++7F5POXxAXOunb07ecYQ6ztUj3DoMNMcqR yrLa23pruLeHbvZg+XU+jFHxdJHoyQS3f8mrjz5b8eVW64sg3sOltovFXiQrsRRnJBpqMRcV JwIAz//UlrMBAAA= MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39860400002)(39450400003)(39850400002)(39840400002)(39410400002)(2980300002)(438002)(189002)(199003)(2906002)(356003)(4326007)(97736004)(69596002)(8676002)(4001430100002)(5003940100001)(36756003)(107886002)(50986999)(8936002)(76176999)(81166006)(81156014)(189998001)(626004)(1076002)(6666003)(305945005)(5660300001)(50226002)(68736007)(47776003)(86362001)(106466001)(92566002)(2270400002)(38730400001)(6916009)(2950100002)(33646002)(110136003)(50466002)(48376002)(54906002)(77096006)(50929005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR02MB1423; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD005; 1:PKvmQqlKz6656xw09rEYgQ8kgwAmlHwJjrxh1d1IUkNjDjzXIykLC9zGiDml2Ksi/pL/fhCeLdlMc+ZTVAedrCiMAqpilhxe31QHM3LdROG/k3ILXtwq9HYnH1F/ASlChP7G3cTmE/Zb2O1uWo1ZfivMwI9eGABqNcaszgl/Nm35OwlPZZdfYDWbwn1O+PAAT8LgpFcKtWVvEE62lrVlhaDCA6S5v7EERAc5w/AZ09BWgzgUs5kaQ2b3Kk7FdhPfYYBRNYx7E4CkRMBiK15jqxoZJDZS+ED0eaQRaG18kff7b88vWMe8qjkPZD3CqdC6Ba1TSyMIWVPJi68wzfxDqndxxdwqKzpKX0CJFQldwJvv9U/1UIJXBjBxoo7CgN8XefLuAMWvoUWmjnRmmDCjVppz1/eL1hybO8pzsPIEldni8NoB+gdHe2PrPddvxH5dOqgt6m+5iM5vlLAvZvcz6CQ2usTRN62iIy2c+W69qH9pBfqNeAHhfgDWN3BtzCXU X-MS-Office365-Filtering-Correlation-Id: 5b173659-ff6a-47c9-0f70-08d43b1e576f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:SN1PR02MB1423; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1423; 3:8E5ShSjNOpymicW42os14mK8aBKkJqafDJCkBjhJcliuN2N94mIhY+TtjREZhwpOI/7i1ud3P+M92FJ6VPLu4SiL//1w+jkGkKLWbuML6Nmd77JE+FPoiEiIUy54/+3z+3VgVu6dRAqR1IecKO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JImWkTp4XsONoTJRWhbHUSPqb/fHEqJ15mEsp8nswNL4QdTDtyq53xAIi/P3d7DkQtP5w0Jr33fvQkNZfCXSM6e5lnhnXqwv+9m6tTO/6WUUh5sE2EyZB01aP+7pj2CT/SfFRK03pX77XfZSayN+6d1FbYxo3COqg6MpoIVJox05x6PtHkK8Tsjr6MfMgm8TbxdNr2055nqfjEXNtNjDGz3A6Xt7eyGvbg3XOtHC8XDVuK0iFV5i73ya29n2E5VZHx0hlTttjINBhDV36Tm/28QARzuFJaboIZskUFl9nDBGcUq7LCz5XNWQEQj7bxsp7zRrjiEjvlS0Mzmf47pqBXtpEFnBUTbZW7FDGiw62l/Z+ykmqxen9y9n5hLwAC9fA2tmHTLK7nxWXRvfT5pHI+jfOhX2NxLgrurQ0SeFx5fP56C/T4Zz1PMQsqXByL2VdHC0xv8tGAtIVf1HVBpWifZMD6AsnP7KgvbXue X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(235219596079481)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(2002001)(6041248)(20161123560025)(20161123558021)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:SN1PR02MB1423; BCL:0; PCL:0; RULEID:; SRVR:SN1PR02MB1423; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1423; 4:rE8VkK4zKfnGXIopOtOw/bk0LVALN+DmPqr5TInBLS6ut929RlWXq1CeamxMAWeexTiDWFEgBdvhYWRsd3w0oClPueeQ24IM5OkO6shEDTBgRJ09RbqZ49eh0tjW9s6hYdkTfyIMHpBnogu+wlAD0UPiqOaeFOluIpS0aW3z8UURpuI4GIe8ept89Z3QYEZZN/Vl+P7QXzqGXK0o0tayixj/JPLMNsQVD1fbvjobtyf1cVCj2FUpR9i50b8kumyEyAkh72n7AaC+7CjM63bYCB3+GtiHViXwY/rjaqUl2GBp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gbzu1+kRjOvottp+hiLiIOxM3ejNk/C+MU6kxQwNgCMC4pDKRXW14WmNTfepzia5IUxBxRnuB8mMgZm5Y7qSTbUz8B6j8fyFJTHWo5lZhwtbVTCvFu4Rw== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 19:08:05.8208 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR02MB1423 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/iser/iscsi_iser.c | 11 ++-- drivers/infiniband/ulp/iser/iser_initiator.c | 88 +++++++++++++++------------- drivers/infiniband/ulp/iser/iser_memory.c | 13 ++-- drivers/infiniband/ulp/iser/iser_verbs.c | 6 +- 4 files changed, 62 insertions(+), 56 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 9104e6b8cac9..08a6875711b2 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -198,9 +198,9 @@ iser_initialize_task_headers(struct iscsi_task *task, goto out; } - dma_addr = ib_dma_map_single(device->ib_device, (void *)tx_desc, - ISER_HEADERS_LEN, DMA_TO_DEVICE); - if (ib_dma_mapping_error(device->ib_device, dma_addr)) { + dma_addr = dma_map_single(device->ib_device->dma_device, tx_desc, + ISER_HEADERS_LEN, DMA_TO_DEVICE); + if (dma_mapping_error(device->ib_device->dma_device, dma_addr)) { ret = -ENOMEM; goto out; } @@ -375,8 +375,9 @@ static void iscsi_iser_cleanup_task(struct iscsi_task *task) return; if (likely(tx_desc->mapped)) { - ib_dma_unmap_single(device->ib_device, tx_desc->dma_addr, - ISER_HEADERS_LEN, DMA_TO_DEVICE); + dma_unmap_single(device->ib_device->dma_device, + tx_desc->dma_addr, ISER_HEADERS_LEN, + DMA_TO_DEVICE); tx_desc->mapped = false; } diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 81ae2e30dd12..b3f01bb9a846 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -164,8 +164,9 @@ static void iser_create_send_desc(struct iser_conn *iser_conn, { struct iser_device *device = iser_conn->ib_conn.device; - ib_dma_sync_single_for_cpu(device->ib_device, - tx_desc->dma_addr, ISER_HEADERS_LEN, DMA_TO_DEVICE); + dma_sync_single_for_cpu(device->ib_device->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 = ISER_VER; @@ -180,11 +181,11 @@ static void iser_free_login_buf(struct iser_conn *iser_conn) if (!desc->req) return; - ib_dma_unmap_single(device->ib_device, desc->req_dma, - ISCSI_DEF_MAX_RECV_SEG_LEN, DMA_TO_DEVICE); + dma_unmap_single(device->ib_device->dma_device, desc->req_dma, + ISCSI_DEF_MAX_RECV_SEG_LEN, DMA_TO_DEVICE); - ib_dma_unmap_single(device->ib_device, desc->rsp_dma, - ISER_RX_LOGIN_SIZE, DMA_FROM_DEVICE); + dma_unmap_single(device->ib_device->dma_device, desc->rsp_dma, + ISER_RX_LOGIN_SIZE, DMA_FROM_DEVICE); kfree(desc->req); kfree(desc->rsp); @@ -203,10 +204,10 @@ static int iser_alloc_login_buf(struct iser_conn *iser_conn) if (!desc->req) return -ENOMEM; - desc->req_dma = ib_dma_map_single(device->ib_device, desc->req, - ISCSI_DEF_MAX_RECV_SEG_LEN, - DMA_TO_DEVICE); - if (ib_dma_mapping_error(device->ib_device, + desc->req_dma = dma_map_single(device->ib_device->dma_device, desc->req, + ISCSI_DEF_MAX_RECV_SEG_LEN, + DMA_TO_DEVICE); + if (dma_mapping_error(device->ib_device->dma_device, desc->req_dma)) goto free_req; @@ -214,10 +215,9 @@ static int iser_alloc_login_buf(struct iser_conn *iser_conn) if (!desc->rsp) goto unmap_req; - desc->rsp_dma = ib_dma_map_single(device->ib_device, desc->rsp, - ISER_RX_LOGIN_SIZE, - DMA_FROM_DEVICE); - if (ib_dma_mapping_error(device->ib_device, + desc->rsp_dma = dma_map_single(device->ib_device->dma_device, desc->rsp, + ISER_RX_LOGIN_SIZE, DMA_FROM_DEVICE); + if (dma_mapping_error(device->ib_device->dma_device, desc->rsp_dma)) goto free_rsp; @@ -226,9 +226,8 @@ static int iser_alloc_login_buf(struct iser_conn *iser_conn) free_rsp: kfree(desc->rsp); unmap_req: - ib_dma_unmap_single(device->ib_device, desc->req_dma, - ISCSI_DEF_MAX_RECV_SEG_LEN, - DMA_TO_DEVICE); + dma_unmap_single(device->ib_device->dma_device, desc->req_dma, + ISCSI_DEF_MAX_RECV_SEG_LEN, DMA_TO_DEVICE); free_req: kfree(desc->req); @@ -265,9 +264,10 @@ int iser_alloc_rx_descriptors(struct iser_conn *iser_conn, rx_desc = iser_conn->rx_descs; for (i = 0; i < iser_conn->qp_max_recv_dtos; i++, rx_desc++) { - dma_addr = ib_dma_map_single(device->ib_device, (void *)rx_desc, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); - if (ib_dma_mapping_error(device->ib_device, dma_addr)) + dma_addr = dma_map_single(device->ib_device->dma_device, + rx_desc, ISER_RX_PAYLOAD_SIZE, + DMA_FROM_DEVICE); + if (dma_mapping_error(device->ib_device->dma_device, dma_addr)) goto rx_desc_dma_map_failed; rx_desc->dma_addr = dma_addr; @@ -284,8 +284,9 @@ int iser_alloc_rx_descriptors(struct iser_conn *iser_conn, rx_desc_dma_map_failed: rx_desc = iser_conn->rx_descs; for (j = 0; j < i; j++, rx_desc++) - ib_dma_unmap_single(device->ib_device, rx_desc->dma_addr, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); + dma_unmap_single(device->ib_device->dma_device, + rx_desc->dma_addr, ISER_RX_PAYLOAD_SIZE, + DMA_FROM_DEVICE); kfree(iser_conn->rx_descs); iser_conn->rx_descs = NULL; rx_desc_alloc_fail: @@ -309,8 +310,9 @@ void iser_free_rx_descriptors(struct iser_conn *iser_conn) rx_desc = iser_conn->rx_descs; for (i = 0; i < iser_conn->qp_max_recv_dtos; i++, rx_desc++) - ib_dma_unmap_single(device->ib_device, rx_desc->dma_addr, - ISER_RX_PAYLOAD_SIZE, DMA_FROM_DEVICE); + dma_unmap_single(device->ib_device->dma_device, + rx_desc->dma_addr, ISER_RX_PAYLOAD_SIZE, + DMA_FROM_DEVICE); kfree(iser_conn->rx_descs); /* make sure we never redo any unmapping */ iser_conn->rx_descs = NULL; @@ -522,13 +524,15 @@ int iser_send_control(struct iscsi_conn *conn, goto send_control_error; } - ib_dma_sync_single_for_cpu(device->ib_device, desc->req_dma, - task->data_count, DMA_TO_DEVICE); + dma_sync_single_for_cpu(device->ib_device->dma_device, + desc->req_dma, task->data_count, + DMA_TO_DEVICE); memcpy(desc->req, task->data, task->data_count); - ib_dma_sync_single_for_device(device->ib_device, desc->req_dma, - task->data_count, DMA_TO_DEVICE); + dma_sync_single_for_device(device->ib_device->dma_device, + desc->req_dma, task->data_count, + DMA_TO_DEVICE); tx_dsg->addr = desc->req_dma; tx_dsg->length = task->data_count; @@ -570,9 +574,9 @@ void iser_login_rsp(struct ib_cq *cq, struct ib_wc *wc) return; } - ib_dma_sync_single_for_cpu(ib_conn->device->ib_device, - desc->rsp_dma, ISER_RX_LOGIN_SIZE, - DMA_FROM_DEVICE); + dma_sync_single_for_cpu(ib_conn->device->ib_device->dma_device, + desc->rsp_dma, ISER_RX_LOGIN_SIZE, + DMA_FROM_DEVICE); hdr = desc->rsp + sizeof(struct iser_ctrl); data = desc->rsp + ISER_HEADERS_LEN; @@ -583,9 +587,9 @@ void iser_login_rsp(struct ib_cq *cq, struct ib_wc *wc) iscsi_iser_recv(iser_conn->iscsi_conn, hdr, data, length); - ib_dma_sync_single_for_device(ib_conn->device->ib_device, - desc->rsp_dma, ISER_RX_LOGIN_SIZE, - DMA_FROM_DEVICE); + dma_sync_single_for_device(ib_conn->device->ib_device->dma_device, + desc->rsp_dma, ISER_RX_LOGIN_SIZE, + DMA_FROM_DEVICE); ib_conn->post_recv_buf_count--; } @@ -655,9 +659,9 @@ void iser_task_rsp(struct ib_cq *cq, struct ib_wc *wc) return; } - ib_dma_sync_single_for_cpu(ib_conn->device->ib_device, - desc->dma_addr, ISER_RX_PAYLOAD_SIZE, - DMA_FROM_DEVICE); + dma_sync_single_for_cpu(ib_conn->device->ib_device->dma_device, + desc->dma_addr, ISER_RX_PAYLOAD_SIZE, + DMA_FROM_DEVICE); hdr = &desc->iscsi_header; length = wc->byte_len - ISER_HEADERS_LEN; @@ -673,9 +677,9 @@ void iser_task_rsp(struct ib_cq *cq, struct ib_wc *wc) iscsi_iser_recv(iser_conn->iscsi_conn, hdr, desc->data, length); - ib_dma_sync_single_for_device(ib_conn->device->ib_device, - desc->dma_addr, ISER_RX_PAYLOAD_SIZE, - DMA_FROM_DEVICE); + dma_sync_single_for_device(ib_conn->device->ib_device->dma_device, + desc->dma_addr, ISER_RX_PAYLOAD_SIZE, + DMA_FROM_DEVICE); /* decrementing conn->post_recv_buf_count only --after-- freeing the * * task eliminates the need to worry on tasks which are completed in * @@ -724,8 +728,8 @@ void iser_dataout_comp(struct ib_cq *cq, struct ib_wc *wc) if (unlikely(wc->status != IB_WC_SUCCESS)) iser_err_comp(wc, "dataout"); - ib_dma_unmap_single(device->ib_device, desc->dma_addr, - ISER_HEADERS_LEN, DMA_TO_DEVICE); + dma_unmap_single(device->ib_device->dma_device, desc->dma_addr, + ISER_HEADERS_LEN, DMA_TO_DEVICE); kmem_cache_free(ig.desc_cache, desc); } diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index 9c3e9ab53a41..0633bb932216 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@ -145,9 +145,9 @@ static void iser_data_buf_dump(struct iser_data_buf *data, for_each_sg(data->sg, sg, data->dma_nents, i) iser_dbg("sg[%d] dma_addr:0x%lX page:0x%p " "off:0x%x sz:0x%x dma_len:0x%x\n", - i, (unsigned long)ib_sg_dma_address(ibdev, sg), + i, (unsigned long)sg_dma_address(sg), sg_page(sg), sg->offset, - sg->length, ib_sg_dma_len(ibdev, sg)); + sg->length, sg_dma_len(sg)); } static void iser_dump_page_vec(struct iser_page_vec *page_vec) @@ -170,7 +170,8 @@ int iser_dma_map_task_data(struct iscsi_iser_task *iser_task, iser_task->dir[iser_dir] = 1; dev = iser_task->iser_conn->ib_conn.device->ib_device; - data->dma_nents = ib_dma_map_sg(dev, data->sg, data->size, dma_dir); + data->dma_nents = dma_map_sg(dev->dma_device, data->sg, data->size, + dma_dir); if (data->dma_nents == 0) { iser_err("dma_map_sg failed!!!\n"); return -EINVAL; @@ -185,7 +186,7 @@ void iser_dma_unmap_task_data(struct iscsi_iser_task *iser_task, struct ib_device *dev; dev = iser_task->iser_conn->ib_conn.device->ib_device; - ib_dma_unmap_sg(dev, data->sg, data->size, dir); + dma_unmap_sg(dev->dma_device, data->sg, data->size, dir); } static int @@ -204,8 +205,8 @@ iser_reg_dma(struct iser_device *device, struct iser_data_buf *mem, reg->rkey = device->pd->unsafe_global_rkey; else reg->rkey = 0; - reg->sge.addr = ib_sg_dma_address(device->ib_device, &sg[0]); - reg->sge.length = ib_sg_dma_len(device->ib_device, &sg[0]); + reg->sge.addr = sg_dma_address(&sg[0]); + reg->sge.length = sg_dma_len(&sg[0]); iser_dbg("Single DMA entry: lkey=0x%x, rkey=0x%x, addr=0x%llx," " length=0x%x\n", reg->sge.lkey, reg->rkey, diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 8ae7a3beddb7..1f439ab917ae 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -1077,9 +1077,9 @@ int iser_post_send(struct ib_conn *ib_conn, struct iser_tx_desc *tx_desc, struct ib_send_wr *bad_wr, *wr = iser_tx_next_wr(tx_desc); int ib_ret; - ib_dma_sync_single_for_device(ib_conn->device->ib_device, - tx_desc->dma_addr, ISER_HEADERS_LEN, - DMA_TO_DEVICE); + dma_sync_single_for_device(ib_conn->device->ib_device->dma_device, + tx_desc->dma_addr, ISER_HEADERS_LEN, + DMA_TO_DEVICE); wr->next = NULL; wr->wr_cqe = &tx_desc->cqe;