Skip to content
Snippets Groups Projects
Commit 2e9e2a27 authored by Alessandro Rubini's avatar Alessandro Rubini
Browse files

trigger support: copy the timestamp later


By copying ti->tstamp to the control at a later time, we support
devices that use an internal time stamp (e.g: white rabbit).

Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
Acked-by: default avatarFederico Vaga <federico.vaga@gmail.com>
parent fb51f97c
Branches
Tags
No related merge requests found
......@@ -187,6 +187,10 @@ static void __zio_internal_data_done(struct zio_cset *cset)
block = chan->active_block;
if (!block)
continue;
/* Copy the stamp */
chan->current_ctrl->tstamp.secs = ti->tstamp.tv_sec;
chan->current_ctrl->tstamp.ticks = ti->tstamp.tv_nsec;
chan->current_ctrl->tstamp.bins = ti->tstamp_extra;
if (zbuf->b_op->store_block(bi, block)) /* may fail, no prob */
zbuf->b_op->free_block(bi, block);
}
......@@ -288,10 +292,6 @@ static void __zio_fire_input_trigger(struct zio_ti *ti)
* blocks or other errors in trigger activation.
*/
chan->current_ctrl->seq_num++;
/* Copy the stamp (we are software driven anyways) */
chan->current_ctrl->tstamp.secs = ti->tstamp.tv_sec;
chan->current_ctrl->tstamp.ticks = ti->tstamp.tv_nsec;
chan->current_ctrl->tstamp.bins = ti->tstamp_extra;
memcpy(ctrl, chan->current_ctrl, ZIO_CONTROL_SIZE);
block = zbuf->b_op->alloc_block(chan->bi, ctrl,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment