Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: ohci: fix 2 timers to fire at jiffies + 1s

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>

authored by

Richard Kennedy and committed by
Greg Kroah-Hartman
9cebcdc7 82247053

+2 -2
+1 -1
drivers/usb/host/ohci-hcd.c
··· 467 467 out: 468 468 kfree(seen); 469 469 if (ohci->eds_scheduled) 470 - mod_timer(&ohci->unlink_watchdog, round_jiffies_relative(HZ)); 470 + mod_timer(&ohci->unlink_watchdog, round_jiffies(jiffies + HZ)); 471 471 done: 472 472 spin_unlock_irqrestore(&ohci->lock, flags); 473 473 }
+1 -1
drivers/usb/host/ohci-q.c
··· 169 169 if (quirk_zfmicro(ohci) 170 170 && (ed->type == PIPE_INTERRUPT) 171 171 && !(ohci->eds_scheduled++)) 172 - mod_timer(&ohci->unlink_watchdog, round_jiffies_relative(HZ)); 172 + mod_timer(&ohci->unlink_watchdog, round_jiffies(jiffies + HZ)); 173 173 wmb (); 174 174 175 175 /* we care about rm_list when setting CLE/BLE in case the HC was at