]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: bfa: use proper time accessor for stats_reset_time
authorArnd Bergmann <arnd@arndb.de>
Fri, 10 Nov 2017 15:37:10 +0000 (16:37 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:57 +0000 (13:16 +0100)
commit2b1f19531ee5455fea54aaff2e3a7f47fffdb403
tree9b934a2022eb5dc1cc4c0a8069b17dabd57ab156
parentbab6d2e04549a01220ba694670faf61fd92959ad
scsi: bfa: use proper time accessor for stats_reset_time

BugLink: https://bugs.launchpad.net/bugs/1853915
We use the deprecated do_gettimeofday() function to read the current
time when resetting the statistics in both bfa_port and bfa_svc. This
works fine because overflow is handled correctly, but we want to get rid
of do_gettimeofday() and using a non-monotonic time suffers from
concurrent settimeofday calls and other problems.

This uses the ktime_get_seconds() function instead, which does what we
need here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Anil Gurumurthy <Anil.Gurumurthy@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 8f604a036bce849a3410f4940fa09e8eb2760bbf)
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/scsi/bfa/bfa_port.c
drivers/scsi/bfa/bfa_port.h
drivers/scsi/bfa/bfa_svc.c
drivers/scsi/bfa/bfa_svc.h