Re: [PATCH] USB: fix a bug in the scatter-gather library

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

 



On Tue, 27 Oct 2009, Sarah Sharp wrote:

> > I'm a little surprised the bug hasn't shown up in testing on those
> > controllers, however.  Is it hidden by an I/O watchdog timer?  Or do
> > they simply not support URB_NO_INTERRUPT?
> 
> I guess I've never understood what this flag was supposed to be for.

It tells the HCD that the URB is just one part of a longer sequence
(for instance, it might correspond to an intermediate element in a
scatterlist) and consequently the system doesn't need to know exactly
when the URB completes.  The HCD is free to tell the hardware to avoid
generating an interrupt when the URB completes normally (of course,
there still should be an interrupt if the URB gets an error).  The last
URB for the scatterlist won't have the flag set, so the system will be
notified when the entire transfer is finished.

The purpose of the flag is to reduce system load by avoiding interrupts 
that aren't really needed.

> Right now, the xHCI driver gets an interrupt when the last part of an
> URB buffer completes, or an error happens.  It doesn't scan the list of
> submitted transfers like EHCI or have a watchdog (aside from the
> cancellation watchdog).  If the xHCI driver doesn't get an interrupt and
> an event on the event ring for a transfer, the URB will never be given
> back, and I think xHCI's ring handling will cease to function properly.
> So I'm not sure how this flag could be used.

In other words, xHCI doesn't implement the flag.  That's okay; it's 
optional.

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