Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1562637
| From | Mathias Nyman <mathias.nyman@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration |
| Date | 2017-01-19 12:40 +0100 |
| Message-ID | <t1jeq-X3-27@gated-at.bofh.it> (permalink) |
| References | <sYsHh-8rV-87@gated-at.bofh.it> <sYJ5o-1Jo-35@gated-at.bofh.it> <t0X4d-3E5-3@gated-at.bofh.it> <t1hcB-86Q-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 19.01.2017 11:22, Greg KH wrote: > On Wed, Jan 18, 2017 at 01:58:28PM +0200, Mathias Nyman wrote: >> On 12.01.2017 10:38, Roger Quadros wrote: >>> 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. >>> >> >> Let's check with Greg >> >> Greg, 5/6 and 6/6 are in 4.10-rc already, causing additional warnings for >> people using dwc3 xhci. >> >> First 3 patches change usb core, patch 4 xhci. >> >> Compiles and boots, doesn't break pci xhci (non-dwc3) functionality >> >> Would you like me to send first 4 patches for usb-linus to get a clean final 4.10 >> without warnings, or to send them for usb-next? >> >> Or will you just pick the patches from here directly. > > I don't have them "here" anymore, they are long-gone from my patch > queue, sorry. > > Can you resend them, I don't know what these patches contained, but if > they fix an 4.10 issue, that would be good to have there, right? > Right, I'll send them -Mathias
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration Mathias Nyman <mathias.nyman@linux.intel.com> - 2017-01-18 13:00 +0100
Re: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration Greg KH <gregkh@linuxfoundation.org> - 2017-01-19 10:30 +0100
Re: [PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration Mathias Nyman <mathias.nyman@linux.intel.com> - 2017-01-19 12:40 +0100
csiph-web