Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1556518 > unrolled thread

Re: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration

Started byMathias Nyman <mathias.nyman@linux.intel.com>
First post2017-01-11 15:30 +0100
Last post2017-01-12 09:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration Mathias Nyman <mathias.nyman@linux.intel.com> - 2017-01-11 15:30 +0100
    Re: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration Alan Stern <stern@rowland.harvard.edu> - 2017-01-11 16:10 +0100
      Re: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration Roger Quadros <rogerq@ti.com> - 2017-01-12 09:40 +0100

#1556518 — Re: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration

FromMathias Nyman <mathias.nyman@linux.intel.com>
Date2017-01-11 15:30 +0100
SubjectRe: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration
Message-ID<sYs4y-7ZN-29@gated-at.bofh.it>
On 17.11.2016 13:43, Sriram Dash wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> For xhci-hcd platform device, all the DMA parameters are not
> configured properly, notably dma ops for dwc3 devices. So, set
> the dma for xhci from sysdev. sysdev is pointing to device that
> is known to the system firmware or hardware.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
> Tested-by: Baolin Wang <baolin.wang@linaro.org>
> ---

...

> +	/*
> +	 * sysdev must point to a device that is known to the system firmware
> +	 * or PCI hardware. We handle these three cases here:
> +	 * 1. xhci_plat comes from firmware
> +	 * 2. xhci_plat is child of a device from firmware (dwc3-plat)
> +	 * 3. xhci_plat is grandchild of a pci device (dwc3-pci)
> +	 */
> +	sysdev = &pdev->dev;
> +	if (sysdev->parent && !sysdev->of_node && sysdev->parent->of_node)
> +		sysdev = sysdev->parent;
> +#ifdef CONFIG_PCI
> +	else if (sysdev->parent && sysdev->parent->parent &&
> +		 sysdev->parent->parent->bus == &pci_bus_type)
> +		sysdev = sysdev->parent->parent;
> +#endif
> +

Not maybe the the ideal situation here, and looks really tailored to make PCI dwc3
controllers with xhci support work.

Was there some reason child devices can't automatically inherit the dma mask from the parents,
forcing us to dig it from grandparents?

Anyway, looks like the dwc3 part is already in 4.10-rc,
If Greg and Alan want to take this series that's fine by me

I haven't tested that it won't break anything on PCI XHCI controllers though

-Mathias  

[toc] | [next] | [standalone]


#1556594

FromAlan Stern <stern@rowland.harvard.edu>
Date2017-01-11 16:10 +0100
Message-ID<sYsHh-8rV-87@gated-at.bofh.it>
In reply to#1556518
On Wed, 11 Jan 2017, Mathias Nyman wrote:

> On 17.11.2016 13:43, Sriram Dash wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > For xhci-hcd platform device, all the DMA parameters are not
> > configured properly, notably dma ops for dwc3 devices. So, set
> > the dma for xhci from sysdev. sysdev is pointing to device that
> > is known to the system firmware or hardware.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
> > Tested-by: Baolin Wang <baolin.wang@linaro.org>
> > ---
> 
> ...
> 
> > +	/*
> > +	 * sysdev must point to a device that is known to the system firmware
> > +	 * or PCI hardware. We handle these three cases here:
> > +	 * 1. xhci_plat comes from firmware
> > +	 * 2. xhci_plat is child of a device from firmware (dwc3-plat)
> > +	 * 3. xhci_plat is grandchild of a pci device (dwc3-pci)
> > +	 */
> > +	sysdev = &pdev->dev;
> > +	if (sysdev->parent && !sysdev->of_node && sysdev->parent->of_node)
> > +		sysdev = sysdev->parent;
> > +#ifdef CONFIG_PCI
> > +	else if (sysdev->parent && sysdev->parent->parent &&
> > +		 sysdev->parent->parent->bus == &pci_bus_type)
> > +		sysdev = sysdev->parent->parent;
> > +#endif
> > +
> 
> Not maybe the the ideal situation here, and looks really tailored to make PCI dwc3
> controllers with xhci support work.
> 
> Was there some reason child devices can't automatically inherit the dma mask from the parents,
> forcing us to dig it from grandparents?
> 
> Anyway, looks like the dwc3 part is already in 4.10-rc,
> If Greg and Alan want to take this series that's fine by me

I have no objections.

Alan Stern

> I haven't tested that it won't break anything on PCI XHCI controllers though
> 
> -Mathias  

[toc] | [prev] | [next] | [standalone]


#1557195

FromRoger Quadros <rogerq@ti.com>
Date2017-01-12 09:40 +0100
Message-ID<sYJ5o-1Jo-35@gated-at.bofh.it>
In reply to#1556594
Mathias,

On 11/01/17 17:08, Alan Stern wrote:
> On Wed, 11 Jan 2017, Mathias Nyman wrote:
> 
>> On 17.11.2016 13:43, Sriram Dash wrote:
>>> From: Arnd Bergmann <arnd@arndb.de>
>>>
>>> For xhci-hcd platform device, all the DMA parameters are not
>>> configured properly, notably dma ops for dwc3 devices. So, set
>>> the dma for xhci from sysdev. sysdev is pointing to device that
>>> is known to the system firmware or hardware.
>>>
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>> Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
>>> Tested-by: Baolin Wang <baolin.wang@linaro.org>
>>> ---
>>
>> ...
>>
>>> +	/*
>>> +	 * sysdev must point to a device that is known to the system firmware
>>> +	 * or PCI hardware. We handle these three cases here:
>>> +	 * 1. xhci_plat comes from firmware
>>> +	 * 2. xhci_plat is child of a device from firmware (dwc3-plat)
>>> +	 * 3. xhci_plat is grandchild of a pci device (dwc3-pci)
>>> +	 */
>>> +	sysdev = &pdev->dev;
>>> +	if (sysdev->parent && !sysdev->of_node && sysdev->parent->of_node)
>>> +		sysdev = sysdev->parent;
>>> +#ifdef CONFIG_PCI
>>> +	else if (sysdev->parent && sysdev->parent->parent &&
>>> +		 sysdev->parent->parent->bus == &pci_bus_type)
>>> +		sysdev = sysdev->parent->parent;
>>> +#endif
>>> +
>>
>> Not maybe the the ideal situation here, and looks really tailored to make PCI dwc3
>> controllers with xhci support work.
>>
>> Was there some reason child devices can't automatically inherit the dma mask from the parents,
>> forcing us to dig it from grandparents?
>>
>> Anyway, looks like the dwc3 part is already in 4.10-rc,
>> If Greg and Alan want to take this series that's fine by me
> 
> I have no objections.
> 
> Alan Stern
> 
>> I haven't tested that it won't break anything on PCI XHCI controllers though
>>
>> -Mathias  

Are you going to pick all the remaining patches from this series (i.e. 1 to 4)?

That should fix the warning that people are seeing on v4.10-rc.

cheers,
roger

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web