Re: Set SEL for device-initiated U1 failed. errors

2013-09-01 Thread Pratyush Anand
On Fri, Aug 30, 2013 at 02:58:25AM +0800, Alan Stern wrote: On Thu, 29 Aug 2013, Sarah Sharp wrote: On Thu, Aug 29, 2013 at 10:06:16AM -0700, Greg Kroah-Hartman wrote: Hi Sarah, I'm getting the following warnings from the 3.10.9 kernel all the time when I unplug a USB 3 storage

Re: current version of http://www.linux-usb.org/usbtest/ testusb.c

2013-09-09 Thread Pratyush Anand
On Mon, Sep 09, 2013 at 02:08:02AM +0800, joe M wrote: Hello, Just wanted to check if there is a version of http://www.linux-usb.org/usbtest/ testusb.c or test.sh scrpts that work with the current kernel. The files seem to be using usbfs, which is deprecated. ./testusb -a usbfs files

Re: [RFC 10/21] xhci: replace xhci_readl() with readl() in xhci-dbg.c

2013-09-12 Thread Pratyush Anand
On Tue, Sep 10, 2013 at 02:03:15AM +0800, Xenia Ragiadakou wrote: Function xhci_readl() is used to read 32bit xHC registers residing in MMIO address space. It takes as first argument a pointer to the xhci_hcd although it does not use it because internally it simply calls readl. This creates an

Re: [RFC 10/21] xhci: replace xhci_readl() with readl() in xhci-dbg.c

2013-09-13 Thread Pratyush Anand
Hi ksenia, On Fri, Sep 13, 2013 at 04:45:23PM +0800, Xenia Ragiadakou wrote: On 09/13/2013 06:49 AM, Pratyush Anand wrote: On Tue, Sep 10, 2013 at 02:03:15AM +0800, Xenia Ragiadakou wrote: Function xhci_readl() is used to read 32bit xHC registers residing in MMIO address space. It takes

Re: [RFC 10/21] xhci: replace xhci_readl() with readl() in xhci-dbg.c

2013-09-19 Thread Pratyush Anand
On Fri, Sep 20, 2013 at 05:37:50AM +0800, Sarah Sharp wrote: On Fri, Sep 13, 2013 at 03:50:48PM +0530, Pratyush Anand wrote: On Fri, Sep 13, 2013 at 3:40 PM, Xenia Ragiadakou burzalod...@gmail.comwrote: Nope :). There is still Kumar 's patch that keeps the wrappers, so it can

Re: Need testers for long-standing xHCI clear halt bug

2013-10-15 Thread Pratyush Anand
Hi Sarah, On Fri, Oct 11, 2013 at 05:43:49AM +0800, Sarah Sharp wrote: Hi Sipter and Marcus, Xenia has a potential fix for a long-standing bug in the xHCI driver, and I need your help testing it. You ran into that bug back in Feb 2013:

Re: Need testers for long-standing xHCI clear halt bug

2013-10-23 Thread Pratyush Anand
Hi Sarah, On Fri, Oct 11, 2013 at 05:43:49AM +0800, Sarah Sharp wrote: Hi Sipter and Marcus, Xenia has a potential fix for a long-standing bug in the xHCI driver, and I need your help testing it. You ran into that bug back in Feb 2013:

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Pratyush Anand
Thanks a lot Alan for your help. On Wed, Oct 30, 2013 at 9:38 PM, Alan Stern st...@rowland.harvard.edu wrote: On Wed, 30 Oct 2013, Pratyush Anand wrote: I am using dwc3 driver. I my case kernel version is even a bit old 3.3, but dwc3 patches are almost updated. I am using g_mass_storage

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-31 Thread Pratyush Anand
Thanks for the quick patch..I will test it. On Wed, Oct 30, 2013 at 10:02 PM, Alan Stern st...@rowland.harvard.edu wrote: On Wed, 30 Oct 2013, Alan Stern wrote: I think you have found a bug in the dwc3 driver. At this point, because the IGNORE_BULK_OUT bit is set, g_mass_storage issues a

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-11-01 Thread Pratyush Anand
= ~DWC3_EP_STALL; + dep-flags = ~(DWC3_EP_STALL | DWC3_EP_WEDGE); } return ret; Tested-by: Pratyush Anand pratyush.an...@st.com However, I noticed that the same error recovery test fails even after above patch if dwc3 dbg/vdbg messages are enabled. However

[PATCH] usb: gadget: mass storage: fix return of delayed status

