All of lore.kernel.org
 help / color / mirror / Atom feed
From: hemantk@codeaurora.org
To: linux-usb@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org, sarah.a.sharp@linux.intel.com
Subject: XHCI: Question regarding process_ctrl_td()
Date: Mon, 30 Sep 2013 23:26:11 -0000	[thread overview]
Message-ID: <c76e936df2dd4a2e10df68614d446e5a.squirrel@www.codeaurora.org> (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

                 reply	other threads:[~2013-09-30 23:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c76e936df2dd4a2e10df68614d446e5a.squirrel@www.codeaurora.org \
    --to=hemantk@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sarah.a.sharp@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.