From: Kashyap, Desai Date: Wed, 23 Sep 2009 11:59:29 +0000 (+0530) Subject: [SCSI] mpt2sas: Added support to set the TimeStamp when sending ioc_init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a8ebd76c49fa45d93a736ae0b0f192b554cc8c3f;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [SCSI] mpt2sas: Added support to set the TimeStamp when sending ioc_init Added support to set the TimeStamp when sending ioc_init. Signed-off-by: Kashyap Desai Signed-off-by: Eric Moore Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 935cfc769cb6..c3524bcefd54 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -57,6 +57,7 @@ #include #include #include +#include #include "mpt2sas_base.h" @@ -2946,6 +2947,7 @@ _base_send_ioc_init(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) Mpi2IOCInitRequest_t mpi_request; Mpi2IOCInitReply_t mpi_reply; int r; + struct timeval current_time; dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name, __func__)); @@ -2996,6 +2998,13 @@ _base_send_ioc_init(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) cpu_to_le32(ioc->reply_post_free_dma); #endif + /* This time stamp specifies number of milliseconds + * since epoch ~ midnight January 1, 1970. + */ + do_gettimeofday(¤t_time); + mpi_request.TimeStamp = (current_time.tv_sec * 1000) + + (current_time.tv_usec >> 3); + if (ioc->logging_level & MPT_DEBUG_INIT) { u32 *mfp; int i;