]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
usb: ci_udc: Update usb request status
authorYe Li <ye.li@nxp.com>
Fri, 22 May 2026 07:55:11 +0000 (15:55 +0800)
committerMattijs Korpershoek <mkorpershoek@kernel.org>
Wed, 22 Jul 2026 07:16:16 +0000 (09:16 +0200)
usb request status is not set in ci_udc driver. However
in ci_ep_dequeue, it checks the request status for executing
complete callback, so upper layer is not able to free these
enqueued requests when calling usb_ep_dequeue.

Signed-off-by: Ye Li <ye.li@nxp.com>
Fixes: 26cc5129ee64 ("USB: gadaget: add Marvell controller support")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://patch.msgid.link/20260522075512.1291485-2-ye.li@nxp.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
drivers/usb/gadget/ci_udc.c

index a62e5ea56584738eedc1f99438b5600723a6bbd1..0baad83ef90fa368c97e99ef208b500901a393a9 100644 (file)
@@ -680,6 +680,8 @@ static int ci_ep_queue(struct usb_ep *ep,
        if (ret)
                return ret;
 
+       req->status = -EINPROGRESS;
+
        DBG("ept%d %s pre-queue req %p, buffer %p\n",
            num, in ? "in" : "out", ci_req, ci_req->hw_buf);
        list_add_tail(&ci_req->queue, &ci_ep->queue);
@@ -754,6 +756,7 @@ static void handle_ep_complete(struct ci_ep *ci_ep)
                ci_ep_submit_next_request(ci_ep);
 
        ci_req->req.actual = ci_req->req.length - len;
+       ci_req->req.status = 0;
        ci_debounce(ci_req, in);
 
        DBG("ept%d %s req %p, complete %x\n",