[SCSI] lpfc 8.1.1 : Fixes for short cable pulls
authorJames.Smart@Emulex.Com <James.Smart@Emulex.Com>
Mon, 28 Nov 2005 16:41:33 +0000 (11:41 -0500)
committerJames Bottomley <jejb@mulgrave.(none)>
Wed, 14 Dec 2005 01:16:01 +0000 (18:16 -0700)
Cause: Link bounces were causing discovery ELS's to be killed.
Driver was not properly flushing ELS commands upon the subsequent
link bounces. Thus, processing of ELS post link bounce erroneously
assumed discovery failure and device loss.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_init.c

index bcc29ec126dc1a29761885fe31193f75c1ad29d9..20f1a0713db2dbd7d2210f4f85defa36deadd7c1 100644 (file)
@@ -720,6 +720,7 @@ lpfc_cmpl_els_plogi(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb,
                /* Do not call DSM for lpfc_els_abort'ed ELS cmds */
                if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
                   ((irsp->un.ulpWord[4] == IOERR_SLI_ABORTED) ||
+                  (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) ||
                   (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) {
                        disc = (ndlp->nlp_flag & NLP_NPR_2B_DISC);
                }
@@ -869,6 +870,7 @@ lpfc_cmpl_els_prli(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb,
                /* Do not call DSM for lpfc_els_abort'ed ELS cmds */
                if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
                   ((irsp->un.ulpWord[4] == IOERR_SLI_ABORTED) ||
+                  (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) ||
                   (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) {
                        goto out;
                }
@@ -1054,6 +1056,7 @@ lpfc_cmpl_els_adisc(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb,
                /* Do not call DSM for lpfc_els_abort'ed ELS cmds */
                if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
                   ((irsp->un.ulpWord[4] == IOERR_SLI_ABORTED) ||
+                  (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) ||
                   (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) {
                        disc = (ndlp->nlp_flag & NLP_NPR_2B_DISC);
                }
@@ -1205,6 +1208,7 @@ lpfc_cmpl_els_logo(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb,
                /* Do not call DSM for lpfc_els_abort'ed ELS cmds */
                if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
                   ((irsp->un.ulpWord[4] == IOERR_SLI_ABORTED) ||
+                  (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) ||
                   (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) {
                        goto out;
                }
index 3eebe663a2e5ffea7d11178489397c4fad368abd..4d4e217edd84514a890f5a3cb725d62543eaed0d 100644 (file)
@@ -563,6 +563,8 @@ lpfc_handle_latt(struct lpfc_hba * phba)
 
        rc = -EIO;
 
+       /* Cleanup any outstanding ELS commands */
+       lpfc_els_flush_cmd(phba);
 
        psli->slistat.link_event++;
        lpfc_read_la(phba, pmb, mp);