]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: btusb: Fix not handling ZPL/short-transfer
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 9 Sep 2024 20:51:52 +0000 (16:51 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:10:46 +0000 (15:10 +0200)
commitb614fde13162097f23454a02e8978e76d11353de
tree960856018364d5ef9e6b41857df2d809f4367c35
parent2b3164186e77ee2807ed75fb4565ff80d2b73300
Bluetooth: btusb: Fix not handling ZPL/short-transfer

[ Upstream commit 7b05933340f4490ef5b09e84d644d12484b05fdf ]

Requesting transfers of the exact same size of wMaxPacketSize may result
in ZPL/short-transfer since the USB stack cannot handle it as we are
limiting the buffer size to be the same as wMaxPacketSize.

Also, in terms of throughput this change has the same effect to
interrupt endpoint as 290ba200815f "Bluetooth: Improve USB driver throughput
by increasing the frame size" had for the bulk endpoint, so users of the
advertisement bearer (e.g. BT Mesh) may benefit from this change.

Fixes: 5e23b923da03 ("[Bluetooth] Add generic driver for Bluetooth USB devices")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tested-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btusb.c