2013-11-04 Thread Pratyush Anand
, DELAYED_STATUS and hence EP0_BUFSIZE will no longer be used now, so remove them. Signed-off-by: Pratyush Anand pratyush.an...@st.com Cc: Felipe Balbi ba...@ti.com Cc: Paul Zimmerman paul.zimmer...@synopsys.com Cc: Alan Stern st...@rowland.harvard.edu --- drivers/usb/gadget/f_mass_storage.c | 2

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-11-04 Thread Pratyush Anand
On Sat, Nov 02, 2013 at 04:18:05AM +0800, Paul Zimmerman wrote: From: Alan Stern Sent: Friday, November 01, 2013 7:09 AM Now DELAYED_STATUS isn't used anywhere. You should add the following hunk to this patch: Index: usb-3.12/drivers/usb/gadget/storage_common.c

Query: DWC3: PHY Suspend bit behavior

2013-11-14 Thread Pratyush Anand
Hi, Patch usb: dwc3: gadget: drop dwc3 manual phy control says Recent versions of the core, can suspend and resume the PHYs automatically, so we don't need to fiddle with dwc3's Global PHY registers at all. First part of the statement is true, but only when bit 17 of GUSB3PIPECTL and bit 6 of

[PATCH 2/8] usb/dwc3: Fix missed isoc

2013-01-10 Thread Pratyush Anand
in request_list during giveback. If any future queued request is successfully transferred then we will issue UPDATE TRANSFER for all request in the request_list. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/core.h |2 -- drivers/usb/dwc3/gadget.c | 36

[PATCH 4/8] usb/dwc3: fix isoc END TRANSFER Condition

2013-01-10 Thread Pratyush Anand
insure that there is no request submitted to core when issuing END TRANSFER. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 23 ++- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3

[PATCH 6/8] usb/dwc3: No need to pass params in case of UPDATE TRANSFER

2013-01-10 Thread Pratyush Anand
UPDATE transfer does not need any parameters. So, no need to prepare it. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[PATCH 3/8] usb/dwc3: Correct Return from ep_queue

2013-01-10 Thread Pratyush Anand
Its better to return from each if condition as they are mutually exclusive. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[PATCH 8/8] usb/dwc3: req-queued must be forced to false in cleanup

2013-01-10 Thread Pratyush Anand
. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3d52876..a511cde 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c

[PATCH 7/8] usb/dwc3: Fix scatter gather implementation

2013-01-10 Thread Pratyush Anand
. dwc3_prepare_trbs: last_one should be set when it is last node of SG as well as last node of request_list. __dwc3_cleanup_done_trbs: It has been prepared after re-factorization of dwc3_cleanup_done_reqs. It is called for each TRB of SG. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3

[PATCH 5/8] usb/dwc3: Fix skip LINK-TRB on ISOC

2013-01-10 Thread Pratyush Anand
When we reach to link trb, we just need to increase free_slot and then calculate TRB. Return is not correct, as it will cause wrong TRB DMA address to fetch in case of update transfer. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 13 + 1 files

Re: [PATCH 2/8] usb/dwc3: Fix missed isoc

2013-01-10 Thread Pratyush Anand
On 1/10/2013 4:20 PM, Felipe Balbi wrote: On Thu, Jan 10, 2013 at 03:23:16PM +0530, Pratyush Anand wrote: There are two reasons to generate missed isoc. 1. when the host does not poll for all the data. 2. because of application-side delays that prevent all the data from being transferred

Re: [PATCH 4/8] usb/dwc3: fix isoc END TRANSFER Condition

2013-01-10 Thread Pratyush Anand
On 1/10/2013 6:02 PM, Sergei Shtylyov wrote: Hello. On 10-01-2013 13:53, Pratyush Anand wrote: There were still some corner cases where isoc transfer was not able to restart, specially when missed isoc does not happen , and in fact gadget does not queue any new request during giveback

[PATCH V2 0/8] usb/dwc3: misc patches rebased at dwc3-for-v3.8

2013-01-14 Thread Pratyush Anand
LINK-TRB on ISOC removed. Pratyush Anand (8): usb/dwc3: Enable usb2 LPM only when connected as usb2.0 usb/dwc3: Fix missed isoc usb/dwc3: Correct Return from ep_queue usb/dwc3: fix isoc END TRANSFER Condition usb/dwc3: Fix skip LINK-TRB on ISOC usb/dwc3: No need to pass params in case

[PATCH V2 1/8] usb/dwc3: Enable usb2 LPM only when connected as usb2.0

2013-01-14 Thread Pratyush Anand
Synopsys says: The HIRD Threshold field must be set to ‘0’ when the device core is operating in super speed mode. This patch implements above statement. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 31 ++- 1 files changed, 18

