From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752702AbcD1OYs (ORCPT ); Thu, 28 Apr 2016 10:24:48 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:63196 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751539AbcD1OYq (ORCPT ); Thu, 28 Apr 2016 10:24:46 -0400 From: Arnd Bergmann To: Russell King - ARM Linux Cc: Felipe Balbi , linux-arm-kernel@lists.infradead.org, Grygorii Strashko , Catalin Marinas , Yoshihiro Shimoda , linux-usb@vger.kernel.org, Sekhar Nori , linux-kernel@vger.kernel.org, David Fisher , "Thang Q. Nguyen" , Alan Stern , Greg Kroah-Hartman Subject: Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Date: Thu, 28 Apr 2016 16:23:56 +0200 Message-ID: <2806018.GHhm6tEuKR@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160428141611.GK19428@n2100.arm.linux.org.uk> References: <87y47ykzmz.fsf@intel.com> <20160428141611.GK19428@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:XmZLVWIa9FE/cAB1q7l3MLkvdFPwXfYLP95QAtLN3P5N5C2cDeL ZZNHtQCuTm1oR6TCtGQu5a1zmsbu/HFSTzilfg3N7aofw9yzp4cp2UAv0NRmo6diH167Q3k wOBvIt+jIat0F1cpWe+YqxHxa/7rVEf3LuTlokbGMRpuF1L6smK+vd3Hlgogn//U06DACwc TBjaxeKHrM3OhuQQ8cYyg== X-UI-Out-Filterresults: notjunk:1;V01:K0:3V9/+uZeuq4=:VXjxGXIDlEu6e636E9C/Tv TuFrFPenPX+rgGXV2PMSLKcJGhwMDtIZlZ5b9wPw+AFJFMNzNecnhThsPSyAJfrw6UEKrxoTS riMtmjwqpqSY41u1r46EM7C7aro91P/14sLMjHbQzkSzwk+EERULO6SsiO6NQs+/HT5hVRnVi Oldht1RvAwsWW08R3rIjwwW6XeAiHGIFFSLvRKd+3XDgHueM0X4yB0MVKGYS9ZQlsudeJ6Fzs h1uhXWml2alGB0HOoGCaGjW9shAZBOhmXbVHDcyoxRphieX7dO4PD9fY5qyRHIBinHJPKAy5Z D5kweMaBVo/tlL27DApGmtFBC4LMqV/rXMsU9MfzQgdBLmFTUdsfcjJYB8+TEbDRpfyQmJfqa D3R7vft2+/z1tCdyBslihCXkgbh5e3C0neE7e0amMHz9RMzioZ2pAXOJEpatXrZeBmkg5YzL/ VTTml0ksJQEcUl3aDRJsSA6vhx6SdfV2l58TchCSfMYpyMzR9XM3aLUGsy1Jb4ZT2D0SCOdhg othTezknBiXMnDz30nXwsV+jTpWLE2Vb+wYmFoLtaQItysmOY1yyHZP7ZYyKMGDtt58TJTLwg r5PnVaPS25Q5CEOlzQX7JE30IO+LAUw2Si3/UYGC6YlUZtESkSFJ/OoB3MN+9bkJAoCgZh47V CGG/Yjos9Y9WJnjrmhNMUqXMb4SswIVNrq/EZCOam/WnAqkIeHa421EzjOggHxCt8Q4v1FIPh tsUuVTqlEYggbNRq Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 28 April 2016 15:16:12 Russell King - ARM Linux wrote: > On Thu, Apr 28, 2016 at 09:37:08AM +0300, Felipe Balbi wrote: > > > > Hi, > > > > Arnd Bergmann writes: > > > pointer and pass that in platform_data. This is really easy, it's > > > > Sorry but passing a struct device pointer in platform_data is > > ridiculous. Not to mention that, as I said before, we can't assume which > > device to pass to xhci_plat in the first place. It might be dwc->dev and > > it might be dwc->dev->parent. > > +1. Passing an unref-counted struct device through platform data is > totally mad, Arnd you're off your rocker if you think that's a good > idea. What's more is that there's no way to properly refcount the > thing. It's the parent device (or NULL), there is no way it can ever go away as it's already refcounted through the device subsystem by the creation of the child device. I do realize that it's a hack, but the idea is to get rid of that as soon as possibly by fixing the way the xhci device is probe so we no longer need to fake a platform_device as the child here and can just use the device itself. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Thu, 28 Apr 2016 16:23:56 +0200 Subject: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev In-Reply-To: <20160428141611.GK19428@n2100.arm.linux.org.uk> References: <87y47ykzmz.fsf@intel.com> <20160428141611.GK19428@n2100.arm.linux.org.uk> Message-ID: <2806018.GHhm6tEuKR@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thursday 28 April 2016 15:16:12 Russell King - ARM Linux wrote: > On Thu, Apr 28, 2016 at 09:37:08AM +0300, Felipe Balbi wrote: > > > > Hi, > > > > Arnd Bergmann writes: > > > pointer and pass that in platform_data. This is really easy, it's > > > > Sorry but passing a struct device pointer in platform_data is > > ridiculous. Not to mention that, as I said before, we can't assume which > > device to pass to xhci_plat in the first place. It might be dwc->dev and > > it might be dwc->dev->parent. > > +1. Passing an unref-counted struct device through platform data is > totally mad, Arnd you're off your rocker if you think that's a good > idea. What's more is that there's no way to properly refcount the > thing. It's the parent device (or NULL), there is no way it can ever go away as it's already refcounted through the device subsystem by the creation of the child device. I do realize that it's a hack, but the idea is to get rid of that as soon as possibly by fixing the way the xhci device is probe so we no longer need to fake a platform_device as the child here and can just use the device itself. Arnd