sk: update error message for Tx timestamp polling

This patch cleans up the error message for the Tx timestamp polling, and adds a
line which indicates where the bug might have originated. This should help a
user more easily diagnose what went wrong.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
master
Jacob Keller 2013-10-28 11:56:27 -07:00 committed by Richard Cochran
parent ed379b4028
commit 7bd59737d3
1 changed files with 5 additions and 3 deletions

8
sk.c
View File

@ -229,11 +229,13 @@ int sk_receive(int fd, void *buf, int buflen,
struct pollfd pfd = { fd, 0, 0 }; struct pollfd pfd = { fd, 0, 0 };
res = poll(&pfd, 1, sk_tx_timeout); res = poll(&pfd, 1, sk_tx_timeout);
if (res < 1) { if (res < 1) {
pr_err(res ? "poll tx timestamp failed: %m" : pr_err(res ? "poll for tx timestamp failed: %m" :
"poll tx timestamp timeout"); "timed out while polling for tx timestamp");
pr_err("increasing tx_timestamp_timeout may correct "
"this issue, but it is likely caused by a driver bug");
return res; return res;
} else if (!(pfd.revents & POLLERR)) { } else if (!(pfd.revents & POLLERR)) {
pr_err("poll tx woke up on non ERR event"); pr_err("poll for tx timestamp woke up on non ERR event");
return -1; return -1;
} }
} }