When the request actual state is equal to lenght, besides setting the
request status to done, the status variable also need to be updated.
If not, the status will be EINPROGRESS and the transfer will never be
set as completed.

Signed-off-by: Rui Miguel Silva <[email protected]>
---
 drivers/usb/gadget/udc/dummy_hcd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/dummy_hcd.c 
b/drivers/usb/gadget/udc/dummy_hcd.c
index 181112c..f5400b8 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -1367,8 +1367,10 @@ top:
                /* many requests terminate without a short packet */
                } else {
                        if (req->req.length == req->req.actual
-                                       && !req->req.zero)
+                                       && !req->req.zero) {
                                req->req.status = 0;
+                               *status = 0;
+                       }
                        if (urb->transfer_buffer_length == urb->actual_length
                                        && !(urb->transfer_flags
                                                & URB_ZERO_PACKET))
-- 
2.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to