[PATCH V2 2/8] usb/dwc3: Fix missed isoc

2013-01-14 Thread Pratyush Anand
TRANSFER for all request in the request_list. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/core.h |2 -- drivers/usb/dwc3/gadget.c | 36 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/drivers/usb/dwc3/core.h b

[PATCH V2 3/8] usb/dwc3: Correct Return from ep_queue

2013-01-14 Thread Pratyush Anand
Its better to return from each if condition as they are mutually exclusive. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[PATCH V2 5/8] usb/dwc3: Fix skip LINK-TRB on ISOC

2013-01-14 Thread Pratyush Anand
When we reach to link trb, we just need to increase free_slot and then calculate TRB. Return is not correct, as it will cause wrong TRB DMA address to fetch in case of update transfer. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 13 + 1 files

[PATCH V2 4/8] usb/dwc3: fix isoc END TRANSFER Condition

2013-01-14 Thread Pratyush Anand
insure that there is no request submitted to core when issuing END TRANSFER. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 23 ++- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3

[PATCH V2 6/8] usb/dwc3: No need to pass params in case of UPDATE TRANSFER

2013-01-14 Thread Pratyush Anand
UPDATE transfer does not need any parameters. So, no need to prepare it. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[PATCH V2 7/8] usb/dwc3: Fix scatter gather implementation

2013-01-14 Thread Pratyush Anand
. dwc3_prepare_trbs: last_one should be set when it is last node of SG as well as last node of request_list. __dwc3_cleanup_done_trbs: It has been prepared after re-factorization of dwc3_cleanup_done_reqs. It is called for each TRB of SG. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3

[PATCH V2 8/8] usb/dwc3: req-queued must be forced to false in cleanup

2013-01-14 Thread Pratyush Anand
. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 4e29e9b..b6bd21f 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c

Re: [PATCH V2 1/8] usb/dwc3: Enable usb2 LPM only when connected as usb2.0

2013-01-14 Thread Pratyush Anand
believe we should include it. Regards Pratyush On 1/14/2013 4:06 PM, Felipe Balbi wrote: Hi, On Mon, Jan 14, 2013 at 03:59:31PM +0530, Pratyush Anand wrote: Synopsys says: The HIRD Threshold field must be set to ‘0’ when the device core is operating in super speed mode. This patch implements

Re: [PATCH V2 1/8] usb/dwc3: Enable usb2 LPM only when connected as usb2.0

2013-01-14 Thread Pratyush Anand
Hi, On 1/14/2013 4:42 PM, Felipe Balbi wrote: Hi, On Mon, Jan 14, 2013 at 04:36:11PM +0530, Pratyush Anand wrote: I think, Paul can comment better. What I got feedback from SNPS that if HIRD settings are programmed in SS mode, it might result in some weird issue. However, our issue

[PATCH] usb/dwc3: fix ep-maxburst for ep0

2013-01-17 Thread Pratyush Anand
dwc3_gadget_set_ep_config expects maxburst as incremented by 1. So, by default initialize ep-maxburst to 0 for ep0. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c

Re: [PATCH] usb/dwc3: fix ep-maxburst for ep0

2013-01-17 Thread Pratyush Anand
Hi, On Thu, Jan 17, 2013 at 5:25 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Thu, Jan 17, 2013 at 04:34:45PM +0530, Pratyush Anand wrote: Hi Felip, On 1/17/2013 4:14 PM, Pratyush ANAND wrote: dwc3_gadget_set_ep_config expects maxburst as incremented by 1. So, by default initialize

[PATCH V2] usb/dwc3: fix ep-maxburst for ep0

2013-01-18 Thread Pratyush Anand
dwc3_gadget_set_ep_config expects maxburst as incremented by 1. So, by default initialize ep-maxburst to 1 for ep0. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c

[PATCH] usb: dwc3: fix EP_BUSY in case of dequeue

2013-02-28 Thread Pratyush Anand
will never reach to core (dep-req_queued) This patch clears DWC3_EP_BUSY during ep_dequeue if none of the request was in dep-req_queued. Reported-by: Eric Tomio eric.to...@st.com Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |2 ++ 1 files changed, 2 insertions

Re: [PATCH] usb: dwc3: fix EP_BUSY in case of dequeue

2013-03-01 Thread Pratyush Anand
On 3/1/2013 12:10 PM, Felipe Balbi wrote: Hi, [...] dep-flags = ~DWC3_EP_BUSY; ^ and here udelay(100); } ?? Ohhh.. I missed this patch in my repo.. usb: dwc3: gadget: fix 'endpoint always busy' bug -- To unsubscribe from this list: send the

