public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Vasu Dev <vasu.dev@linux.intel.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: devel@open-fcoe.org, linux-scsi@vger.kernel.org
Subject: Re: [Open-FCoE] [PATCH] fix computation related to FC_EX_CLOSED in FC local port
Date: Thu, 16 Dec 2010 12:05:42 -0800	[thread overview]
Message-ID: <1292529942.15910.17.camel@vi2.jf.intel.com> (raw)
In-Reply-To: <AANLkTinZ04+m0-TOrv3vbLNH43b4VqKNJ9EyXdJYgj1A@mail.gmail.com>

On Thu, 2010-12-16 at 23:54 +0800, Hillf Danton wrote:
> In fc_lport_error(), FC_EX_CLOSED could be understood to be no more
> rettries, so resetting local port is reasonable and necessary.
> 

It is not reasonable/necessary in this case as FC_EX_CLOSED is issued on
lport reset thru exch block reset called there, so doing lport reset
again in same call flow is not needed unless I'm missing something to do
reset again here. Are hitting any bug which got fixed by this patch ?

  
> When processing response to flogi request, FC_EX_CLOSED should be
> treated as other errors, since the state machine of local port could
> reach reset.
> 
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
> 
> --- a/drivers/scsi/libfc/fc_lport.c	2010-11-01 19:54:12.000000000 +0800
> +++ b/drivers/scsi/libfc/fc_lport.c	2010-12-16 23:46:06.000000000 +0800
> @@ -1013,7 +1013,7 @@ static void fc_lport_error(struct fc_lpo
>  		     lport->retry_count);
> 
>  	if (PTR_ERR(fp) == -FC_EX_CLOSED)
> -		return;
> +		goto reset;
> 
>  	/*
>  	 * Memory allocation failure, or the exchange timed out
> @@ -1029,6 +1029,7 @@ static void fc_lport_error(struct fc_lpo
> 
>  		schedule_delayed_work(&lport->retry_work, delay);
>  	} else
> + reset:
>  		fc_lport_enter_reset(lport);
>  }
> 
> @@ -1428,9 +1429,6 @@ void fc_lport_flogi_resp(struct fc_seq *
> 
>  	FC_LPORT_DBG(lport, "Received a FLOGI %s\n", fc_els_resp_type(fp));
> 
> -	if (fp == ERR_PTR(-FC_EX_CLOSED))
> -		return;
> -

Like other resp handlers in lport.c, above code is required instead just
removing for  fc_lport_flogi_resp, this is to allow exch clean up on
exch block reset.

	Vasu

>  	mutex_lock(&lport->lp_mutex);
> 
>  	if (lport->state != LPORT_ST_FLOGI) {
> _______________________________________________
> devel mailing list
> devel@lists.open-fcoe.org
> https://lists.open-fcoe.org/mailman/listinfo/devel


  reply	other threads:[~2010-12-16 20:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16 15:54 [PATCH] fix computation related to FC_EX_CLOSED in FC local port Hillf Danton
2010-12-16 20:05 ` Vasu Dev [this message]
2010-12-17 13:17   ` [Open-FCoE] " Hillf Danton

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=1292529942.15910.17.camel@vi2.jf.intel.com \
    --to=vasu.dev@linux.intel.com \
    --cc=devel@open-fcoe.org \
    --cc=dhillf@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox