On Wed, Mar 11, 2015 at 09:03:54AM +0100, Sebastian Andrzej Siewior wrote: > On 03/10/2015 10:22 PM, Felipe Balbi wrote: > > On Thu, Mar 05, 2015 at 12:25:48PM +0530, Amit Virdi wrote: > >> +cc Sebastian, Alan Stern > >> > >> Hello Felipe, > >> > >> On 2/28/2015 3:18 AM, Felipe Balbi wrote: > >>> Hi Amit, > >>> > >>> commit ef11982dd7a657512c362242508bb4021e0d67b6 (Add support for > >>> interrupt EP) actually broke testusb for MUSB when MUSB is the gadget. > >>> > >>> The reason is that we're requesting an endpoint with a 64-byte FIFO, but > >>> later deciding to use the same endpoint with wMaxPacketSize set to 1024 > >>> and MUSB errors out because the endpoint was selected for 64-byte only. > >>> > >>> This only happens when trying to set alternate setting 2 and it's pretty > >>> easy to trigger. > >>> > >> > >> This issue was brought up earlier by Sebastian. He even submitted a patch > >> for the same and there were discussions over it. > >> http://www.spinics.net/lists/linux-usb/msg117962.html > >> > >> However, things were never concluded. Using module parameters should get it > >> working but that isn't a clean solution. > >> > >> What do you suggest? > > > > allocate endpoints based on largest wMaxPacketSize ? If we have more > > FIFO space than needed, that's not a problem. The problem is when we > > allocate a FIFO which is not large enough. > > Please either revert the patch that broke things or apply mine until > the whole endpoint allocations is reworked so this is not an issue > anymore. I'll apply your patch, but add a few comments as to why we're doing it that way. -- balbi
Attachment:
signature.asc
Description: Digital signature