mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mike Nuss" <mikenuss@gmail.com>
To: "Richard Kennedy" <richard@rsk.demon.co.uk>
Cc: "Alan Stern" <stern@rowland.harvard.edu>,
	dbrownell@users.sourceforge.net,
	linux-usb <linux-usb@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: ohci : strange looking use of round_jiffies_relative. possible bug ?
Date: Wed, 26 Mar 2008 14:06:49 -0400	[thread overview]
Message-ID: <a340dd0e0803261106v67bbecdaie8a3f52b47e2c84a@mail.gmail.com> (raw)
In-Reply-To: <1206546405.2931.20.camel@castor.localdomain>

On Wed, Mar 26, 2008 at 11:46 AM, Richard Kennedy
<richard@rsk.demon.co.uk> wrote:
>
>  On Wed, 2008-03-26 at 11:37 -0400, Alan Stern wrote:
>  > On Wed, 26 Mar 2008, Richard Kennedy wrote:
>  >
>  > > I was looking at the uses of round_jiffies and noticed that the ohci
>  > > unlink_watchdog_func() calls
>  > > mod_timer(&ohci->unlink_watchdog, round_jiffies_relative(HZ));
>  > >
>  > > Which looks a bit strange as it will set the timer to 0 <= t < HZ.
>  > > Reading the comments I think that is really is expecting to setup timer
>  > > to (now + 1s)
>  > >
>  > > mod_timer(&ohci->unlink_watchdog, round_jiffies(jiffies + HZ));
>  > >
>  > > If this is not true then perhaps it needs a comment to explain what it
>  > > _is_ trying to do, because it's got me baffled ;)

Yes, my intent there was a roughly 1 second delay. You're correct, it's wrong.

>  > I'd say it's a bug.  Or rather a pair of bugs, since that mod_timer()
>  > call appears in two places.

Yup.

Mike

  reply	other threads:[~2008-03-26 18:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-26 14:38 Richard Kennedy
2008-03-26 15:37 ` Alan Stern
2008-03-26 15:46   ` Richard Kennedy
2008-03-26 18:06     ` Mike Nuss [this message]
2008-03-27 18:55       ` David Brownell
2008-03-26 16:32   ` [patch] usb ohci : fix 2 timers to fire at jiffies + 1s Richard Kennedy
2008-03-27 18:53     ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a340dd0e0803261106v67bbecdaie8a3f52b47e2c84a@mail.gmail.com \
    --to=mikenuss@gmail.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=richard@rsk.demon.co.uk \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®