Re: [PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-10-06 Thread Mathias Nyman
On 11.09.2015 07:08, chunfeng yun wrote: Hi, On Tue, 2015-09-08 at 14:09 +0300, Mathias Nyman wrote: xhci versions 1.0 and later report the untransferred data remaining in a TD a bit differently than older hosts. We used to have separate functions for these, and needed to check host version b

Re: [PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-09-11 Thread chunfeng yun
On Tue, 2015-09-08 at 14:09 +0300, Mathias Nyman wrote: > xhci versions 1.0 and later report the untransferred data remaining in a > TD a bit differently than older hosts. > > We used to have separate functions for these, and needed to check host > version before calling the right function. > >

Re: [PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-09-10 Thread chunfeng yun
Hi, It works ok when I add MTK's quirk into xhci_td_remainder(), and test it by usb camera, udisk, usb ethernet adapter, and hub. On Tue, 2015-09-08 at 14:09 +0300, Mathias Nyman wrote: > xhci versions 1.0 and later report the untransferred data remaining in a > TD a bit differently than older h

Re: [PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-09-10 Thread chunfeng yun
Hi, On Tue, 2015-09-08 at 14:09 +0300, Mathias Nyman wrote: > xhci versions 1.0 and later report the untransferred data remaining in a > TD a bit differently than older hosts. > > We used to have separate functions for these, and needed to check host > version before calling the right function. >

Re: [PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-09-08 Thread Mathias Nyman
On 08.09.2015 14:46, Oliver Neukum wrote: On Tue, 2015-09-08 at 14:09 +0300, Mathias Nyman wrote: Now Mediatek host has an additional quirk on how it uses the TD Size field for remaining data. To prevent yet another function for calculating remainder we instead want to make one quirk friendly un

Re: [PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-09-08 Thread Oliver Neukum
On Tue, 2015-09-08 at 14:09 +0300, Mathias Nyman wrote: > Now Mediatek host has an additional quirk on how it uses the TD Size > field for remaining data. To prevent yet another function for > calculating > remainder we instead want to make one quirk friendly unified function. Could you clarify wh

[PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-09-08 Thread Mathias Nyman
xhci versions 1.0 and later report the untransferred data remaining in a TD a bit differently than older hosts. We used to have separate functions for these, and needed to check host version before calling the right function. Now Mediatek host has an additional quirk on how it uses the TD Size f