From mboxrd@z Thu Jan 1 00:00:00 1970 From: hemantk@codeaurora.org Subject: XHCI: Question regarding process_ctrl_td() Date: Mon, 30 Sep 2013 23:26:11 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: Received: from smtp.codeaurora.org ([198.145.11.231]:45544 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754343Ab3I3X0L (ORCPT ); Mon, 30 Sep 2013 19:26:11 -0400 Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: linux-usb@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, sarah.a.sharp@linux.intel.com 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