|
@@ -1321,6 +1321,7 @@ static int ep_dequeue(struct usb_ep *ep, struct usb_request *req)
|
|
|
struct ci_hw_ep *hwep = container_of(ep, struct ci_hw_ep, ep);
|
|
struct ci_hw_ep *hwep = container_of(ep, struct ci_hw_ep, ep);
|
|
|
struct ci_hw_req *hwreq = container_of(req, struct ci_hw_req, req);
|
|
struct ci_hw_req *hwreq = container_of(req, struct ci_hw_req, req);
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
|
|
+ struct td_node *node, *tmpnode;
|
|
|
|
|
|
|
|
if (ep == NULL || req == NULL || hwreq->req.status != -EALREADY ||
|
|
if (ep == NULL || req == NULL || hwreq->req.status != -EALREADY ||
|
|
|
hwep->ep.desc == NULL || list_empty(&hwreq->queue) ||
|
|
hwep->ep.desc == NULL || list_empty(&hwreq->queue) ||
|
|
@@ -1331,6 +1332,12 @@ static int ep_dequeue(struct usb_ep *ep, struct usb_request *req)
|
|
|
|
|
|
|
|
hw_ep_flush(hwep->ci, hwep->num, hwep->dir);
|
|
hw_ep_flush(hwep->ci, hwep->num, hwep->dir);
|
|
|
|
|
|
|
|
|
|
+ list_for_each_entry_safe(node, tmpnode, &hwreq->tds, td) {
|
|
|
|
|
+ dma_pool_free(hwep->td_pool, node->ptr, node->dma);
|
|
|
|
|
+ list_del(&node->td);
|
|
|
|
|
+ kfree(node);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/* pop request */
|
|
/* pop request */
|
|
|
list_del_init(&hwreq->queue);
|
|
list_del_init(&hwreq->queue);
|
|
|
|
|
|