[lkml]   [2017]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectptp device strangeness

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; = POLLIN;
if (np>0) {
if (ev.revents>0) {
std::cout<<"discarded ptp event"<<std::endl;
read(ptpDev, &event, sizeof(event));
But as confirmed in the debugger np=1 and read blocks forever.
I don't think that this is correct behavior?

For pinning down this misbehavior I would like to know it this is a local
problem of my hardware or if this is a general problem with the ptp chardev

I am currently on 4.11.12. As this is the latest preempt rt release.

Best regards

 \ /
  Last update: 2017-09-01 17:38    [W:0.021 / U:14.188 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site