]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: chipidea: udc: limit usb request length to max 16KB
authorXu Yang <xu.yang_2@nxp.com>
Mon, 23 Sep 2024 08:12:02 +0000 (16:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:04:07 +0000 (20:04 +0100)
commit8a5c06ebc2ee82c681c6d2cefe4cde45caa5e070
treee51f90a8a2eccbc33a6d62f337ea9a5c876d429d
parentb89bbf32fc46e0520f533a3dcdb4c26c661ea3f4
usb: chipidea: udc: limit usb request length to max 16KB

[ Upstream commit ca8d18aa7b0f22d66a3ca9a90d8f73431b8eca89 ]

To let the device controller work properly on short packet limitations,
one usb request should only correspond to one dTD. Then every dTD will
set IOC. In theory, each dTD support up to 20KB data transfer if the
offset is 0. Due to we cannot predetermine the offset, this will limit
the usb request length to max 16KB. This should be fine since most of
the user transfer data based on this size policy.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20240923081203.2851768-2-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/chipidea/ci.h
drivers/usb/chipidea/udc.c