“daed473d4ad49228a886434ec5f934a42fcb765a”上不存在“paddle/git@gitcode.net:RobotFutures/Paddle.git”
提交 f2f33387 编写于 作者: J Jacob Keller 提交者: Jeff Kirsher

ixgbe: Update ptp_overflow check comment and jiffies

This patch fixes the comment on ptp_overflow_check to match up with what is
currently used as the parameters. Also change the jiffies check to use
time_is_after_jiffies macro.
Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 aeb82648
...@@ -407,21 +407,21 @@ void ixgbe_ptp_check_pps_event(struct ixgbe_adapter *adapter, u32 eicr) ...@@ -407,21 +407,21 @@ void ixgbe_ptp_check_pps_event(struct ixgbe_adapter *adapter, u32 eicr)
/** /**
* ixgbe_ptp_overflow_check - delayed work to detect SYSTIME overflow * ixgbe_ptp_overflow_check - watchdog task to detect SYSTIME overflow
* @work: structure containing information about this work task * @adapter: private adapter struct
* *
* this work function is scheduled to continue reading the timecounter * this watchdog task periodically reads the timecounter
* in order to prevent missing when the system time registers wrap * in order to prevent missing when the system time registers wrap
* around. This needs to be run approximately twice a minute when no * around. This needs to be run approximately twice a minute.
* PTP activity is occurring.
*/ */
void ixgbe_ptp_overflow_check(struct ixgbe_adapter *adapter) void ixgbe_ptp_overflow_check(struct ixgbe_adapter *adapter)
{ {
unsigned long elapsed_jiffies = adapter->last_overflow_check - jiffies; bool timeout = time_is_before_jiffies(adapter->last_overflow_check +
IXGBE_OVERFLOW_PERIOD);
struct timespec ts; struct timespec ts;
if ((adapter->flags2 & IXGBE_FLAG2_PTP_ENABLED) && if ((adapter->flags2 & IXGBE_FLAG2_PTP_ENABLED) &&
(elapsed_jiffies >= IXGBE_OVERFLOW_PERIOD)) { (timeout)) {
ixgbe_ptp_gettime(&adapter->ptp_caps, &ts); ixgbe_ptp_gettime(&adapter->ptp_caps, &ts);
adapter->last_overflow_check = jiffies; adapter->last_overflow_check = jiffies;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册