diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2010-03-17 16:21:33 +0530 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 09:23:54 -0500 |
commit | 7921b35c5fcf300ebd860e3e7894c692c9547838 (patch) | |
tree | 3b968f086a248dd2e5614e041512012342f1a495 /drivers/scsi/mpt2sas | |
parent | 31cef6bcb89dbbc325e65f7570644554de7db441 (diff) |
[SCSI] mpt2sas: Corrected time stamp
incorrect timestamp on 32 bit platforms: The upper 32 bit of
the timestamp was getting truncated when converting seconds to
milliseconds, which was due to the variable being long. To fix the problem,
the variable needs to be u64. Also the microseconds conversion to
milliseconds was incorrect; it should be divide by 1000 instead of divide by
8.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index fb886d099ba..2e6e45a2803 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -3009,8 +3009,8 @@ _base_send_ioc_init(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) * since epoch ~ midnight January 1, 1970. */ do_gettimeofday(¤t_time); - mpi_request.TimeStamp = (current_time.tv_sec * 1000) + - (current_time.tv_usec >> 3); + mpi_request.TimeStamp = cpu_to_le64((u64)current_time.tv_sec * 1000 + + (current_time.tv_usec / 1000)); if (ioc->logging_level & MPT_DEBUG_INIT) { u32 *mfp; |