Lines Matching full:pf
140 static int i40e_ptp_set_pins(struct i40e_pf *pf,
151 struct i40e_pf *pf = container_of(work, struct i40e_pf, in i40e_ptp_extts0_work() local
153 struct i40e_hw *hw = &pf->hw; in i40e_ptp_extts0_work()
171 ptp_clock_event(pf->ptp_clock, &event); in i40e_ptp_extts0_work()
188 * @pf: board private structure
191 * Return CAN_SET_PINS if pins can be set on a specific PF or
195 static enum i40e_can_set_pins_t i40e_can_set_pins(struct i40e_pf *pf) in i40e_can_set_pins() argument
197 if (!i40e_is_ptp_pin_dev(&pf->hw)) { in i40e_can_set_pins()
198 dev_warn(&pf->pdev->dev, in i40e_can_set_pins()
203 if (!pf->ptp_pins) { in i40e_can_set_pins()
204 dev_warn(&pf->pdev->dev, in i40e_can_set_pins()
209 if (pf->hw.pf_id) { in i40e_can_set_pins()
210 dev_warn(&pf->pdev->dev, in i40e_can_set_pins()
220 * @pf: Board private structure
222 * This function resets timing events for pf.
224 static void i40_ptp_reset_timing_events(struct i40e_pf *pf) in i40_ptp_reset_timing_events() argument
228 spin_lock_bh(&pf->ptp_rx_lock); in i40_ptp_reset_timing_events()
231 rd32(&pf->hw, I40E_PRTTSYN_RXTIME_L(i)); in i40_ptp_reset_timing_events()
232 rd32(&pf->hw, I40E_PRTTSYN_RXTIME_H(i)); in i40_ptp_reset_timing_events()
233 pf->latch_events[i] = 0; in i40_ptp_reset_timing_events()
236 rd32(&pf->hw, I40E_PRTTSYN_TXTIME_L); in i40_ptp_reset_timing_events()
237 rd32(&pf->hw, I40E_PRTTSYN_TXTIME_H); in i40_ptp_reset_timing_events()
239 pf->tx_hwtstamp_timeouts = 0; in i40_ptp_reset_timing_events()
240 pf->tx_hwtstamp_skipped = 0; in i40_ptp_reset_timing_events()
241 pf->rx_hwtstamp_cleared = 0; in i40_ptp_reset_timing_events()
242 pf->latch_event_flags = 0; in i40_ptp_reset_timing_events()
243 spin_unlock_bh(&pf->ptp_rx_lock); in i40_ptp_reset_timing_events()
272 * @pf: Board private structure
280 static void i40e_ptp_read(struct i40e_pf *pf, struct timespec64 *ts, in i40e_ptp_read() argument
283 struct i40e_hw *hw = &pf->hw; in i40e_ptp_read()
300 * @pf: Board private structure
307 static void i40e_ptp_write(struct i40e_pf *pf, const struct timespec64 *ts) in i40e_ptp_write() argument
309 struct i40e_hw *hw = &pf->hw; in i40e_ptp_write()
348 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); in i40e_ptp_adjfine() local
349 struct i40e_hw *hw = &pf->hw; in i40e_ptp_adjfine()
359 freq = I40E_PTP_40GB_INCVAL * READ_ONCE(pf->ptp_adj_mult); in i40e_ptp_adjfine()
376 * @pf: the PF private data structure
380 static void i40e_ptp_set_1pps_signal_hw(struct i40e_pf *pf) in i40e_ptp_set_1pps_signal_hw() argument
382 struct i40e_hw *hw = &pf->hw; in i40e_ptp_set_1pps_signal_hw()
390 i40e_ptp_read(pf, &now, NULL); in i40e_ptp_set_1pps_signal_hw()
414 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); in i40e_ptp_adjtime() local
415 struct i40e_hw *hw = &pf->hw; in i40e_ptp_adjtime()
417 mutex_lock(&pf->tmreg_lock); in i40e_ptp_adjtime()
439 i40e_ptp_read(pf, &now, NULL); in i40e_ptp_adjtime()
441 i40e_ptp_write(pf, (const struct timespec64 *)&now); in i40e_ptp_adjtime()
442 i40e_ptp_set_1pps_signal_hw(pf); in i40e_ptp_adjtime()
445 mutex_unlock(&pf->tmreg_lock); in i40e_ptp_adjtime()
462 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); in i40e_ptp_gettimex() local
464 mutex_lock(&pf->tmreg_lock); in i40e_ptp_gettimex()
465 i40e_ptp_read(pf, ts, sts); in i40e_ptp_gettimex()
466 mutex_unlock(&pf->tmreg_lock); in i40e_ptp_gettimex()
482 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); in i40e_ptp_settime() local
484 mutex_lock(&pf->tmreg_lock); in i40e_ptp_settime()
485 i40e_ptp_write(pf, ts); in i40e_ptp_settime()
486 mutex_unlock(&pf->tmreg_lock); in i40e_ptp_settime()
504 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); in i40e_pps_configure() local
507 i40e_ptp_set_1pps_signal_hw(pf); in i40e_pps_configure()
538 * @pf: private board structure
546 static int i40e_ptp_enable_pin(struct i40e_pf *pf, unsigned int chan, in i40e_ptp_enable_pin() argument
554 if (pf->hw.pf_id) in i40e_ptp_enable_pin()
558 pins.sdp3_2 = pf->ptp_pins->sdp3_2; in i40e_ptp_enable_pin()
559 pins.sdp3_3 = pf->ptp_pins->sdp3_3; in i40e_ptp_enable_pin()
560 pins.gpio_4 = pf->ptp_pins->gpio_4; in i40e_ptp_enable_pin()
569 pin_index = ptp_find_pin(pf->ptp_clock, func, chan); in i40e_ptp_enable_pin()
594 return i40e_ptp_set_pins(pf, &pins) ? -EINVAL : 0; in i40e_ptp_enable_pin()
609 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); in i40e_ptp_feature_enable() local
630 return i40e_ptp_enable_pin(pf, chan, func, on); in i40e_ptp_feature_enable()
635 * @pf: the PF data structure
645 static u32 i40e_ptp_get_rx_events(struct i40e_pf *pf) in i40e_ptp_get_rx_events() argument
647 struct i40e_hw *hw = &pf->hw; in i40e_ptp_get_rx_events()
652 new_latch_events = prttsyn_stat & ~pf->latch_event_flags; in i40e_ptp_get_rx_events()
665 pf->latch_events[i] = jiffies; in i40e_ptp_get_rx_events()
669 pf->latch_event_flags = prttsyn_stat; in i40e_ptp_get_rx_events()
676 * @pf: The PF private data structure
683 void i40e_ptp_rx_hang(struct i40e_pf *pf) in i40e_ptp_rx_hang() argument
685 struct i40e_hw *hw = &pf->hw; in i40e_ptp_rx_hang()
693 if (!(pf->flags & I40E_FLAG_PTP) || !pf->ptp_rx) in i40e_ptp_rx_hang()
696 spin_lock_bh(&pf->ptp_rx_lock); in i40e_ptp_rx_hang()
699 i40e_ptp_get_rx_events(pf); in i40e_ptp_rx_hang()
708 if ((pf->latch_event_flags & BIT(i)) && in i40e_ptp_rx_hang()
709 time_is_before_jiffies(pf->latch_events[i] + HZ)) { in i40e_ptp_rx_hang()
711 pf->latch_event_flags &= ~BIT(i); in i40e_ptp_rx_hang()
716 spin_unlock_bh(&pf->ptp_rx_lock); in i40e_ptp_rx_hang()
725 dev_dbg(&pf->pdev->dev, in i40e_ptp_rx_hang()
730 pf->rx_hwtstamp_cleared += cleared; in i40e_ptp_rx_hang()
735 * @pf: The PF private data structure
742 void i40e_ptp_tx_hang(struct i40e_pf *pf) in i40e_ptp_tx_hang() argument
746 if (!(pf->flags & I40E_FLAG_PTP) || !pf->ptp_tx) in i40e_ptp_tx_hang()
750 if (!test_bit(__I40E_PTP_TX_IN_PROGRESS, pf->state)) in i40e_ptp_tx_hang()
757 if (time_is_before_jiffies(pf->ptp_tx_start + HZ)) { in i40e_ptp_tx_hang()
758 skb = pf->ptp_tx_skb; in i40e_ptp_tx_hang()
759 pf->ptp_tx_skb = NULL; in i40e_ptp_tx_hang()
760 clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf->state); in i40e_ptp_tx_hang()
764 pf->tx_hwtstamp_timeouts++; in i40e_ptp_tx_hang()
770 * @pf: Board private structure
776 void i40e_ptp_tx_hwtstamp(struct i40e_pf *pf) in i40e_ptp_tx_hwtstamp() argument
779 struct sk_buff *skb = pf->ptp_tx_skb; in i40e_ptp_tx_hwtstamp()
780 struct i40e_hw *hw = &pf->hw; in i40e_ptp_tx_hwtstamp()
784 if (!(pf->flags & I40E_FLAG_PTP) || !pf->ptp_tx) in i40e_ptp_tx_hwtstamp()
788 if (!pf->ptp_tx_skb) in i40e_ptp_tx_hwtstamp()
802 pf->ptp_tx_skb = NULL; in i40e_ptp_tx_hwtstamp()
803 clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf->state); in i40e_ptp_tx_hwtstamp()
812 * @pf: Board private structure
822 void i40e_ptp_rx_hwtstamp(struct i40e_pf *pf, struct sk_buff *skb, u8 index) in i40e_ptp_rx_hwtstamp() argument
831 if (!(pf->flags & I40E_FLAG_PTP) || !pf->ptp_rx) in i40e_ptp_rx_hwtstamp()
834 hw = &pf->hw; in i40e_ptp_rx_hwtstamp()
836 spin_lock_bh(&pf->ptp_rx_lock); in i40e_ptp_rx_hwtstamp()
839 prttsyn_stat = i40e_ptp_get_rx_events(pf); in i40e_ptp_rx_hwtstamp()
843 spin_unlock_bh(&pf->ptp_rx_lock); in i40e_ptp_rx_hwtstamp()
848 pf->latch_event_flags &= ~BIT(index); in i40e_ptp_rx_hwtstamp()
853 spin_unlock_bh(&pf->ptp_rx_lock); in i40e_ptp_rx_hwtstamp()
862 * @pf: Board private structure
868 void i40e_ptp_set_increment(struct i40e_pf *pf) in i40e_ptp_set_increment() argument
871 struct i40e_hw *hw = &pf->hw; in i40e_ptp_set_increment()
877 i40e_aq_get_link_info(&pf->hw, true, NULL, NULL); in i40e_ptp_set_increment()
894 dev_warn(&pf->pdev->dev, in i40e_ptp_set_increment()
920 WRITE_ONCE(pf->ptp_adj_mult, mult); in i40e_ptp_set_increment()
926 * @pf: Board private structure
933 int i40e_ptp_get_ts_config(struct i40e_pf *pf, struct ifreq *ifr) in i40e_ptp_get_ts_config() argument
935 struct hwtstamp_config *config = &pf->tstamp_config; in i40e_ptp_get_ts_config()
937 if (!(pf->flags & I40E_FLAG_PTP)) in i40e_ptp_get_ts_config()
946 * @pf: Board private structure
950 static void i40e_ptp_free_pins(struct i40e_pf *pf) in i40e_ptp_free_pins() argument
952 if (i40e_is_ptp_pin_dev(&pf->hw)) { in i40e_ptp_free_pins()
953 kfree(pf->ptp_pins); in i40e_ptp_free_pins()
954 kfree(pf->ptp_caps.pin_config); in i40e_ptp_free_pins()
955 pf->ptp_pins = NULL; in i40e_ptp_free_pins()
1043 * @pf: Board private structure
1047 static void i40e_ptp_set_pins_hw(struct i40e_pf *pf) in i40e_ptp_set_pins_hw() argument
1049 const struct i40e_ptp_pins_settings *pins = pf->ptp_pins; in i40e_ptp_set_pins_hw()
1050 struct i40e_hw *hw = &pf->hw; in i40e_ptp_set_pins_hw()
1066 dev_info(&pf->pdev->dev, in i40e_ptp_set_pins_hw()
1075 * @pf: Board private structure
1078 * Validate and set PTP pins in HW for specific PF.
1081 static int i40e_ptp_set_pins(struct i40e_pf *pf, in i40e_ptp_set_pins() argument
1084 enum i40e_can_set_pins_t pin_caps = i40e_can_set_pins(pf); in i40e_ptp_set_pins()
1093 pins->sdp3_2 = pf->ptp_pins->sdp3_2; in i40e_ptp_set_pins()
1095 pins->sdp3_3 = pf->ptp_pins->sdp3_3; in i40e_ptp_set_pins()
1097 pins->gpio_4 = pf->ptp_pins->gpio_4; in i40e_ptp_set_pins()
1115 dev_warn(&pf->pdev->dev, in i40e_ptp_set_pins()
1123 memcpy(pf->ptp_pins, pins, sizeof(*pins)); in i40e_ptp_set_pins()
1124 i40e_ptp_set_pins_hw(pf); in i40e_ptp_set_pins()
1125 i40_ptp_reset_timing_events(pf); in i40e_ptp_set_pins()
1132 * @pf: Board private structure
1136 int i40e_ptp_alloc_pins(struct i40e_pf *pf) in i40e_ptp_alloc_pins() argument
1138 if (!i40e_is_ptp_pin_dev(&pf->hw)) in i40e_ptp_alloc_pins()
1141 pf->ptp_pins = in i40e_ptp_alloc_pins()
1144 if (!pf->ptp_pins) { in i40e_ptp_alloc_pins()
1145 dev_warn(&pf->pdev->dev, "Cannot allocate memory for PTP pins structure.\n"); in i40e_ptp_alloc_pins()
1149 pf->ptp_pins->sdp3_2 = off; in i40e_ptp_alloc_pins()
1150 pf->ptp_pins->sdp3_3 = off; in i40e_ptp_alloc_pins()
1151 pf->ptp_pins->gpio_4 = off; in i40e_ptp_alloc_pins()
1152 pf->ptp_pins->led2_0 = high; in i40e_ptp_alloc_pins()
1153 pf->ptp_pins->led2_1 = high; in i40e_ptp_alloc_pins()
1154 pf->ptp_pins->led3_0 = high; in i40e_ptp_alloc_pins()
1155 pf->ptp_pins->led3_1 = high; in i40e_ptp_alloc_pins()
1158 if (pf->hw.pf_id) in i40e_ptp_alloc_pins()
1161 i40e_ptp_init_leds_hw(&pf->hw); in i40e_ptp_alloc_pins()
1162 i40e_ptp_set_pins_hw(pf); in i40e_ptp_alloc_pins()
1169 * @pf: Board private structure
1179 static int i40e_ptp_set_timestamp_mode(struct i40e_pf *pf, in i40e_ptp_set_timestamp_mode() argument
1182 struct i40e_hw *hw = &pf->hw; in i40e_ptp_set_timestamp_mode()
1198 INIT_WORK(&pf->ptp_extts0_work, i40e_ptp_extts0_work); in i40e_ptp_set_timestamp_mode()
1202 pf->ptp_tx = false; in i40e_ptp_set_timestamp_mode()
1205 pf->ptp_tx = true; in i40e_ptp_set_timestamp_mode()
1213 pf->ptp_rx = false; in i40e_ptp_set_timestamp_mode()
1224 if (!(pf->hw_features & I40E_HW_PTP_L4_CAPABLE)) in i40e_ptp_set_timestamp_mode()
1226 pf->ptp_rx = true; in i40e_ptp_set_timestamp_mode()
1238 if (!(pf->hw_features & I40E_HW_PTP_L4_CAPABLE)) in i40e_ptp_set_timestamp_mode()
1244 pf->ptp_rx = true; in i40e_ptp_set_timestamp_mode()
1247 if (pf->hw_features & I40E_HW_PTP_L4_CAPABLE) { in i40e_ptp_set_timestamp_mode()
1261 spin_lock_bh(&pf->ptp_rx_lock); in i40e_ptp_set_timestamp_mode()
1268 pf->latch_event_flags = 0; in i40e_ptp_set_timestamp_mode()
1269 spin_unlock_bh(&pf->ptp_rx_lock); in i40e_ptp_set_timestamp_mode()
1273 if (pf->ptp_tx) in i40e_ptp_set_timestamp_mode()
1280 if (pf->ptp_tx) in i40e_ptp_set_timestamp_mode()
1290 * ignore Rx timestamps via the pf->ptp_rx flag. in i40e_ptp_set_timestamp_mode()
1304 * @pf: Board private structure
1316 int i40e_ptp_set_ts_config(struct i40e_pf *pf, struct ifreq *ifr) in i40e_ptp_set_ts_config() argument
1321 if (!(pf->flags & I40E_FLAG_PTP)) in i40e_ptp_set_ts_config()
1327 err = i40e_ptp_set_timestamp_mode(pf, &config); in i40e_ptp_set_ts_config()
1332 pf->tstamp_config = config; in i40e_ptp_set_ts_config()
1340 * @pf: private board structure
1345 static int i40e_init_pin_config(struct i40e_pf *pf) in i40e_init_pin_config() argument
1349 pf->ptp_caps.n_pins = 3; in i40e_init_pin_config()
1350 pf->ptp_caps.n_ext_ts = 2; in i40e_init_pin_config()
1351 pf->ptp_caps.pps = 1; in i40e_init_pin_config()
1352 pf->ptp_caps.n_per_out = 2; in i40e_init_pin_config()
1354 pf->ptp_caps.pin_config = kcalloc(pf->ptp_caps.n_pins, in i40e_init_pin_config()
1355 sizeof(*pf->ptp_caps.pin_config), in i40e_init_pin_config()
1357 if (!pf->ptp_caps.pin_config) in i40e_init_pin_config()
1360 for (i = 0; i < pf->ptp_caps.n_pins; i++) { in i40e_init_pin_config()
1361 snprintf(pf->ptp_caps.pin_config[i].name, in i40e_init_pin_config()
1362 sizeof(pf->ptp_caps.pin_config[i].name), in i40e_init_pin_config()
1364 pf->ptp_caps.pin_config[i].index = sdp_desc[i].index; in i40e_init_pin_config()
1365 pf->ptp_caps.pin_config[i].func = PTP_PF_NONE; in i40e_init_pin_config()
1366 pf->ptp_caps.pin_config[i].chan = sdp_desc[i].chan; in i40e_init_pin_config()
1369 pf->ptp_caps.verify = i40e_ptp_verify; in i40e_init_pin_config()
1370 pf->ptp_caps.enable = i40e_ptp_feature_enable; in i40e_init_pin_config()
1372 pf->ptp_caps.pps = 1; in i40e_init_pin_config()
1379 * @pf: Board private structure
1387 static long i40e_ptp_create_clock(struct i40e_pf *pf) in i40e_ptp_create_clock() argument
1390 if (!IS_ERR_OR_NULL(pf->ptp_clock)) in i40e_ptp_create_clock()
1393 strscpy(pf->ptp_caps.name, i40e_driver_name, in i40e_ptp_create_clock()
1394 sizeof(pf->ptp_caps.name) - 1); in i40e_ptp_create_clock()
1395 pf->ptp_caps.owner = THIS_MODULE; in i40e_ptp_create_clock()
1396 pf->ptp_caps.max_adj = 999999999; in i40e_ptp_create_clock()
1397 pf->ptp_caps.adjfine = i40e_ptp_adjfine; in i40e_ptp_create_clock()
1398 pf->ptp_caps.adjtime = i40e_ptp_adjtime; in i40e_ptp_create_clock()
1399 pf->ptp_caps.gettimex64 = i40e_ptp_gettimex; in i40e_ptp_create_clock()
1400 pf->ptp_caps.settime64 = i40e_ptp_settime; in i40e_ptp_create_clock()
1401 if (i40e_is_ptp_pin_dev(&pf->hw)) { in i40e_ptp_create_clock()
1402 int err = i40e_init_pin_config(pf); in i40e_ptp_create_clock()
1409 pf->ptp_clock = ptp_clock_register(&pf->ptp_caps, &pf->pdev->dev); in i40e_ptp_create_clock()
1410 if (IS_ERR(pf->ptp_clock)) in i40e_ptp_create_clock()
1411 return PTR_ERR(pf->ptp_clock); in i40e_ptp_create_clock()
1417 pf->tstamp_config.rx_filter = HWTSTAMP_FILTER_NONE; in i40e_ptp_create_clock()
1418 pf->tstamp_config.tx_type = HWTSTAMP_TX_OFF; in i40e_ptp_create_clock()
1421 ktime_get_real_ts64(&pf->ptp_prev_hw_time); in i40e_ptp_create_clock()
1422 pf->ptp_reset_start = ktime_get(); in i40e_ptp_create_clock()
1429 * @pf: Board private structure
1431 * Read the current PTP time and save it into pf->ptp_prev_hw_time. This should
1436 void i40e_ptp_save_hw_time(struct i40e_pf *pf) in i40e_ptp_save_hw_time() argument
1439 if (!(pf->flags & I40E_FLAG_PTP)) in i40e_ptp_save_hw_time()
1442 i40e_ptp_gettimex(&pf->ptp_caps, &pf->ptp_prev_hw_time, NULL); in i40e_ptp_save_hw_time()
1444 pf->ptp_reset_start = ktime_get(); in i40e_ptp_save_hw_time()
1449 * @pf: Board private structure
1452 * hardware time as pf->ptp_prev_hw_time. To be as accurate as possible,
1459 void i40e_ptp_restore_hw_time(struct i40e_pf *pf) in i40e_ptp_restore_hw_time() argument
1461 ktime_t delta = ktime_sub(ktime_get(), pf->ptp_reset_start); in i40e_ptp_restore_hw_time()
1464 timespec64_add_ns(&pf->ptp_prev_hw_time, ktime_to_ns(delta)); in i40e_ptp_restore_hw_time()
1467 i40e_ptp_settime(&pf->ptp_caps, &pf->ptp_prev_hw_time); in i40e_ptp_restore_hw_time()
1472 * @pf: Board private structure
1479 * pf->ptp_prev_hw_time to the current system time. During resets, it is
1483 void i40e_ptp_init(struct i40e_pf *pf) in i40e_ptp_init() argument
1485 struct net_device *netdev = pf->vsi[pf->lan_vsi]->netdev; in i40e_ptp_init()
1486 struct i40e_hw *hw = &pf->hw; in i40e_ptp_init()
1490 /* Only one PF is assigned to control 1588 logic per port. Do not in i40e_ptp_init()
1496 pf->flags &= ~I40E_FLAG_PTP; in i40e_ptp_init()
1497 dev_info(&pf->pdev->dev, "%s: PTP not supported on %s\n", in i40e_ptp_init()
1503 mutex_init(&pf->tmreg_lock); in i40e_ptp_init()
1504 spin_lock_init(&pf->ptp_rx_lock); in i40e_ptp_init()
1507 err = i40e_ptp_create_clock(pf); in i40e_ptp_init()
1509 pf->ptp_clock = NULL; in i40e_ptp_init()
1510 dev_err(&pf->pdev->dev, "%s: ptp_clock_register failed\n", in i40e_ptp_init()
1512 } else if (pf->ptp_clock) { in i40e_ptp_init()
1515 if (pf->hw.debug_mask & I40E_DEBUG_LAN) in i40e_ptp_init()
1516 dev_info(&pf->pdev->dev, "PHC enabled\n"); in i40e_ptp_init()
1517 pf->flags |= I40E_FLAG_PTP; in i40e_ptp_init()
1528 i40e_ptp_set_increment(pf); in i40e_ptp_init()
1531 i40e_ptp_set_timestamp_mode(pf, &pf->tstamp_config); in i40e_ptp_init()
1534 i40e_ptp_restore_hw_time(pf); in i40e_ptp_init()
1537 i40e_ptp_set_1pps_signal_hw(pf); in i40e_ptp_init()
1542 * @pf: Board private structure
1547 void i40e_ptp_stop(struct i40e_pf *pf) in i40e_ptp_stop() argument
1549 struct i40e_hw *hw = &pf->hw; in i40e_ptp_stop()
1552 pf->flags &= ~I40E_FLAG_PTP; in i40e_ptp_stop()
1553 pf->ptp_tx = false; in i40e_ptp_stop()
1554 pf->ptp_rx = false; in i40e_ptp_stop()
1556 if (pf->ptp_tx_skb) { in i40e_ptp_stop()
1557 struct sk_buff *skb = pf->ptp_tx_skb; in i40e_ptp_stop()
1559 pf->ptp_tx_skb = NULL; in i40e_ptp_stop()
1560 clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf->state); in i40e_ptp_stop()
1564 if (pf->ptp_clock) { in i40e_ptp_stop()
1565 ptp_clock_unregister(pf->ptp_clock); in i40e_ptp_stop()
1566 pf->ptp_clock = NULL; in i40e_ptp_stop()
1567 dev_info(&pf->pdev->dev, "%s: removed PHC on %s\n", __func__, in i40e_ptp_stop()
1568 pf->vsi[pf->lan_vsi]->netdev->name); in i40e_ptp_stop()
1571 if (i40e_is_ptp_pin_dev(&pf->hw)) { in i40e_ptp_stop()
1586 i40e_ptp_free_pins(pf); in i40e_ptp_stop()