From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757221AbcIGTqQ (ORCPT ); Wed, 7 Sep 2016 15:46:16 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:60165 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752946AbcIGTqM (ORCPT ); Wed, 7 Sep 2016 15:46:12 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Alan Stern , Felipe Balbi , Grygorii Strashko , Russell King - ARM Linux , Catalin Marinas , Yoshihiro Shimoda , "linux-usb@vger.kernel.org" , Sekhar Nori , lkml , Stuart Yoder , Scott Wood , David Fisher , "Thang Q. Nguyen" , Leo Li , Greg Kroah-Hartman , Peter Chen Subject: Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Date: Wed, 07 Sep 2016 21:45:55 +0200 Message-ID: <2360127.zmY5dTBf6B@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:+XrGg6CWBt3zlSuL9q+5zo+gS7bPV0Ty1uBQtcDIEPOQdIhDeEX T2wwTgsjs8k1EP2aGZPIwDbqmXlL9DlnB6bdb62Mv6WYVUUPVESyvVW29bas85MRd6xDO4f xF2lPmQthfOEuzla8nyqnep6vmh0b/0emyPQ9aQ5zCZqN2oOXfEjD7j3DmK/Usa0n/Q3QSI KtfDQqoqQHd9rzZJH/e6A== X-UI-Out-Filterresults: notjunk:1;V01:K0:0v6a1u8w/mU=:3MnxFth+ouIEX0vO8bpz3E Wbt04cH+exFVsjs8DU1CjE9c7vkwOLK4+WWYpW2F0uLDXwE82SLq0k+JpnH5O/YaPE9J+1cBE BKBlmsDNP0kBjXJ5B15pTbWKVZxdzYid8IgQJfeIs9q+ZW19p5YDFL/Bd4Uw7DWqzrsXBl54N sOscxfPPKMr1H/o3Zq4Pky2o46zeFGvprTAbbLQ6F7CFr7jy8bStFbZKhROns1BUnN/Satsz9 4HqXDjIaI0MiYPRD2IN7DjUm7kCL8ie4lb+5ACk520WT4MoC1pzfgQX8kC4MKx4M7Kwnb0YFT nQ5SyZ+swPiNFdzo/MWhkZvsWc0jMX8xTcV7e5P2OFFDqpkpNsU9wvPlwBcbOjk2WErFrhBcq xvCQhOGmWqbeNBCIWQ19APoXbVhidK/F30p3JFqjg9ep9PNGe8TQyg3kVedWssTFGB0t7OzXT 5UH2FgMwEWSAdt0WAaE07hhS9pY7/aRDuCMrq0OHd9I9Eshy7y5JCdH1SW+oDvlkpaMOxj63s zq8HJ3hT4eayyBiVY+4zCQsFc0OCFhkPcvE+6caWsXrV0Vq+iipYci3Zh3dRb9c85b5scXmYF bLOq7KqKKbEQNWemTpeiKYK4TYTBHlRWAwRfT4JJT+0h1xTh++IdeXdh2MUX/z+fGKwefJdfn XF1qm2e44GgzqpFM1sidjhB6qcXl3BoQ5nYCK76Tu6b116zU+fS2WDZTOWJJjVn3PxqH730bD Ncg+JbzBCRugGRVT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, September 7, 2016 12:08:20 PM CEST Alan Stern wrote: > On Wed, 7 Sep 2016, Arnd Bergmann wrote: > > > drivers/usb/host/ehci-fsl.c | 4 ++-- > > How did this driver end up in the patch? > > > diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c > > index 9f5ffb629973..b2419950221f 100644 > > --- a/drivers/usb/host/ehci-fsl.c > > +++ b/drivers/usb/host/ehci-fsl.c > > @@ -96,8 +96,8 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) > > } > > irq = res->start; > > > > - hcd = usb_create_hcd(&fsl_ehci_hc_driver, &pdev->dev, > > - dev_name(&pdev->dev)); > > + hcd = __usb_create_hcd(&fsl_ehci_hc_driver, &pdev->dev.parent, > > + &pdev->dev, dev_name(&pdev->dev), NULL); > > Based on the > > if (of_device_is_compatible(dev->parent->of_node, > "fsl,mpc5121-usb2-dr")) { > > lines in the driver? No, based on the "fsl-ehci" name, which is only used as a child of the drivers/usb/host/fsl-mph-dr-of.c dual-role driver. I looked for drivers that call platform_device_add() and manipulate the dma_mask of that child. Sorry for missing this one when I did the description. I believe it is correct though. The DMA settings on powerpc are probably correct in this case, but the existing code doesn't allow you to describe on-board USB devices with additional properties as children of the dual-role device node. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Wed, 07 Sep 2016 21:45:55 +0200 Subject: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev In-Reply-To: References: Message-ID: <2360127.zmY5dTBf6B@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wednesday, September 7, 2016 12:08:20 PM CEST Alan Stern wrote: > On Wed, 7 Sep 2016, Arnd Bergmann wrote: > > > drivers/usb/host/ehci-fsl.c | 4 ++-- > > How did this driver end up in the patch? > > > diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c > > index 9f5ffb629973..b2419950221f 100644 > > --- a/drivers/usb/host/ehci-fsl.c > > +++ b/drivers/usb/host/ehci-fsl.c > > @@ -96,8 +96,8 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) > > } > > irq = res->start; > > > > - hcd = usb_create_hcd(&fsl_ehci_hc_driver, &pdev->dev, > > - dev_name(&pdev->dev)); > > + hcd = __usb_create_hcd(&fsl_ehci_hc_driver, &pdev->dev.parent, > > + &pdev->dev, dev_name(&pdev->dev), NULL); > > Based on the > > if (of_device_is_compatible(dev->parent->of_node, > "fsl,mpc5121-usb2-dr")) { > > lines in the driver? No, based on the "fsl-ehci" name, which is only used as a child of the drivers/usb/host/fsl-mph-dr-of.c dual-role driver. I looked for drivers that call platform_device_add() and manipulate the dma_mask of that child. Sorry for missing this one when I did the description. I believe it is correct though. The DMA settings on powerpc are probably correct in this case, but the existing code doesn't allow you to describe on-board USB devices with additional properties as children of the dual-role device node. Arnd