Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-23 Thread Marcus Glocker
On Wed, 23 Dec 2020 17:35:36 +0100 Patrick Wildt wrote: > Am Wed, Dec 23, 2020 at 10:44:21AM +0100 schrieb Marcus Glocker: > > On Wed, 23 Dec 2020 09:47:44 +0100 > > Marcus Glocker wrote: > > > > > On Tue, 22 Dec 2020 20:55:41 +0100 > > > Marcus Glocker wrote: > > > > > > > > > Did you

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-23 Thread Patrick Wildt
Am Wed, Dec 23, 2020 at 10:44:21AM +0100 schrieb Marcus Glocker: > On Wed, 23 Dec 2020 09:47:44 +0100 > Marcus Glocker wrote: > > > On Tue, 22 Dec 2020 20:55:41 +0100 > > Marcus Glocker wrote: > > > > > > > Did you consider incrementing xx->ntrb instead? > > > > > > >That doesn't work

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-23 Thread Marcus Glocker
On Wed, 23 Dec 2020 09:47:44 +0100 Marcus Glocker wrote: > On Tue, 22 Dec 2020 20:55:41 +0100 > Marcus Glocker wrote: > > > > > Did you consider incrementing xx->ntrb instead? > > > > >That doesn't work either, because the status completion code needs > > >xx->ntrb to be correct for the

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-23 Thread Marcus Glocker
On Tue, 22 Dec 2020 20:55:41 +0100 Marcus Glocker wrote: > > > Did you consider incrementing xx->ntrb instead? > > >That doesn't work either, because the status completion code needs > >xx->ntrb to be correct for the data TD to be handled correctly. > >Incrementing xx->ntrb means the number

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-22 Thread Marcus Glocker
> > Did you consider incrementing xx->ntrb instead? >That doesn't work either, because the status completion code needs >xx->ntrb to be correct for the data TD to be handled correctly. >Incrementing xx->ntrb means the number of TRBs for the data TD is >incorrect, since it includes the (optional)

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-10-11 Thread Jonathon Fletcher
On Sun, Oct 11, 2020 at 12:14:22PM +0200, Patrick Wildt wrote: > On Sun, Oct 11, 2020 at 08:12:29AM +0200, Martin Pieuchot wrote: > > On 09/10/20(Fri) 12:37, Jonathon Fletcher wrote: > > > In xhci_xfer_get_trb, the count of transfer buffers in the pipe > > > (xp->free_trbs) is always decremented

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-10-11 Thread Patrick Wildt
On Sun, Oct 11, 2020 at 08:12:29AM +0200, Martin Pieuchot wrote: > On 09/10/20(Fri) 12:37, Jonathon Fletcher wrote: > > In xhci_xfer_get_trb, the count of transfer buffers in the pipe > > (xp->free_trbs) is always decremented but the count of transfer buffers > > used in the transfer (xx->ntrb)

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-10-11 Thread Martin Pieuchot
On 09/10/20(Fri) 12:37, Jonathon Fletcher wrote: > In xhci_xfer_get_trb, the count of transfer buffers in the pipe > (xp->free_trbs) is always decremented but the count of transfer buffers used > in the transfer (xx->ntrb) is not incremented for zero-length transfers. The > result of this is

xhci zero length transfers 'leak' one transfer buffer count

2020-10-09 Thread Jonathon Fletcher
In xhci_xfer_get_trb, the count of transfer buffers in the pipe (xp->free_trbs) is always decremented but the count of transfer buffers used in the transfer (xx->ntrb) is not incremented for zero-length transfers. The result of this is that, at the end of a zero length transfer, xp->free_trbs