Re: [PATCH] Jazzsonic driver updates
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, [EMAIL PROTECTED] > > > > > > [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 <[EMAIL PROTECTED]> > > > > > --- 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 :-) m68k doesn't clone it. This is from macsonic.c, #define vdma_alloc(foo, bar) ((u32)foo) > If anything it seems this should be converted to the modern DMA API. Sure, but until that happens, it would be nice if the upstream kernel had the MIPS repo versions of sonic.c, sonic.h and jazzsonic.c. That way it might be possible for me to put together a patch for macsonic that both archs are happy with. It doesn't require a new DMA API to fix all the built-in ethernet ports on 68k Macs. -f > Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Jazzsonic driver updates
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, [EMAIL PROTECTED] > > > > [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 <[EMAIL PROTECTED]> > > > --- 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. Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Jazzsonic driver updates
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, [EMAIL PROTECTED] [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 [EMAIL PROTECTED] --- 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. Ralf - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Jazzsonic driver updates
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, [EMAIL PROTECTED] [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 [EMAIL PROTECTED] --- 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 :-) m68k doesn't clone it. This is from macsonic.c, #define vdma_alloc(foo, bar) ((u32)foo) If anything it seems this should be converted to the modern DMA API. Sure, but until that happens, it would be nice if the upstream kernel had the MIPS repo versions of sonic.c, sonic.h and jazzsonic.c. That way it might be possible for me to put together a patch for macsonic that both archs are happy with. It doesn't require a new DMA API to fix all the built-in ethernet ports on 68k Macs. -f Ralf - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Re: [PATCH] Jazzsonic driver updates
On Tue, 22 Mar 2005, Geert Uytterhoeven wrote: > On Fri, 28 Jan 2005, Linux Kernel Mailing List wrote: > > ChangeSet 1.1986, 2005/01/28 00:12:28-05:00, [EMAIL PROTECTED] > > > > [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 <[EMAIL PROTECTED]> > > > --- 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. > Compilation is easily fixed, a patch is below. BTW, this will still leave the macsonic driver in a non-working state. I have a patch to make it work again, which also re-introduces the support for 16-bit cards that went missing way back in 2.4.something (jazzsonic cards are all 32-bit, as are some mac cards). My patch basically ports the current macsonic driver from mac68k 2.2 branch, and has been widely tested on macs. Problem is, it hasn't yet been tested on MIPS, and it makes a lot of changes to sonic.c, which is shared by jazzsonic and macsonic. Can anyone with a Jazz machine help out with this? One of the difficulties is that MIPS and m68k architectures each have their own repo, and last time I looked, the SONIC code in the MIPS repo didn't agree with the SONIC code in the m68k repo. But, it shouldn't be difficult to make macsonic and jazzsonic work with the same core driver code again. Besides, we already have two SONIC drivers in the tree, seperating jazzsonic and macsonic would add a third. -f Signed-off-by: Finn Thain <[EMAIL PROTECTED]> --- a/drivers/net/macsonic.c2005-03-25 04:01:51.0 +1100 +++ b/drivers/net/macsonic.c2005-03-25 04:48:39.0 +1100 @@ -638,6 +638,7 @@ #define vdma_free(baz) #define sonic_chiptomem(bat) (bat) #define PHYSADDR(quux) (quux) +#define CPHYSADDR(quux) (quux) #define sonic_request_irq request_irq #define sonic_free_irq free_irq - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Jazzsonic driver updates
On Fri, 28 Jan 2005, Linux Kernel Mailing List wrote: > ChangeSet 1.1986, 2005/01/28 00:12:28-05:00, [EMAIL PROTECTED] > > [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 <[EMAIL PROTECTED]> > --- 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); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Jazzsonic driver updates
On Fri, 28 Jan 2005, Linux Kernel Mailing List wrote: ChangeSet 1.1986, 2005/01/28 00:12:28-05:00, [EMAIL PROTECTED] [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 [EMAIL PROTECTED] --- 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); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like that. -- Linus Torvalds - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Re: [PATCH] Jazzsonic driver updates
On Tue, 22 Mar 2005, Geert Uytterhoeven wrote: On Fri, 28 Jan 2005, Linux Kernel Mailing List wrote: ChangeSet 1.1986, 2005/01/28 00:12:28-05:00, [EMAIL PROTECTED] [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 [EMAIL PROTECTED] --- 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. Compilation is easily fixed, a patch is below. BTW, this will still leave the macsonic driver in a non-working state. I have a patch to make it work again, which also re-introduces the support for 16-bit cards that went missing way back in 2.4.something (jazzsonic cards are all 32-bit, as are some mac cards). My patch basically ports the current macsonic driver from mac68k 2.2 branch, and has been widely tested on macs. Problem is, it hasn't yet been tested on MIPS, and it makes a lot of changes to sonic.c, which is shared by jazzsonic and macsonic. Can anyone with a Jazz machine help out with this? One of the difficulties is that MIPS and m68k architectures each have their own repo, and last time I looked, the SONIC code in the MIPS repo didn't agree with the SONIC code in the m68k repo. But, it shouldn't be difficult to make macsonic and jazzsonic work with the same core driver code again. Besides, we already have two SONIC drivers in the tree, seperating jazzsonic and macsonic would add a third. -f Signed-off-by: Finn Thain [EMAIL PROTECTED] --- a/drivers/net/macsonic.c2005-03-25 04:01:51.0 +1100 +++ b/drivers/net/macsonic.c2005-03-25 04:48:39.0 +1100 @@ -638,6 +638,7 @@ #define vdma_free(baz) #define sonic_chiptomem(bat) (bat) #define PHYSADDR(quux) (quux) +#define CPHYSADDR(quux) (quux) #define sonic_request_irq request_irq #define sonic_free_irq free_irq - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/