Re: [PATCH 00/11] usb: dwc3: more hibernation helpers

2014-02-26 Thread Pratyush Anand
On Wed, Feb 26, 2014 at 03:40:32AM +0800, Felipe Balbi wrote: Adding Amit for whome it will be very useful as he was about to start some work related to hibernation. Regards Pratyush Hi, these series cleans up dwc3 a little bit and adds more boiler plate code for hibernation support. Note

Re: [PATCH 04/11] usb: dwc3: gadget: implement dwc3_gadget_get_link_state

2014-02-26 Thread Pratyush Anand
On Wed, Feb 26, 2014 at 03:40:36AM +0800, Felipe Balbi wrote: From: Paul Zimmerman paul.zimmer...@synopsys.com This function will be used during hibernation to get the current link state. It will be needed at least for Hibernation support. Since we do receive linksts_change_interrupt,

Re: What to use for usb transfer from gadget to host?

2014-03-20 Thread Pratyush Anand
On Thu, Mar 20, 2014 at 10:11:42PM +0800, tzi...@me.com wrote: Hello! I am developing on a phyFlex iMx.6 and want to send data via USB to a Host connected via the OTG port. The data is images from an image sensor, so I need a high performance (USB 2.0). How is your image sensor driver

Query: Link Power management support for xhci platform driver

2014-03-21 Thread Pratyush Anand
Hi Sarah, I have to implement dynamic U1/U2 initiation on a dwc3 based xhci platform. I can see that my host starts sending LGO_U1 (when idle) by enabling XHCI_LPM_SUPPORT XHCI_INTEL_HOST quirk in xhci_plat_quirks and using xhci_enable/disable_usb3_lpm_timeout in xhci_plat_xhci_driver. But

Re: Query: Link Power management support for xhci platform driver

2014-03-24 Thread Pratyush Anand
Hi Sarah, Thanks a lot for replying back. On Sat, Mar 22, 2014 at 12:17:49AM +0800, Sarah Sharp wrote: Cc-ing Mathias Nyman, who is taking over as xHCI driver maintainer. On Fri, Mar 21, 2014 at 02:37:22PM +0530, Pratyush Anand wrote: Hi Sarah, I have to implement dynamic U1/U2

Discussion: Link Layer Test implementation strategy for Linux Embedded Host

2014-03-31 Thread Pratyush Anand
Hi Alan/Greg, I was starting some work for running Lecroy USB Compliance Suite Link Layer Tests with embedded xhci host, which runs Linux. I thought, its wise to discuss my test strategy before I start implementing it, as in long run I would like to push them to mainline. These tests have been

Re: Discussion: Link Layer Test implementation strategy for Linux Embedded Host

2014-03-31 Thread Pratyush Anand
Hi Alan, On Tue, Apr 1, 2014 at 4:19 AM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 31 Mar 2014, Greg KH wrote: On Mon, Mar 31, 2014 at 05:14:31PM +0530, Pratyush Anand wrote: Hi Alan/Greg, I was starting some work for running Lecroy USB Compliance Suite Link Layer Tests

Re: [PATCH] usb: dwc3: Do not handle xfercomplete if EP is already stopped

2012-07-10 Thread Pratyush Anand
On 7/6/2012 4:01 PM, Pratyush ANAND wrote: In some rare cases, we have observed that core generates xfercomplete event for last transfer even when end transfer was issued for that endpoint. Now since we have already called the giveback for the submitted request, so we do not need to handle

Re: usb: dwc3: resume phy during gadget initialization on recent cores breaks phy suspend

2012-07-10 Thread Pratyush Anand
On 7/8/2012 4:20 AM, Paul Zimmerman wrote: Commit usb: dwc3: resume phy during gadget initialization on recent cores breaks phy suspend on cores newer than 1.94a. The core will still operate, but the power savings provided by phy suspend are lost. Pratyush, did you see an actual problem caused

[PATCH] usb/dwc3: Correct DEPCFG for Config Action Modify

2012-08-06 Thread Pratyush Anand
From: Pratyush ANAND pratyush.an...@st.com We need to issue DEPCFG (with Config Action Set to Modify) as per specification. Even if we do not respect this , it works in normal cases. But, I have observed one failure in very peculiar situation. If cpu clock is very slow and execution

Re: [PATCH] usb/dwc3: Correct DEPCFG for Config Action Modify

2012-08-06 Thread Pratyush Anand
On 8/6/2012 5:28 PM, Felipe Balbi wrote: Hi, On Mon, Aug 06, 2012 at 03:33:16PM +0530, Pratyush Anand wrote: From: Pratyush ANAND pratyush.an...@st.com We need to issue DEPCFG (with Config Action Set to Modify) as per specification. Even if we do not respect this , it works in normal cases

