aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-05-09 21:18:40 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-05-17 06:08:22 -0400
commit75ad83a452116c00c092bdc4c842c4401cd24080 (patch)
treedb494dfcd6b8984ed5d6554c02408a2b3a2f31a3
parentcc459f19e32bdc783f9f0ce5c872c1ff399e3e82 (diff)
[SCSI] lpfc 8.3.31: Fix driver crash during back-to-back ramp events
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>
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index d5f3fcc3e548..9434b0379abe 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -399,6 +399,14 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
399 num_rsrc_err = atomic_read(&phba->num_rsrc_err); 399 num_rsrc_err = atomic_read(&phba->num_rsrc_err);
400 num_cmd_success = atomic_read(&phba->num_cmd_success); 400 num_cmd_success = atomic_read(&phba->num_cmd_success);
401 401
402 /*
403 * The error and success command counters are global per
404 * driver instance. If another handler has already
405 * operated on this error event, just exit.
406 */
407 if (num_rsrc_err == 0)
408 return;
409
402 vports = lpfc_create_vport_work_array(phba); 410 vports = lpfc_create_vport_work_array(phba);
403 if (vports != NULL) 411 if (vports != NULL)
404 for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { 412 for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {