[SCSI] qla4xxx: Reset seconds_since_last_heartbeat correctly.

The seconds_since_last_heartbeat should be checked for consecutive
heartbeat checks. Currently it could happen that it gets set to
max (2 seconds) for non-consecutive heartbeat checks.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
Lalit Chandivade 2010-10-06 22:49:32 -07:00 committed by James Bottomley
parent 2bd1e2be8f
commit 99457d75f6

View File

@ -690,7 +690,9 @@ static void qla4_8xxx_check_fw_alive(struct scsi_qla_host *ha)
qla4xxx_wake_dpc(ha);
qla4xxx_mailbox_premature_completion(ha);
}
}
} else
ha->seconds_since_last_heartbeat = 0;
ha->fw_heartbeat_counter = fw_heartbeat_counter;
}