All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <james.smart@emulex.com>
To: "michaelc@cs.wisc.edu" <michaelc@cs.wisc.edu>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/2] lpfc: force retry in queuecommand when port is transitioning
Date: Fri, 25 Feb 2011 19:07:49 -0500	[thread overview]
Message-ID: <4D684455.4060104@emulex.com> (raw)
In-Reply-To: <1298664268-12967-2-git-send-email-michaelc@cs.wisc.edu>

Acked-by: James Smart  <james.smart@emulex.com>

-- james s


On 2/25/2011 3:04 PM, michaelc@cs.wisc.edu wrote:
> From: Mike Christie<michaelc@cs.wisc.edu>
>
> If the port takes a while to transition we could exhaust
> the retries when using DID_TRANSPORT_DISRUPTED. For this
> case we do not want to use any of the cmd's
> retries, because if the command was running then when
> it got failed the retry counter was already incremented.
> And if this is the first time we are seeing the command,
> (it got queued because it slipped through during the race)
> then it should not have its retries incremented. The
> fc class will decide the correct handling later.
>
> Signed-off-by: Mike Christie<michaelc@cs.wisc.edu>
> ---
>   drivers/scsi/lpfc/lpfc_scsi.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
> index c97751c..af5aaaa 100644
> --- a/drivers/scsi/lpfc/lpfc_scsi.c
> +++ b/drivers/scsi/lpfc/lpfc_scsi.c
> @@ -3004,7 +3004,7 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
>   	 * transport is still transitioning.
>   	 */
>   	if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
> -		cmnd->result = ScsiResult(DID_TRANSPORT_DISRUPTED, 0);
> +		cmnd->result = ScsiResult(DID_IMM_RETRY, 0);
>   		goto out_fail_command;
>   	}
>   	if (atomic_read(&ndlp->cmd_pending)>= ndlp->cmd_qdepth)

  reply	other threads:[~2011-02-26  0:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 20:04 lpfc fixes for 2.6.39 michaelc
2011-02-25 20:04 ` [PATCH 1/2] lpfc: force retry in queuecommand when port is transitioning michaelc
2011-02-26  0:07   ` James Smart [this message]
2011-02-25 20:04 ` [PATCH 2/2] lpfc: block target when port queueing limit is hit michaelc
2011-02-26  0:07   ` James Smart

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=4D684455.4060104@emulex.com \
    --to=james.smart@emulex.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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.