Re: [PATCH] Jazzsonic driver updates

From: Finn Thain
Date: Sun Jun 12 2005 - 01:35:05 EST




On Wed, 23 Mar 2005, Ralf Baechle wrote:

> On Tue, Mar 22, 2005 at 06:13:17PM +0100, Geert Uytterhoeven wrote:
>
> > On Fri, 28 Jan 2005, Linux Kernel Mailing List wrote:
> > > ChangeSet 1.1986, 2005/01/28 00:12:28-05:00, ralf@xxxxxxxxxxxxxx
> > >
> > > [PATCH] Jazzsonic driver updates
> > >
> > > o Resurrect the Jazz SONIC driver after years of it not having been tested
> > > o Convert from Space.c initialization to module_init / platform device.
> > >
> > > Signed-off-by: Jeff Garzik <jgarzik@xxxxxxxxx>
> >
> > > --- a/drivers/net/sonic.c 2005-03-06 18:10:39 -08:00
> > > +++ b/drivers/net/sonic.c 2005-03-06 18:10:39 -08:00
> > > @@ -116,7 +116,7 @@
> > > /*
> > > * Map the packet data into the logical DMA address space
> > > */
> > > - if ((laddr = vdma_alloc(PHYSADDR(skb->data), skb->len)) == ~0UL) {
> > > + if ((laddr = vdma_alloc(CPHYSADDR(skb->data), skb->len)) == ~0UL) {
> > ^^^^^^^^^
> > This part broke compilation for Mac/m68k.
> >
> > > printk("%s: no VDMA entry for transmit available.\n",
> > > dev->name);
> > > dev_kfree_skb(skb);
>
> Oh funny. vdma_alloc() was created 10 years ago as an internal API for
> the Jazz machines. Didn't realize m68k had cloned it :-) If anything
> it seems this should be converted to the modern DMA API.

I've just started merging my Mac sonic work into 2.6.12-rc6. m68k doesn't
yet implement the modern DMA API, but it is easy to fake it for a while
for macsonic.c. So I don't mind converting macsonic, jazzsonic and the
shared sonic driver core to the new API.

But, I knowing nothing about the Jazz DMA controller. I need some help
from the MIPS people:

Would I be right to say that vdma_{alloc,free}() can be changed to
dma_{,un}map_single? The other Jazz specific routine that sonic uses is
vdma_log2phys, and I don't know if that has a better alternative.

-f

> Ralf
> -
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/