1. 08 May, 2018 30 commits
  2. 02 May, 2018 8 commits
  3. 20 Apr, 2018 2 commits
    • Arnd Bergmann's avatar
      scsi: ips: fix firmware timestamps for 32-bit · f990bee3
      Arnd Bergmann authored
      do_gettimeofday() is deprecated since it will stop working in 2038 on
      32-bit platforms, leading to incorrect times passed to the firmware.
      On 64-bit platforms the current code appears to be fine, as the
      calculation passes an 8-bit century number into the firmware that can
      represent times long in the future (possibly until 25599).
      
      Using ktime_get_real_seconds() to get a 64-bit seconds value and
      time64_to_tm() to convert it into the firmware format greatly simplifies
      the ips timekeeping code, makes 32-bit and 64-bit behave the same way
      here, and gets us closer to removing the deprecated interfaces.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      f990bee3
    • Arnd Bergmann's avatar
      scsi: esas2r: use ktime_get_real_seconds() · feeeca4c
      Arnd Bergmann authored
      do_gettimeofday() is deprecated because of the y2038 overflow.  Here, we
      use the result to pass into a 32-bit field in the firmware, which still
      risks an overflow, but if the firmware is written to expect unsigned
      values, it can at least last until y2106, and there is not much we can
      do about it.
      
      This changes do_gettimeofday() to ktime_get_real_seconds(), which at
      least simplifies the code a bit, and avoids the deprecated
      interface. I'm adding a comment about the overflow to document what
      happens.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      feeeca4c