Skip to content

Commit

Permalink
sk: update error message for Tx timestamp polling
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jacob-keller authored and richardcochran committed Oct 30, 2013
1 parent ed379b4 commit 7bd5973
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sk.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,13 @@ int sk_receive(int fd, void *buf, int buflen,
struct pollfd pfd = { fd, 0, 0 };
res = poll(&pfd, 1, sk_tx_timeout);
if (res < 1) {
pr_err(res ? "poll tx timestamp failed: %m" :
"poll tx timestamp timeout");
pr_err(res ? "poll for tx timestamp failed: %m" :
"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;
} 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;
}
}
Expand Down

0 comments on commit 7bd5973

Please sign in to comment.