[PATCH 14/14] usb: dwc2: host: use kmem cache to allocate descriptors

2015-10-11 Thread Gregory Herrero
Kmem caches help to get correct boundary for descriptor buffers which need to be 512 bytes aligned for dwc2 controller. Two kmem caches are needed for generic descriptors and for hs isochronous descriptors which doesn't have same size. Signed-off-by: Gregory Herrero --- drivers/usb/dwc2/core.h

[PATCH 01/14] usb: dwc2: host: ensure filling of isoc desc is correctly done

2015-10-11 Thread Gregory Herrero
Increment qtd->isoc_frame_index_last before testing it, else below check will never be true and IOC (Interrupt On Complete) bit for last frame will never be set in descriptor status. /* Set IOC for each descriptor corresponding to last frame of URB */ if (qtd->isoc_frame_index_last == qtd->urb

[PATCH 12/14] usb: dwc2: host: avoid usage of dma_alloc_coherent with irqs disabled

2015-10-11 Thread Gregory Herrero
Use Streaming DMA mappings to handle cache coherency of frame list and descriptor list. Cache are always flushed before controller access it or before cpu access it. Signed-off-by: Gregory Herrero --- drivers/usb/dwc2/core.c | 9 drivers/usb/dwc2/core.h | 2 + drivers/usb/dwc2/h

[PATCH 02/14] usb: dwc2: host: set active bit in isochronous descriptors

2015-10-11 Thread Gregory Herrero
Active bit must be enabled in all scheduled descriptors. Else transfer never start. Remove previous code which was not correctly configuring descriptors. Active bit was set before calling dwc2_fill_host_isoc_dma_desc() which is erasing dma_desc->status. Signed-off-by: Gregory Herrero --- drivers

[PATCH 08/14] usb: dwc2: host: always increment available host channel during release

2015-10-11 Thread Gregory Herrero
When releasing a channel, increment hsotg->available_host_channels even in case a periodic channel is released. Signed-off-by: Gregory Herrero --- drivers/usb/dwc2/hcd_ddma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c index 9635d

[PATCH 10/14] usb: dwc2: host: free status_buf on hcd de-init

2015-10-11 Thread Gregory Herrero
status_buf needs to be freed in dwc2_hcd_remove(). Signed-off-by: Gregory Herrero --- drivers/usb/dwc2/hcd.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index af4e4a2..41c00e9 100644 --- a/drivers/usb/dwc

[PATCH 13/14] usb: dwc2: host: fix descriptor list address masking

2015-10-11 Thread Gregory Herrero
From: Mian Yousaf Kaukab Masks for HCDMA.CTD and HCDMA.DMAAddr are incorrect. As we always start from first descriptor, no need to mask the address anyway. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Gregory Herrero --- drivers/usb/dwc2/core.c | 8 ++-- drivers/usb/dwc2/hw.h | 4 --

[PATCH 00/14] usb: dwc2: descriptor dma mode bug fixes

2015-10-11 Thread Gregory Herrero
Hi, This patchset contains bug fixes for host descriptor dma mode. Descriptor dma mode can't be used as the default mode since controller does not support split transfers in this mode. So we add a new configuration parameter which allows descriptor dma mode to be enabled for full-speed devices on

[PATCH 11/14] usb: dwc2: host: enable descriptor dma for fs devices

2015-10-11 Thread Gregory Herrero
From: Mian Yousaf Kaukab As descriptor dma mode does not support split transfers, it can't be enabled for high speed devices. Add a core parameter to enable it for full speed devices. Ensure frame list and descriptor list are correctly freed during disconnect. Signed-off-by: Mian Yousaf Kaukab

[PATCH 03/14] usb: dwc2: host: rework isochronous halt path

2015-10-11 Thread Gregory Herrero
When a channel is halted because of urb dequeue during transfer completion, no other qtds must be scheduled until halt is done. Moreover, all in progress qtds must be given back. Signed-off-by: Gregory Herrero --- drivers/usb/dwc2/hcd_ddma.c | 22 +- 1 file changed, 21 insert

[PATCH 09/14] usb: dwc2: host: process all completed urbs

2015-10-11 Thread Gregory Herrero
Process all completed urbs, if more urbs are complete by the time driver processes completion interrupt. Signed-off-by: Gregory Herrero --- drivers/usb/dwc2/hcd_ddma.c | 38 -- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/hcd

[PATCH 06/14] usb: dwc2: host: add function to compare frame index

2015-10-11 Thread Gregory Herrero
This function allow comparing frame index used for descriptor list which has 64 entries. Signed-off-by: Gregory Herrero --- drivers/usb/dwc2/hcd.h | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/usb/dwc2/hcd.h b/drivers/usb/dwc2/hcd.h index f105bad..a19837f 100644 ---

[PATCH 04/14] usb: dwc2: host: fix use of qtd after free in desc dma mode

2015-10-11 Thread Gregory Herrero
When completing non isoc xfer, dwc2_complete_non_isoc_xfer_ddma() is relying on qtd->n_desc to process the corresponding number of descriptors. During the processing of these descriptors, qtd could be unlinked and freed if xfer is done and urb is no more in progress. In this case, dwc2_complete_n

[PATCH 05/14] usb: dwc2: host: spinlock release channel

2015-10-11 Thread Gregory Herrero
Prevent dwc2 driver from accessing channel while it frees it. Signed-off-by: Gregory Herrero --- drivers/usb/dwc2/hcd_ddma.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c index 4801e69..a76a58c 100644 --- a/drivers/usb/dwc2/hcd_

[PATCH 07/14] usb: dwc2: host: program descriptor for next frame

2015-10-11 Thread Gregory Herrero
Isochronous descriptor is currently programmed for the frame after the last descriptor was programmed. If the last descriptor frame underrun, then current descriptor must take this into account and must be programmed on the current frame + 1. This overrun usually happens when system is loaded and d

[PATCH] MAINTAINERS: add Mediatek usb3 phy driver

2015-10-11 Thread Chunfeng Yun
Add Mediatek usb3 phy driver to maintainer entry. Signed-off-by: Chunfeng Yun --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7ba7ab7..be0055c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1291,6 +1291,13 @@ F: arch/arm/mach-media

Re: [PATCH v3 1/4] usb: gadget: f_midi: free usb request when done

2015-10-11 Thread Clemens Ladisch
Felipe Balbi wrote: > Clemens Ladisch writes: >> Felipe Tonello wrote: >>> req->actual == req->length means that there is no data left to enqueue, >> >> This condition is not checked in the patch. >> >>> so free the request. >>> >>> Signed-off-by: Felipe F. Tonello >>> --- >>> drivers/usb/gadget

Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver

2015-10-11 Thread Kishon Vijay Abraham I
Hi, On Sunday 11 October 2015 04:45 PM, punnaiah choudary kalluri wrote: > On Wed, Sep 30, 2015 at 9:48 PM, Felipe Balbi wrote: >> On Thu, Sep 24, 2015 at 11:18:01AM -0500, Rob Herring wrote: >>> On Thu, Sep 24, 2015 at 4:26 AM, Subbaraya Sundeep Bhatta >>> wrote: Hi Peter, > -

Re: simplify configfs attributes V2

2015-10-11 Thread Christoph Hellwig
On Fri, Oct 09, 2015 at 04:37:51PM -0500, Felipe Balbi wrote: > For reference, I'm fine if you guys take all patches through FS > tree. Another option is waiting for dependencies to be merged in v4.4, > and the gadget changes merge in v4.5, whatever works. I'd prefer to take them all in one go. I

Re: [PATCH 18/23] spear13xx_pcie_gadget: use per-attribute show and store methods

2015-10-11 Thread Christoph Hellwig
On Fri, Oct 09, 2015 at 04:05:17PM -0500, Felipe Balbi wrote: > Pratyush Anand writes: > > > On Sat, Oct 3, 2015 at 7:02 PM, Christoph Hellwig wrote: > >> Signed-off-by: Christoph Hellwig > > > > Acked-by: Pratyush Anand > > I don't seem to have the actual patch, care to resend? The whole se

Re: [PATCH 02/23] usb-gadget: use per-attribute show and store methods

2015-10-11 Thread Christoph Hellwig
On Fri, Oct 09, 2015 at 04:19:57PM -0500, Felipe Balbi wrote: > > Signed-off-by: Christoph Hellwig > > Reviewed-by: Andrzej Pietrasiewicz > > I suppose this depends on other fs/configfs changes ? The whole series should be applied in order, but doesn't have any other dependencies. -- To unsubsc

Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver

2015-10-11 Thread punnaiah choudary kalluri
On Wed, Sep 30, 2015 at 9:48 PM, Felipe Balbi wrote: > On Thu, Sep 24, 2015 at 11:18:01AM -0500, Rob Herring wrote: >> On Thu, Sep 24, 2015 at 4:26 AM, Subbaraya Sundeep Bhatta >> wrote: >> > Hi Peter, >> > >> >> -Original Message- >> >> From: Peter Chen [mailto:peter.c...@freescale.com]