usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Thu, 4 Jan 2024 06:16:39 +0000 (14:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Jan 2024 15:05:50 +0000 (16:05 +0100)
commit017dbfc05c31284150819890b4cc86a699cbdb71
tree0621d25ada82e0bf16f9c613bc278ddf578cf97e
parent223b4ef5a3b75c4500facf07f99a925232eaf113
usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer

For Gen1 isoc-in transfer, host still send out unexpected ACK after device
finish the burst with a short packet, this will cause an exception on the
connected device, such as, a usb 4k camera.
It can be fixed by setting rxfifo depth less than 4k bytes, prefer to use
3k here, the side-effect is that may cause performance drop about 10%,
including bulk transfer.

Fixes: 926d60ae64a6 ("usb: xhci-mtk: modify the SOF/ITP interval for mt8195")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20240104061640.7335-2-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.c
drivers/usb/host/xhci-mtk.h