Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b99fc202 authored by Shivasharan S's avatar Shivasharan S Committed by Martin K. Petersen
Browse files

scsi: megaraid_sas: Update current host time to FW during IOC Init



Driver needs to send current host time to firmware during init.

Signed-off-by: default avatarKashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: default avatarShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e5d65b4b
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -773,6 +773,7 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
	MFI_CAPABILITIES *drv_ops;
	MFI_CAPABILITIES *drv_ops;
	u32 scratch_pad_2;
	u32 scratch_pad_2;
	unsigned long flags;
	unsigned long flags;
	struct timeval tv;


	fusion = instance->ctrl_context;
	fusion = instance->ctrl_context;


@@ -821,6 +822,12 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
	IOCInitMessage->SystemRequestFrameBaseAddress = cpu_to_le64(fusion->io_request_frames_phys);
	IOCInitMessage->SystemRequestFrameBaseAddress = cpu_to_le64(fusion->io_request_frames_phys);
	IOCInitMessage->HostMSIxVectors = instance->msix_vectors;
	IOCInitMessage->HostMSIxVectors = instance->msix_vectors;
	IOCInitMessage->HostPageSize = MR_DEFAULT_NVME_PAGE_SHIFT;
	IOCInitMessage->HostPageSize = MR_DEFAULT_NVME_PAGE_SHIFT;

	do_gettimeofday(&tv);
	/* Convert to milliseconds as per FW requirement */
	IOCInitMessage->TimeStamp = cpu_to_le64((tv.tv_sec * 1000) +
						(tv.tv_usec / 1000));

	init_frame = (struct megasas_init_frame *)cmd->frame;
	init_frame = (struct megasas_init_frame *)cmd->frame;
	memset(init_frame, 0, MEGAMFI_FRAME_SIZE);
	memset(init_frame, 0, MEGAMFI_FRAME_SIZE);