From owner-svn-src-projects@FreeBSD.ORG Thu Oct 14 01:47:07 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8734F1065670; Thu, 14 Oct 2010 01:47:07 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76CB28FC18; Thu, 14 Oct 2010 01:47:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9E1l79p008432; Thu, 14 Oct 2010 01:47:07 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9E1l76n008430; Thu, 14 Oct 2010 01:47:07 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201010140147.o9E1l76n008430@svn.freebsd.org> From: Jeff Roberson Date: Thu, 14 Oct 2010 01:47:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213820 - projects/ofed/head/sys/ofed/include/linux X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2010 01:47:07 -0000 Author: jeff Date: Thu Oct 14 01:47:07 2010 New Revision: 213820 URL: http://svn.freebsd.org/changeset/base/213820 Log: - Linux uses absolute timeout values while FreeBSD uses relative timeout values. Adjust accordingly. Previously this would produce absurdly long timeouts. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/ofed/include/linux/timer.h Modified: projects/ofed/head/sys/ofed/include/linux/timer.h ============================================================================== --- projects/ofed/head/sys/ofed/include/linux/timer.h Thu Oct 14 01:46:20 2010 (r213819) +++ projects/ofed/head/sys/ofed/include/linux/timer.h Thu Oct 14 01:47:07 2010 (r213820) @@ -66,11 +66,12 @@ do { \ } while (0) #define mod_timer(timer, expire) \ - callout_reset(&(timer)->timer_callout, (expire), _timer_fn, (timer)) + callout_reset(&(timer)->timer_callout, (expire) - jiffies, \ + _timer_fn, (timer)) #define add_timer(timer) \ callout_reset(&(timer)->timer_callout, \ - (timer)->timer_callout.c_time, _timer_fn, (timer)) + (timer)->timer_callout.c_time - jiffies, _timer_fn, (timer)) #define del_timer(timer) callout_stop(&(timer)->timer_callout) #define del_timer_sync(timer) callout_drain(&(timer)->timer_callout)