From patchwork Thu Jan 12 19:07:08 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: 9514035 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 D65C8601E7 for ; Thu, 12 Jan 2017 19:11:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7490286DC for ; Thu, 12 Jan 2017 19:11:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB0802870D; Thu, 12 Jan 2017 19:11:29 +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 D60EA286DC for ; Thu, 12 Jan 2017 19:11:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750803AbdALTLZ (ORCPT ); Thu, 12 Jan 2017 14:11:25 -0500 Received: from mail-sn1nam01on0045.outbound.protection.outlook.com ([104.47.32.45]:59556 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751041AbdALTIV (ORCPT ); Thu, 12 Jan 2017 14:08:21 -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=DS8qLqZYRrgS3C57EPSNA1KHAIfs9yIN5VnnZJR3a+g=; b=Ar9UbtE2Sn/EeBio4s+xgUkYYkc+xKebs9Gkr2oz8ostomQGVakBi+0SxHqLCBuZpMHvQlYYBQ03KW7Hhybw12QQmclwU/6x5v279bVTHl5KGCJ3esDHHgGB8boRRKCrUS8/ip8iQzvihN3DXdSZ9o9vAgOJRd9J+n7+BRPPMJY= Received: from BY2PR02CA0045.namprd02.prod.outlook.com (10.141.216.35) by SN1PR02MB1424.namprd02.prod.outlook.com (10.162.0.28) 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:12 +0000 Received: from BL2FFO11OLC011.protection.gbl (2a01:111:f400:7c09::104) by BY2PR02CA0045.outlook.office365.com (2a01:111:e400:2c40::35) 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:11 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; linuxfoundation.org; dkim=none (message not signed) header.d=none; linuxfoundation.org; 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 BL2FFO11OLC011.mail.protection.outlook.com (10.173.160.157) 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:08 +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 D1.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-ea-5877d1691879 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id BD.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 16/26] IB/IPoIB: Inline ib_dma_map_*() functions Date: Thu, 12 Jan 2017 11:07:08 -0800 Message-ID: <20170112190718.6728-17-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+NgFrrILMWRmVeSWpSXmKPExsXCddJ5kW7mxfIIg4U39Cxenv/AatG8eD2b xeVdc9gsnh3qZXFg8dg/dw27x/t9V9k8Pm+SC2CO4rJJSc3JLEst0rdL4MqYOOEba8Fby4qu pg62BsYv+l2MnBwSAiYSq7a/YOli5OIQEljKJNE2cxOUs41RoqfrNGMXIwdY1cu1jBDxjYwS f55/YwfpZhMwkvj2fiYLiC0ioCax6dUidpAiZoHFjBLtp5cxgySEBZwlzl7cygRiswioSmye uIEFZCivgL3Ek8lCEFfIS+xqu8gKYnMChb/9v8QIYgsJ2EnsOvAf7CAJgSZWiRMb3oMt4xUQ lDg58wmYzSwgIXHwxQtmiAZ1iZNL5jNNYBSahaRsFpKyBYxMqxjFcjNzinPTUwsMTfWKE/NS Mouz9ZLzczcxQgI6cwfj3SfehxgFOBiVeHh32JRFCLEmlhVX5h5ilOBgVhLhnXW+PEKINyWx siq1KD++qDQntfgQozQHi5I4r9u9L2FCAumJJanZqakFqUUwWSYOTqkGRtYpgcuOV17acHPh xEW/Nu7UDJ7y1FfovzB7oKiFEHeavkXoeQUpSRGe/wn/BC6+uRJq6+nM+eZjrMeDaY6rYj4E T5ppkXq6tH3THN9li+ZKbVjmp8U29chNu9khfN8t6mbeD6uKXxdvZ8THFj9VMbZVdnfwsSeH yu5OV2mrDNjwlX/zpS8W85RYijMSDbWYi4oTAeMgfrRkAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAJMWRmVeSWpSXmKPExsXCtZGTTZfvSnmEwd8tphYHf7YxWrw8/4HV onnxejaLy7vmsFk8O9TL4sDqsX/uGnaP9/uusnlMW3OeyePzJrkAligum5TUnMyy1CJ9uwSu jIkTvrEWvLWs6GrqYGtg/KLfxcjBISFgIvFyLWMXIxeHkMB6RokTG5YwdTFycrAJGEl8ez+T BcQWEVCT2PRqETuIzSywkFFi4i8pEFtYwFni7MWtYPUsAqoSmyduAKvnFbCXeH3zF1i9hIC8 xK62i6wgNidQ/Nv/S4wgtpCAncSuA/9ZJjByL2BkWMUolpuZU5ybnllgaKRXnJiXklmcrZec n7uJERIGUTsYr080P8TIxMEp1cDYv6vUPN7hyjsBSyHOMj+tiP0bE+b2lkl72Txd2BQ8ze5e dIYm997wHZKn1hxqitVbW3cp31z6QFHMh7k8Z6JfO/DwT9+xIjNLlX2nWhHbzZsPYjwEJ8/7 m2nt6GjT8eGWItOW7Pjnd/91yRgVlYr27r6S9PdsVNXOC0+vqaT+ODjhkKZn8hQlluKMREMt 5qLiRABfhAbkswEAAA== 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)(39840400002)(39450400003)(39860400002)(39410400002)(39850400002)(2980300002)(438002)(189002)(199003)(50986999)(106466001)(4001430100002)(76176999)(54906002)(626004)(5660300001)(33646002)(4326007)(8936002)(2906002)(50466002)(48376002)(50226002)(8676002)(1076002)(68736007)(81166006)(81156014)(2270400002)(6916009)(2950100002)(69596002)(36756003)(92566002)(6666003)(47776003)(356003)(5003940100001)(305945005)(38730400001)(77096006)(110136003)(107886002)(189998001)(86362001)(97736004)(50929005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR02MB1424; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC011; 1:vi/0YJUrLqGj8JicTX4oyfJ1Tap5V2OAEsTBCXLPbnn09rDceaDbzaoKgAM9X4FC0iF6SaLFWPtqTqZCANz+i0K99MS1xy0PXAJ96RmrHhfLXw9GzCFcZwWGsUfSNrLIZQX/azKncSkfxEx6KpfngS5ha99qOXn6ZjB1AqGv41n9bSfwqYvaFRWC3pTAsmq2Lu5fN0YWmLiQczpqp8RhZsh9HRhkhGqBZWPa1llmodXv0c2FDds5zV0xhLK9V7kZrhuE8od15lHxkBKCtjocyALgd/eT08ajemjclhy6B4p28a07RZ6kFu/B8E+yvVS6ZS0+Lat5oRJs2CYfpE2To8a0L0Gi6Gi4TobDnKsdEl6vk9txNtuYpjpv0HFwDtsCTV7QVdNnuGBhHV61uSDBv6EHsY9QI+Hu2V7kcc4UzOY3RKZXineUezHaV+nxvMUUdS8YtP91w7ZYH/zxvD8ToEx7ZZo3DGPIwVSvPPqV9shx+KYh5owCBHfKzdG3J+se X-MS-Office365-Filtering-Correlation-Id: 3b4670e9-04f2-41e1-d6a0-08d43b1e59ec X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:SN1PR02MB1424; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1424; 3:GIVJvvRr0xDuCVk1K40xZUEiQRYuEX932nIb6QU5czAlexaHqjuzbWv8w3DWMh8blZUd1b+NkkPL46Wyk6LtTXjfRlaxWplA1WKQRpV6uaBYfRyOOuQFwgcGnNn9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5HgEIVvlQ==; 20:1o12e6wKvXNZZAq5fcovgBe+/fgBup+7zMs09zRp0//p7Amnx038vItfONf2rSBh8oahzex8NMwl1zcFZJL9vTQ+vAjXVRyC7A6eo2h/6MvBu9ZRF1q/AfKYhtkIvH3PAE+AqmWq/Gzl2LSR5bbVdUDXIIqRWyjGJfYU/XPMgCtCTZipPxP0NGqcQOuvbPTfLoIy0CeqU0RzSS4/lQI2RX6W5D11k55R5jqMOkRnGqp90W649T5n91yEzRnrFPupzImSb6sglu1lakXEYQoq3Kz6Ox87HLCxAFLkHunajf7ZvIM1C5wOquzPG/a6G1X4IzPk5SUUw+mYQXJ5e2dJpVG+ORxgmACB3LoekHjI/t7632nKq/BkToeMy4ErnAC2hA8laUB0+sUh8VvtmfVH7ldjQ3WyC48SH9wwzBedQ4Pm0T1WXgoeRX72KGVAbAlcLDxHWo2xn2brVvEDYqSzhkkLcDiCrrpZef31NcuRX28+gSuPvTQezF91RXNoiF8J 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)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:SN1PR02MB1424; BCL:0; PCL:0; RULEID:; SRVR:SN1PR02MB1424; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1424; 4:q6luLEGE4bNXeuBxONKpzjk7AVIfhI9isux9loSv9iRyfMnpPJu0zVULZwm0YJ7YEXPPeaPidLmxovIbAXb1SqzDff2nCIr7Z8e/A8wviN80IyZYmgGS+5vh4PU8c3pzArz7p2apPrQH7r2CXg4jfzle/mJl5aJCd2G4C+N0xLjxF2oocqukPDKI25yruVb8HOTY7pRi9oxvvnCHelV4SLxxajSQt/OH2MD30mLl3bgXjt5WWwkbQ1/zF+YukHWn9S9u3bw5gHmBHhZVmHLeJr+GFGykoJiQAUgXsPkToYU6/NM8djCfekHQGObojTX5JGljog12Bz/leBRqBDBB4QXruj9dBs/O5wOxehxGpgDLC4rG6ikEvzW6BXM6/5iQP97APrSOVNLIV7tCPnO+K6Nl2i9apA9aIhttFIHYQzVexwymT1mvAh6PcYfDmXTBi0ym1wv7fnN7F7hplvG7WCJesGPTLnkQNYzzK0ZN9JrTCSS+yOmRbnn2iWpfltdAzaJoA7eYXkajyd3/W8XAtapIe3bsbd780oeOYFvqG73Vcspb+gpCMTqr3LvFelTobow7iytfov3JWZiirdyPCqwj2xlggD0zAtbFfBA/X/wn4iTUfKojDJf2yr70ZCiIa/NHWGdhmprxqmL8kuytaeZPv9bk+jC4oRjGGV+n6w54c2fUGYUg3WtXC+TbFTJnemTwFEw77ZA7CI35OHVSp+ncePc+nV5j4wM+L436tws= X-Forefront-PRVS: 018577E36E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR02MB1424; 23:NUBA0ztibnNgkDZfxlISrLNAvvVS5QLoQZgndHfgI?= =?us-ascii?Q?gEkRMBGWujmwhA4i21k/cnHfUWb5VCOCF24pJaj1xoYCnm0Gn9HbUXWWzQCe?= =?us-ascii?Q?ofE62DivD+eeMg8z+2fZofSd8GzCmNszmQstgHOfaBLphFfvyjqPDIkvZd8K?= =?us-ascii?Q?FEEnzWJUgKkYReHTslkD4YneylQHu3uP+xUYXNarTtMTG+DzGA06/NkW93mY?= =?us-ascii?Q?r/G0eYIFMZYYJuriePZ9SB36JyccGtDSU5wlTghf49V0PormBC+Ro8MhEmpi?= =?us-ascii?Q?lIw/3+XsXWQvQtpSuKBo5vgcwCjLdmWIQnIUgg/g7VgC0NSN9CuAc8e/GYAm?= =?us-ascii?Q?VoDPSV4dTDFWbFgAek/UmgB/2WhxI3HeDBG/QVODq4r5uvtaGv/VPx5yCFq9?= =?us-ascii?Q?FL/PqnB8IOzgR7wvwOYM5/dGAz0zdF+Kgm2Hl5A4eEMjqxLd+oTyFDPEvhaq?= =?us-ascii?Q?a8lb2tJ0SzRGBFMh0piCiLxM2nEWUGFxrSQisOypIw+MbQopqxnEy4fhOOZZ?= =?us-ascii?Q?tBSGv2254yx8ECB1XWeuEuEXxsaEGYvJSL7+Kn4peLh+94KZulIsRsa48RDK?= =?us-ascii?Q?nC1vCYJXzPI2xdUgVUn3gqE3/Rn+qZmociImvVr3a7CG8cZrY+BhIawJsX+w?= =?us-ascii?Q?e0DmbTpLKA+XVZ3ILuqQJUgBF28p7pccAXzBYhpuvlRrt/6G2LSBTHkVfNp6?= =?us-ascii?Q?hrlqKiydr678DVbAH8OjmWmlBq6KAI3fPl/toQt6IzuEoPugdE9R04DOoPwV?= =?us-ascii?Q?09TZBRUxBgOAaCCXsfSHhaq2KIXPK3nEk9FMBMMalkQLjuxQ+nDYGfaJDV31?= =?us-ascii?Q?AZw2O77onWbYM5y7L38nwPOQMkzcD/BupwVOzvgSCTtj9NrdRAfDiPsTxp6/?= =?us-ascii?Q?y2xq7VW03DMUITfdnHejyfBrHtlvJMQ1YarBvrNgRv4jjjITKhPiiLbsQo1D?= =?us-ascii?Q?+tiRVpAgns/2b7U910cEm/UOKXBv5t7DaEzzTGny3VONlu38PShXezYf9DAe?= =?us-ascii?Q?vfkdYIQfaGfvSLFLHuC+DLzH6CYdsMubHCtRFAvlRLsC4kXgMj/Ys27YV9Y6?= =?us-ascii?Q?Bho9C3mHRPv6vvx0CXNxBcXnU4oB1ub3DIF20212Xdo0ZNOLUjE4RrFE6qaV?= =?us-ascii?Q?T28oy+Xor2+Gw7VzaLX4HXjI8v5YCZgh6Ikw25QVorZ8D3ZR24fKnTqAoG9U?= =?us-ascii?Q?epyKa316j0My+/I3kPZY142zsmH/m/nbsxR?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1424; 6:QFMjfjKnL+4zz0YqMwKHwpTrr+uUq2KGrp3HxPS20xgcTnDESA8CntF7j59TeqgAOs1km9LZRysX3sITokQKgbK+JRdSPUtLwwmrnSYHbw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s7RQMFIb3QBx2hnivYxeS3vlU1PlE+Lx9VblayEyq2JxCoDZUt3cYDi9qEF1C7UhGaXvubI4jBkUHzAf8j3+YMN3GBfGYYEFL3thQ== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 19:08:08.9398 (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: SN1PR02MB1424 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 Reviewed-by: Yuval Shaia --- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 34 +++++++++++++++----------- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 42 +++++++++++++++++---------------- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 096c4f6fbd65..6d91593852e9 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -83,10 +83,12 @@ static void ipoib_cm_dma_unmap_rx(struct ipoib_dev_priv *priv, int frags, { int i; - ib_dma_unmap_single(priv->ca, mapping[0], IPOIB_CM_HEAD_SIZE, DMA_FROM_DEVICE); + dma_unmap_single(priv->ca->dma_device, mapping[0], IPOIB_CM_HEAD_SIZE, + DMA_FROM_DEVICE); for (i = 0; i < frags; ++i) - ib_dma_unmap_page(priv->ca, mapping[i + 1], PAGE_SIZE, DMA_FROM_DEVICE); + dma_unmap_page(priv->ca->dma_device, mapping[i + 1], PAGE_SIZE, + DMA_FROM_DEVICE); } static int ipoib_cm_post_receive_srq(struct net_device *dev, int id) @@ -158,9 +160,9 @@ static struct sk_buff *ipoib_cm_alloc_rx_skb(struct net_device *dev, */ skb_reserve(skb, IPOIB_CM_RX_RESERVE); - mapping[0] = ib_dma_map_single(priv->ca, skb->data, IPOIB_CM_HEAD_SIZE, - DMA_FROM_DEVICE); - if (unlikely(ib_dma_mapping_error(priv->ca, mapping[0]))) { + mapping[0] = dma_map_single(priv->ca->dma_device, skb->data, + IPOIB_CM_HEAD_SIZE, DMA_FROM_DEVICE); + if (unlikely(dma_mapping_error(priv->ca->dma_device, mapping[0]))) { dev_kfree_skb_any(skb); return NULL; } @@ -172,9 +174,9 @@ static struct sk_buff *ipoib_cm_alloc_rx_skb(struct net_device *dev, goto partial_error; skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE); - mapping[i + 1] = ib_dma_map_page(priv->ca, page, - 0, PAGE_SIZE, DMA_FROM_DEVICE); - if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1]))) + mapping[i + 1] = dma_map_page(priv->ca->dma_device, page, + 0, PAGE_SIZE, DMA_FROM_DEVICE); + if (unlikely(dma_mapping_error(priv->ca->dma_device, mapping[i + 1]))) goto partial_error; } @@ -183,10 +185,12 @@ static struct sk_buff *ipoib_cm_alloc_rx_skb(struct net_device *dev, partial_error: - ib_dma_unmap_single(priv->ca, mapping[0], IPOIB_CM_HEAD_SIZE, DMA_FROM_DEVICE); + dma_unmap_single(priv->ca->dma_device, mapping[0], IPOIB_CM_HEAD_SIZE, + DMA_FROM_DEVICE); for (; i > 0; --i) - ib_dma_unmap_page(priv->ca, mapping[i], PAGE_SIZE, DMA_FROM_DEVICE); + dma_unmap_page(priv->ca->dma_device, mapping[i], PAGE_SIZE, + DMA_FROM_DEVICE); dev_kfree_skb_any(skb); return NULL; @@ -626,11 +630,13 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc) small_skb = dev_alloc_skb(dlen + IPOIB_CM_RX_RESERVE); if (small_skb) { skb_reserve(small_skb, IPOIB_CM_RX_RESERVE); - ib_dma_sync_single_for_cpu(priv->ca, rx_ring[wr_id].mapping[0], - dlen, DMA_FROM_DEVICE); + dma_sync_single_for_cpu(priv->ca->dma_device, + rx_ring[wr_id].mapping[0], + dlen, DMA_FROM_DEVICE); skb_copy_from_linear_data(skb, small_skb->data, dlen); - ib_dma_sync_single_for_device(priv->ca, rx_ring[wr_id].mapping[0], - dlen, DMA_FROM_DEVICE); + dma_sync_single_for_device(priv->ca->dma_device, + rx_ring[wr_id].mapping[0], + dlen, DMA_FROM_DEVICE); skb_put(small_skb, dlen); skb = small_skb; goto copied; diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 5038f9d2d753..79204bd966bd 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -92,9 +92,8 @@ void ipoib_free_ah(struct kref *kref) static void ipoib_ud_dma_unmap_rx(struct ipoib_dev_priv *priv, u64 mapping[IPOIB_UD_RX_SG]) { - ib_dma_unmap_single(priv->ca, mapping[0], - IPOIB_UD_BUF_SIZE(priv->max_ib_mtu), - DMA_FROM_DEVICE); + dma_unmap_single(priv->ca->dma_device, mapping[0], + IPOIB_UD_BUF_SIZE(priv->max_ib_mtu), DMA_FROM_DEVICE); } static int ipoib_ib_post_receive(struct net_device *dev, int id) @@ -139,9 +138,9 @@ static struct sk_buff *ipoib_alloc_rx_skb(struct net_device *dev, int id) skb_reserve(skb, sizeof(struct ipoib_pseudo_header)); mapping = priv->rx_ring[id].mapping; - mapping[0] = ib_dma_map_single(priv->ca, skb->data, buf_size, - DMA_FROM_DEVICE); - if (unlikely(ib_dma_mapping_error(priv->ca, mapping[0]))) + mapping[0] = dma_map_single(priv->ca->dma_device, skb->data, buf_size, + DMA_FROM_DEVICE); + if (unlikely(dma_mapping_error(priv->ca->dma_device, mapping[0]))) goto error; priv->rx_ring[id].skb = skb; @@ -278,9 +277,9 @@ int ipoib_dma_map_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req) int off; if (skb_headlen(skb)) { - mapping[0] = ib_dma_map_single(ca, skb->data, skb_headlen(skb), - DMA_TO_DEVICE); - if (unlikely(ib_dma_mapping_error(ca, mapping[0]))) + mapping[0] = dma_map_single(ca->dma_device, skb->data, + skb_headlen(skb), DMA_TO_DEVICE); + if (unlikely(dma_mapping_error(ca->dma_device, mapping[0]))) return -EIO; off = 1; @@ -289,11 +288,12 @@ int ipoib_dma_map_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req) for (i = 0; i < skb_shinfo(skb)->nr_frags; ++i) { const skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; - mapping[i + off] = ib_dma_map_page(ca, - skb_frag_page(frag), - frag->page_offset, skb_frag_size(frag), - DMA_TO_DEVICE); - if (unlikely(ib_dma_mapping_error(ca, mapping[i + off]))) + mapping[i + off] = dma_map_page(ca->dma_device, + skb_frag_page(frag), + frag->page_offset, + skb_frag_size(frag), + DMA_TO_DEVICE); + if (unlikely(dma_mapping_error(ca->dma_device, mapping[i + off]))) goto partial_error; } return 0; @@ -302,11 +302,13 @@ int ipoib_dma_map_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req) for (; i > 0; --i) { const skb_frag_t *frag = &skb_shinfo(skb)->frags[i - 1]; - ib_dma_unmap_page(ca, mapping[i - !off], skb_frag_size(frag), DMA_TO_DEVICE); + dma_unmap_page(ca->dma_device, mapping[i - !off], + skb_frag_size(frag), DMA_TO_DEVICE); } if (off) - ib_dma_unmap_single(ca, mapping[0], skb_headlen(skb), DMA_TO_DEVICE); + dma_unmap_single(ca->dma_device, mapping[0], skb_headlen(skb), + DMA_TO_DEVICE); return -EIO; } @@ -320,8 +322,8 @@ void ipoib_dma_unmap_tx(struct ipoib_dev_priv *priv, int off; if (skb_headlen(skb)) { - ib_dma_unmap_single(priv->ca, mapping[0], skb_headlen(skb), - DMA_TO_DEVICE); + dma_unmap_single(priv->ca->dma_device, mapping[0], + skb_headlen(skb), DMA_TO_DEVICE); off = 1; } else off = 0; @@ -329,8 +331,8 @@ void ipoib_dma_unmap_tx(struct ipoib_dev_priv *priv, for (i = 0; i < skb_shinfo(skb)->nr_frags; ++i) { const skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; - ib_dma_unmap_page(priv->ca, mapping[i + off], - skb_frag_size(frag), DMA_TO_DEVICE); + dma_unmap_page(priv->ca->dma_device, mapping[i + off], + skb_frag_size(frag), DMA_TO_DEVICE); } }