mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 01:14:19 -04:00
ptp: ixgbe: convert to the 64 bit get/set time methods.
This driver's clock is implemented using a timecounter, and so with this patch the driver is ready for the year 2038. Compile tested only. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
d4c496fe45
commit
91432d18ed
@@ -279,7 +279,7 @@ static int ixgbe_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
|
||||
* read the timecounter and return the correct value on ns,
|
||||
* after converting it into a struct timespec.
|
||||
*/
|
||||
static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts)
|
||||
static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
|
||||
{
|
||||
struct ixgbe_adapter *adapter =
|
||||
container_of(ptp, struct ixgbe_adapter, ptp_caps);
|
||||
@@ -306,7 +306,7 @@ static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts)
|
||||
* wall timer value.
|
||||
*/
|
||||
static int ixgbe_ptp_settime(struct ptp_clock_info *ptp,
|
||||
const struct timespec *ts)
|
||||
const struct timespec64 *ts)
|
||||
{
|
||||
struct ixgbe_adapter *adapter =
|
||||
container_of(ptp, struct ixgbe_adapter, ptp_caps);
|
||||
@@ -407,7 +407,7 @@ void ixgbe_ptp_overflow_check(struct ixgbe_adapter *adapter)
|
||||
{
|
||||
bool timeout = time_is_before_jiffies(adapter->last_overflow_check +
|
||||
IXGBE_OVERFLOW_PERIOD);
|
||||
struct timespec ts;
|
||||
struct timespec64 ts;
|
||||
|
||||
if (timeout) {
|
||||
ixgbe_ptp_gettime(&adapter->ptp_caps, &ts);
|
||||
@@ -874,8 +874,8 @@ static int ixgbe_ptp_create_clock(struct ixgbe_adapter *adapter)
|
||||
adapter->ptp_caps.pps = 1;
|
||||
adapter->ptp_caps.adjfreq = ixgbe_ptp_adjfreq;
|
||||
adapter->ptp_caps.adjtime = ixgbe_ptp_adjtime;
|
||||
adapter->ptp_caps.gettime = ixgbe_ptp_gettime;
|
||||
adapter->ptp_caps.settime = ixgbe_ptp_settime;
|
||||
adapter->ptp_caps.gettime64 = ixgbe_ptp_gettime;
|
||||
adapter->ptp_caps.settime64 = ixgbe_ptp_settime;
|
||||
adapter->ptp_caps.enable = ixgbe_ptp_feature_enable;
|
||||
break;
|
||||
case ixgbe_mac_82599EB:
|
||||
@@ -890,8 +890,8 @@ static int ixgbe_ptp_create_clock(struct ixgbe_adapter *adapter)
|
||||
adapter->ptp_caps.pps = 0;
|
||||
adapter->ptp_caps.adjfreq = ixgbe_ptp_adjfreq;
|
||||
adapter->ptp_caps.adjtime = ixgbe_ptp_adjtime;
|
||||
adapter->ptp_caps.gettime = ixgbe_ptp_gettime;
|
||||
adapter->ptp_caps.settime = ixgbe_ptp_settime;
|
||||
adapter->ptp_caps.gettime64 = ixgbe_ptp_gettime;
|
||||
adapter->ptp_caps.settime64 = ixgbe_ptp_settime;
|
||||
adapter->ptp_caps.enable = ixgbe_ptp_feature_enable;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user