Skip to content

Commit

Permalink
Merge pull request torvalds#196 in PROCESSOR-SDK/processor-sdk-linux …
Browse files Browse the repository at this point in the history
…from plsdk-3125 to processor-sdk-linux-4.19.y

* commit 'bcada72bd7ebad1ff5ef724f55af614fcc1c682a':
  ptp: cleanup timestamp event queue when extts is disabled
  • Loading branch information
wingmankwok committed Nov 8, 2019
2 parents 106aec4 + bcada72 commit f5f0390
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/ptp/ptp_chardev.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
req.type = PTP_CLK_REQ_EXTTS;
enable = req.extts.flags & PTP_ENABLE_FEATURE ? 1 : 0;
err = ops->enable(ops, &req, enable);
if (!enable && !err && queue_cnt(&ptp->tsevq)) {
struct timestamp_event_queue *queue = &ptp->tsevq;
unsigned long flags;

spin_lock_irqsave(&queue->lock, flags);
queue->head = 0;
queue->tail = 0;
spin_unlock_irqrestore(&queue->lock, flags);
}
break;

case PTP_PEROUT_REQUEST:
Expand Down

0 comments on commit f5f0390

Please sign in to comment.