Skip to contentSkip to conversation

XHCI: Question regarding process_ctrl_td()

DISCUSSION [email protected] 1 participant 1 message Sep 30, 2013 Arm Qualcomm mailing list

lore
Share & tools
lore
#0 lore raw

Hi

I have question regarding code snippet in process_ctrl_td()

		if (event_trb == td->last_trb) {
			if (td->urb->actual_length != 0) {
				/* Don't overwrite a previously set error code
				 */
				if ((*status == -EINPROGRESS || *status == 0) &&
						(td->urb->transfer_flags
						 & URB_SHORT_NOT_OK))
					/* Did we already see a short data
					 * stage? */
					*status = -EREMOTEIO;
			} else {
			>>>>	td->urb->actual_length =
					td->urb->transfer_buffer_length;
			}
}

For status stage of a control transfer what is the reason for overwriting the actual_length with transfer_buffer_length in case if actual_length is zero(highlighted with >>>>)?

Thanks,
Hemant