Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933126AbdCGS12 (ORCPT ); Tue, 7 Mar 2017 13:27:28 -0500 Received: from mail-eopbgr20082.outbound.protection.outlook.com ([40.107.2.82]:16527 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932897AbdCGS1V (ORCPT ); Tue, 7 Mar 2017 13:27:21 -0500 From: Parav Pandit To: "gregkh@linuxfoundation.org" , Bart Van Assche CC: "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "sebott@linux.vnet.ibm.com" , "linux@armlinux.org.uk" , "hpa@zytor.com" , "mingo@redhat.com" , "dwmw2@infradead.org" , "bhelgaas@google.com" , "dledford@redhat.com" , "benh@kernel.crashing.org" Subject: RE: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev Thread-Topic: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev Thread-Index: AQHSltr7A9hsfT8RwUyV7gxEsYQ73qGIz5EAgADPNyCAABFRAA== Date: Tue, 7 Mar 2017 18:27:17 +0000 Message-ID: References: <20170307003549.3872-1-bart.vanassche@sandisk.com> <20170307003549.3872-2-bart.vanassche@sandisk.com> <20170307045236.GC3913@kroah.com> <1488905685.2739.1.camel@sandisk.com> <20170307171403.GA19293@kroah.com> In-Reply-To: <20170307171403.GA19293@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linuxfoundation.org; dkim=none (message not signed) header.d=none;linuxfoundation.org; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [172.87.190.14] x-ms-office365-filtering-correlation-id: ac77156d-3191-47a1-37b0-08d4658795b7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:VI1PR0502MB3005; x-microsoft-exchange-diagnostics: 1;VI1PR0502MB3005;7:rj4BulFjKVHGPyWQXdfHYRvtt7s/BvCSnkkmuYJEsKJgrj/oqR1s9EXZGTPEhgQLngeM+qpDsfY1UUJrkMHv6s5vnwV3T9x9b5GuN4aicsplnJp5rhL/9/NkiAwrS4zRxHPn2eqCzcMV53VMehCv9XMEIB3tlOG1VqccUNYg49OwEUJ8PLvaXGwl8OauRndk+5GRwcU4oJ3Pw74NTxhto5A77q1EIZrXfVNTyQybTNYWxYXuDXVkrxwIza6J77GPeszmt+3MjixztEL2oLYmD3pxN7xz5LCnGeQ8VOYJCqMAOQm3dru0/r3o5Tovb+ixgkcTS+CQ8hpmf423l1Vluw== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(211936372134217)(104084551191319)(42932892334569); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148);SRVR:VI1PR0502MB3005;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0502MB3005; x-forefront-prvs: 0239D46DB6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39450400003)(39850400002)(39410400002)(39860400002)(51444003)(377424004)(377454003)(13464003)(24454002)(8676002)(7736002)(93886004)(3660700001)(53936002)(305945005)(9686003)(6436002)(77096006)(7696004)(38730400002)(53546006)(122556002)(66066001)(76176999)(6506006)(3280700002)(50986999)(54356999)(3846002)(6246003)(74316002)(106116001)(2900100001)(189998001)(99286003)(55016002)(102836003)(5660300001)(6116002)(33656002)(4326008)(86362001)(8656002)(54906002)(2950100002)(8936002)(25786008)(229853002)(2906002)(2501003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0502MB3005;H:VI1PR0502MB3008.eurprd05.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2017 18:27:17.1734 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3005 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v27IRZ8E009778 Content-Length: 1906 Lines: 42 > -----Original Message----- > From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org] > Sent: Tuesday, March 7, 2017 11:14 AM > To: Bart Van Assche > Cc: linux-kernel@vger.kernel.org; linux-rdma@vger.kernel.org; Parav Pandit > ; sebott@linux.vnet.ibm.com; > linux@armlinux.org.uk; hpa@zytor.com; mingo@redhat.com; > dwmw2@infradead.org; bhelgaas@google.com; dledford@redhat.com; > benh@kernel.crashing.org > Subject: Re: [PATCH 1/2] device: Stop requiring that struct device is > embedded in struct pci_dev > > On Tue, Mar 07, 2017 at 04:54:58PM +0000, Bart Van Assche wrote: > > On Tue, 2017-03-07 at 05:52 +0100, Greg Kroah-Hartman wrote: > > > Somehow all other subsystems work just fine, don't instantly think > > > that the driver core needs to bend to the will of the IB code, > > > because you are somehow "special". Hint, you aren't :) > > > > Hi Greg, > > > > In another e-mail Parav compared IB drivers with networking drivers. > > Great, then notice that networking drivers don't need to do this type of crud > :) > Well what I compared is: netdev has struct device and it also has underlying pci_dev based device. ibdev has struct device and it also has underlying pci_dev based device. So let us try to treat them in same way wherever possible and keep setup needed in ib drivers. > > But I think that's a bad comparison: in the networking stack it's the > > network driver itself that sets up and triggers DMA while in the IB > > stack it's the upper layer protocol (ULP) driver that calls the > > functions defined in struct dma_ops. For some IB HW drivers (hfi1, qib > > and rdma_rxe) the ULP driver must use the DMA mapping operations from DMA mapping and allocation is done in different layer for its own reason unrelated to this change. If rxe, qib, hfi1 point to right dma_device, can't we remove the ib_dma_*()?