RE: [PATCH 5/8] usb: cdns3: gadget: handle sg list use case at completion correctly

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

 



 
> 
> When I debug sg use case, it indeed took several patches for all functions work,
> and some patches improved the old patches since some short transfers use
> case did not be considered well.
> 
> Using this patch, it could let the completion work for both normal transfer and
> short transfer. So I prefer keeping one patch.
> 
> > > + * Then, we check if cycle bit for index priv_ep->dequeue
> > > + * is correct.
> > >   *
> > >   * some rules:
> > > - * 1. priv_ep->dequeue never exceed current_index.
> > > + * 1. priv_ep->dequeue never equals to current_index.
> > >   * 2  priv_ep->enqueue never exceed priv_ep->dequeue
> > >   * 3. exception: priv_ep->enqueue == priv_ep->dequeue
> > >   *    and priv_ep->free_trbs is zero.
> > >   *    This case indicate that TR is full.
> > >   *
> > > - * Then We can split recognition into two parts:
> > > + * At below two cases, the request have been handled.
> > >   * Case 1 - priv_ep->dequeue < current_index
> > >   *      SR ... EQ ... DQ ... CI ... ER
> > >   *      SR ... DQ ... CI ... EQ ... ER
> > >   *
> > > - *      Request has been handled by DMA if ST and ET is between DQ
> and CI.
> > > - *
> > >   * Case 2 - priv_ep->dequeue > current_index
> > > - * This situation take place when CI go through the LINK TRB at the
> > > end of
> > > + * This situation takes place when CI go through the LINK TRB at
> > > + the end of
> >
> > not part of $subject
> >
> 
> I will make another patch for comment improvement, thanks.
> 
 
I find I change the function from handle request to handle TRB, so the comments for this function
needs to be updated accordingly, it needs to be at the same patch.

Peter




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

  Powered by Linux