usb: ks_bridge: Avoid allocating large buffers in atomic context
The current code allocates a new Rx buffer in Rx completion handler.
Rx buffers are freed after user space consumes them. This results in
allocating larger buffers in atomic context which may fail some times.
Don't queue the Rx buffer immediately. Defer it till user space consumes
it and reuse the same buffer. The test results indicate no throughput
degradation. The Rx buffers will be freed when interface is suspended
or disconnected.
CRs-Fixed: 430595
Change-Id: I8e69e27df2e11b38497e0384a8edd87ecedcb24b
Signed-off-by:
Pavankumar Kondeti <pkondeti@codeaurora.org>
(cherry picked from commit 5c915c1949b79bc59d2b222bfcce02cd429619b2)
Loading
Please sign in to comment