From patchwork Fri Jan 20 21:04:36 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: 9529445 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 297256020B for ; Fri, 20 Jan 2017 21:20:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15AB3286D3 for ; Fri, 20 Jan 2017 21:20:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08E1A286D5; Fri, 20 Jan 2017 21:20:48 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 5F9AE286D3 for ; Fri, 20 Jan 2017 21:20:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751267AbdATVUo (ORCPT ); Fri, 20 Jan 2017 16:20:44 -0500 Received: from mail-sn1nam01on0078.outbound.protection.outlook.com ([104.47.32.78]:4016 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751982AbdATVUk (ORCPT ); Fri, 20 Jan 2017 16:20:40 -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=In3DqSSQ24EH99psMOFCK77W8MsVRFOFWW6VrAh/9cQ=; b=CMDkAVQhyn5dv+JCSeMt0Bwavz7xJ+dMxe8PNr0oVDcG9AEQNTuhF/tYhOr1RPyIiaVvUdzm05s+RpUu4rwSQEY09sXlkC/Uw2uGBl7+kjI+EDcqWmPiNF9MZuQK3CmlL/YUGQbSd8hqG4XEyhuHtQa3kHyZISD37cKLOVefHgM= Received: from BY2PR02CA0073.namprd02.prod.outlook.com (10.242.32.31) by BY2PR02MB1284.namprd02.prod.outlook.com (10.162.79.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Fri, 20 Jan 2017 21:04:51 +0000 Received: from BY2FFO11FD012.protection.gbl (2a01:111:f400:7c0c::166) by BY2PR02CA0073.outlook.office365.com (2a01:111:e400:2c2a::31) 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; Fri, 20 Jan 2017 21:04:50 +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 BY2FFO11FD012.mail.protection.outlook.com (10.1.14.130) 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; Fri, 20 Jan 2017 21:04:50 +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 91.D8.01420.44972885; Fri, 20 Jan 2017 12:55:32 -0800 (PST) Received: from milsmgip11.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; Fri, 20 Jan 2017 13:04:41 -0800 X-AuditID: 0ac94371-7ee9b9800001058c-61-58827944cbdb Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id F2.43.16817.96B72885; Fri, 20 Jan 2017 13:04:41 -0800 (PST) From: Bart Van Assche To: Doug Ledford CC: , Bart Van Assche Subject: [PATCH v3 36/37] IB/core: Remove ib_device.dma_device Date: Fri, 20 Jan 2017 13:04:36 -0800 Message-ID: <20170120210437.26389-37-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170120210437.26389-1-bart.vanassche@sandisk.com> References: <20170120210437.26389-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsXCddJ5ka5LZVOEwcH3/BYvz39gtXh2qJfF gcnj/b6rbB6fN8kFMEVx2aSk5mSWpRbp2yVwZSzonstYcM+gYuL5XvYGxr0aXYycHBICJhIH n75k7WLk4hASWMok8eHyZzYIZxujxJ+9N1hgqjq/34Cq2swo8XXKDnaQBJuAkcS39zPBikQE 1CQ2vVoEFmcW8JOYcqIJzBYWsJPonToFaCoHB4uAqsTr05YgYV4BB4nrnafYIObLS+xqu8gK YnMCxT9d7mMEsYUE7CWOX37KDrJXQuA+i8T95efYIZoFJU7OfMICsUtC4uCLF8wQDeoSJ5fM Z5rAKDQLSdksJGULGJlWMYrlZuYU56anFhia6BUn5qVkFmfrJefnbmKEhGzhDsbXt70PMQpw MCrx8CoENEUIsSaWFVfmHmKU4GBWEuF9DQx4Id6UxMqq1KL8+KLSnNTiQ4zSHCxK4rwXoz+G CQmkJ5akZqemFqQWwWSZODilGhgvbfX8w3b5kOi6hFUJ/5zFj7UqfD3g1b+YfdfvoiP+Cy6J CZc3Or0LE1rhbhzuqia6WupssVy7yJ0rTrF1GX08y42jPphHMN91Kra6dMi4OU/1rU3dOZ/r v3sDfvOVOp/Vnxx3f9KiU+Jbu4yvSB2XPNI2s6vgEfOjDRsFXs9g4Pa/xr2LSVGJpTgj0VCL uag4EQBpKLYSVQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkuLIzCtJLcpLzFFi42Lh2siRoptZ3RRhMHODvMXBn22MFi/Pf2C1 eHaol8WB2eP9vqtsHtPWnGfy+LxJLoA5issmJTUnsyy1SN8ugStjQfdcxoJ7BhUTz/eyNzDu 1ehi5OSQEDCR6Px+gxXEFhLYyCixfIEBiM0mYCTx7f1MFhBbREBNYtOrRewgNrOAn8TZlndg trCAnUTv1ClsXYwcHCwCqhKvT1uCmLwCDhLbJqhDTJeX2NV2EWw6J1D40+U+RohN9hLHLz9l n8DIvYCRYRWjWG5mTnFuemaBoaFecWJeSmZxtl5yfu4mRrCXOSN3MD6daH6IkYmDU6qBse9J f/ic63UTta9Pa1e/kGF82y+Jx8N3wcSDv8I2dNlYnLl037XBytLU6qn82ROtPiultb+tcV+q Y/w+YB6/46fWILd17K6ei+aw7L3D9rcpJNRein3bvwOnq6UfRDVM5/P8rVqebP/n9U6Tjxeq btzhuWqyt+vBrelaRx/e+6c86ZJTq4xxhRJLcUaioRZzUXEiAKPjfEuiAQAA 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)(39450400003)(39840400002)(39860400002)(39850400002)(39410400002)(2980300002)(438002)(199003)(189002)(8676002)(356003)(50466002)(53936002)(36756003)(1076002)(38730400001)(77096006)(106466001)(54906002)(2906002)(76176999)(48376002)(4326007)(92566002)(305945005)(2270400002)(189998001)(47776003)(97736004)(50986999)(107886002)(81156014)(8936002)(4001430100002)(50226002)(5003940100001)(626004)(68736007)(2950100002)(69596002)(33646002)(6666003)(5660300001)(6916009)(86362001)(81166006)(110136003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB1284; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD012; 1:dZZ5vh7B6WyS3xxyXKdpUyyESAk3qDU5LMZQ6i57RV86Hx3bnIizWW23A76N70Yfw0FWJqCgqJNgz9nycDZSZhQi+VxhaXoAJPUbksvf23taBSTT28VvL9TRodZwht/6l/hb5RBLiABN6UJOveyGgXPTIhIInjIIa3WqX0mtpp4ZBLAimb5DCt2NYYYUhfxSABNvzxVUF1S7NiLYiio5/guC5JFTMbeURfnBYUf6i/k1Vk06nN0xO04AZ/Ly6L2O1m1uJ8ZFVO/PkkK4jKZdiA5DsuucDJ5LMRk3hfnF85x5zvIENFYVh8h5S+3uw9uQcWFbtoF8E4c2Jdh6MT/KKQqPziZNbLMVeRCDg+2TtFMPpcTemMH0xy3Jo7y41kzXkLD/+epPf+2TMtwp5mlbuAOZ1HnTWcfBHbO6LMn2WGAyI9WnP7ET3M1phxpTr52DOxJDaB4jAe1dK8tn3ArjzoH46IRZMRRZ9TZ6i7Rz4Qi6PbTSQOlQihnTPreTJ6pH X-MS-Office365-Filtering-Correlation-Id: 1bcbaf8c-ae3b-4bce-e603-08d44177f96f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BY2PR02MB1284; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1284; 3:LEJQ+nWQgoEMQ6NVkSq8ZJll8Gvl/aVsBoYfyxYZ6oYyjpabW1Fhyk8v5YaRJUEFlkPfJvqEFt9p0Wjo6rhaIW9ZLROod2Txc76jrsUU2s58s1O9Jxlczzm5SbSUZ3cIvPiRPuA/KHwxFJctn4yTT35eIGWy8bcR1/JeEDvwH1Ruh6E2fTz+qM/3d14HPRZZBxT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Ldba1Omy34nK2NmKPZOIM9n24Kwe6WjzRcWOHGMNnzVPsRgdtWh+uS4+uA6Jo79y8zb3FLQhpUzPDiKMikkzuHbfd4TZO6x89dRfjiDrQn4H2jxMBl/md4vZzHAIGu4Erpa5efN6QLWDceUMGQYdmi9B4gCuvIOmIQGP3Gq4CodJOK30g5HvHIc1UAYChHkJd3xgbF4KtYInYkIiKhL690sOi2Gqc+V1s+kmJ30GCpgGoEHrsYZR+vgzk8XlxPy4FA1XXTr1I+NMD5mRXUgn/XHRAGZKBt/WCjcr6K1tz9xYhcHrT+pIITIdlzYVQFliKqjx/K0tMqanUvRTpo6OXTR/iF4wU6ZB+3gzgDsa5jpd0BKVirVhg3/xcqN9R9jzaAYFvadjQECupLjI9JNF98MjnB49tXIckGxfdjlR2hLE1EAfrBZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(6072148); SRVR:BY2PR02MB1284; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB1284; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1284; 4:gpshUKSKAJ05QY6/zBS8MkQiklgMowJRq4g0mXKhvQin5y2G7uquxK2qBATWMHsPrjIqHaN4Y0Hocznu5Qp3y4lpMO4Py9i7Kngh4z8xUTC+qRVoHsqtDnYeSYgE2Wxmb84LUmVf4xH0AKJsxYtTZJpNcAMiFPZuWMIydCfbfW89d94ofWj4I4ocMlv3ajl8x64HBdVO449ZO0xF+R6wnbs+6+Wb/YphswBFrpcjn4Izh5kPYDLhrOACqgOM6fXWl6o73pdwCVRYPqg/HPkS3/pHJHbye5sSg2A1nE+jRCwfMKvPVymFG3hgS358yg4Cjfi6uMfap0qCb/0R4ipaA2v3GjasWPodabjECoXLnl1AXr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eMH/0UYf0QO8rYb?= =?us-ascii?Q?8FZ3NTTo40n/64RgeVDeLgqwSg5OUFc/7/hhxxDw4G5/q8MTTip+wmyjRwL0?= =?us-ascii?Q?8bJJmAwxWmmg3Q52zJNKJXHUcG5qZnyF68j5/BtIXMvSobNEouRwPnSQqgmb?= =?us-ascii?Q?zmPDikYAsWbFcsUvDbkyDI0DxX+6OBC2okdZGj0epZTnOP5OeetN5vHmsa+q?= =?us-ascii?Q?nKWFIgGYP1hiY2BM3bjAen/lQK42uZa6zQ27H4cH3zrTlfGJTKtfRVTLll6S?= =?us-ascii?Q?AUK6iGssINCpHBgV29IKJ9uTewaLdAdoq2Vbe5892c+wD78KKFdmmr8bVkGw?= =?us-ascii?Q?0YsNppccNvU5DRDFIpHI80qTO8numulPLimp0z4nk5YINTuaqh/GDDPwdTpx?= =?us-ascii?Q?EFClNz9Xs5VxKn8PnExCtIcSUGYR56SfqEoWXs4uShjnAFsFSYP2ezsfFoxK?= =?us-ascii?Q?XfwX+lkD+myD6RrTpiV2TFNxh0q6WmZGaeZXIveFTsUBB7qqIZllhisgdDJn?= =?us-ascii?Q?cWHc5vG8yBAUh10zHtnP2wGCGznJ5IV5YVqCDf7P3IjRL5HDGF85N1cBm0mU?= =?us-ascii?Q?vuEYTVlexf2CH9wwBYycUs+hfxNujBfNh7wW82S+c05urxiZTKXqXUbs4Lxa?= =?us-ascii?Q?9v1owaTkCYiAw0uEFigmbUjww7R6wu8kAXL?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1284; 6:xgtHI3gli8RZuicggZxnEPbrlFT8mIxOvTZtSxXVvZxoVu3Y2eU8oDoU5RYoZRHrk6OyGCXDZ6cdmE5YoydOSXHIf+qTADto+iaqYLq+7wPmuAWW2YPGOZmv2XERBj5sDzEnkiDUX5bbIpl1GgWorUWGmMSBkk5Tyx7ZNhB/26kOrtEzVrghaiWTszoF6Xto4+GTn7Pfq1y08nDpewfjbNtMbxPb+sT+rFdFZi4z4992E1bjArI3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ange-CrossTenant-OriginalArrivalTime: 20 Jan 2017 21:04:50.7544 (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: BY2PR02MB1284 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 Add code in ib_register_device() for copying the DMA masks. Use &ib_device.dev in DMA mapping operations instead of dma_device. Remove ib_device.dma_device because due to this and previous patches it is no longer used. Signed-off-by: Bart Van Assche --- drivers/infiniband/core/device.c | 17 +++++++++-------- include/rdma/ib_verbs.h | 31 +++++++++++++------------------ 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index d543c4390447..cac1518de36e 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -333,14 +333,15 @@ int ib_register_device(struct ib_device *device, int ret; struct ib_client *client; struct ib_udata uhw = {.outlen = 0, .inlen = 0}; - - WARN_ON_ONCE(!device->dev.parent && !device->dma_device); - WARN_ON_ONCE(device->dev.parent && device->dma_device - && device->dev.parent != device->dma_device); - if (!device->dev.parent) - device->dev.parent = device->dma_device; - if (!device->dma_device) - device->dma_device = device->dev.parent; + struct device *parent = device->dev.parent; + + WARN_ON_ONCE(!parent); + if (!device->dev.dma_ops) + device->dev.dma_ops = parent->dma_ops; + if (!device->dev.dma_mask) + device->dev.dma_mask = parent->dma_mask; + if (!device->dev.coherent_dma_mask) + device->dev.coherent_dma_mask = parent->coherent_dma_mask; mutex_lock(&device_mutex); diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index fd4e42dd1efc..f09ed2f81c91 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1840,8 +1840,6 @@ struct ib_port_immutable { }; struct ib_device { - struct device *dma_device; - char name[IB_DEVICE_NAME_MAX]; struct list_head event_handler_list; @@ -2968,7 +2966,7 @@ static inline int ib_dma_mapping_error(struct ib_device *dev, u64 dma_addr) { if (dev->dma_ops) return dev->dma_ops->mapping_error(dev, dma_addr); - return dma_mapping_error(dev->dma_device, dma_addr); + return dma_mapping_error(&dev->dev, dma_addr); } /** @@ -2984,7 +2982,7 @@ static inline u64 ib_dma_map_single(struct ib_device *dev, { if (dev->dma_ops) return dev->dma_ops->map_single(dev, cpu_addr, size, direction); - return dma_map_single(dev->dma_device, cpu_addr, size, direction); + return dma_map_single(&dev->dev, cpu_addr, size, direction); } /** @@ -3001,7 +2999,7 @@ static inline void ib_dma_unmap_single(struct ib_device *dev, if (dev->dma_ops) dev->dma_ops->unmap_single(dev, addr, size, direction); else - dma_unmap_single(dev->dma_device, addr, size, direction); + dma_unmap_single(&dev->dev, addr, size, direction); } /** @@ -3020,7 +3018,7 @@ static inline u64 ib_dma_map_page(struct ib_device *dev, { if (dev->dma_ops) return dev->dma_ops->map_page(dev, page, offset, size, direction); - return dma_map_page(dev->dma_device, page, offset, size, direction); + return dma_map_page(&dev->dev, page, offset, size, direction); } /** @@ -3037,7 +3035,7 @@ static inline void ib_dma_unmap_page(struct ib_device *dev, if (dev->dma_ops) dev->dma_ops->unmap_page(dev, addr, size, direction); else - dma_unmap_page(dev->dma_device, addr, size, direction); + dma_unmap_page(&dev->dev, addr, size, direction); } /** @@ -3053,7 +3051,7 @@ static inline int ib_dma_map_sg(struct ib_device *dev, { if (dev->dma_ops) return dev->dma_ops->map_sg(dev, sg, nents, direction); - return dma_map_sg(dev->dma_device, sg, nents, direction); + return dma_map_sg(&dev->dev, sg, nents, direction); } /** @@ -3070,7 +3068,7 @@ static inline void ib_dma_unmap_sg(struct ib_device *dev, if (dev->dma_ops) dev->dma_ops->unmap_sg(dev, sg, nents, direction); else - dma_unmap_sg(dev->dma_device, sg, nents, direction); + dma_unmap_sg(&dev->dev, sg, nents, direction); } static inline int ib_dma_map_sg_attrs(struct ib_device *dev, @@ -3081,9 +3079,7 @@ static inline int ib_dma_map_sg_attrs(struct ib_device *dev, if (dev->dma_ops) return dev->dma_ops->map_sg_attrs(dev, sg, nents, direction, dma_attrs); - else - return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, - dma_attrs); + return dma_map_sg_attrs(&dev->dev, sg, nents, direction, dma_attrs); } static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, @@ -3095,8 +3091,7 @@ static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, return dev->dma_ops->unmap_sg_attrs(dev, sg, nents, direction, dma_attrs); else - dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, - dma_attrs); + dma_unmap_sg_attrs(&dev->dev, sg, nents, direction, dma_attrs); } /** * ib_sg_dma_address - Return the DMA address from a scatter/gather entry @@ -3141,7 +3136,7 @@ static inline void ib_dma_sync_single_for_cpu(struct ib_device *dev, if (dev->dma_ops) dev->dma_ops->sync_single_for_cpu(dev, addr, size, dir); else - dma_sync_single_for_cpu(dev->dma_device, addr, size, dir); + dma_sync_single_for_cpu(&dev->dev, addr, size, dir); } /** @@ -3159,7 +3154,7 @@ static inline void ib_dma_sync_single_for_device(struct ib_device *dev, if (dev->dma_ops) dev->dma_ops->sync_single_for_device(dev, addr, size, dir); else - dma_sync_single_for_device(dev->dma_device, addr, size, dir); + dma_sync_single_for_device(&dev->dev, addr, size, dir); } /** @@ -3182,7 +3177,7 @@ static inline void *ib_dma_alloc_coherent(struct ib_device *dev, *dma_handle = handle; return ret; } - return dma_alloc_coherent(dev->dma_device, size, dma_handle, flag); + return dma_alloc_coherent(&dev->dev, size, dma_handle, flag); } /** @@ -3199,7 +3194,7 @@ static inline void ib_dma_free_coherent(struct ib_device *dev, if (dev->dma_ops) dev->dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); else - dma_free_coherent(dev->dma_device, size, cpu_addr, dma_handle); + dma_free_coherent(&dev->dev, size, cpu_addr, dma_handle); } /**