summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_vport.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-09-29 11:18:45 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-07 17:26:19 -0500
commitd439d286f573afab8c164dbc953ce1d214585a40 (patch)
treeeec9c3089e49ae0938b4fff282afd2472d9b7fdc /drivers/scsi/lpfc/lpfc_vport.c
parentbf5eefb007e7c5498a41af2dd65d957ae9793a63 (diff)
downloadblackbird-op-linux-d439d286f573afab8c164dbc953ce1d214585a40.tar.gz
blackbird-op-linux-d439d286f573afab8c164dbc953ce1d214585a40.zip
[SCSI] lpfc 8.3.17: Code Cleanup and Locking fixes
- Move Unload flag earlier in vport deletei to stop ELS traffic - Replaced some unnecessary spin_lock_irqsave with spin_lock_irq - Fixed circular spinlock dependency between low-level driver and SCSI midlayer - Remove duplicate code from lpfc_els_retry routine - Make all error values negative Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_vport.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_vport.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
index 1655507a682c..a5281ce893d0 100644
--- a/drivers/scsi/lpfc/lpfc_vport.c
+++ b/drivers/scsi/lpfc/lpfc_vport.c
@@ -580,7 +580,9 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
"static vport.\n");
return VPORT_ERROR;
}
-
+ spin_lock_irq(&phba->hbalock);
+ vport->load_flag |= FC_UNLOADING;
+ spin_unlock_irq(&phba->hbalock);
/*
* If we are not unloading the driver then prevent the vport_delete
* from happening until after this vport's discovery is finished.
@@ -618,10 +620,6 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
scsi_host_put(shost);
return VPORT_INVAL;
}
- spin_lock_irq(&phba->hbalock);
- vport->load_flag |= FC_UNLOADING;
- spin_unlock_irq(&phba->hbalock);
-
lpfc_free_sysfs_attr(vport);
lpfc_debugfs_terminate(vport);
OpenPOWER on IntegriCloud