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

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

 



Hi,

On Thu, Jan 17, 2013 at 5:25 PM, Felipe Balbi <balbi@xxxxxx> 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 ep->maxburst to 0 for ep0.
> > >
> >
> > Although , this patch fixes issue of maxburst for default control
> > endpoint. But, I could not understand purpose of following patch..May
> > be I am missing something..
> >
> > usb: gadget: composite: fix ep->maxburst initialization
> >
> > Since at every other places, maxburst takes value same as bMaxburst
> > size(like isoc_maxburst in f_sourcesink.c), so why should we use an
> > incremented one in composite.c and decrement it again in peripheral
> > driver.
>
> I don't think the patch above is wrong, we don't know how other
> controllers behave, some might require bMaxBurst + 1  and some might
> require bMaxBurst,

Thats correct.

> we're just making sure that whatever the gadget
> framework sees is the real number (meaning that the smallest is 1).

But if we keep ep->maxburst in range [1,16]
Then we also need to clearly mention it in gadget.h about it.
Also to keep similarity and to avoid confusion we need to mention that
ep->mult range  as [1,3]

Still, it seems that there would be less confusion to keep values at
all places same as
that of companion descriptor field value and, if a controller expects
something else
then let that controller handle accordingly.

Regards
Pratyush
>
> $SUBJECT is perfectly sound and should be backported to stable as soon
> as you fix the commit log :-)
>
> --
> balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux