Re: [PATCH 1/2] ehci: Minor constant fix for SCHEDULE_SLOP.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 19, 2009 at 10:00:40PM -0400, Alan Stern wrote:
> On Mon, 19 Oct 2009, Sarah Sharp wrote:
> 
> > Change the constant SCHEDULE_SLOP to be 80 frames, instead of 10 frames.
> 
> Don't you mean "80 microframes instead of 10 frames"?
>
> > It was always multiplied by 8, and the comments indicate that the "slop
> > amount" should be 80 frames.
> 
> Where do they indicate that?

Ugh, nevermind, I read the comment you added wrong:

                /* Fell behind (by up to twice the slop amount)? */
-               if (start >= max - 2 * 8 * SCHEDULE_SLOP)
+               if (start >= max - 2 * SCHEDULE_SLOP)

The comment says the code is checking for falling behind by up to "twice
the slop amount" and I saw (2 * 8 * SCHEDULE_SLOP), so I concluded the
slop amount is (8 * SCHEDULE_SLOP).

So, yes, the comment should say microframes, and the code was just
converting frames to microframes everywhere.  I'll fix the comment.

> 
> >  SCHEDULE_SLOP is only used in ehci-sched.c.
> > 
> > Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/usb/host/ehci-sched.c |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
> > index d163371..29a63e1 100644
> > --- a/drivers/usb/host/ehci-sched.c
> > +++ b/drivers/usb/host/ehci-sched.c
> > @@ -1322,7 +1322,7 @@ sitd_slot_ok (
> >   * given EHCI_TUNE_FLS and the slop).  Or, write a smarter scheduler!
> >   */
> >  
> > -#define SCHEDULE_SLOP	10	/* frames */
> > +#define SCHEDULE_SLOP	80	/* frames */
> 
> The code itself is fine, but the comment here should be adjusted.

Sarah
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux