Hi Felipe, Felipe Balbi wrote: > Hi, > > Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx> writes: >> We only care to resume transfer for SG because the request maybe >> partially completed. dwc3_gadget_ep_request_completed() doesn't check >> that of a request, at least not fully. >> >> 1) It doesn't account for OUT direction. >> 2) It doesn't account for isoc. For isoc, a request maybe completed with >> partial data. > I would rather fix the function for these cases instead of removing it > completely. While at that, also move the req->num_pending_sgs check > inside dwc3_gadget_ep_request_completed() > If we want to keep this function, the only thing this function does is to check req->num_pending_sgs. We'd only resume the request because there are pending TRBs from SG not completed yet. If all the TRBs of a request are completed, regardless if all the data are received/sent, we don't queue them again. Do you still want to have this function? BR, Thinh