]> err.no Git - linux-2.6/commitdiff
USB: ohci: fix 2 timers to fire at jiffies + 1s
authorRichard Kennedy <richard@rsk.demon.co.uk>
Fri, 28 Mar 2008 21:50:30 +0000 (14:50 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 2 Apr 2008 22:06:09 +0000 (15:06 -0700)
Code inspection discovered in 2 places timers were being incorrectly setup
using round_jiffies_relative(HZ).  The timer would then fire at time (0 <= T <
HZ).

Fix them to use round_jiffies(jiffies + HZ);

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-q.c

index dd4798ee028edba1e9612bfaa8d77a34afa2e8b3..33f1c1c32edf75ecc5a93e4a171c0afa2806a123 100644 (file)
@@ -467,7 +467,7 @@ static void unlink_watchdog_func(unsigned long _ohci)
 out:
        kfree(seen);
        if (ohci->eds_scheduled)
-               mod_timer(&ohci->unlink_watchdog, round_jiffies_relative(HZ));
+               mod_timer(&ohci->unlink_watchdog, round_jiffies(jiffies + HZ));
 done:
        spin_unlock_irqrestore(&ohci->lock, flags);
 }
index 51817322232b453a5f6c881809d542e9315e0f76..9c9f3b59186f6c65d3d33cbfa16dced198de10eb 100644 (file)
@@ -169,7 +169,7 @@ static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed)
        if (quirk_zfmicro(ohci)
                        && (ed->type == PIPE_INTERRUPT)
                        && !(ohci->eds_scheduled++))
-               mod_timer(&ohci->unlink_watchdog, round_jiffies_relative(HZ));
+               mod_timer(&ohci->unlink_watchdog, round_jiffies(jiffies + HZ));
        wmb ();
 
        /* we care about rm_list when setting CLE/BLE in case the HC was at