[PATCH V2] usb/dwc3: Send DEPCFG with Config Action: Modify after conndone

2012-08-06 Thread Pratyush Anand
From: Pratyush ANAND pratyush.an...@st.com For core 1.94A and latter, specification says to issue DEPCFG with Config Action: Modify for physical endpoint 0/1. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |8 ++-- 1 files changed, 6 insertions(+), 2

testusb: test13 is broken at super speed

2013-05-20 Thread Pratyush Anand
dmesg. On 5/20/2013 12:26 PM, V K Raveendra Talabattula wrote: Hi, I tried it and got the same error(protocol error) --Raveendra --- *Original Message* --- *Sender* : Pratyush Anand *Date* : May 20, 2013 15:25 (GMT+09:00) *Title* : Re: Regarding the patches related

Re: Reagrding interrupt end point transfers

2013-05-21 Thread Pratyush Anand
Hi Raveendra, On 5/21/2013 11:24 AM, V K Raveendra Talabattula wrote: Hi Pratyush, I need to test the tarnsfer on interrupt end point also.As such there are no test cases for interrupt end point tranfers ,also there is no support in gadget zero for interrupt end points. Can you give me any

Re: How should we handle isochronous underruns?

2013-07-01 Thread Pratyush Anand
On 6/30/2013 8:32 PM, Alan Stern wrote: There are several possible things the HCD could do when an underrun occurs: I do not have much experience in working with ISOC host.But by the experience of device side I can say that, There could be problem irrespective of tasklet or irq context, only

Re: How should we handle isochronous underruns?

2013-07-01 Thread Pratyush Anand
On 7/1/2013 4:48 PM, Clemens Ladisch wrote: It could try to schedule the URB for the next time slot after the last one used by the preceding URB, even if that time slot has already expired. There is no meaning of submitting an URB for expired time slot. Of course there is. The

Re: Detecting start/stop streaming for UVC webcam with bulk transfer mode

2013-07-02 Thread Pratyush Anand
On 6/20/2013 11:20 AM, Chetan Nanda wrote: Hi Laurent, Thanks for your mail, On Tue, Jun 18, 2013 at 6:12 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Chetan, On Tuesday 18 June 2013 11:17:40 Chetan Nanda wrote: Hi, I am currently working with UVC camera device which

[PATCH] usb/dwc3: Correct missed isoc when endpoint is busy

2012-08-07 Thread Pratyush Anand
When MISSED_ISOC is set, BUSY is also set. Since, we are handling MISSED_ISOC as a separate case in third scenario, therefore handle only BUSY but not MISSED_ISOC in second scenario. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |3 ++- 1 files changed, 2

Re: [PATCH] usb/dwc3: Correct missed isoc when endpoint is busy

2012-08-07 Thread Pratyush Anand
On 8/7/2012 5:54 PM, Felipe Balbi wrote: Hi, On Tue, Aug 07, 2012 at 04:54:18PM +0530, Pratyush Anand wrote: When MISSED_ISOC is set, BUSY is also set. Since, we are handling MISSED_ISOC as a separate case in third scenario, therefore handle only BUSY but not MISSED_ISOC in second scenario

[PATCH V2] usb/dwc3: Correct cache sync issue in case of ep0 bounced

2012-08-10 Thread Pratyush Anand
data in request-buf from request-dma in this scenario. So, cache sync function must not be executed in case of ep0 bounced. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/ep0.c|1 - drivers/usb/dwc3/gadget.c |7 +-- 2 files changed, 5 insertions(+), 3

dwc: Load order of glue diver and core driver

