[SCSI] lpfc 8.3.30: Fix deadlock during adapter offline request
authorJames Smart <james.smart@emulex.com>
Fri, 2 Mar 2012 03:35:34 +0000 (22:35 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 27 Mar 2012 07:26:30 +0000 (08:26 +0100)
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/lpfc/lpfc_init.c

index 5b66142..d8e8270 100644 (file)
@@ -2704,16 +2704,14 @@ lpfc_offline_prep(struct lpfc_hba * phba)
                                }
                                spin_lock_irq(shost->host_lock);
                                ndlp->nlp_flag &= ~NLP_NPR_ADISC;
-
+                               spin_unlock_irq(shost->host_lock);
                                /*
                                 * Whenever an SLI4 port goes offline, free the
-                                * RPI.  A new RPI when the adapter port comes
-                                * back online.
+                                * RPI. Get a new RPI when the adapter port
+                                * comes back online.
                                 */
                                if (phba->sli_rev == LPFC_SLI_REV4)
                                        lpfc_sli4_free_rpi(phba, ndlp->nlp_rpi);
-
-                               spin_unlock_irq(shost->host_lock);
                                lpfc_unreg_rpi(vports[i], ndlp);
                        }
                }