Re: CSW endpoint status returned STALL after BOT MSC Reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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) endpoint.  
> > This tells the dwc3 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);
> > 
> > > INFO	Retrieving status on CBW endpoint
> > > INFO	CBW endpoint status = 0x0
> > > INFO	Retrieving status on CSW endpoint
> > > INFO	CSW endpoint status = 0x1
> > 
> > But the status is still set to 1.  Clearly this is a bug in dwc3.
> 
> And indeed it is.  The dwc3 driver does not implement the wedge method 
> correctly.  This patch should fix it.  Let me know how it works.

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.

I guess I didn't see this before because I was running mass storage with
stall=0...

Alan, if you can send as a proper patch after Pratyush gives his
Tested-by, that'd be great.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux