> From: Pratyush Anand [mailto:pratyush.anand@xxxxxx] > Sent: Monday, May 21, 2012 2:40 AM > > On 5/21/2012 2:46 PM, Felipe Balbi wrote: > > Hi, > > > > On Mon, May 21, 2012 at 02:41:13PM +0530, Pratyush Anand wrote: > >>>> If I call > >>>> dwc3_gadget_start_isoc_uf(dwc, dep, cur_uf) > >>>> > >>>> with cur_uf obtained from __dwc3_gadget_get_frame(dwc) , it does not work. > >>> > >>> I guess you have already this bug :-) > >>> > >> > >> even if we correct the mask, there would be issue. > >> So frame number from DSTS is of 14 bits. > >> Correct value of DSTS was 0x3C8FC. > >> After correction of mask it will give uf as 0x391F which is not > >> 0x791F coming from event->parameter. > > > > the missing bit on the mask fixes it, if you look at those numbers, > > 0x391f only missed bit 14, which was missing on your mask ;-) > > > > No.. to avoid confusion: > > At one instance: > event->parameters is *0x791f*. > DSTS is 0x3C8FC. > > Our mask is (0x3fff << 3) = 0x1fff8 > (0x3C8FC & 0x1fff8) = 0x1C8FC > (0x1C8FC >> 3) = *0x391f* > > Also, since one has 16 bit space while other has 14 bit, so they can not > be same always. Hi Pratyush, You should use the value from the event, not from DSTS. The extra bits in the event value take into account multiple frames. -- Paul -- 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