]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/lpfc/lpfc_els.c
Merge branch 'work'
[linux-2.6-omap-h63xx.git] / drivers / scsi / lpfc / lpfc_els.c
index 08a0c00cfc302eee9f97a8f9668910672d39d08a..20f1a0713db2dbd7d2210f4f85defa36deadd7c1 100644 (file)
@@ -127,8 +127,7 @@ lpfc_prep_els_iocb(struct lpfc_hba * phba,
        if (((pcmd = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == 0) ||
            ((pcmd->virt = lpfc_mbuf_alloc(phba,
                                           MEM_PRI, &(pcmd->phys))) == 0)) {
-               if (pcmd)
-                       kfree(pcmd);
+               kfree(pcmd);
 
                spin_lock_irq(phba->host->host_lock);
                lpfc_sli_release_iocbq(phba, elsiocb);
@@ -145,8 +144,7 @@ lpfc_prep_els_iocb(struct lpfc_hba * phba,
                        prsp->virt = lpfc_mbuf_alloc(phba, MEM_PRI,
                                                     &prsp->phys);
                if (prsp == 0 || prsp->virt == 0) {
-                       if (prsp)
-                               kfree(prsp);
+                       kfree(prsp);
                        lpfc_mbuf_free(phba, pcmd->virt, pcmd->phys);
                        kfree(pcmd);
                        spin_lock_irq(phba->host->host_lock);
@@ -172,8 +170,7 @@ lpfc_prep_els_iocb(struct lpfc_hba * phba,
                lpfc_mbuf_free(phba, prsp->virt, prsp->phys);
                kfree(pcmd);
                kfree(prsp);
-               if (pbuflist)
-                       kfree(pbuflist);
+               kfree(pbuflist);
                return NULL;
        }
 
@@ -723,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);
                }
@@ -872,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;
                }
@@ -1057,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);
                }
@@ -1208,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;
                }