RE: EHCI isoc scheduling

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

 



On Fri, 9 Sep 2011, Paul Zimmerman wrote:

> Adding Sarah to CC, I just noticed she was the one who added this code.
> 
> > -----Original Message-----
> > From: Paul Zimmerman
> > Sent: Friday, September 09, 2011 1:16 PM
> > To: alan stern
> > Cc: 'linux-usb@xxxxxxxxxxxxxxx'
> > Subject: EHCI isoc scheduling
> > 
> > Hi Alan,
> > 
> > Can you give me a clue about this code in ehci-sched.c/iso_stream_schedule()?
> > 
> > 		/* For high speed devices, allow scheduling within the
> > 		 * isochronous scheduling threshold.  For full speed devices
> > 		 * and Intel PCI-based controllers, don't (work around for
> > 		 * Intel ICH9 bug).
> > 		 */
> > 		if (!stream->highspeed && ehci->fs_i_thresh)
> > 			next = now + ehci->i_thresh;
> > 		else
> > 			next = now;
> > 
> > Why does the driver allow scheduling within the threshold? I though the whole
> > point of the threshold value in the HCCPARAMS register was to tell the driver
> > the earliest time when it is safe to do scheduling.

As I recall, people observed that an old version of the driver which
always ignored fs_i_thresh had worked well.  But then problems starting
occurring with newer Intel controllers when communicating with
full-speed devices, so the test was added.  The comment could stand to
be phrased a little better.

> > Plus, the code doesn't seem to be doing what the comment says for the ICH9
> > workaround case (ehci->fs_i_thresh = 1). It seems the && should be an ||
> > instead.

That's because the comment is so easy to misinterpret.

> > The driver seems to be violating the EHCI spec here. Or am I misunderstanding
> > what the code is doing?

It _is_ violating the spec.  Or rather, it's trying to do something 
which the spec doesn't guarantee will work.  The only justification is 
that so far nobody has complained.

Alan Stern

--
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