Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/trace/dma-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ int dma_trace_enable(struct dma_trace_data *d)

void dma_trace_disable(struct dma_trace_data *d)
{
struct dma_trace_buf *buffer = &d->dmatb;

/* cancel trace work */
schedule_task_cancel(&d->dmat_work);

Expand All @@ -507,6 +509,14 @@ void dma_trace_disable(struct dma_trace_data *d)
d->host_size = 0;
}
#endif

/*
* Reset the local read and write pointers to preserve the captured logs
* while the dtrace is disabed
*/
buffer->w_ptr = buffer->addr;
buffer->r_ptr = buffer->addr;
buffer->avail = 0;
}

/** Sends all pending DMA messages to mailbox (for emergencies) */
Expand Down