From patchwork Tue Jan 17 21:48:44 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: 9521955 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 D0654601B7 for ; Tue, 17 Jan 2017 21:50:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDF672860E for ; Tue, 17 Jan 2017 21:50:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B24A628610; Tue, 17 Jan 2017 21:50:20 +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, T_TVD_MIME_EPI 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 159742860E for ; Tue, 17 Jan 2017 21:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751057AbdAQVuS (ORCPT ); Tue, 17 Jan 2017 16:50:18 -0500 Received: from mail-co1nam03on0056.outbound.protection.outlook.com ([104.47.40.56]:30560 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750947AbdAQVuQ (ORCPT ); Tue, 17 Jan 2017 16:50: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=6UYyhCbRq1XXBGNxiEEb3DUCXChgO/oYpXKPojobUUU=; b=rL0aU/BfXbDX2I5VSPOrLS4pQIRU1xxq2/Q55Cf09QlTYM3wImqAJ2YqMk6vHuduW+LdVUW8vslExQj+Gm1EdcVgXf97VyDPSzIQtgSk0vxDrLp8p39F3VrMJpjb/rT1PMD1zM79uF3aN6FxL5gWdMwm4jiFmnNnOysX7I36tME= Received: from BY2PR02CA0028.namprd02.prod.outlook.com (10.141.216.18) by DM2PR02MB1417.namprd02.prod.outlook.com (10.161.143.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Tue, 17 Jan 2017 21:48:51 +0000 Received: from BL2FFO11OLC001.protection.gbl (2a01:111:f400:7c09::115) by BY2PR02CA0028.outlook.office365.com (2a01:111:e400:2c40::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13 via Frontend Transport; Tue, 17 Jan 2017 21:48:50 +0000 Authentication-Results: spf=pass (sender IP is 74.221.232.54) 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 74.221.232.54 as permitted sender) receiver=protection.outlook.com; client-ip=74.221.232.54; helo=sacsmgep14.sandisk.com; Received: from sacsmgep14.sandisk.com (74.221.232.54) by BL2FFO11OLC001.mail.protection.outlook.com (10.173.161.185) 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; Tue, 17 Jan 2017 21:48:49 +0000 X-AuditID: ac1c2133-0afff70000013ebf-08-587f0bf1bada Received: from SACHUBIP02.sdcorp.global.sandisk.com (Unknown_Domain [172.28.1.254]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 00.3A.16063.1FB0F785; Tue, 17 Jan 2017 22:32:20 -0800 (PST) Received: from ULS-OP-MBXIP03.sdcorp.global.sandisk.com ([fe80::f9ec:1e1b:1439:62d8]) by SACHUBIP02.sdcorp.global.sandisk.com ([10.181.10.104]) with mapi id 14.03.0319.002; Tue, 17 Jan 2017 13:48:44 -0800 From: Bart Van Assche To: "alex.estrin@intel.com" , "dledford@redhat.com" CC: "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "gregkh@linuxfoundation.org" Subject: Re: [PATCH v2 00/26] IB: Optimize DMA mapping Thread-Topic: [PATCH v2 00/26] IB: Optimize DMA mapping Thread-Index: AQHScQt5AKsaDD3twkSwTo7S3d5ybQ== Date: Tue, 17 Jan 2017 21:48:44 +0000 Message-ID: <1484689709.2729.6.camel@sandisk.com> References: <20170112190718.6728-1-bart.vanassche@sandisk.com> <1484338667.2679.15.camel@sandisk.com> <1484344759.2679.26.camel@sandisk.com> In-Reply-To: Accept-Language: nl-NL, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [172.28.1.254] MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBIsWRmVeSWpSXmKPExsWyRobxn+4X7voIg/Pt5hYXnn5nsnh5/gOr RfPi9WwWl3fNYbN4dqiXxYHVY/Gel0we++euYfd4v+8qm8fnTXIBLFFcNimpOZllqUX6dglc GZO/3mQqOGlYseLwPvYGxt96XYycHBICJhIH179l62Lk4hASWMIkcfXXEVYI5xKjxJmnxxhB qtgEjCRmT9jDAmKLCCRJrD7xjhmkiFlgN6PE9w372EESwgJmEk/3fgZKcAAVmUt8WxgOUa8n 8ePSGrASFgFViaNnehlBSngFDCU69pVC7PrMJPH93GSwXZwCIRJznq5jB6lhFJCVaHnNDRJm FhCXuPVkPhPE0SISDy+eZoOwRSVePv7HCmErSHxe8Y8NpJVZIECie7I5SJhXQFDi5MwnLBMY RWYhmTQLoWoWkiqIEj2JG1OnsEHYVhJ7e84xQ9jaEssWvoayEyVO/umGsgMlXsxYzz4LHCa3 GSV2XP8K17xm43coW1FiSvdD9gWM3KsYxYoTk4tz01MLDE30ihPzUjKLs/WS83M3MYLjXNF4 B+O/De6HGAU4GJV4eDsm1kUIsSaWFVfmHmJUARr0aMPqC4xSLHn5ealKIrwNjUBp3pTEyqrU ovz4otKc1OJDjNIcLErivPIHdocKCaQnlqRmp6YWpBbBZJk4OKUaGBOsZmbxe/42ZLnv+1Dz 9aHZAfa/ZsndfFzTm3l0r+wTCx0zn5JVO7f905t5YsrrVfesspdPfn13trO88sM9vc4ptybM cD0RJbf5f2DKGXbvsw/2bDc1vSCi6SS1edYhlWurz81P/MT+OvvTEsPuSiHf3F5Fsx/ybdNr z9yKnJ3ZemClq6vjnkwlluKMREMt5qLiRACdidOl+wIAAA== X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:74.221.232.54; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39840400002)(39450400003)(39850400002)(39410400002)(39860400002)(2980300002)(438002)(199003)(24454002)(377424004)(189002)(81166006)(97736004)(5001770100001)(36756003)(8676002)(103116003)(4326007)(81156014)(5890100001)(512934002)(189998001)(84326002)(102836003)(33646002)(6116002)(3846002)(4610100001)(54906002)(2501003)(69596002)(5000100001)(93886004)(305945005)(38730400001)(86362001)(229853002)(2950100002)(2900100001)(626004)(76176999)(5660300001)(54356999)(8936002)(30436002)(50986999)(356003)(99936001)(7736002)(106466001)(568964002)(2476003)(68736007)(92566002)(106116001)(2270400002)(2906002)(53936002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR02MB1417; H:sacsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC001; 1:gCVFZGYSLGGK+Q/ay0C+WicA8t7f5E0mEFF7BFLG2WmrgyhoMlJWsI1ZcD8EOXm0is6kv73ya7ApGAzpn3FZZYaYmkCVmQP1thGxJfuELbE2ClVIi+H/b1VdQZwLsXy9ttWkyqzoyGH67oLKjcEAxgnaQqSK5Z+iAQtMESTX+fT7hTWTTAFWsA0Q1WBIJYEAm5Ce6kdt6oxYYOXzrs6e5OGdIoeXGzekeOyC24ErnOq94nWAAlyOcLf+asqVrNIAyzUtXH86CK8oeq1F+A+c7U6zAO1gp1XMyR6OHuk+bHShT/ky6pi4NDhVkby5ZYZAb3SY9SuLEW52OuC6z5KGc8XkSqL1ZnD5BV+0zg91gAzHoVm0eNKoNG9G0XOvmU1ZOkD9ji9ODVmtPjHb8xBqF/CcJP3WQbvSAEIecSftzphk3JQWL63uxGA6mKsYcOSSPuzVA3F5lGIsVFATz60reeizRVv4CAwoM9rC/J3i61B1H46ArfTXEfVQECKCuAC3uzzDRj1Y/WVpMNKr6EJA/ZBkMXeM9K8UcLNDFz+VI8yTFnHIJ73D4sQCYRnf+cAzbyiobhzlhHVPQEHj6y6c1zR441eQOL83K2CHKFY9TPI= X-MS-Office365-Filtering-Correlation-Id: 4fb0a9d0-6806-449f-b6f0-08d43f229f5a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:DM2PR02MB1417; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1417; 3:9iwxVFg9mfh6rC09nCC3VQcx+0s9lVqhPKNiXuTfFYXBi01h/8HnLdqLECVzcH46QoaUpNHFcwz6ZALaAFNLcNGDxzLQ7K/Y4K5/GcpWrRzEVKAx6pRK8e62Ug7T3a/eyGOAYvXWg2it2v9zZJU9HIblWuQlrzuX9LiBrEwyTlAboaDHLuCEQDvvzO06k3oNyjmC7i4Q1YLiEjcM8qcOqsSmXR0X9sswm+BeQWyHY/ttDHoemAPiklsCCG7Brb0u19fxPmCAFTeMEm0CDTSS3aedddiv77ZVAHCmqYVZI8tDdKDOZLqfSbI1t9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tE X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1417; 31:up2scX1Focl0wz22HB4p7T2SVmZg6NBnZi0bOJc14WJUs/eixWML/FYE6N1m4Dcog/VeoT13WL6g+GWJ5Kfcc5TjKYo2PkdLVuTOWfLJvUsoWnGmCi6SAOEX53Ut2bUJcW88B6sm6RP3mveSKgDDgKW2VO4nN5OOHqd5JmoT21GDv4OKtjzbL/XHEZQdSHypyQZG7V03XoEZYLMs+GFh7jevM/hF9gMVMzcABRGw+EVzZii5kQmeR/4whEb2d0nety8Drpq9K3hESNtzzCmSWAy/mOp5NCA9JVjQ3HFpLt0Ov8nwbOHdYITcOMShCf8l; 20:fOUZLn4T6hv1WH5gMHlowWqRFJ+GOllYemS2l/M8DZUtfKwckmX+2vdEf4rFiq/5QFpfSZsSsDKCnVJc+CiqW3fcplG7rSbnYgRbvt0EpchXOXywQzV/kl0XOdfreRL/Bbn0x1Ze6uiAYuofbi7bzS10gfgEempBuCv7MAPKroIhYBqWDvHBM/Gnjny+lcHPNbbGfD5a8UqzLKLP7sp0foQJPhWZ1le4Lw/dgOjC7mX+RRNvNrZ/plqB2zsp6NM0PGkreWEhxlC0BU8wg70eLWrv5J1nnNGpT+Zt5RbSxdpl6/JssqQVrt7lpzLNB/XyQzd/QKoHnXtyEQANLJvevpGNw4iGPNepNtoxjIKazhYOtLD/MFyacp4Xz3/vERymnH9egbVWfLJAiFWowVwjqJ6tQkMjG5fSqyWurD2hDfaK5oZ2YJcmphMcoB8OrzAmdsFX98jUL3umXQ77ZxifPCzpCSV/PaL92S/vzhm66npPnUsw/SLscxGTl6w4E2iP X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415395)(6040375)(601004)(2401047)(13023025)(13015025)(13017025)(13018025)(13024025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(6072148); SRVR:DM2PR02MB1417; BCL:0; PCL:0; RULEID:; SRVR:DM2PR02MB1417; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1417; 4:9JFefeyNVYOcpbEAv1fQnYnQ2cXqqZzJUR1DG6OJ24vlirB8YcC0S1AVxhcrpj3ViMeTuPK2FjKyEQqS++dnF2QQTHoL6obhOgHVjJJP9jBxB7SlYBajGwHFhLk1RYpD31VP6nFRQmAIoejEgkQwKtZZ7n9IZlo9QoGYxR1zRwSbfyZy2lSEIpoZ7jvm3eyqde0pvMnY186438ep99JPUppmeeW8JoF2U7+5tOWaLOHMczx2hcZP9GaCS0jwealoG25xNvBtMfUt5piReI5DMU/B9YyTvcjI5R9GfJBnnb4Pl5Qxj3IUhXGCCoOjK9N0N52sLk4zKS6eMmeaEWimd7r9k2jCDQfWISuAFAq1jD78DCDNqc9QmqDlYNNW/fyt8lSTmYaJWqB1Eeiyyg+ATZmQVw8Hu/H10qJ1ofM1btZAliX3bE4XV4NDSAIPZTkvCEhZkU1/9QOKo1ES2dJNk+64ar20AjPdU6D5mUr1PW8sSiztDAhV6b7KqKNMjNjeDYoQnNNpFUF7pLRZ9iOKsqEhiqXXQFnxbNonpsVeq7HjYAvLtlo4zYJHlj6rpmNmzbB+256/PHQh7/ewu9xZaEzLOjmg+gRFRRYawuWfN+tzK/+XQhGOb8cw36LS12U+ieE0oF9toHcnG5FlsYJzuUkw6yoAHY0M6OXmsQnmFfM16+MB4sQB3Df3PmSSHJJ/AH8J4wZESDHrMWpEvglAyNeU/FUrrtm/yOf8L9o9Pfp/O3aOgYF2ZuTT2xPgjT5o X-Forefront-PRVS: 01901B3451 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR02MB1417; 23:WpmfD/3Nm2tax9gzBIPzYFckweWt4GHImbVTOFcuA?= =?us-ascii?Q?VevwjgTRbSS+J4XEOiCw4dM8QeWAEgAurqJHqsBTdPPFQFMTMNY546UgS2Ai?= =?us-ascii?Q?qvcCy31N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H38UVSmyzKD0d9w3Chv8br0r2Yp6W5pNw9fYJbnWQ5xfyq1beWVrfQQ==; 5:UOPxPd50MT5Ky1nfcVvVRCJrJggSmsDn5If2zuvIXmj/VKyhtikg0x/OY1vFxfrBaYl+Re4bgpoBwIby6N/+eHlOAX003biIH9Ns+ROuuvNePIxOZrAMaARshjJ+kE0zpTWayiiDihIO+e3JTOZiSqUDo0icJiTO+XnuworXlxc=; 24:FH9qcEYvLrZ4WOdn4HPzNsepee7SOf3+/9xWv2qI8rvdpgOLX5m3UmVKyng5dFo29Fdr/fqnd6e4bqTVZEexvvys5YHPbvXHq9ySjFWsw7Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1417; 7:JFAak15vL2zsi/+WzqR4sA9qzGEnHif46ePVMYA+6sSicjoVFBlsxALegUe8eRbGTvIn+c0JMPeviFZ3sbIQZjYc4iPTizZJwFq1zBfDJGz4MRTCsNL5Azj3MLop11DHv02gtcDFQAZWaopJ2A/t/FbM6bV00hvdno8VlcKA7jkqy4e6HSJEKHZ/G3GAoHM1qEeRvl6RSCp53STSuNAq/z6JlxRsqYgs4lnCH5IIZkeIxaFiw9MzLzXENYx6i6H5VGLvTQ2AlKNV4u7N7VzZHOQAuSHetkAtX1fXfkLS04hNJTr4eS3+3viv7/+miZMJ+xrMr0wYVSPO5h88QJLTE+1UXgllmyxKbAI/5jLFHRCF2lAqlCzq0Wt9kCXrLqPFPEUvqFBh4Py1mkJNt757UaUM+6gyWTTyjV5EGKeLMvxN5L1YVXpw8iBjAKxMR5nFf6AlWVi7R9GvS7W2CRXnMA== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 21:48:49.5427 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[74.221.232.54]; Helo=[sacsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR02MB1417 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 On Sat, 2017-01-14 at 02:05 +0000, Estrin, Alex wrote: > [ ... ] > please see hfi1/verbs.c @ hfi1_register_ib_device() > [ ... ] Hello Alex, I think I figured out what I did wrong: both the hfi1 and the qib drivers need two sets of DMA mapping operations. ULPs have to use &dma_virt_ops and the SDMA code has to use the PCIe DMA mapping operations. My patch series made the SDMA code use dma_virt_ops and that's wrong. The attached patch should fix this. Unfortunately I do not have access to a hfi1 or qib test setup. Can you help me by testing the attached patch on top of the already posted patches? Thanks, Bart. From 21ed4680a16b2281ea63caa9a3ef9e4c682a1d8b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 17 Jan 2017 13:22:35 -0800 Subject: [PATCH] hfi1, qib, rdmavt: Use proper DMA mapping operations Make users of the hfi1 and qib drivers use dma_virt_ops. Use the PCIe mapping operations for SDMA. Make sure that the rdmavt code does not change the PCIe DMA mapping operations pointer into &dma_virt_ops. --- drivers/infiniband/hw/hfi1/mad.c | 2 +- drivers/infiniband/hw/hfi1/verbs.c | 1 - drivers/infiniband/hw/qib/qib_verbs.c | 1 - drivers/infiniband/sw/rdmavt/vt.c | 2 ++ include/rdma/rdma_vt.h | 8 ++++++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c index 6e595afca24c..041d503c399b 100644 --- a/drivers/infiniband/hw/hfi1/mad.c +++ b/drivers/infiniband/hw/hfi1/mad.c @@ -4406,7 +4406,7 @@ int hfi1_process_mad(struct ib_device *ibdev, int mad_flags, u8 port, switch (in_mad->base_version) { case OPA_MGMT_BASE_VERSION: if (unlikely(in_mad_size != sizeof(struct opa_mad))) { - dev_err(ibdev->dma_device, "invalid in_mad_size\n"); + dev_err(&ibdev->dev, "invalid in_mad_size\n"); return IB_MAD_RESULT_FAILURE; } return hfi1_process_opa_mad(ibdev, mad_flags, port, diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c index 95ed4d6da510..fa0ff3e11597 100644 --- a/drivers/infiniband/hw/hfi1/verbs.c +++ b/drivers/infiniband/hw/hfi1/verbs.c @@ -1784,7 +1784,6 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd) strlcpy(ibdev->name + lcpysz, "_%d", IB_DEVICE_NAME_MAX - lcpysz); ibdev->owner = THIS_MODULE; ibdev->phys_port_cnt = dd->num_pports; - ibdev->dma_device = &dd->pcidev->dev; ibdev->modify_device = modify_device; ibdev->alloc_hw_stats = alloc_hw_stats; ibdev->get_hw_stats = get_hw_stats; diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c index 4b54c0ddd08a..daa28a7b7574 100644 --- a/drivers/infiniband/hw/qib/qib_verbs.c +++ b/drivers/infiniband/hw/qib/qib_verbs.c @@ -1632,7 +1632,6 @@ int qib_register_ib_device(struct qib_devdata *dd) ibdev->owner = THIS_MODULE; ibdev->node_guid = ppd->guid; ibdev->phys_port_cnt = dd->num_pports; - ibdev->dma_device = &dd->pcidev->dev; ibdev->modify_device = qib_modify_device; ibdev->process_mad = qib_process_mad; diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c index 6a81b179f631..af9dcd47dace 100644 --- a/drivers/infiniband/sw/rdmavt/vt.c +++ b/drivers/infiniband/sw/rdmavt/vt.c @@ -103,6 +103,8 @@ struct rvt_dev_info *rvt_alloc_device(size_t size, int nports) if (!rdi->ports) ib_dealloc_device(&rdi->ibdev); + rdi->ib_dev.dma_device = &rdi->dma_device; + return rdi; } EXPORT_SYMBOL(rvt_alloc_device); diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h index 861e23eaebda..b7259c9b056e 100644 --- a/include/rdma/rdma_vt.h +++ b/include/rdma/rdma_vt.h @@ -339,6 +339,14 @@ struct rvt_driver_provided { struct rvt_dev_info { struct ib_device ibdev; /* Keep this first. Nothing above here */ + /* + * qib and hfi1 use two sets of DMA operations: + * - The DMA operations of the PCIe device for SDMA. + * - dma_virt_ops for users of the qib and hfi1 drivers. + * The only purpose of @dma_device is to provide a struct device that + * provides dma_virt_ops. + */ + struct device dma_device; /* * Prior to calling for registration the driver will be responsible for -- 2.11.0