[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bus_dmamap_sync() for USB
On Thu, Jun 26, 2008 at 03:50:47AM -0500, David Young wrote:
> On Tue, Jun 24, 2008 at 08:55:51PM +0200, Manuel Bouyer wrote:
> > On Tue, Jun 24, 2008 at 01:13:12PM -0500, David Young wrote:
> > > What do you think the role of interrupt latency is?
> > The linked-list corruption is purely timing-related: the host has to
> > read/change it while the controller is reading/modifying it for it to
> > happen.
> > The controller looks at the linked list every microsecond (in other words,
> > it's active every microsecond) If the interrupt handler runs fast enough
> > (and is not heavily loaded, i.e. not talking to several devices/endpoints at
> > once) it's likely to complete before the controller is active again.
> Do you mean that there is still a known race condition in the code,
> regardless of the DMA synchronization that you added?
No, I mean that there is a possible race condition if the CPU reorder reads
But if the driver's interrupt handler runs while the controller is idle
waiting for the start of the next USB frame (which typically happens in
normal use, with a single device active on a USB controller), read/write
reordering don't matters, of course.
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
Main Index |
Thread Index |