USB: f_fs: Don't queue already queued request again

f_fs uses only one request per ep and driver is trying to queue
same request again before it completed. This is seen in following
scenario, as part of system suspend wait_for_completion was
interrupted by -ERESTARTSYS, and driver tried to dequeue this
request, as USB was in LPM it was unable to dequeue this and
later on system resume ffs_epfile_read tried to queue same
request again which was never dequeued or completed. ep_queue
will return error if same request is queued again while it is in
progress. User space considers this ep_queue failure as halt and
try to clear halt condition that never happened. When User space
is trying to clear halt by that time USB has entered LPM again
leading to crash.

Avoid this by making sure same request is not queued again until
it is completed.

CRs-Fixed: 813068
Change-Id: I6e9f357b9b8a47753b1323b4308e60844d7dec94
Signed-off-by: Tarun Gupta <tarung@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
1 file changed