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 > > ==

RE: CSW endpoint status returned STALL after BOT MSC Reset

2013-11-01 Thread Paul Zimmerman
> 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 > === > --- usb-3.12

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-11-01 Thread Alan Stern
On Fri, 1 Nov 2013, Pratyush Anand wrote: > Tested-by: Pratyush Anand Thank you. > However, I noticed that the same error recovery test fails even after > above patch if dwc3 dbg/vdbg messages are enabled. However, reason is > not in dwc3 driver, rather in mass storage driver. > > Any specifi

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-11-01 Thread Pratyush Anand
On Thu, Oct 31, 2013 at 12:32:29AM +0800, Alan Stern 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 usb_ep_clear_halt() call for the bulk-in (CSW) endpo

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-31 Thread Alan Stern
On Thu, 31 Oct 2013, Pratyush Anand wrote: > This is fine. > But I do not see any way to unwedge ep0. dwc3_gadget_ep0_set_halt > ignores *value* > argument and will not handle a gadget driver's clear halt status request. > However, I do no see any gadget driver wedging ep0, so may be it will not

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 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 usb_ep_clear_halt()

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Felipe Balbi
Hi, On Wed, Oct 30, 2013 at 03:49:20PM -0400, Alan Stern wrote: > On Wed, 30 Oct 2013, Felipe Balbi wrote: > > > now that I reread documentation on set_wedge() I see that Alan's patch > > is correct. dwc3 should ignore CLEAR_FEATURE(HALT_ENDPOINT) from the > > host, but if the gadget driver direc

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Alan Stern
On Wed, 30 Oct 2013, Felipe Balbi wrote: > now that I reread documentation on set_wedge() I see that Alan's patch > is correct. dwc3 should ignore CLEAR_FEATURE(HALT_ENDPOINT) from the > host, but if the gadget driver directly calls clear_halt() is should > succeed. And now that I look back on it

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Felipe Balbi
Hi, On Wed, Oct 30, 2013 at 12:32:29PM -0400, Alan Stern 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 usb_ep_clear_halt() call for the bulk-in (CSW)

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Felipe Balbi
Hi, On Wed, Oct 30, 2013 at 12:09:32PM -0400, Alan Stern wrote: > On Wed, 30 Oct 2013, Pratyush Anand wrote: > > > I read a bit usbmassbulk specification. > > What I understood that, host sends a CBW (21 byte bulk out command), > > which should start with dCBWSignature 43425355. > > > > I see t

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Felipe Balbi
> > > > > The device > > > is an ARM based platform with a USB DRD that is running 3.4 kernel, the > > > USB > > > port is configured as �device�. > > > > > > When it > > > comes to �Error recovery test� , it fails showing the following

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Alan Stern
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 usb_ep_clear_halt() call for the bulk-in (CSW) endpoint. > This tells the dwc3 driver to change the endpoint's status back

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Pratyush Anand
driver to change the endpoint's status back to 0: > > if (test_and_clear_bit(IGNORE_BULK_OUT, >&common->fsg->atomic_bitflags)) > usb_ep_clear_halt(common->fsg->bulk_in); > > >

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Alan Stern
On Wed, 30 Oct 2013, Pratyush Anand wrote: > I read a bit usbmassbulk specification. > What I understood that, host sends a CBW (21 byte bulk out command), > which should start with dCBWSignature 43425355. > > I see that in both pass and fail case host sends a 31 byte bulk out > with signature a

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-30 Thread Alan Stern
&common->fsg->atomic_bitflags)) usb_ep_clear_halt(common->fsg->bulk_in); > INFO Retrieving status on CBW endpoint > INFO CBW endpoint status = 0x0 > INFO Retrieving status on CSW endpoint > INFO CSW endpoint status =

Re: CSW endpoint status returned STALL after BOT MSC Reset

2013-10-28 Thread Alan Stern
t is running 3.4 kernel, the USB > port is configured as �device�. > > When it > comes to �Error recovery test� , it fails showing the following messages: > > > > ERRORCSW > endpoint status returned STALL after BOT MSC Reset > > FAIL (