On Wed, Feb 08, 2017 at 10:12:59AM -0500, Alan Stern wrote: > On Wed, 8 Feb 2017, Peter Chen wrote: > > > >> On Thu, Jan 19, 2017 at 02:21:26PM +0200, Mathias Nyman wrote: > > >> > Hi Greg > > >> > > > >> > This series by Arnd Bergmann was originally six patches, but last > > >> > two of them were already taken to 4.10. Without the rest of them > > >> > there will be a regression in 4.10. > > >> > > > >> > Original cover letter says: > > >> > > > >> > For xhci-hcd platform device, all the DMA parameters are not > > >> > configured properly, notably dma ops for dwc3 devices. > > >> > > > >> > The idea here is that you pass in the parent of_node along with the > > >> > child device pointer, so it would behave exactly like the parent > > >> > already does. The difference is that it also handles all the other > > >> > attributes besides the mask. > > >> > > > >> > -Mathias > > >> > > > >> > Arnd Bergmann (4): > > >> > usb: separate out sysdev pointer from usb_bus > > >> > usb: chipidea: use bus->sysdev for DMA configuration > > >> > usb: ehci: fsl: use bus->sysdev for DMA configuration > > >> > usb: xhci: use bus->sysdev for DMA configuration > > >> > > >> The ehci part needs to similar change, otherwise, it will fail too. > > >> I post a patch for it [1]. Alan, would you please help to review it? > > >> Then, Greg can pick up the five patches together. > > >> > > >> [1] http://www.spinics.net/lists/linux-usb/msg153263.html > > > > > >That patch contains a lot of unrelated whitespace changes. Can you redo it with only > > >the necessary changes? > > > > > > > Alan, the ./scripts/checkpatch.pl complaints it, so I made changes, and I think the > > whitespace changes are not needed to have an additional patch, so I add these whitespace > > changes to this patch, is it ok I just add the comments to mention that? > > > > Below is console output for the patch without whitespace changes: > > > > b29397@b29397-desktop:~/work/projects/usb$ ./scripts/checkpatch.pl 0001-usb-ehci-use-bus-sysdev-for-DMA-configuration.patch > > WARNING: space prohibited between function name and open parenthesis '(' > > #25: FILE: drivers/usb/host/ehci-mem.c:141: > > + dma_free_coherent (ehci_to_hcd(ehci)->self.sysdev, > > > > WARNING: space prohibited between function name and open parenthesis '(' > > #70: FILE: drivers/usb/host/ehci-mem.c:202: > > + dma_alloc_coherent (ehci_to_hcd(ehci)->self.sysdev, > > > > total: 0 errors, 2 warnings, 48 lines checked > > > > NOTE: For some of the reported defects, checkpatch may be able to > > mechanically convert to the typical style using --fix or --fix-inplace. > > > > 0001-usb-ehci-use-bus-sysdev-for-DMA-configuration.patch has style problems, please review. > > It's okay to fix the whitespace in those two lines, because you're > changing them anyway. But don't change any other lines just to make > them look better. > Modified patch like below: >From 083c2bc7f05b520c51f64ef6b8ee6a0bae499442 Mon Sep 17 00:00:00 2001 From: Peter Chen <peter.chen@xxxxxxx> Date: Mon, 6 Feb 2017 14:50:33 +0800 Subject: [PATCH 1/1] usb: ehci: use bus->sysdev for DMA configuration Set the dma for ehci from sysdev. The sysdev is pointing to device that is known to the system firmware or hardware. Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Sriram Dash <sriram.dash@xxxxxxx> Signed-off-by: Peter Chen <peter.chen@xxxxxxx> --- drivers/usb/host/ehci-mem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c index 4de4301..9b7e639 100644 --- a/drivers/usb/host/ehci-mem.c +++ b/drivers/usb/host/ehci-mem.c @@ -138,7 +138,7 @@ static void ehci_mem_cleanup (struct ehci_hcd *ehci) ehci->sitd_pool = NULL; if (ehci->periodic) - dma_free_coherent (ehci_to_hcd(ehci)->self.controller, + dma_free_coherent(ehci_to_hcd(ehci)->self.sysdev, ehci->periodic_size * sizeof (u32), ehci->periodic, ehci->periodic_dma); ehci->periodic = NULL; @@ -155,7 +155,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) /* QTDs for control/bulk/intr transfers */ ehci->qtd_pool = dma_pool_create ("ehci_qtd", - ehci_to_hcd(ehci)->self.controller, + ehci_to_hcd(ehci)->self.sysdev, sizeof (struct ehci_qtd), 32 /* byte alignment (for hw parts) */, 4096 /* can't cross 4K */); @@ -165,7 +165,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) /* QHs for control/bulk/intr transfers */ ehci->qh_pool = dma_pool_create ("ehci_qh", - ehci_to_hcd(ehci)->self.controller, + ehci_to_hcd(ehci)->self.sysdev, sizeof(struct ehci_qh_hw), 32 /* byte alignment (for hw parts) */, 4096 /* can't cross 4K */); @@ -179,7 +179,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) /* ITD for high speed ISO transfers */ ehci->itd_pool = dma_pool_create ("ehci_itd", - ehci_to_hcd(ehci)->self.controller, + ehci_to_hcd(ehci)->self.sysdev, sizeof (struct ehci_itd), 32 /* byte alignment (for hw parts) */, 4096 /* can't cross 4K */); @@ -189,7 +189,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) /* SITD for full/low speed split ISO transfers */ ehci->sitd_pool = dma_pool_create ("ehci_sitd", - ehci_to_hcd(ehci)->self.controller, + ehci_to_hcd(ehci)->self.sysdev, sizeof (struct ehci_sitd), 32 /* byte alignment (for hw parts) */, 4096 /* can't cross 4K */); @@ -199,7 +199,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) /* Hardware periodic table */ ehci->periodic = (__le32 *) - dma_alloc_coherent (ehci_to_hcd(ehci)->self.controller, + dma_alloc_coherent(ehci_to_hcd(ehci)->self.sysdev, ehci->periodic_size * sizeof(__le32), &ehci->periodic_dma, flags); if (ehci->periodic == NULL) { -- 2.7.4 -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html