scsi: aacraid: use timespec64 instead of timeval
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Nov 2017 10:46:05 +0000 (11:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:23 +0000 (10:10 +0100)
commit73e31f2af17843c640fd7e0c8d73f13773dd1777
tree0424b7e62226a910aa10a0b8f531328c3764527d
parent28461320cc952e8a971ec415743ae97120937fbd
scsi: aacraid: use timespec64 instead of timeval

[ Upstream commit 820f188659122602ab217dd80cfa32b3ac0c55c0 ]

aacraid passes the current time to the firmware in one of two ways,
either as year/month/day/... or as 32-bit unsigned seconds.

The first one is broken on 32-bit architectures as it cannot go past
year 2038. Using timespec64 here makes it behave properly on both 32-bit
and 64-bit architectures, and avoids relying on signed integer overflow
to pass times into the second interface.

The interface used in aac_send_hosttime() however is still problematic
in year 2106 when 32-bit seconds overflow. Hopefully we don't have to
worry about aacraid by that time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Dave Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/aacraid/commsup.c