Skip to content

Commit 5ecae9f

Browse files
sreekanthbrcmmartinkpetersen
authored andcommitted
scsi: mpt3sas: Fix incorrect system timestamp
For updating the IOC firmware's timestamp with system timestamp, the driver issues the Mpi26IoUnitControlRequest message. While framing the Mpi26IoUnitControlRequest, the driver should copy the lower 32 bits of the current timestamp into IOCParameterValue field and the higher 32 bits into Reserved7 field. Link: https://lore.kernel.org/r/[email protected] Fixes: f98790c ("scsi: mpt3sas: Sync time periodically between driver and firmware") Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 91202a0 commit 5ecae9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/mpt3sas/mpt3sas_base.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,8 @@ static void _base_sync_drv_fw_timestamp(struct MPT3SAS_ADAPTER *ioc)
639639
mpi_request->IOCParameter = MPI26_SET_IOC_PARAMETER_SYNC_TIMESTAMP;
640640
current_time = ktime_get_real();
641641
TimeStamp = ktime_to_ms(current_time);
642-
mpi_request->Reserved7 = cpu_to_le32(TimeStamp & 0xFFFFFFFF);
643-
mpi_request->IOCParameterValue = cpu_to_le32(TimeStamp >> 32);
642+
mpi_request->Reserved7 = cpu_to_le32(TimeStamp >> 32);
643+
mpi_request->IOCParameterValue = cpu_to_le32(TimeStamp & 0xFFFFFFFF);
644644
init_completion(&ioc->scsih_cmds.done);
645645
ioc->put_smid_default(ioc, smid);
646646
dinitprintk(ioc, ioc_info(ioc,

0 commit comments

Comments
 (0)