Skip to content

Commit

Permalink
[SCSI] lpfc 8.3.31: Fix driver crash during back-to-back ramp events
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Smart authored and James Bottomley committed May 17, 2012
1 parent cc459f1 commit 75ad83a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/scsi/lpfc/lpfc_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,14 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
num_rsrc_err = atomic_read(&phba->num_rsrc_err);
num_cmd_success = atomic_read(&phba->num_cmd_success);

/*
* The error and success command counters are global per
* driver instance. If another handler has already
* operated on this error event, just exit.
*/
if (num_rsrc_err == 0)
return;

vports = lpfc_create_vport_work_array(phba);
if (vports != NULL)
for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {
Expand Down

0 comments on commit 75ad83a

Please sign in to comment.