OSDN Git Service

USB: gagget: f_fs: Return error if TX req is queued during device offline
authorVijayavardhan Vennapusa <vvreddy@codeaurora.org>
Sat, 19 Nov 2016 00:09:12 +0000 (16:09 -0800)
committerMayank Rana <mrana@codeaurora.org>
Sat, 19 Nov 2016 00:09:57 +0000 (16:09 -0800)
commitbeafbd43d59433b8ed5f4fb330a826239ff46f18
treef94b3840476813436992a4638a8cd37368141fb0
parent42939d068531e7c2a10e5d8f13e51c2f77c8bf16
USB: gagget: f_fs: Return error if TX req is queued during device offline

when USB cable is disconnected during TX data transfers, endpoints will
be disabled during function disable. If userspace client tries to queue
requests on disabled endpoints, driver will wait till endpoints are
enabled and then queues previous session requests. This results in kernel
driver and userspace driver out of sync and due to this, stall will be
seen. Hence fix this issue by returning error value if client tries to
queue requests on TX endpoint during device offline.

CRs-Fixed: 633497
Change-Id: I3e43b8a704367aff7fe8dd88159315aef811c51c
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
drivers/usb/gadget/function/f_fs.c