Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Peter Chen
On Mon, Aug 24, 2015 at 02:17:08PM -0400, Alan Stern wrote: > On Mon, 24 Aug 2015, Felipe Balbi wrote: > > > > Maybe we should add a vendor-specific control request to gadget Zero so > > > that the host can tell the gadget what the transfer size will be. > > > > I proposed that many months ago an

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Peter Chen
On Mon, Aug 24, 2015 at 10:53:50AM -0500, Felipe Balbi wrote: > On Mon, Aug 24, 2015 at 10:51:04AM -0400, Alan Stern wrote: > > On Mon, 24 Aug 2015, Peter Chen wrote: > > > > > Thanks, that's much clear. > > > > > > At udc driver: > > > > > > __set_halt(struct usb_ep *ep, int value, bool may_fai

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, Felipe Balbi wrote: > > Maybe we should add a vendor-specific control request to gadget Zero so > > that the host can tell the gadget what the transfer size will be. > > I proposed that many months ago and you were against it, remember ? I believe you -- it sounds like the s

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Felipe Balbi
On Mon, Aug 24, 2015 at 11:43:21AM -0400, Alan Stern wrote: > On Mon, 24 Aug 2015, Peter Chen wrote: > > > On Thu, Aug 20, 2015 at 05:03:46PM -0400, Alan Stern wrote: > > > On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > > > > > > > > - When using pattern = 1 as module parameters to compare the >

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Felipe Balbi
On Mon, Aug 24, 2015 at 10:51:04AM -0400, Alan Stern wrote: > On Mon, 24 Aug 2015, Peter Chen wrote: > > > Thanks, that's much clear. > > > > At udc driver: > > > > __set_halt(struct usb_ep *ep, int value, bool may_fail) > > { > > if (may_fail && ep queue is not empty) { > > retu

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, Peter Chen wrote: > On Thu, Aug 20, 2015 at 05:03:46PM -0400, Alan Stern wrote: > > On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > > > > > > - When using pattern = 1 as module parameters to compare the data, > > > > > > the > > > > > > packet size must be same between host a

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, Peter Chen wrote: > Thanks, that's much clear. > > At udc driver: > > __set_halt(struct usb_ep *ep, int value, bool may_fail) > { > if (may_fail && ep queue is not empty) { > return false > } else { > do stall; > return t

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Peter Chen
On Thu, Aug 20, 2015 at 05:03:46PM -0400, Alan Stern wrote: > On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > > > > - When using pattern = 1 as module parameters to compare the data, the > > > > > packet size must be same between host and device's. > > > > > > > > why ? > > > > > > The gadget sto

Re: Some restrictions when using usbtest and g_zero

2015-08-23 Thread Peter Chen
On Fri, Aug 21, 2015 at 10:16:30AM -0400, Alan Stern wrote: > On Fri, 21 Aug 2015, Peter Chen wrote: > > > Thanks, Alan and Felipe. > > > > My problem should be the chipidea udc driver does not support functional > > stall well, it fixes the handling between functional and protocol stall. > > >

Re: Some restrictions when using usbtest and g_zero

2015-08-21 Thread Alan Stern
On Fri, 21 Aug 2015, Peter Chen wrote: > Thanks. > > I don't have much time to debug this problem deeply today. Below > are some information: > > - The parameter 'stall' is y for g_mass_storage > - The stall bulk-IN is from the line 1571 at f_mass_storage.c > > If I do not stall this bulk-IN, a

Re: Some restrictions when using usbtest and g_zero

2015-08-21 Thread Alan Stern
On Fri, 21 Aug 2015, Peter Chen wrote: > Thanks, Alan and Felipe. > > My problem should be the chipidea udc driver does not support functional > stall well, it fixes the handling between functional and protocol stall. > > My understanding for these two stalls: > > - Functional stall, the host s

Re: Some restrictions when using usbtest and g_zero

2015-08-21 Thread Peter Chen
On Thu, Aug 20, 2015 at 12:41:26PM -0500, Felipe Balbi wrote: > Hi, > > > > > > > > pass USB CV2.0 MSC TEST. (othwerwise, "Command Set Test - Device > > > > > > Configured" > > > > > > will fail) > > > > > > > > > > Why would a pending struct usb_request in your queue fail USB CV ? > > > > > >

