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()
166 set_bit(MV88E6XXX_HWTSTAMP_ENABLED, &ps->state); in mv88e6xxx_set_hwtstamp_config()
175 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_port_hwtstamp_set() local
190 memcpy(&ps->tstamp_config, &config, sizeof(config)); in mv88e6xxx_port_hwtstamp_set()
200 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_port_hwtstamp_get() local
201 struct hwtstamp_config *config = &ps->tstamp_config; in mv88e6xxx_port_hwtstamp_get()
217 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_should_tstamp() local
227 if (!test_bit(MV88E6XXX_HWTSTAMP_ENABLED, &ps->state)) in mv88e6xxx_should_tstamp()
253 struct mv88e6xxx_port_hwtstamp *ps, in mv88e6xxx_get_rxts() argument
271 err = mv88e6xxx_port_ptp_read(chip, ps->port_id, in mv88e6xxx_get_rxts()
284 err = mv88e6xxx_port_ptp_write(chip, ps->port_id, reg, 0); in mv88e6xxx_get_rxts()
309 struct mv88e6xxx_port_hwtstamp *ps) in mv88e6xxx_rxtstamp_work() argument
314 skb = skb_dequeue(&ps->rx_queue); in mv88e6xxx_rxtstamp_work()
317 mv88e6xxx_get_rxts(chip, ps, skb, ptp_ops->arr0_sts_reg, in mv88e6xxx_rxtstamp_work()
318 &ps->rx_queue); in mv88e6xxx_rxtstamp_work()
320 skb = skb_dequeue(&ps->rx_queue2); in mv88e6xxx_rxtstamp_work()
322 mv88e6xxx_get_rxts(chip, ps, skb, ptp_ops->arr1_sts_reg, in mv88e6xxx_rxtstamp_work()
323 &ps->rx_queue2); in mv88e6xxx_rxtstamp_work()
334 struct mv88e6xxx_port_hwtstamp *ps; in mv88e6xxx_port_rxtstamp() local
339 ps = &chip->port_hwtstamp[port]; in mv88e6xxx_port_rxtstamp()
341 if (ps->tstamp_config.rx_filter != HWTSTAMP_FILTER_PTP_V2_EVENT) in mv88e6xxx_port_rxtstamp()
351 skb_queue_tail(&ps->rx_queue2, skb); in mv88e6xxx_port_rxtstamp()
353 skb_queue_tail(&ps->rx_queue, skb); in mv88e6xxx_port_rxtstamp()
361 struct mv88e6xxx_port_hwtstamp *ps) in mv88e6xxx_txtstamp_work() argument
371 if (!ps->tx_skb) in mv88e6xxx_txtstamp_work()
375 err = mv88e6xxx_port_ptp_read(chip, ps->port_id, in mv88e6xxx_txtstamp_work()
385 if (time_is_before_jiffies(ps->tx_tstamp_start + in mv88e6xxx_txtstamp_work()
388 ps->port_id); in mv88e6xxx_txtstamp_work()
400 mv88e6xxx_port_ptp_write(chip, ps->port_id, ptp_ops->dep_sts_reg, 0); in mv88e6xxx_txtstamp_work()
405 dev_warn(chip->dev, "p%d: tx timestamp overrun\n", ps->port_id); in mv88e6xxx_txtstamp_work()
409 if (departure_block[3] != ps->tx_seq_id) { in mv88e6xxx_txtstamp_work()
410 dev_warn(chip->dev, "p%d: unexpected seq. id\n", ps->port_id); in mv88e6xxx_txtstamp_work()
423 ps->port_id, ktime_to_ns(shhwtstamps.hwtstamp), in mv88e6xxx_txtstamp_work()
424 departure_block[0], ps->tx_seq_id, departure_block[3]); in mv88e6xxx_txtstamp_work()
428 * -- by clearing the ps->tx_skb "flag" -- beforehand. in mv88e6xxx_txtstamp_work()
431 tmp_skb = ps->tx_skb; in mv88e6xxx_txtstamp_work()
432 ps->tx_skb = NULL; in mv88e6xxx_txtstamp_work()
433 clear_bit_unlock(MV88E6XXX_HWTSTAMP_TX_IN_PROGRESS, &ps->state); in mv88e6xxx_txtstamp_work()
439 dev_kfree_skb_any(ps->tx_skb); in mv88e6xxx_txtstamp_work()
440 ps->tx_skb = NULL; in mv88e6xxx_txtstamp_work()
441 clear_bit_unlock(MV88E6XXX_HWTSTAMP_TX_IN_PROGRESS, &ps->state); in mv88e6xxx_txtstamp_work()
450 struct mv88e6xxx_port_hwtstamp *ps; in mv88e6xxx_hwtstamp_work() local
457 ps = &chip->port_hwtstamp[i]; in mv88e6xxx_hwtstamp_work()
458 if (test_bit(MV88E6XXX_HWTSTAMP_TX_IN_PROGRESS, &ps->state)) in mv88e6xxx_hwtstamp_work()
459 restart |= mv88e6xxx_txtstamp_work(chip, ps); in mv88e6xxx_hwtstamp_work()
461 mv88e6xxx_rxtstamp_work(chip, ps); in mv88e6xxx_hwtstamp_work()
471 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_port_txtstamp() local
489 &ps->state)) { in mv88e6xxx_port_txtstamp()
494 ps->tx_skb = clone; in mv88e6xxx_port_txtstamp()
495 ps->tx_tstamp_start = jiffies; in mv88e6xxx_port_txtstamp()
496 ps->tx_seq_id = be16_to_cpu(hdr->sequence_id); in mv88e6xxx_port_txtstamp()
543 struct mv88e6xxx_port_hwtstamp *ps = &chip->port_hwtstamp[port]; in mv88e6xxx_hwtstamp_port_setup() local
545 ps->port_id = port; in mv88e6xxx_hwtstamp_port_setup()
547 skb_queue_head_init(&ps->rx_queue); in mv88e6xxx_hwtstamp_port_setup()
548 skb_queue_head_init(&ps->rx_queue2); in mv88e6xxx_hwtstamp_port_setup()