usb: xhci: fix TDS for MTK xHCI1.1
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Fri, 8 Dec 2017 16:10:06 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:19 +0000 (10:10 +0100)
commit912fe79116f2456a00cf4a9b2ad3ef207ba3e162
tree623967e25b2ab79562a4f59d9199c30f484f54a2
parenteae219a2fc5554d86b9ac4d31bef73c273e926c0
usb: xhci: fix TDS for MTK xHCI1.1

commit 72b663a99c074a8d073e7ecdae446cfb024ef551 upstream.

For MTK's xHCI 1.0 or latter, TD size is the number of max
packet sized packets remaining in the TD, not including
this TRB (following spec).

For MTK's xHCI 0.96 and older, TD size is the number of max
packet sized packets remaining in the TD, including this TRB
(not following spec).

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c