Date: Sun, 10 May 2015 22:21:00 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282743 - head/sys/ofed/include/linux Message-ID: <201505102221.t4AML0BR003855@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sun May 10 22:21:00 2015 New Revision: 282743 URL: https://svnweb.freebsd.org/changeset/base/282743 Log: 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 Modified: head/sys/ofed/include/linux/jiffies.h Modified: head/sys/ofed/include/linux/jiffies.h ============================================================================== --- head/sys/ofed/include/linux/jiffies.h Sun May 10 22:07:53 2015 (r282742) +++ head/sys/ofed/include/linux/jiffies.h Sun May 10 22:21:00 2015 (r282743) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505102221.t4AML0BR003855>