]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: f_hid: Fix zero length packet transfer
authorWilliam Wu <william.wu@rock-chips.com>
Tue, 26 Aug 2025 10:28:07 +0000 (18:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2025 11:45:11 +0000 (12:45 +0100)
commit3248107d00948c55c5475c3efcd02ee75aaf185b
treea949cfe7b92f08d511a237faf769ae4a447af215
parent0ee184e039269397780cfd03401d939620b93aa1
usb: gadget: f_hid: Fix zero length packet transfer

[ Upstream commit ed6f727c575b1eb8136e744acfd5e7306c9548f6 ]

Set the hid req->zero flag of ep0/in_ep to true by default,
then the UDC drivers can transfer a zero length packet at
the end if the hid transfer with size divisible to EPs max
packet size according to the USB 2.0 spec.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Link: https://lore.kernel.org/r/1756204087-26111-1-git-send-email-william.wu@rock-chips.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/gadget/function/f_hid.c