Subject: Re: mc* performance patch
To: Allen Briggs <briggs@NetBSD.org>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: port-macppc
Date: 01/15/2005 11:45:50
Allen Briggs <briggs@NetBSD.org> writes:

> > There are plenty of PCI NIC drivers that use bus_dma, but I have no
> > idea if those would be a good example for an obio-attached device.
> 
> The bus match and attachment should be independent of the bus_dma
> usage in the driver.  If you look at the AMD "Lance" ethernet
> (if_le), there are a slew of bus attachments (sbus, obio, pci, isa,
> pcmcia, qbus, vme, turbochannel, etc.), but they all "just work"
> with src/sys/dev/ic/am7990.c.

Notably, the Lance drivers don't use DMA. The bus_dma abstraction
doesn't encompass starting the DMA transfer (this took me a long time
to wrap my head around, originally). Since DBDMA is a property of the
bus controller rather than the device, I don't think there's an
opportunity for a truly MI version of the code, or much of a
bus/back-end split. Allocating the memory for the drivers with the
bus_dma() interfaces would definitely be an improvement, though.

        - Nathan