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


Groups > linux.kernel > #1370561 > unrolled thread

[PATCH] usb: gadget: udc-core: remove manual dma configuration

Started byGrygorii Strashko <grygorii.strashko@ti.com>
First post2016-04-04 13:40 +0200
Last post2016-04-05 08:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] usb: gadget: udc-core: remove manual dma configuration Grygorii Strashko <grygorii.strashko@ti.com> - 2016-04-04 13:40 +0200
    RE: [PATCH] usb: gadget: udc-core: remove manual dma configuration Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> - 2016-04-05 08:30 +0200

#1370561 — [PATCH] usb: gadget: udc-core: remove manual dma configuration

FromGrygorii Strashko <grygorii.strashko@ti.com>
Date2016-04-04 13:40 +0200
Subject[PATCH] usb: gadget: udc-core: remove manual dma configuration
Message-ID<rkb1n-2kr-3@gated-at.bofh.it>
Since commit 7ace8fc8219e ("usb: gadget: udc: core: Fix argument of
dma_map_single for IOMMU") it is not necessary to configure DMA for
usb_gadget device manually, because all DMA operation are performed
using parent/controller device.

Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/usb/gadget/udc/udc-core.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index 4151597..e4e70e1 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -371,12 +371,6 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,
 	INIT_WORK(&gadget->work, usb_gadget_state_work);
 	gadget->dev.parent = parent;
 
-#ifdef	CONFIG_HAS_DMA
-	dma_set_coherent_mask(&gadget->dev, parent->coherent_dma_mask);
-	gadget->dev.dma_parms = parent->dma_parms;
-	gadget->dev.dma_mask = parent->dma_mask;
-#endif
-
 	if (release)
 		gadget->dev.release = release;
 	else
-- 
2.8.0

[toc] | [next] | [standalone]


#1371259

FromYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date2016-04-05 08:30 +0200
Message-ID<rksEW-7oi-3@gated-at.bofh.it>
In reply to#1370561
Hi,

> From: Grygorii Strashko [mailto:grygorii.strashko@ti.com]
> Sent: Monday, April 04, 2016 8:32 PM
> 
> Since commit 7ace8fc8219e ("usb: gadget: udc: core: Fix argument of
> dma_map_single for IOMMU") it is not necessary to configure DMA for
> usb_gadget device manually, because all DMA operation are performed
> using parent/controller device.
> 
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

My environment could work correctly after I applied this patch.
So,

Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>


I realized that the commit 7ace8fc8219e is not suitable for my environment.
(Especially I realized it could use all of DMAC channels when IOMMU was enabled.)
So, I will submit RFC patch set for udc-core.c / renesas_usbhs later :)

Best regards,
Yoshihiro Shimoda

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web