From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093AbdIAPib (ORCPT ); Fri, 1 Sep 2017 11:38:31 -0400 Received: from krieglstein.org ([176.28.13.145]:45848 "EHLO krieglstein.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbdIAPi3 (ORCPT ); Fri, 1 Sep 2017 11:38:29 -0400 X-Greylist: delayed 592 seconds by postgrey-1.27 at vger.kernel.org; Fri, 01 Sep 2017 11:38:28 EDT From: Tim Sander To: Richard Cochran , linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Subject: ptp device strangeness Date: Fri, 01 Sep 2017 17:28:34 +0200 Message-ID: <1934181.WnEexch2hB@dabox> Organization: Sander and Lightning User-Agent: KMail/5.1.3 (Linux/4.9.2; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi I am currently using ptp on a Altera/Intel SOC with a dp8640 PHY. PTP functionality seems to be right. But i am doing timestamping with gpio0 and sometimes i loose the sync of the stamping and the events. So i would like to read out all messages. Reading O_NONBLOCK does not work so i tried polling from usermode with the below code: np = poll(&ev, 1, 0); ev.fd=ptpDev; ev.events = POLLIN; if (np>0) { if (ev.revents>0) { std::cout<<"discarded ptp event"<