diff options
author | Suganath Prabu S <suganath-prabu.subramani@broadcom.com> | 2020-11-26 10:43:04 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-12-09 17:34:18 +0100 |
commit | f98790c0037590cd7022ba9e22cf4ff90d3b2bb3 (patch) | |
tree | 1dabebe9ec0d007dd7c5174f01375689b9f96442 /drivers/interconnect | |
parent | scsi: qla2xxx: Update version to 10.02.00.104-k (diff) | |
download | linux-f98790c0037590cd7022ba9e22cf4ff90d3b2bb3.tar.xz linux-f98790c0037590cd7022ba9e22cf4ff90d3b2bb3.zip |
scsi: mpt3sas: Sync time periodically between driver and firmware
The controller time currently gets updated with host time during driver
load or when a controller reset is issued. I.e. when host issues the
IOCInit request message to the HBA firmware. This IOCInit message has a
field named 'TimeStamp' with which the host updates the controller time.
Sometimes controller time drifts with respect to the host and it is
difficult to correlate host logs with controller logs. Issuing a controller
reset to sync the time would impact in-flight I/O and is not a viable
option.
Instead the driver now sends an IO_UNIT_CONTROL Request to sync the time
periodically. This is done from the watchdog thread which gets invoked
every second.
The time synchronization interval is specified in the 'TimeSyncInterval'
field in Manufacturing Page11 by the controller:
TimeSyncInterval - 8 bits
bits 0-6: Time stamp Synchronization interval value
bit 7: Time stamp Synchronization interval unit,
(if this bit is one then Timestamp Synchronization
interval value is specified in terms of hours else
Timestamp Synchronization interval value is
specified in terms of minutes).
The driver keeps track of the timer using IOC's timestamp_update_count
field. This field value gets incremented whenever the watchdog thread gets
invoked. And whenever this field value is greater than or equal to the Time
Stamp Synchronization interval value, the driver sends the IO_UNIT_CONTROL
Request message to controller to update the time and then it resets the
timestamp_update_count field to zero.
Link: https://lore.kernel.org/r/20201126094311.8686-2-suganath-prabu.subramani@broadcom.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/interconnect')
0 files changed, 0 insertions, 0 deletions