Re: Some restrictions when using usbtest and g_zero

2015-08-21 Thread Peter Chen
On Thu, Aug 20, 2015 at 04:58:13PM -0400, Alan Stern wrote: > On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > > > Doesn't Peter need to cope with differentiating protocol vs non-protocol > > > > stalls ? > > > > > > Those matter only for ep0, not for bulk/interrupt. > > > > huh ? usbtest send Set

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > > - When using pattern = 1 as module parameters to compare the data, the > > > > packet size must be same between host and device's. > > > > > > why ? > > > > The gadget stores the pattern data starting from 0 for each packet it > > sends. But the

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > Doesn't Peter need to cope with differentiating protocol vs non-protocol > > > stalls ? > > > > Those matter only for ep0, not for bulk/interrupt. > > huh ? usbtest send SetFeature(HALT) for the bulk endpoint, right ? > That's what Peter's UDC drive

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
On Thu, Aug 20, 2015 at 04:12:24PM -0400, Alan Stern wrote: > On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > Hi, > > > > On Thu, Aug 20, 2015 at 01:08:30PM -0400, Alan Stern wrote: > > > On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > > > > > > > > - Test 13 will fail due to there is pending IN r

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: > Hi, > > On Thu, Aug 20, 2015 at 01:08:30PM -0400, Alan Stern wrote: > > On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > > > > > > - Test 13 will fail due to there is pending IN request (f_sourcesink > > > > > > will queue a request unconditionally at its

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
Hi, On Thu, Aug 20, 2015 at 01:08:30PM -0400, Alan Stern wrote: > On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > > > > - Test 13 will fail due to there is pending IN request (f_sourcesink > > > > > will queue a request unconditionally at its completion), and udc > > > > > driver > > > > > will r

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > > - Test 13 will fail due to there is pending IN request (f_sourcesink > > > > will queue a request unconditionally at its completion), and udc driver > > > > will run out error if that. udc driver must do that if it wants to > > > > > > wait, what ?

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
On Thu, Aug 20, 2015 at 10:40:17AM -0400, Alan Stern wrote: > On Thu, 20 Aug 2015, Peter Chen wrote: > > > Hi all, > > > > I have played usbtest and g_zero (f_sourcesink & f_loopback) to do > > the tests between two boards these days, and have found some restrictions, > > I list them here, and to

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
Hi, On Thu, Aug 20, 2015 at 10:48:15AM -0400, Alan Stern wrote: > On Thu, 20 Aug 2015, Felipe Balbi wrote: > > > Hi, > > > > On Thu, Aug 20, 2015 at 04:25:08PM +0800, Peter Chen wrote: > > > Hi all, > > > > > > I have played usbtest and g_zero (f_sourcesink & f_loopback) to do > > > the tests b

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: > Hi, > > On Thu, Aug 20, 2015 at 04:25:08PM +0800, Peter Chen wrote: > > Hi all, > > > > I have played usbtest and g_zero (f_sourcesink & f_loopback) to do > > the tests between two boards these days, and have found some restrictions, > > I list them her

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Peter Chen wrote: > Hi all, > > I have played usbtest and g_zero (f_sourcesink & f_loopback) to do > the tests between two boards these days, and have found some restrictions, > I list them here, and to see if they are common problems and can > be improved or not. > > - Test

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
Hi, On Thu, Aug 20, 2015 at 04:25:08PM +0800, Peter Chen wrote: > Hi all, > > I have played usbtest and g_zero (f_sourcesink & f_loopback) to do > the tests between two boards these days, and have found some restrictions, > I list them here, and to see if they are common problems and can > be imp

Some restrictions when using usbtest and g_zero

2015-08-20 Thread Peter Chen
Hi all, I have played usbtest and g_zero (f_sourcesink & f_loopback) to do the tests between two boards these days, and have found some restrictions, I list them here, and to see if they are common problems and can be improved or not. - Test 13 will fail due to there is pending IN request (f_sour