usbip: use monotonic timestamps
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Nov 2017 10:39:57 +0000 (11:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Nov 2017 14:34:08 +0000 (15:34 +0100)
commit6c51441cd0710330ccdb8dd0288e5316256d1c8e
tree82f7475d202cd09c0beabac8455b1c90afc04d36
parent15081e85cca45e495144eb0c108926e629fde486
usbip: use monotonic timestamps

This gets rid of the deprecated do_gettimeofday() function in usbip.
The comment above vgadget_get_frame() mentions that it suffers
from issues with the time jumps due to suspend and settimeofday,
so I'm changing it to use ktime_get_ts64() to use monotonic times
that don't have this problem.

I couldn't tell whether we should use CLOCK_MONOTONIC or
CLOCK_MONOTONIC_RAW here, the difference being the exact rate
when correcting for NTP. I picked monotonic time since it doesn't
change the speed to the existing code and should be better
synchronized with other machines we talk to.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vudc.h
drivers/usb/usbip/vudc_dev.c
drivers/usb/usbip/vudc_sysfs.c