From patchwork Thu Jan 12 19:07:14 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: 9514015 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 DFA1E601E5 for ; Thu, 12 Jan 2017 19:10:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0E0F286DC for ; Thu, 12 Jan 2017 19:10:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4AF32870D; Thu, 12 Jan 2017 19:10:10 +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 13D5F286DC for ; Thu, 12 Jan 2017 19:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750746AbdALTIi (ORCPT ); Thu, 12 Jan 2017 14:08:38 -0500 Received: from mail-cys01nam02on0046.outbound.protection.outlook.com ([104.47.37.46]:63264 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750889AbdALTIK (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=rDM4kNgeJukhFPvOss+l3GP4+a+VOn/HpMp4Zy7NgSs=; b=dkDeKEUNhgX9U6h8+MNz4KCmW7BRknuM6AqkM7oYjQE302A1UfxkVN4TAv8gmXn3GXKgT2mqNj7eFOwAChgLr7bUyMdGdzSWToOBnxm3OI4ArGCDW0RdFRvzlvhngjYFWgUOwLpvrm6zGHTDeOXJ4/eHDcaJ8sz89gvqTLvOVgI= Received: from DM5PR02CA0059.namprd02.prod.outlook.com (10.168.192.21) by CO1PR02MB048.namprd02.prod.outlook.com (10.242.163.25) 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 BN1AFFO11FD029.protection.gbl (2a01:111:f400:7c10::169) by DM5PR02CA0059.outlook.office365.com (2603:10b6:3:39::21) 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; intel.com; dkim=none (message not signed) header.d=none;intel.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 BN1AFFO11FD029.mail.protection.outlook.com (10.58.52.184) 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 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 C2.A0.65426.A61D7785; Thu, 12 Jan 2017 10:56:42 -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:59 -0800 X-AuditID: 0ac94369-b62949800001ff92-ed-5877d16a3657 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id FF.DF.09762.F04D7785; Thu, 12 Jan 2017 11:07:59 -0800 (PST) From: Bart Van Assche To: Doug Ledford CC: , , "Greg Kroah-Hartman" , Bart Van Assche , Keith Busch Subject: [PATCH v2 22/26] nvme-rdma: Inline ib_dma_map_*() functions Date: Thu, 12 Jan 2017 11:07:14 -0800 Message-ID: <20170112190718.6728-23-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+NgFrrFLMWRmVeSWpSXmKPExsXCddJ5kW7WxfIIg97PUhYvz39gtWhevJ7N 4t7RL0wWl3fNYbN4dqiXxYHVY/Gel0we++euYfd4v+8qm8fnTXIBLFFcNimpOZllqUX6dglc Ga+2PWAp6HSo2PF9EmMD406zLkZODgkBE4mTK9aydzFycQgJLGWSWP+ogxXC2cYo8eLBLDaY qgObjzKC2EICGxkl7m3PA7HZBIwkvr2fyQJiiwioSWx6tQhsErPACUaJ9Ue2ADVzcAgLuEi8 vC0FYrIIqErc6A4CKecVsJf4uHQaI8R4eYldbRdZQWxOoPi3/5egVtlJ7DrwnwVkpIRAH6vE hLZPbBDNghInZz4B28ssICFx8MULZogGdYmTS+YzTWAUmoWkbBaSsgWMTKsYxXIzc4pz01ML DE31ihPzUjKLs/WS83M3MUJCPHMH490n3ocYBTgYlXh4d9iURQixJpYVV+YeYpTgYFYS4Z11 vjxCiDclsbIqtSg/vqg0J7X4EKM0B4uSOK/bvS9hQgLpiSWp2ampBalFMFkmDk6pBsa7Pvvf XYm8+seB/+0djkhT76Ta6ENdSwuLlcR58g5H10124vYITPtZ/FZVlu9LluKSH3u6HOIfdvC3 ZuV8/qqulRC1YJ7ea7v9K470Cz9zuPxQrnDPhM49p4yvn93d2Gbv/6Rz34MLrrft/tSuU6n6 xxm1+Mme07MuJJs+sChZccRlw1ZZjTVKLMUZiYZazEXFiQBH6RwJbQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFJMWRmVeSWpSXmKPExsXCtZGTTZf/SnmEwddl7BYHf7YxWrw8/4HV onnxejaLe0e/MFlc3jWHzeLZoV4WBzaPxXteMnnsn7uG3eP9vqtsHtPWnGfy+LxJLoA1issm JTUnsyy1SN8ugSvj1bYHLAWdDhU7vk9ibGDcadbFyMkhIWAicWDzUcYuRi4OIYH1jBLbZ+5g BEmwCRhJfHs/kwXEFhFQk9j0ahE7SBGzwAlGiW2965i6GDk4hAVcJF7elgIxWQRUJW50B4GU 8wrYS6z9dZsVYr68xK62i2A2J1D82/9LYOOFBOwkdh34zzKBkXsBI8MqRrHczJzi3PTMAkMj veLEvJTM4my95PzcTYyQ0IjawXh9ovkhRiYOTqkGRpUHYZ0/EvdF/jF7cODEMdFuhUdbDaYo zOP9zXt/hubf6KeCLdw779Sc1nbxEp6rvLXrXcdGIRXOxw6/xe+lyXaFZRzuDFktyVHme2/j Suudihzn4rxuib9Z9dsv4fHyaAfTktSH2y5/yXQpNH/ju1nBoD/E2ObF4tC/+956Z17fdpUt VFqbQ4mlOCPRUIu5qDgRANGKeCe9AQAA 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)(39850400002)(39860400002)(39410400002)(39840400002)(2980300002)(438002)(3190300001)(199003)(189002)(8676002)(92566002)(81166006)(68736007)(47776003)(50226002)(8936002)(81156014)(77096006)(38730400001)(106466001)(305945005)(69596002)(5003940100001)(50986999)(76176999)(5660300001)(626004)(189998001)(2950100002)(6916009)(110136003)(36756003)(6666003)(4326007)(33646002)(2906002)(97736004)(48376002)(356003)(2270400002)(86362001)(50466002)(54906002)(1076002)(50929005); DIR:OUT; SFP:1101; SCL:1; SRVR:CO1PR02MB048; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD029; 1:uKm8qEFrBwMJBZzuPxnLpfF255OzhG5RwVG+o70sBq3PkyA4GxM7D0mOpWZHBIwpGutYUX/COPFKC9AktMdxqlvStWuuqIPIty8idYA9kA9upDNLSlyMz3n38LnhQaCIVYhEpdXX7xl6L8gJNQ60mup78UxJi31ExX+eLj8Y1CkpkgUELFFc6d9GGYA+ws/lmgx5uf/M31K3K8x7r/t0MBQU1jtGYvn48Zksp855YfojLdXdV4besBCMzMm2sNiS0Dmf/JElovbLeydLHoY3Scb6PkjjQ4PQHS22cs+e8S7Kjht9zNR0/iS4UIfBJgZS/WFhafplmT7jyZtrb+07q2nFoOpDVsEIfeJmKCe24H5aBKgZAYCUL6QO84QMVRTpjZsb5+KUpFwEcfytYqqfjMlfTeIQHvWXF9X6jqeZyRXutVAeB/w6W6/2AoJZuT/KJt8/dzuwzCgEBL1Ioq5fQuXCydSZJGWDfqCgv7iXF+3jTaGTs9UM0tEeaSMKtSeSdyBTyLjLIyoC552DQr9ThY830HhC0J0IjevcSda5YWPL5mfUR/+w7BmzRbCqVWo9 X-MS-Office365-Filtering-Correlation-Id: db3e248b-4fcb-4a56-1fee-08d43b1e577c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:CO1PR02MB048; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 3:7s4dUTwf+7FIB8KeO0C9Uh/nfHLWKD6ADXk2fO+1Dve4ypqYnG6D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LcKEBfLCyj7oNcVs6Zr165mAP/jZM/7bu012vv6I1djYRKZiaiIFaSeJBa6HTAquCRKMkSKP+Yv4=; 20:FThDqzNCLeol3b/DJSir0j+tx1wKwPUYE1T+PboPSauJDcO2q3HP4DVXQrV9e4+4pzcbeFWRskzdrzYlNZ/oKE6UKGgOfqEH2s0O7/XO8LQBSK1oZjnUm73g/cSxg/3nYKcJAGAlZc/9V51xPxWVkOGRG5eAsfdPiLlCCwuH/lsxftovqpyWbuHlcoUMeLRCzNlw8pyMkErA18U79VPZNOmk67+CFj4ArP9irbAHxzRfm+gPvLB/rNNss+IMntCKENez/ChwFg7mPXXHErLveH8fAet+4zef/+1HWt/4lEtmUAqhQvUtLCwJCMs0NW9R65oq3ToZ/0iIrVgic+D5UZJBmyo5pXI5tGe4ybWe5TFyMLDwUpi4YnKmuw1F7eEpoNjz0v1uRfr0Ty+D/elPtVRNycf5nBlQ8Bbw4cOdkpgeIKYPR14E9n53GdO+vZlwjUOCSv1QAa6PMgcb2lLIHasZP7nVt/+fL9bshs4e5exrIPXHx7xEBT+6WmYxACiH X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569)(228905959029699)(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:CO1PR02MB048; BCL:0; PCL:0; RULEID:; SRVR:CO1PR02MB048; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 4:DuFm1ntXBAeBl1DG0j/QCp6zMbbW0o0B3BSH9xlV8MQSHr/HWh/yUfbik7ROQW+epOvePooFfJmLx33+QoLxXSdSkMmJLLJmXgjU9qakujSlaXASJS4kwhCWlBSZPFqDOINkb6PXzHQyT2yWm7P56+LHUo8F1cmOG/MONm7SJwNIpo19jpSf88Ej1H4kxYm/rL3xUMS1fK5rjpc7LF+MtaJV/7J/ED65INAEfSdBn/G4WdvI5OVoxIU3+vO86Vh8mWEwcwxlkjA1Pm/CsTlIxuFUgsDBEF1nFmPxG3RtFZauAjfipRhA37Da22cRjNVFXkMmfvrp535Cdm+m0rs+mizB1wUlbzH7JE9/QgaB6c523Elph0LecqK1deEZ4S9stNuFNyioPQG78kzcd4eWJQwwKI+2up2OQmb1+txz9BxDq1zzU/wMe32SD6hZI1M+BOTfKNwNDHwCJEMrkK+Bt9Jv47IXs2NEwwVYnUqvkHdyj2RZPp1prgx6imlG7THCWWAzmXkE27232bh/S68mUe6WenEE5XSbkPPKVydop5xLHMzQMte0Tt9i4Z/2os4wVmX4muEoyBfWjV/bqiKeVa1Y8YQH9UXzw4Ozq2ZQldFuS7ZlT1g5P2weDX7QP6Ru0AEV+K8w+w+8lsJ9RSVSRuhYbJBSUcT7YIm2Q25LUcy2uR3oXdaP96UTHSId33nTqoABoEitM0OK2aKJlqzf/R8z8Rw+3corYeeJzzrCpmOUIpJz3qGuC7us/LFLHjXU X-Forefront-PRVS: 018577E36E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR02MB048; 23:FoAcmlOJVbXJxHNkkrvCxAvwhiI8DTQc8LIXQcLy37?= =?us-ascii?Q?Soyyk8AG4yst3uLvwLNPH50G1fCULKHhh9T06lNsB74yQzPDDwGXOSizFqGc?= =?us-ascii?Q?Ra057/wDKQipUt8tVRCHHCbOc9ucHxkx2fwQtxYJAZrw37/y+SCWhkWgn6In?= =?us-ascii?Q?MJFMwWhVtzuSRK4gbIAwRXjUFjxcgANFtmvQer0MWkRo9BA1v3a8polqXUPW?= =?us-ascii?Q?dXVC4yuaZ6/5Gy1o32m0KX8OMRFv2oWRG4f23FsRq/blgtP2lmct0hvQ4+sw?= =?us-ascii?Q?nuFZsfeORkBJC87rJbRauouWTZ1fKXd2nEvxALwuq7/6C8GXaCZASquJCCJd?= =?us-ascii?Q?yEr294Lq3+eshOsFe8W8+70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TzUVUEMcs9DBRLDxjkFKC6pjpFa376YDp/0Ck/6vCM68D9HHlWdZtPftp3e+RF2oRMLcSbdL+yoxY+6DZZuYoeKT1T1eMYzs59ezIIuoQ+Ugimq+NH896274knL84fBpXVHErv63DLwGb4sAwHxQFhZhY8pxOh1d8CbKhi8M9b9wyMWheDr7wngZGlrjJ4uNdNbdEt74A== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 19:08:05.1264 (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: CO1PR02MB048 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 Cc: Keith Busch --- drivers/nvme/host/rdma.c | 35 +++++++++++++++++++---------------- drivers/nvme/target/rdma.c | 32 ++++++++++++++++---------------- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 208b6a08781c..877ff1982f38 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -207,7 +207,7 @@ static inline size_t nvme_rdma_inline_data_size(struct nvme_rdma_queue *queue) static void nvme_rdma_free_qe(struct ib_device *ibdev, struct nvme_rdma_qe *qe, size_t capsule_size, enum dma_data_direction dir) { - ib_dma_unmap_single(ibdev, qe->dma, capsule_size, dir); + dma_unmap_single(ibdev->dma_device, qe->dma, capsule_size, dir); kfree(qe->data); } @@ -218,8 +218,9 @@ static int nvme_rdma_alloc_qe(struct ib_device *ibdev, struct nvme_rdma_qe *qe, if (!qe->data) return -ENOMEM; - qe->dma = ib_dma_map_single(ibdev, qe->data, capsule_size, dir); - if (ib_dma_mapping_error(ibdev, qe->dma)) { + qe->dma = dma_map_single(ibdev->dma_device, qe->data, capsule_size, + dir); + if (dma_mapping_error(ibdev->dma_device, qe->dma)) { kfree(qe->data); return -ENOMEM; } @@ -895,9 +896,8 @@ static void nvme_rdma_unmap_data(struct nvme_rdma_queue *queue, } } - ib_dma_unmap_sg(ibdev, req->sg_table.sgl, - req->nents, rq_data_dir(rq) == - WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE); + dma_unmap_sg(ibdev->dma_device, req->sg_table.sgl, req->nents, + rq_data_dir(rq) == WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE); nvme_cleanup_cmd(rq); sg_free_table_chained(&req->sg_table, true); @@ -1008,7 +1008,7 @@ static int nvme_rdma_map_data(struct nvme_rdma_queue *queue, req->nents = blk_rq_map_sg(rq->q, rq, req->sg_table.sgl); - count = ib_dma_map_sg(ibdev, req->sg_table.sgl, req->nents, + count = dma_map_sg(ibdev->dma_device, req->sg_table.sgl, req->nents, rq_data_dir(rq) == WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE); if (unlikely(count <= 0)) { sg_free_table_chained(&req->sg_table, true); @@ -1135,7 +1135,8 @@ static void nvme_rdma_submit_async_event(struct nvme_ctrl *arg, int aer_idx) if (WARN_ON_ONCE(aer_idx != 0)) return; - ib_dma_sync_single_for_cpu(dev, sqe->dma, sizeof(*cmd), DMA_TO_DEVICE); + dma_sync_single_for_cpu(dev->dma_device, sqe->dma, sizeof(*cmd), + DMA_TO_DEVICE); memset(cmd, 0, sizeof(*cmd)); cmd->common.opcode = nvme_admin_async_event; @@ -1143,8 +1144,8 @@ static void nvme_rdma_submit_async_event(struct nvme_ctrl *arg, int aer_idx) cmd->common.flags |= NVME_CMD_SGL_METABUF; nvme_rdma_set_sg_null(cmd); - ib_dma_sync_single_for_device(dev, sqe->dma, sizeof(*cmd), - DMA_TO_DEVICE); + dma_sync_single_for_device(dev->dma_device, sqe->dma, sizeof(*cmd), + DMA_TO_DEVICE); ret = nvme_rdma_post_send(queue, sqe, &sge, 1, NULL, false); WARN_ON_ONCE(ret); @@ -1194,7 +1195,8 @@ static int __nvme_rdma_recv_done(struct ib_cq *cq, struct ib_wc *wc, int tag) return 0; } - ib_dma_sync_single_for_cpu(ibdev, qe->dma, len, DMA_FROM_DEVICE); + dma_sync_single_for_cpu(ibdev->dma_device, qe->dma, len, + DMA_FROM_DEVICE); /* * AEN requests are special as they don't time out and can * survive any kind of queue freeze and often don't respond to @@ -1207,7 +1209,8 @@ static int __nvme_rdma_recv_done(struct ib_cq *cq, struct ib_wc *wc, int tag) &cqe->result); else ret = nvme_rdma_process_nvme_rsp(queue, cqe, wc, tag); - ib_dma_sync_single_for_device(ibdev, qe->dma, len, DMA_FROM_DEVICE); + dma_sync_single_for_device(ibdev->dma_device, qe->dma, len, + DMA_FROM_DEVICE); nvme_rdma_post_recv(queue, qe); return ret; @@ -1455,8 +1458,8 @@ static int nvme_rdma_queue_rq(struct blk_mq_hw_ctx *hctx, return BLK_MQ_RQ_QUEUE_BUSY; dev = queue->device->dev; - ib_dma_sync_single_for_cpu(dev, sqe->dma, - sizeof(struct nvme_command), DMA_TO_DEVICE); + dma_sync_single_for_cpu(dev->dma_device, sqe->dma, + sizeof(struct nvme_command), DMA_TO_DEVICE); ret = nvme_setup_cmd(ns, rq, c); if (ret != BLK_MQ_RQ_QUEUE_OK) @@ -1473,8 +1476,8 @@ static int nvme_rdma_queue_rq(struct blk_mq_hw_ctx *hctx, goto err; } - ib_dma_sync_single_for_device(dev, sqe->dma, - sizeof(struct nvme_command), DMA_TO_DEVICE); + dma_sync_single_for_device(dev->dma_device, sqe->dma, + sizeof(struct nvme_command), DMA_TO_DEVICE); if (rq->cmd_type == REQ_TYPE_FS && req_op(rq) == REQ_OP_FLUSH) flush = true; diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c index 8c3760a78ac0..f8be76f9fb5c 100644 --- a/drivers/nvme/target/rdma.c +++ b/drivers/nvme/target/rdma.c @@ -246,9 +246,9 @@ static int nvmet_rdma_alloc_cmd(struct nvmet_rdma_device *ndev, if (!c->nvme_cmd) goto out; - c->sge[0].addr = ib_dma_map_single(ndev->device, c->nvme_cmd, - sizeof(*c->nvme_cmd), DMA_FROM_DEVICE); - if (ib_dma_mapping_error(ndev->device, c->sge[0].addr)) + c->sge[0].addr = dma_map_single(ndev->device->dma_device, c->nvme_cmd, + sizeof(*c->nvme_cmd), DMA_FROM_DEVICE); + if (dma_mapping_error(ndev->device->dma_device, c->sge[0].addr)) goto out_free_cmd; c->sge[0].length = sizeof(*c->nvme_cmd); @@ -259,10 +259,10 @@ static int nvmet_rdma_alloc_cmd(struct nvmet_rdma_device *ndev, get_order(NVMET_RDMA_INLINE_DATA_SIZE)); if (!c->inline_page) goto out_unmap_cmd; - c->sge[1].addr = ib_dma_map_page(ndev->device, + c->sge[1].addr = dma_map_page(ndev->device->dma_device, c->inline_page, 0, NVMET_RDMA_INLINE_DATA_SIZE, DMA_FROM_DEVICE); - if (ib_dma_mapping_error(ndev->device, c->sge[1].addr)) + if (dma_mapping_error(ndev->device->dma_device, c->sge[1].addr)) goto out_free_inline_page; c->sge[1].length = NVMET_RDMA_INLINE_DATA_SIZE; c->sge[1].lkey = ndev->pd->local_dma_lkey; @@ -282,8 +282,8 @@ static int nvmet_rdma_alloc_cmd(struct nvmet_rdma_device *ndev, get_order(NVMET_RDMA_INLINE_DATA_SIZE)); } out_unmap_cmd: - ib_dma_unmap_single(ndev->device, c->sge[0].addr, - sizeof(*c->nvme_cmd), DMA_FROM_DEVICE); + dma_unmap_single(ndev->device->dma_device, c->sge[0].addr, + sizeof(*c->nvme_cmd), DMA_FROM_DEVICE); out_free_cmd: kfree(c->nvme_cmd); @@ -295,13 +295,13 @@ static void nvmet_rdma_free_cmd(struct nvmet_rdma_device *ndev, struct nvmet_rdma_cmd *c, bool admin) { if (!admin) { - ib_dma_unmap_page(ndev->device, c->sge[1].addr, - NVMET_RDMA_INLINE_DATA_SIZE, DMA_FROM_DEVICE); + dma_unmap_page(ndev->device->dma_device, c->sge[1].addr, + NVMET_RDMA_INLINE_DATA_SIZE, DMA_FROM_DEVICE); __free_pages(c->inline_page, get_order(NVMET_RDMA_INLINE_DATA_SIZE)); } - ib_dma_unmap_single(ndev->device, c->sge[0].addr, - sizeof(*c->nvme_cmd), DMA_FROM_DEVICE); + dma_unmap_single(ndev->device->dma_device, c->sge[0].addr, + sizeof(*c->nvme_cmd), DMA_FROM_DEVICE); kfree(c->nvme_cmd); } @@ -350,9 +350,9 @@ static int nvmet_rdma_alloc_rsp(struct nvmet_rdma_device *ndev, if (!r->req.rsp) goto out; - r->send_sge.addr = ib_dma_map_single(ndev->device, r->req.rsp, - sizeof(*r->req.rsp), DMA_TO_DEVICE); - if (ib_dma_mapping_error(ndev->device, r->send_sge.addr)) + r->send_sge.addr = dma_map_single(ndev->device->dma_device, r->req.rsp, + sizeof(*r->req.rsp), DMA_TO_DEVICE); + if (dma_mapping_error(ndev->device->dma_device, r->send_sge.addr)) goto out_free_rsp; r->send_sge.length = sizeof(*r->req.rsp); @@ -378,8 +378,8 @@ static int nvmet_rdma_alloc_rsp(struct nvmet_rdma_device *ndev, static void nvmet_rdma_free_rsp(struct nvmet_rdma_device *ndev, struct nvmet_rdma_rsp *r) { - ib_dma_unmap_single(ndev->device, r->send_sge.addr, - sizeof(*r->req.rsp), DMA_TO_DEVICE); + dma_unmap_single(ndev->device->dma_device, r->send_sge.addr, + sizeof(*r->req.rsp), DMA_TO_DEVICE); kfree(r->req.rsp); }