summaryrefslogtreecommitdiffstats
path: root/sys/ofed
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2015-05-10 22:21:00 +0000
committermarkj <markj@FreeBSD.org>2015-05-10 22:21:00 +0000
commit9a6d755918d6c0209303eaa55fef98a018919a7d (patch)
tree1bc029b0b1768b037ac3462fd6cd17ee9efc560e /sys/ofed
parenta4b25580a84b5ce3dd1b738792209f9e7f11cb66 (diff)
downloadFreeBSD-src-9a6d755918d6c0209303eaa55fef98a018919a7d.zip
FreeBSD-src-9a6d755918d6c0209303eaa55fef98a018919a7d.tar.gz
msecs_to_jiffies() is implemented using tvtohz(9), which always returns a
positive value since it adds the current tick to its result. This differs from the behaviour in Linux, whose implementation does not add the extra tick, so subtract the extra tick in the OFED compat layer implementation. This addresses some incorrect handling of IB MAD timeouts, since some IB code depends on msecs_to_jiffies(0) returning 0. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/include/linux/jiffies.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ofed/include/linux/jiffies.h b/sys/ofed/include/linux/jiffies.h
index b8757bb..dce2e15 100644
--- a/sys/ofed/include/linux/jiffies.h
+++ b/sys/ofed/include/linux/jiffies.h
@@ -42,7 +42,7 @@ msecs_to_jiffies(int msec)
tv.tv_sec = msec / 1000;
tv.tv_usec = (msec % 1000) * 1000;
- return (tvtohz(&tv));
+ return (tvtohz(&tv) - 1);
}
#define jiffies ticks
OpenPOWER on IntegriCloud