Commit 4220f3ff authored by Felipe Balbi's avatar Felipe Balbi Committed by Jiri Slaby
Browse files

usb: dwc3: gadget: fix set_halt() bug with pending transfers



[ Upstream commit 7a608559 ]

According to our Gadget Framework API documentation,
->set_halt() *must* return -EAGAIN if we have pending
transfers (on either direction) or FIFO isn't empty (on
TX endpoints).

Fix this bug so that the mass storage gadget can be used
without stall=0 parameter.

This patch should be backported to all kernels since v3.2.

Suggested-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent d87f96cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment