Lines Matching full:ps
95 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_set_hwtstamp_config() local
101 clear_bit_unlock(MV88E6XXX_HWTSTAMP_ENABLED, &ps->state); in mv88e6xxx_set_hwtstamp_config()
170 set_bit(MV88E6XXX_HWTSTAMP_ENABLED, &ps->state); in mv88e6xxx_set_hwtstamp_config()
179 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_port_hwtstamp_set() local
194 memcpy(&ps->tstamp_config, &config, sizeof(config)); in mv88e6xxx_port_hwtstamp_set()
204 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_port_hwtstamp_get() local
205 struct hwtstamp_config *config = &ps->tstamp_config; in mv88e6xxx_port_hwtstamp_get()
221 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_should_tstamp() local
231 if (!test_bit(MV88E6XXX_HWTSTAMP_ENABLED, &ps->state)) in mv88e6xxx_should_tstamp()
257 struct mv88e6xxx_port_hwtstamp *ps, in mv88e6xxx_get_rxts() argument
275 err = mv88e6xxx_port_ptp_read(chip, ps->port_id, in mv88e6xxx_get_rxts()
288 err = mv88e6xxx_port_ptp_write(chip, ps->port_id, reg, 0); in mv88e6xxx_get_rxts()
313 struct mv88e6xxx_port_hwtstamp *ps) in mv88e6xxx_rxtstamp_work() argument
318 skb = skb_dequeue(&ps->rx_queue); in mv88e6xxx_rxtstamp_work()
321 mv88e6xxx_get_rxts(chip, ps, skb, ptp_ops->arr0_sts_reg, in mv88e6xxx_rxtstamp_work()
322 &ps->rx_queue); in mv88e6xxx_rxtstamp_work()
324 skb = skb_dequeue(&ps->rx_queue2); in mv88e6xxx_rxtstamp_work()
326 mv88e6xxx_get_rxts(chip, ps, skb, ptp_ops->arr1_sts_reg, in mv88e6xxx_rxtstamp_work()
327 &ps->rx_queue2); in mv88e6xxx_rxtstamp_work()
338 struct mv88e6xxx_port_hwtstamp *ps; in mv88e6xxx_port_rxtstamp() local
343 ps = &chip->port_hwtstamp[port]; in mv88e6xxx_port_rxtstamp()
345 if (ps->tstamp_config.rx_filter != HWTSTAMP_FILTER_PTP_V2_EVENT) in mv88e6xxx_port_rxtstamp()
355 skb_queue_tail(&ps->rx_queue2, skb); in mv88e6xxx_port_rxtstamp()
357 skb_queue_tail(&ps->rx_queue, skb); in mv88e6xxx_port_rxtstamp()
365 struct mv88e6xxx_port_hwtstamp *ps) in mv88e6xxx_txtstamp_work() argument
375 if (!ps->tx_skb) in mv88e6xxx_txtstamp_work()
379 err = mv88e6xxx_port_ptp_read(chip, ps->port_id, in mv88e6xxx_txtstamp_work()
389 if (time_is_before_jiffies(ps->tx_tstamp_start + in mv88e6xxx_txtstamp_work()
392 ps->port_id); in mv88e6xxx_txtstamp_work()
404 mv88e6xxx_port_ptp_write(chip, ps->port_id, ptp_ops->dep_sts_reg, 0); in mv88e6xxx_txtstamp_work()
409 dev_warn(chip->dev, "p%d: tx timestamp overrun\n", ps->port_id); in mv88e6xxx_txtstamp_work()
413 if (departure_block[3] != ps->tx_seq_id) { in mv88e6xxx_txtstamp_work()
414 dev_warn(chip->dev, "p%d: unexpected seq. id\n", ps->port_id); in mv88e6xxx_txtstamp_work()
427 ps->port_id, ktime_to_ns(shhwtstamps.hwtstamp), in mv88e6xxx_txtstamp_work()
428 departure_block[0], ps->tx_seq_id, departure_block[3]); in mv88e6xxx_txtstamp_work()
432 * -- by clearing the ps->tx_skb "flag" -- beforehand. in mv88e6xxx_txtstamp_work()
435 tmp_skb = ps->tx_skb; in mv88e6xxx_txtstamp_work()
436 ps->tx_skb = NULL; in mv88e6xxx_txtstamp_work()
437 clear_bit_unlock(MV88E6XXX_HWTSTAMP_TX_IN_PROGRESS, &ps->state); in mv88e6xxx_txtstamp_work()
443 dev_kfree_skb_any(ps->tx_skb); in mv88e6xxx_txtstamp_work()
444 ps->tx_skb = NULL; in mv88e6xxx_txtstamp_work()
445 clear_bit_unlock(MV88E6XXX_HWTSTAMP_TX_IN_PROGRESS, &ps->state); in mv88e6xxx_txtstamp_work()
454 struct mv88e6xxx_port_hwtstamp *ps; in mv88e6xxx_hwtstamp_work() local
461 ps = &chip->port_hwtstamp[i]; in mv88e6xxx_hwtstamp_work()
462 if (test_bit(MV88E6XXX_HWTSTAMP_TX_IN_PROGRESS, &ps->state)) in mv88e6xxx_hwtstamp_work()
463 restart |= mv88e6xxx_txtstamp_work(chip, ps); in mv88e6xxx_hwtstamp_work()
465 mv88e6xxx_rxtstamp_work(chip, ps); in mv88e6xxx_hwtstamp_work()
475 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_port_txtstamp() local
486 &ps->state)) in mv88e6xxx_port_txtstamp()
489 ps->tx_skb = clone; in mv88e6xxx_port_txtstamp()
490 ps->tx_tstamp_start = jiffies; in mv88e6xxx_port_txtstamp()
491 ps->tx_seq_id = be16_to_cpu(hdr->sequence_id); in mv88e6xxx_port_txtstamp()
539 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_hwtstamp_port_setup() local
541 ps->port_id = port; in mv88e6xxx_hwtstamp_port_setup()
543 skb_queue_head_init(&ps->rx_queue); in mv88e6xxx_hwtstamp_port_setup()
544 skb_queue_head_init(&ps->rx_queue2); in mv88e6xxx_hwtstamp_port_setup()