From: Pieter Palmers <pieterp@xxxxxxx>I had to use 1000000ULL instead of USEC_PER_SEC to avoid weird behavior.
This implements the simultaneous read of the isochronous cycle timer and
the system clock (in usecs). This allows to express the exact receive
time of an ISO packet as a system time with microsecond accuracy.
http://bugzilla.kernel.org/show_bug.cgi?id=7773
The counterpart patch for libraw1394 can be found at
http://thread.gmane.org/gmane.linux.kernel.firewire.devel/8934
Patch update (Stefan R.):
- Disable preemption and local interrupts.
- Fix integer overflow.
- Add paranoid error checks and kerneldoc to hpsb_read_cycle_timer.Thanks for the cleanups!
Move it to other ieee1394_core high-level API functions.
- Rename userspace-exported struct _raw1394_cycle_timer to
raw1394_cycle_timer. Change comments in raw1394.
- Adjust whitespace.