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
This commit is contained in:
Mark Johnston 2015-05-10 22:21:00 +00:00
parent 2808a02bf4
commit 760a181bb2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=282743

View File

@ -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