2012-08-16 Thread Pratyush Anand
Hi, May be something silly, but I am not getting it :( Probe of glue logic driver such as dwc3_exynos_probe must be called before core driver ie dwc3_probe. Since both drivers are called through module_init, How do we insure that? Regards Pratyush -- To unsubscribe from this list: send

Re: USB: DWC3: Missed Isoc issue

2012-08-22 Thread Pratyush Anand
On 8/22/2012 5:01 PM, Felipe Balbi wrote: Hi, On Wed, Aug 22, 2012 at 02:39:50PM +0530, Pratyush Anand wrote: Hi Felip, I am already discussing it with SNPS, but if you have observed following with current code.. Out of two generation condition for missed isoc, only first is handled

[PATCH 0/5] dwc3 fixes

2012-08-24 Thread Pratyush Anand
This fixes are mainly handling missed isoc IN request. I did not need last patch in my fixing. Still , I think fix is important. Pratyush Anand (5): usb/dwc3:Move udelay within stop_active_transfe usb/dwc3: Fix missed isoc usb/dwc3: Fix next request to handle in case of update transfer

[PATCH 1/5] usb/dwc3:Move udelay within stop_active_transfe

2012-08-24 Thread Pratyush Anand
We need udelay(100) after every END TRANSFER, so it is better to keep it within dwc3_stop_active_transfer. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 42 +- 1 files changed, 21 insertions(+), 21 deletions(-) diff

[PATCH 3/5] usb/dwc3: Fix next request to handle in case of update transfer

2012-08-24 Thread Pratyush Anand
req_queued points to the first request for which completion is still to be called. request_list points to the first request which need to be queued. dwc3_prepare_trb will change HWO from 0 to 1 for the first request of request_list. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers

[PATCH 2/5] usb/dwc3: Fix missed isoc

2012-08-24 Thread Pratyush Anand
in request_list during giveback. If any future queued request is successfully transferred then we will issue UPDATE TRANSFER for all request in the request_list. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/core.h |1 - drivers/usb/dwc3/gadget.c | 36

[PATCH 5/5] usb/dwc3: fix no request in request_list when start isoc

2012-08-24 Thread Pratyush Anand
If xfernotready is received and there is no request in request_list then PENDING flag must be set, so that next request in ep queue is executed. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff

[PATCH 4/5] usb/dwc3: Fix skip LINK-TRB on ISOC

2012-08-24 Thread Pratyush Anand
When we reach to link trb, we just need to increase free_slot and then calculate TRB. Return is not correct, as it will cause wrong TRB DMA address to fetch in case of update transfer. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 13 + 1 files

Re: [PATCH 5/5] usb/dwc3: fix no request in request_list when start isoc

2012-08-24 Thread Pratyush Anand
On 8/24/2012 5:10 PM, Pratyush ANAND wrote: If xfernotready is received and there is no request in request_list then PENDING flag must be set, so that next request in ep queue is executed. Although, I did not encounter PENDING in isoc testing. But, if somebody hits it, then only this patch

Re: [PATCH 5/5] usb/dwc3: fix no request in request_list when start isoc

2012-08-24 Thread Pratyush Anand
On 8/24/2012 7:01 PM, Pratyush Anand wrote: On 8/24/2012 5:10 PM, Pratyush ANAND wrote: If xfernotready is received and there is no request in request_list then PENDING flag must be set, so that next request in ep queue is executed. Although, I did not encounter PENDING in isoc testing

[PATCH] usb/dwc3: Fix Pedning isoc

2012-08-24 Thread Pratyush Anand
that you can receive xfernotready again and can have notion of current microframe. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3

Re: [PATCH] usb/dwc3: Fix Pedning isoc

2012-08-27 Thread Pratyush Anand
On 8/27/2012 5:30 PM, Sergei Shtylyov wrote: Hello. On 25-08-2012 6:54, Pratyush Anand wrote: There are several typos here and there... First, s/Pedning/pending/ in the subject. Ohh.. I will correct all these while sending V2. I am doing some more test with other gadgets

[PATCH V2 0/3] dwc3 fixes

2012-08-29 Thread Pratyush Anand
V2 removes patches which were not working with webcam gadget. Pratyush Anand (3): usb/dwc3:Move udelay within stop_active_transfe usb/dwc3: Fix missed isoc usb/dwc3: Fix Pedning isoc drivers/usb/dwc3/core.h |1 - drivers/usb/dwc3/gadget.c | 89

[PATCH V2 2/3] usb/dwc3: Fix missed isoc

2012-08-29 Thread Pratyush Anand
in request_list during giveback. If any future queued request is successfully transferred then we will issue UPDATE TRANSFER for all request in the request_list. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/core.h |1 - drivers/usb/dwc3/gadget.c | 36

[PATCH V2 1/3] usb/dwc3:Move udelay within stop_active_transfe

2012-08-29 Thread Pratyush Anand
We need udelay(100) after every END TRANSFER, so it is better to keep it within dwc3_stop_active_transfer. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 42 +- 1 files changed, 21 insertions(+), 21 deletions(-) diff

Re: [PATCH 5/5] usb/dwc3: fix no request in request_list when start isoc

2012-08-29 Thread Pratyush Anand
On 8/29/2012 9:53 PM, Felipe Balbi wrote: On Wed, Aug 29, 2012 at 09:54:10PM +0530, Pratyush Anand wrote: On 8/29/2012 9:40 PM, Felipe Balbi wrote: Discard 5/5. I will send another. All the others are fine then ? I'll start queueing once v3.6-rc4 is out. Two patches were not working

Re: [PATCH V2 3/3] usb/dwc3: Fix Pedning isoc

2012-08-30 Thread Pratyush Anand
On 8/29/2012 11:01 PM, Sergei Shtylyov wrote: Hello. On 08/29/2012 08:30 PM, Pratyush Anand wrote: If xfernotready is received and there is no request in request_list then PENDING flag must be set, so that next request in ep queue is executed. In case of isoc transfer, if xfornotready

[PATCH V3 3/3] usb/dwc3: Fix Pending isoc

2012-08-30 Thread Pratyush Anand
that you can receive xfernotready again and can have notion of current microframe. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3

[RFC 2/6] usb/dwc3: fix isoc END TRANSFER Condition

2012-09-06 Thread Pratyush Anand
any data so , it did not call ep_queue. To twist it further, gadget did not queue till cleanup for last queued TRB is called. If we ever reach this scenario, we must call END TRANSFER. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 22

[RFC 3/6] usb/dwc3: Correct Return from ep_queue

2012-09-06 Thread Pratyush Anand
Its better to return from each if condition as they are mutually exclusive. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[RFC 5/6] usb/dwc3: Fix update transfer issue condition

2012-09-06 Thread Pratyush Anand
was already cached correctly during START TRANSFER. Two simplify the flow two functions dwc3_prepare_trbs __dwc3_gadget_kick_transfer have been merged. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 156 + 1 files

[RFC 6/6] usb/dwc3: Remove return from start_isoc if request_list is empty

2012-09-06 Thread Pratyush Anand
Now do not return from start_isoc if request_list is empty. You are going to return from kick_transfer anyway in this case. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/drivers/usb

[RFC 1/6] usb/dwc3: fix resource_index

2012-09-06 Thread Pratyush Anand
that core does generate xfernotready even if END TRANSFER is issued with resource_index 0, but then it is not able to start transfer again. Moreover I have observed that START TRANSFER returns a new resource_index only if SET XFER RESOURCE is issued again. Signed-off-by: Pratyush Anand pratyush.an

Re: [RFC 2/6] usb/dwc3: fix isoc END TRANSFER Condition

2012-09-07 Thread Pratyush Anand
On 9/7/2012 4:50 PM, Sergei Shtylyov wrote: There were still some corner cases where isoc transfer was not able to restart, specially when missed does not happen , and gadget does Missed what does not happen? Its missed isoc. I will try to amend it more clearly in final submission. Can

usb: dwc3: query: dma sg implementation for isoc

2012-09-10 Thread Pratyush Anand
Hi Felip, I am not sure what was the original intention to use sg. But I wanted to use this to resolve one of the issue with my application related to isoc endpoint. So, you can correct me , if I am not in-lined with uses philosophy. I have a scenario, where I have scattered data to be

Re: usb: dwc3: query: dma sg implementation for isoc

2012-09-10 Thread Pratyush Anand
On 9/10/2012 6:49 PM, Felipe Balbi wrote: aaa true:-) I had forgotten about that extra bit of information when using chained TRBs :-s My bad. Please send a patch. Sure, will send. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to

