On Fri, Apr 21, 2017 at 10:04:35AM -0600, Baicar, Tyler wrote:The timestamp may still be useful when it is imprecise. In the polling case, you may only poll every minute or so, so the time may be useful. Also, I imagine there could be interrupt based errors happening much faster than the FW/OS handshake can happen. Maybe we can just use what I had before but also specify imprecise so that it is clear:
This is basically what I already had in v14...you asked to move it into aWell, clearly I've been smoking some nasty potent sh*t. :-\
different if-statement? https://lkml.org/lkml/2017/4/12/397
/me goes and looks at the spec:
"Bit 0 â Timestamp is precise if this bit is set and correlates to the
time of the error event."
So why are we even printing the timestamp when !precise?
IOW, I think we should do:
if (!(timestamp[3] & 0x1))
printk("%stimestamp imprecise\n", pfx);
else {
sec = ..
min = ...
...
}
and print the actual values only when the timestamp is precise.
Otherwise it has *some* values which could just as well be completely
random. And it's not like we're reporting the error tomorrow - it is
mostly a couple of seconds from logging to the fw pushing it out...