From patchwork Thu Jan 12 19:07:11 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: 9514053 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 74B2360762 for ; Thu, 12 Jan 2017 19:12:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66116286DB for ; Thu, 12 Jan 2017 19:12:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AA2F2870C; Thu, 12 Jan 2017 19:12:38 +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 B6574286DC for ; Thu, 12 Jan 2017 19:12:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751003AbdALTL1 (ORCPT ); Thu, 12 Jan 2017 14:11:27 -0500 Received: from mail-sn1nam02on0056.outbound.protection.outlook.com ([104.47.36.56]:7354 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751036AbdALTIS (ORCPT ); Thu, 12 Jan 2017 14:08:18 -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=907U2OGnKElrqBvAPApsB9/JPd2vpbmHzZvlfCZJ47A=; b=Ww0cDwZ+Nh1f9TGzhz8JblQglzjb67jifK2LsRmog969EZF8SHPj0FL9sMIf9NdkubtFwXO1h3V4ICDvH2vTOo61uuYvCDXx04Gy1JG4PUN0dd2p7LdJaxKPkkTg7+DsCWfTXSZYtgdAKGx/sPWuEg5zvpBICTLdFYEY0jZYUkw= Received: from BN6PR02CA0061.namprd02.prod.outlook.com (10.175.94.151) by BY2PR02MB042.namprd02.prod.outlook.com (10.242.44.21) 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 BN1AFFO11FD042.protection.gbl (2a01:111:f400:7c10::156) by BN6PR02CA0061.outlook.office365.com (2603:10b6:404:f9::23) 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 BN1AFFO11FD042.mail.protection.outlook.com (10.58.52.253) 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 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 72.7B.01420.5F1D7785; Thu, 12 Jan 2017 10:59:01 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.9.6) 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-ce-5877d1f5983a Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id DE.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 19/26] IB/srp: Inline ib_dma_map_*() functions Date: Thu, 12 Jan 2017 11:07:11 -0800 Message-ID: <20170112190718.6728-20-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+NgFrrELMWRmVeSWpSXmKPExsXCddJ5ke7Xi+URBucW61q8PP+B1aJ58Xo2 i8u75rBZPDvUy+LA4rF/7hp2j/f7rrJ5fN4kF8AcxWWTkpqTWZZapG+XwJWxdPZZ1oKdThVv Wh4zNTC+Meti5OSQEDCReHr+H0sXIxeHkMBSJonmG5tYQRJCAtsYJc4+SYEpOnJxNitE0UZG icW3/zKDJNgEjCS+vZ/JAmKLCKhJbHq1iB2kiFlgMaNE++llYEXCAo4Svx4vBitiEVCVuLv5 GlicV8Be4nv3NkaIDfISu9ougm3mBIp/+3+JEeIKO4ldB/6DnSch0MQq8a7nACtEs6DEyZlP wIYyC0hIHHzxghmiQV3i5JL5TBMYhWYhKZuFpGwBI9MqRrHczJzi3PTUAkMTveLEvJTM4my9 5PzcTYyQkC7cwfj6tvchRgEORiUe3h02ZRFCrIllxZW5hxglOJiVRHhnnS+PEOJNSaysSi3K jy8qzUktPsQozcGiJM57MfpjmJBAemJJanZqakFqEUyWiYNTqoGxKGPXW5/LKoK5oQ9S+Lgr tdaUL4wR4X68fVsp95+AMzk/FrkrrWY/Uen3d4qQ1K0uu2xt4dAb9hO+XZz66qDC5SaNzPsr Uq9kP3/T8cvAxZX/4eLGqaFJzkKuO9MXOq6+emxLUE0I73aNLU+33j1xYNpOjqyWq57vDwtw LTGWNp94LXxifOAbJZbijERDLeai4kQAXRa4UmUCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAJMWRmVeSWpSXmKPExsXCtZGTTZfvSnmEwdLPlhYHf7YxWrw8/4HV onnxejaLy7vmsFk8O9TL4sDqsX/uGnaP9/uusnlMW3OeyePzJrkAligum5TUnMyy1CJ9uwSu jKWzz7IW7HSqeNPymKmB8Y1ZFyMnh4SAicSRi7NZuxi5OIQE1jNKfH2xmQ0kwSZgJPHt/UwW EFtEQE1i06tF7CA2s8BCRomJv6RAbGEBR4lfjxeD1bAIqErc3XyNuYuRg4NXwF7ixHodiPny ErvaLrKC2JxA4W//LzGC2EICdhK7DvxnmcDIvYCRYRWjWG5mTnFuemaBoZFecWJeSmZxtl5y fu4mRkgYRO1gvD7R/BAjEwenVAOj4edDgXf2lK7q3P4zdJJz6KrP6+xXCsoJtQY1Ozys4upc 65Zw3TvONCFm58J9r1Rkn35eMDtX4+5qPS0Dh0+TOj9fL7mSGrh6wXa7msy53q8D+/++mrnE c4OL0Ra5eVdEVvsxfGoV5JmQdtZM0kr4ga6uzbJbM1Qvmne/bemfFp94l01H85qhEktxRqKh FnNRcSIAkBqIurMBAAA= 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)(39410400002)(39840400002)(39860400002)(39850400002)(39450400003)(2980300002)(438002)(199003)(189002)(48376002)(1076002)(8676002)(8936002)(106466001)(33646002)(5003940100001)(6666003)(356003)(305945005)(47776003)(189998001)(107886002)(54906002)(4326007)(97736004)(2906002)(575784001)(50466002)(68736007)(50226002)(81166006)(86362001)(81156014)(36756003)(110136003)(2270400002)(38730400001)(76176999)(50986999)(92566002)(4001430100002)(2950100002)(6916009)(626004)(77096006)(69596002)(5660300001)(50929005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB042; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD042; 1:r9/m+H6xyYQgFjxT2yb/aJechJ/M7SXqCN5t8FK4wb4rYE2xbQL/XR+Qza5j6BTE/mGAvMBMKBccvQ370wHkq6n/TrhEG01pyAiq6MzEQ1rbsZjZteUdAz3eWYQ42YUIrVjwi243au75Qq5OMQus0W7tkwvF603r5nJ3uyfd/dgHYL9xWZhHkAwQ5rfGWx+aTYmDkZJ0LsdKDIAKeU9qXuKLxWNAycZ/3VOrGidYyBWZFoGys0zeV3lEdTN8MwrZeZEpTnVZOOj7ACIuuU/st0G6PVMkNE2kSUMI0xUG2XBn1kUh2q3FsBBGMZeYl/rNvQjORuC/5KX1Z9z7pMV58Omev8pam0bTmOzTeNJzC9w3R0YAXW43dSuYapLWXrd/LZKn1HYudB3kiMITrh/SdJ+zOM4nBjBYBgM+ySrD3QF+lS9sh4nA0tu4J8u96b+fWPaGarzH4B24b90JBm1c++xpNCMFvix1WbSRN0BZvW89kCx6BilsBqUIvglERjsr X-MS-Office365-Filtering-Correlation-Id: d9408079-ef68-4179-5599-08d43b1e57c1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BY2PR02MB042; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB042; 3:jBuY7Syn7rTCLcFAjZAzBGrjJ5IRrxTgAB2TxUgWSB2SKh8Ll5uXQvH+WUqvmF4gr4DsPTRnsPOmUIvm5EDqLVJMbLO5GQXUBGqO7oETJn0Gh8y/jTPFFS2ED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ww==; 20:q9IQEh4umZiChq8YYPOy5bb0tqC6GiL2UluwgtReJPr9Ei7p6+ASYEBGzJOpYp+Wn2eVSrKxvvRN7d7R6weUSGXQp0F7a7PhIev3RgSk+iNhIXm2vuQEtUb30FFkMhzUJaQHhh7A+hIckyWwBSfPCUBFkX6HJZ0zTBPAjwDJrPi8hO3jdFjfZOhhYXPx3BCeA9DcnRaKi+eIzv1yfsRv8ZcqzkrTuphc0ppQrJDrNqGMiAw9LhIE+asrf100k0AthTWIwoj5FyT+vvLK1/Arqsvjr0XJg+RSlNGY+Y80acPCnIEp48od+vbnxKmFKkpGNzfOZze7bOsug17/lbsawE3gdno0M/yeU3L38GUuGeCVfBPCVi1VoDtOB5rcwxRyXIZvniHGAjBGrEcn+Qn42U5YtKUSw39DojDP6w9760gLjO+WS8ahwe9LlmxwHxuIQHhYmNsmhL26CqrGmgVGdASSH/QyuT92qsy+pkR+85Q/zYgy2KSPfAuVw0IbtEgW 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:BY2PR02MB042; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB042; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB042; 4:b35aiXy2KpKWVIrqplAWNqu0f4o8o+Zp5D/0bETGuSD+f0IJEHyL5dEwHDNerWTD4Hzn9NDdppu48Brd67BwGWsPZpz8VaE0aOmLSP/qqiqEJAK5UJo9UofYDRqM56/6tz/hE3uI9+FGnk45zbJqzD8jxXXSoleQoiP5BNgvWFfl6ykzen3ErHAN1hEvOulF2SVTsrsSck7FHCbJpbWDgojjlbL24rT94eVSsPyI1dKfq924VoYc4aqTx9Mv09k/VNItxvjflrzkdio+P9Qje+heY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3aMLOTB6vpnB5myLeTxpyErAQbn36POA5oIk2QufVpAYJZOu9ne8LAGXf4rw3F8oBEtj0BSifOR297babw67iRneLCDiW0q5vnKCyVr+g1ZumD4O85SrAcRxrfx2fXMnkCx57FRWB+sMdwnDZq3WGKAQvY9ce/UT8Mq9X9ikTeSLw== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 19:08:06.4224 (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: BY2PR02MB042 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 --- drivers/infiniband/ulp/srp/ib_srp.c | 80 +++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 43 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index cd150c19d0d2..3b411c40a8ab 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -233,9 +233,9 @@ static struct srp_iu *srp_alloc_iu(struct srp_host *host, size_t size, if (!iu->buf) goto out_free_iu; - iu->dma = ib_dma_map_single(host->srp_dev->dev, iu->buf, size, - direction); - if (ib_dma_mapping_error(host->srp_dev->dev, iu->dma)) + iu->dma = dma_map_single(host->srp_dev->dev->dma_device, iu->buf, size, + direction); + if (dma_mapping_error(host->srp_dev->dev->dma_device, iu->dma)) goto out_free_buf; iu->size = size; @@ -256,8 +256,8 @@ static void srp_free_iu(struct srp_host *host, struct srp_iu *iu) if (!iu) return; - ib_dma_unmap_single(host->srp_dev->dev, iu->dma, iu->size, - iu->direction); + dma_unmap_single(host->srp_dev->dev->dma_device, iu->dma, iu->size, + iu->direction); kfree(iu->buf); kfree(iu); } @@ -843,9 +843,8 @@ static void srp_free_req_data(struct srp_target_port *target, kfree(req->map_page); } if (req->indirect_dma_addr) { - ib_dma_unmap_single(ibdev, req->indirect_dma_addr, - target->indirect_size, - DMA_TO_DEVICE); + dma_unmap_single(ibdev->dma_device, req->indirect_dma_addr, + target->indirect_size, DMA_TO_DEVICE); } kfree(req->indirect_desc); } @@ -888,10 +887,9 @@ static int srp_alloc_req_data(struct srp_rdma_ch *ch) if (!req->indirect_desc) goto out; - dma_addr = ib_dma_map_single(ibdev, req->indirect_desc, - target->indirect_size, - DMA_TO_DEVICE); - if (ib_dma_mapping_error(ibdev, dma_addr)) + dma_addr = dma_map_single(ibdev->dma_device, req->indirect_desc, + target->indirect_size, DMA_TO_DEVICE); + if (dma_mapping_error(ibdev->dma_device, dma_addr)) goto out; req->indirect_dma_addr = dma_addr; @@ -1096,8 +1094,8 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd, ib_fmr_pool_unmap(*pfmr); } - ib_dma_unmap_sg(ibdev, scsi_sglist(scmnd), scsi_sg_count(scmnd), - scmnd->sc_data_direction); + dma_unmap_sg(ibdev->dma_device, scsi_sglist(scmnd), scsi_sg_count(scmnd), + scmnd->sc_data_direction); } /** @@ -1411,8 +1409,7 @@ static int srp_map_finish_fr(struct srp_map_state *state, *state->fr.next++ = desc; state->nmdesc++; - srp_map_desc(state, desc->mr->iova, - desc->mr->length, desc->mr->rkey); + srp_map_desc(state, desc->mr->iova, desc->mr->length, desc->mr->rkey); err = ib_post_send(ch->qp, &wr.wr, &bad_wr); if (unlikely(err)) { @@ -1429,9 +1426,8 @@ static int srp_map_sg_entry(struct srp_map_state *state, { struct srp_target_port *target = ch->target; struct srp_device *dev = target->srp_host->srp_dev; - struct ib_device *ibdev = dev->dev; - dma_addr_t dma_addr = ib_sg_dma_address(ibdev, sg); - unsigned int dma_len = ib_sg_dma_len(ibdev, sg); + dma_addr_t dma_addr = sg_dma_address(sg); + unsigned int dma_len = sg_dma_len(sg); unsigned int len = 0; int ret; @@ -1525,13 +1521,11 @@ static int srp_map_sg_dma(struct srp_map_state *state, struct srp_rdma_ch *ch, int count) { struct srp_target_port *target = ch->target; - struct srp_device *dev = target->srp_host->srp_dev; struct scatterlist *sg; int i; for_each_sg(scat, sg, count, i) { - srp_map_desc(state, ib_sg_dma_address(dev->dev, sg), - ib_sg_dma_len(dev->dev, sg), + srp_map_desc(state, sg_dma_address(sg), sg_dma_len(sg), target->pd->unsafe_global_rkey); } @@ -1659,7 +1653,7 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_rdma_ch *ch, dev = target->srp_host->srp_dev; ibdev = dev->dev; - count = ib_dma_map_sg(ibdev, scat, nents, scmnd->sc_data_direction); + count = dma_map_sg(ibdev->dma_device, scat, nents, scmnd->sc_data_direction); if (unlikely(count == 0)) return -EIO; @@ -1691,9 +1685,9 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_rdma_ch *ch, */ struct srp_direct_buf *buf = (void *) cmd->add_data; - buf->va = cpu_to_be64(ib_sg_dma_address(ibdev, scat)); + buf->va = cpu_to_be64(sg_dma_address(scat)); buf->key = cpu_to_be32(pd->unsafe_global_rkey); - buf->len = cpu_to_be32(ib_sg_dma_len(ibdev, scat)); + buf->len = cpu_to_be32(sg_dma_len(scat)); req->nmdesc = 0; /* Debugging help. */ @@ -1707,8 +1701,8 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_rdma_ch *ch, */ indirect_hdr = (void *) cmd->add_data; - ib_dma_sync_single_for_cpu(ibdev, req->indirect_dma_addr, - target->indirect_size, DMA_TO_DEVICE); + dma_sync_single_for_cpu(ibdev->dma_device, req->indirect_dma_addr, + target->indirect_size, DMA_TO_DEVICE); memset(&state, 0, sizeof(state)); state.desc = req->indirect_desc; @@ -1789,8 +1783,8 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_rdma_ch *ch, else cmd->data_in_desc_cnt = count; - ib_dma_sync_single_for_device(ibdev, req->indirect_dma_addr, table_len, - DMA_TO_DEVICE); + dma_sync_single_for_device(ibdev->dma_device, req->indirect_dma_addr, + table_len, DMA_TO_DEVICE); map_complete: /* Debugging help. */ @@ -2084,9 +2078,9 @@ static int srp_response_common(struct srp_rdma_ch *ch, s32 req_delta, return 1; } - ib_dma_sync_single_for_cpu(dev, iu->dma, len, DMA_TO_DEVICE); + dma_sync_single_for_cpu(dev->dma_device, iu->dma, len, DMA_TO_DEVICE); memcpy(iu->buf, rsp, len); - ib_dma_sync_single_for_device(dev, iu->dma, len, DMA_TO_DEVICE); + dma_sync_single_for_device(dev->dma_device, iu->dma, len, DMA_TO_DEVICE); err = srp_post_send(ch, iu, len); if (err) { @@ -2144,8 +2138,8 @@ static void srp_recv_done(struct ib_cq *cq, struct ib_wc *wc) return; } - ib_dma_sync_single_for_cpu(dev, iu->dma, ch->max_ti_iu_len, - DMA_FROM_DEVICE); + dma_sync_single_for_cpu(dev->dma_device, iu->dma, ch->max_ti_iu_len, + DMA_FROM_DEVICE); opcode = *(u8 *) iu->buf; @@ -2181,8 +2175,8 @@ static void srp_recv_done(struct ib_cq *cq, struct ib_wc *wc) break; } - ib_dma_sync_single_for_device(dev, iu->dma, ch->max_ti_iu_len, - DMA_FROM_DEVICE); + dma_sync_single_for_device(dev->dma_device, iu->dma, ch->max_ti_iu_len, + DMA_FROM_DEVICE); res = srp_post_recv(ch, iu); if (res != 0) @@ -2267,8 +2261,8 @@ static int srp_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd) req = &ch->req_ring[idx]; dev = target->srp_host->srp_dev->dev; - ib_dma_sync_single_for_cpu(dev, iu->dma, target->max_iu_len, - DMA_TO_DEVICE); + dma_sync_single_for_cpu(dev->dma_device, iu->dma, target->max_iu_len, + DMA_TO_DEVICE); scmnd->host_scribble = (void *) req; @@ -2302,8 +2296,8 @@ static int srp_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd) goto err_iu; } - ib_dma_sync_single_for_device(dev, iu->dma, target->max_iu_len, - DMA_TO_DEVICE); + dma_sync_single_for_device(dev->dma_device, iu->dma, target->max_iu_len, + DMA_TO_DEVICE); if (srp_post_send(ch, iu, len)) { shost_printk(KERN_ERR, target->scsi_host, PFX "Send failed\n"); @@ -2689,8 +2683,8 @@ static int srp_send_tsk_mgmt(struct srp_rdma_ch *ch, u64 req_tag, u64 lun, return -1; } - ib_dma_sync_single_for_cpu(dev, iu->dma, sizeof *tsk_mgmt, - DMA_TO_DEVICE); + dma_sync_single_for_cpu(dev->dma_device, iu->dma, sizeof *tsk_mgmt, + DMA_TO_DEVICE); tsk_mgmt = iu->buf; memset(tsk_mgmt, 0, sizeof *tsk_mgmt); @@ -2700,8 +2694,8 @@ static int srp_send_tsk_mgmt(struct srp_rdma_ch *ch, u64 req_tag, u64 lun, tsk_mgmt->tsk_mgmt_func = func; tsk_mgmt->task_tag = req_tag; - ib_dma_sync_single_for_device(dev, iu->dma, sizeof *tsk_mgmt, - DMA_TO_DEVICE); + dma_sync_single_for_device(dev->dma_device, iu->dma, sizeof *tsk_mgmt, + DMA_TO_DEVICE); if (srp_post_send(ch, iu, sizeof(*tsk_mgmt))) { srp_put_tx_iu(ch, iu, SRP_IU_TSK_MGMT); mutex_unlock(&rport->mutex);