Re: [RFC 1/6] usb/dwc3: fix resource_index

2012-09-10 Thread Pratyush Anand
On 9/10/2012 9:33 PM, Felipe Balbi wrote: - if (!dep-resource_index) - return; the thing is that this will let us fall into a situation where we issue END_TRANSFER even when resource_index is zero, which isn't good at all. I will explain the situation: 1. isoc IN transfer has

[PATCH V2 0/5] dwc3 isoc fixes : part 2

2012-09-10 Thread Pratyush Anand
, which was failing. when gadget is non blocking, ie it does not call ep_queue during giveback, if it does not have any data. Now another thread will call ep_queue, whenever data is available. These patch sets resolved this issue. Pratyush Anand (5): usb/dwc3: fix isoc END TRANSFER Condition usb

[PATCH V2 2/5] usb/dwc3: Correct Return from ep_queue

2012-09-10 Thread Pratyush Anand
Its better to return from each if condition as they are mutually exclusive. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[PATCH V2 3/5] usb/dwc3: Fix skip LINK-TRB on ISOC

2012-09-10 Thread Pratyush Anand
When we reach to link trb, we just need to increase free_slot and then calculate TRB. Return is not correct, as it will cause wrong TRB DMA address to fetch in case of update transfer. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 13 + 1 files

[PATCH V2 5/5] usb/dwc3: Remove return from start_isoc if request_list is empty

