Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97215c9e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: ci13xxx: Avoid prime failure due to queueing un-initialized ZLP TD"

parents 0a06cfcf 753aea43
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -3257,6 +3257,19 @@ static int ep_dequeue(struct usb_ep *ep, struct usb_request *req)
		mReq->map     = 0;
	}
	req->status = -ECONNRESET;

	if (mEp->last_zptr) {
		dma_pool_free(mEp->td_pool, mEp->last_zptr, mEp->last_zdma);
		mEp->last_zptr = NULL;
		mEp->last_zdma = 0;
	}

	if (mReq->zptr) {
		dma_pool_free(mEp->td_pool, mReq->zptr, mReq->zdma);
		mReq->zptr = NULL;
		mReq->zdma = 0;
	}

	if (mEp->multi_req) {
		restore_original_req(mReq);
		mEp->multi_req = false;