Port-macppc archive

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

Re: which bus_dmamap_sync() ?



On Sat, Jun 21, 2008 at 02:04:11PM -0500, David Young wrote:
> On Fri, Jun 20, 2008 at 07:44:15PM +0200, Manuel Bouyer wrote:
> > Hi,
> > can anyone tell me what bus_dmamap_sync() function port-macppc is using for
> > its PCI bus ? I've been looking at arch/macppc/ and arch/powerpc/ and
> > my conclusion is that bus_dmamap_sync() is a nop on port-macppc
> > (_dmamap_sync being NULL). Is this right ?
> 
> It is a nop, but strictly speaking, *no* bus_dmamap_sync() for PCI bus
> should be a nop, because that ignores the presence of buffers in the
> bus bridges.  NetBSD ordinarily lucks out because most drivers have
> read an interrupt status register on the bus master prior to calling
> bus_dmamap_sync().  The register read has the side-effect of flushing
> buffers to RAM.

Specifically for the USB controller this doesn't work because the
USB controller keeps running and can read/write to the linked list
of DMA descriptors while we're also handling it. 
Some network controllers may also have this issue. See port-i386/38935
for more details (it's x86 details in this PR, but this can translate
to any architecture that can do read or write reorderings).

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index