From: James Smart <James.Smart@Emulex.Com>
To: linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH 5/22] lpfc 8.1.2 : Fixed a race condition in the PLOGI retry logic.
Date: Wed, 08 Feb 2006 10:41:38 -0500 [thread overview]
Message-ID: <43EA1132.2080804@emulex.com> (raw)
Fixed a race condition in the PLOGI retry logic.
Signed-off-by: James Smart <James.Smart@emulex.com>
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -1627,6 +1627,14 @@ lpfc_device_recov_npr_node(struct lpfc_h
{
spin_lock_irq(phba->host->host_lock);
ndlp->nlp_flag &= ~NLP_NPR_2B_DISC;
+ if (ndlp->nlp_flag & NLP_DELAY_TMO) {
+ ndlp->nlp_flag &= ~NLP_DELAY_TMO;
+ if (!list_empty(&ndlp->els_retry_evt.evt_listp))
+ list_del_init(&ndlp->els_retry_evt.evt_listp);
+ spin_unlock_irq(phba->host->host_lock);
+ del_timer_sync(&ndlp->nlp_delayfunc);
+ return (ndlp->nlp_state);
+ }
spin_unlock_irq(phba->host->host_lock);
return (ndlp->nlp_state);
}
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -1467,24 +1467,28 @@ lpfc_els_retry_delay_handler(struct lpfc
lpfc_issue_els_flogi(phba, ndlp, retry);
break;
case ELS_CMD_PLOGI:
- ndlp->nlp_state = NLP_STE_PLOGI_ISSUE;
- lpfc_nlp_list(phba, ndlp, NLP_PLOGI_LIST);
- lpfc_issue_els_plogi(phba, ndlp, retry);
+ if (!lpfc_issue_els_plogi(phba, ndlp, retry)) {
+ ndlp->nlp_state = NLP_STE_PLOGI_ISSUE;
+ lpfc_nlp_list(phba, ndlp, NLP_PLOGI_LIST);
+ }
break;
case ELS_CMD_ADISC:
- ndlp->nlp_state = NLP_STE_ADISC_ISSUE;
- lpfc_nlp_list(phba, ndlp, NLP_ADISC_LIST);
- lpfc_issue_els_adisc(phba, ndlp, retry);
+ if (!lpfc_issue_els_adisc(phba, ndlp, retry)) {
+ ndlp->nlp_state = NLP_STE_ADISC_ISSUE;
+ lpfc_nlp_list(phba, ndlp, NLP_ADISC_LIST);
+ }
break;
case ELS_CMD_PRLI:
- ndlp->nlp_state = NLP_STE_PRLI_ISSUE;
- lpfc_nlp_list(phba, ndlp, NLP_PRLI_LIST);
- lpfc_issue_els_prli(phba, ndlp, retry);
+ if (!lpfc_issue_els_prli(phba, ndlp, retry)) {
+ ndlp->nlp_state = NLP_STE_PRLI_ISSUE;
+ lpfc_nlp_list(phba, ndlp, NLP_PRLI_LIST);
+ }
break;
case ELS_CMD_LOGO:
- ndlp->nlp_state = NLP_STE_NPR_NODE;
- lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST);
- lpfc_issue_els_logo(phba, ndlp, retry);
+ if (!lpfc_issue_els_logo(phba, ndlp, retry)) {
+ ndlp->nlp_state = NLP_STE_NPR_NODE;
+ lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST);
+ }
break;
}
return;
next reply other threads:[~2006-02-08 15:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-08 15:41 James Smart [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-03-01 0:25 [PATCH 5/22] lpfc 8.1.2: Fixed a race condition in the PLOGI retry logic Jamie Wellnitz
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=43EA1132.2080804@emulex.com \
--to=james.smart@emulex.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;
as well as URLs for NNTP newsgroup(s).