[SCSI] qla4xxx: Reset seconds_since_last_heartbeat correctly.
authorLalit Chandivade <lalit.chandivade@qlogic.com>
Thu, 7 Oct 2010 05:49:32 +0000 (22:49 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Mon, 25 Oct 2010 19:51:04 +0000 (14:51 -0500)
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>
drivers/scsi/qla4xxx/ql4_os.c

index a6455fbe4f4fa1bbde3a43ea1d4c5f8e900db2f8..57890b6288b92d16f1abf5724c620cb96a827a57 100644 (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;
 }