Lines Matching refs:ts

171 		       struct ines_timestamp *ts, struct device *dev);
174 static bool ines_timestamp_expired(struct ines_timestamp *ts);
257 struct ines_timestamp *ts; in ines_find_rxts() local
267 ts = list_entry(this, struct ines_timestamp, list); in ines_find_rxts()
268 if (ines_timestamp_expired(ts)) { in ines_find_rxts()
269 list_del_init(&ts->list); in ines_find_rxts()
270 list_add(&ts->list, &port->pool); in ines_find_rxts()
273 if (ines_match(skb, type, ts, port->clock->dev)) { in ines_find_rxts()
274 ns = ts->sec * 1000000000ULL + ts->nsec; in ines_find_rxts()
275 list_del_init(&ts->list); in ines_find_rxts()
276 list_add(&ts->list, &port->pool); in ines_find_rxts()
289 struct ines_timestamp ts; in ines_find_txts() local
314 ts.tag = ines_read32(port, ts_tx); in ines_find_txts()
315 ts.sec = ines_txts64(port, 3); in ines_find_txts()
316 ts.nsec = ines_txts64(port, 2); in ines_find_txts()
317 ts.clkid = ines_txts64(port, 4); in ines_find_txts()
318 ts.portnum = ines_read32(port, ts_tx); in ines_find_txts()
319 ts.seqid = ines_read32(port, ts_tx); in ines_find_txts()
321 if (ines_match(skb, class, &ts, port->clock->dev)) { in ines_find_txts()
322 ns = ts.sec * 1000000000ULL + ts.nsec; in ines_find_txts()
432 struct ines_timestamp *ts, struct device *dev) in ines_match() argument
451 if (tag_to_msgtype(ts->tag & 0x7) != msgtype) { in ines_match()
453 tag_to_msgtype(ts->tag & 0x7), msgtype); in ines_match()
456 if (ts->clkid != clkid) { in ines_match()
458 ts->clkid, clkid); in ines_match()
461 if (ts->portnum != portn) { in ines_match()
463 ts->portnum, portn); in ines_match()
466 if (ts->seqid != seqid) { in ines_match()
468 ts->seqid, seqid); in ines_match()
499 struct ines_timestamp *ts; in ines_rxfifo_read() local
522 ts = list_first_entry(&port->pool, struct ines_timestamp, list); in ines_rxfifo_read()
523 ts->tmo = jiffies + HZ; in ines_rxfifo_read()
524 ts->tag = ines_read32(port, ts_rx); in ines_rxfifo_read()
525 ts->sec = ines_rxts64(port, 3); in ines_rxfifo_read()
526 ts->nsec = ines_rxts64(port, 2); in ines_rxfifo_read()
527 ts->clkid = ines_rxts64(port, 4); in ines_rxfifo_read()
528 ts->portnum = ines_read32(port, ts_rx); in ines_rxfifo_read()
529 ts->seqid = ines_read32(port, ts_rx); in ines_rxfifo_read()
531 list_del_init(&ts->list); in ines_rxfifo_read()
532 list_add_tail(&ts->list, &port->events); in ines_rxfifo_read()
555 static bool ines_timestamp_expired(struct ines_timestamp *ts) in ines_timestamp_expired() argument
557 return time_after(jiffies, ts->tmo); in ines_timestamp_expired()