2012-09-10 Thread Pratyush Anand
Now do not return from start_isoc if request_list is empty. You are going to return from kick_transfer anyway in this case. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/drivers/usb

[PATCH V2 1/5] usb/dwc3: fix isoc END TRANSFER Condition

2012-09-10 Thread Pratyush Anand
insure that there is no request submitted to core when issuing END TRANSFER. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c | 24 +++- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3

Re: usb: dwc3: query: dma sg implementation for isoc

2012-09-11 Thread Pratyush Anand
On 9/10/2012 6:49 PM, Felipe Balbi wrote: On Mon, Sep 10, 2012 at 06:45:06PM +0530, Pratyush Anand wrote: Hi Felip, Thanks for the clarifications. On 9/10/2012 6:29 PM, Felipe Balbi wrote: If my understanding is correct, then I might need to modify dwc3 driver a bit. only first TRB

Re: usb: dwc3: query: dma sg implementation for isoc

2012-09-11 Thread Pratyush Anand
On 9/11/2012 2:39 PM, Felipe Balbi wrote: On Tue, Sep 11, 2012 at 12:29:36PM +0530, Pratyush Anand wrote: On 9/10/2012 6:49 PM, Felipe Balbi wrote: On Mon, Sep 10, 2012 at 06:45:06PM +0530, Pratyush Anand wrote: Hi Felip, Thanks for the clarifications. On 9/10/2012 6:29 PM, Felipe Balbi

[RFC 0/2] usb/dwc3: Fixes for SG implementation

2012-09-13 Thread Pratyush Anand
Pratyush Anand (2): usb/dwc3: Fix scatter gather implementation usb/dwc3: req-queued must be forced to false in cleanup drivers/usb/dwc3/core.h |2 +- drivers/usb/dwc3/gadget.c | 291 ++--- 2 files changed, 171 insertions(+), 122 deletions

[RFC 2/2] usb/dwc3: req-queued must be forced to false in cleanup

2012-09-13 Thread Pratyush Anand
. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/gadget.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3e649e6..0f784dd 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c

[RFC 1/2] usb/dwc3: Fix scatter gather implementation

2012-09-13 Thread Pratyush Anand
for each TRB of SG. Signed-off-by: Pratyush Anand pratyush.an...@st.com --- drivers/usb/dwc3/core.h |2 +- drivers/usb/dwc3/gadget.c | 290 ++--- 2 files changed, 170 insertions(+), 122 deletions(-) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb

Re: [RFC] Documentation update for Isochronous URB handling

2012-09-14 Thread Pratyush Anand
On 9/11/2012 8:11 PM, Alan Stern wrote: Here is a proposed update for the kernel's documentation on Isochronous URBs. It describes the behavior Clemens and I have been discussing, which isn't implemented yet. I'm working on separate patches to implement the new behavior for EHCI, OHCI, and

Query: usbtest: Test 13: Endpoint Halt Test: At Super Speed does not work

2012-09-25 Thread Pratyush Anand
Hi , I use 3.5.3-1.fc17 kernel on my host test PC. I use dwc3 in Super speed mode as usb device, however the issue which I see is not related to usb device. I have observed that testusb (test13, EP halt test) never passes in Supper Speed mode. When simple_io is called second time from

Re: Query: usbtest: Test 13: Endpoint Halt Test: At Super Speed does not work

2012-09-25 Thread Pratyush Anand
On 9/25/2012 4:49 PM, Felipe Balbi wrote: Can you post dwc3's logs ? We need to see if it executed set_halt() or set_wedge(). Host Does SET FEATURE(ENDPOINT_HALT). dwc3 codes calls __dwc3_gadget_ep_set_halt with correct dep for the specified endpoint. I do not think that dwc3 is doing

Re: Query: usbtest: Test 13: Endpoint Halt Test: At Super Speed does not work

2012-09-26 Thread Pratyush Anand
On 9/25/2012 9:29 PM, Sarah Sharp wrote: Can Pratyush recompile his Linux host side kernel with CONFIG_USB_DEBUG and CONFIG_USB_XHCI_HCD_DEBUGGING and send me the dmesg? Ok, I ll do that. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to

Re: Query: xhci: isoc in test: Wrong sequence number in ACK token

2012-10-05 Thread Pratyush Anand
Hi Paul, Thanks for the help. On 10/6/2012 12:23 AM, Paul Zimmerman wrote: If the host controller in your PC is not connected thru a PCIe bridge with multiple lanes, the connection will not be fast enough to support that high of a transfer rate. And maybe on your eval board the host controller

  1   2   >