Fwd: [DWC3][Gadget] Question regarding the unmapping of request as part of queue failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Felipe,

I was looking at the code flow for ep_queue and came across the
following piece of code.

__dwc3_gadget_kick_transfer {
 
    dwc3_prepare_trbs(dep);
    req = next_request(&dep->started_list);
    if (!req) {
            dep->flags |= DWC3_EP_PENDING_REQUEST;
            return 0;
    }
}

As part of dwc3_prepare_trbs(dep), we get a request from the pending_list
and queue to the tail of the started_list. But here we get the head of
the started_list, now if there is any failure in issuing UPDATE_TRANSFER
to the core, we unmap this request using "dwc3_gadget_del_and_unmap_request".

But if this kick_transfer was part of the ep_queue and we have failed
to issue update transfer, instead of unmapping the request we are trying
to queue, we will be unmapping a different request (first in the started_list)
which the core could have already started processing. I believe we should unmap
the request we are trying to queue but not any other.

Please provide your comments on this.

Thanks,
Sriharsha




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux