Re: fix xhci 'actlen' calculation

2019-11-12 Thread Patrick Wildt
On Tue, Nov 12, 2019 at 07:00:00PM +0100, Patrick Wildt wrote: > On Tue, Nov 12, 2019 at 01:43:28PM +0100, Patrick Wildt wrote: > > On Tue, Nov 12, 2019 at 10:45:39AM +0100, Gerhard Roth wrote: > > > Hi, > > > > > > xhci's calculation of 'xfer->actlen' is wrong if the xfer was split into > > > mul

Re: fix xhci 'actlen' calculation

2019-11-12 Thread Patrick Wildt
On Tue, Nov 12, 2019 at 01:43:28PM +0100, Patrick Wildt wrote: > On Tue, Nov 12, 2019 at 10:45:39AM +0100, Gerhard Roth wrote: > > Hi, > > > > xhci's calculation of 'xfer->actlen' is wrong if the xfer was split into > > multiple TRBs. That's because the code just looks at the remainder > > reporte

Re: fix xhci 'actlen' calculation

2019-11-12 Thread Patrick Wildt
On Tue, Nov 12, 2019 at 10:45:39AM +0100, Gerhard Roth wrote: > Hi, > > xhci's calculation of 'xfer->actlen' is wrong if the xfer was split into > multiple TRBs. That's because the code just looks at the remainder > reported by the status TRB. However, this remainder only refers to the > total siz

fix xhci 'actlen' calculation

2019-11-12 Thread Gerhard Roth
Hi, xhci's calculation of 'xfer->actlen' is wrong if the xfer was split into multiple TRBs. That's because the code just looks at the remainder reported by the status TRB. However, this remainder only refers to the total size of this single TRB; not to the total size of the xfer. Example: assume