qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ne2000: mark I/O as LITTLE_ENDIAN
@ 2013-09-02 11:10 Aurelien Jarno
  2013-09-04  8:39 ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2013-09-02 11:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, qemu-stable, Aurelien Jarno

Now that the memory subsystem is propagating the endianness correctly,
the ne2000 device should have its I/O ports marked as LITTLE_ENDIAN, as
PCI devices are little endian.

This makes the ne2000 NIC to work again on PowerPC.

Cc: qemu-stable@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 hw/net/ne2000.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
index 31afd28..c961258 100644
--- a/hw/net/ne2000.c
+++ b/hw/net/ne2000.c
@@ -693,7 +693,7 @@ static void ne2000_write(void *opaque, hwaddr addr,
 static const MemoryRegionOps ne2000_ops = {
     .read = ne2000_read,
     .write = ne2000_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 /***********************************************************/
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] ne2000: mark I/O as LITTLE_ENDIAN
  2013-09-02 11:10 [Qemu-devel] [PATCH] ne2000: mark I/O as LITTLE_ENDIAN Aurelien Jarno
@ 2013-09-04  8:39 ` Stefan Hajnoczi
  2013-09-06 15:28   ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-09-04  8:39 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel, qemu-stable

On Mon, Sep 02, 2013 at 01:10:34PM +0200, Aurelien Jarno wrote:
> Now that the memory subsystem is propagating the endianness correctly,
> the ne2000 device should have its I/O ports marked as LITTLE_ENDIAN, as
> PCI devices are little endian.
> 
> This makes the ne2000 NIC to work again on PowerPC.
> 
> Cc: qemu-stable@nongnu.org
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  hw/net/ne2000.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
> index 31afd28..c961258 100644
> --- a/hw/net/ne2000.c
> +++ b/hw/net/ne2000.c
> @@ -693,7 +693,7 @@ static void ne2000_write(void *opaque, hwaddr addr,
>  static const MemoryRegionOps ne2000_ops = {
>      .read = ne2000_read,
>      .write = ne2000_write,
> -    .endianness = DEVICE_NATIVE_ENDIAN,
> +    .endianness = DEVICE_LITTLE_ENDIAN,
>  };

This is also used by hw/net/ne2000-isa.c:isa_ne2000_realizefn().  Is it
correct to explicitly say little-endian there?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] ne2000: mark I/O as LITTLE_ENDIAN
  2013-09-04  8:39 ` Stefan Hajnoczi
@ 2013-09-06 15:28   ` Stefan Hajnoczi
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-09-06 15:28 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Aurelien Jarno, qemu-stable

On Wed, Sep 04, 2013 at 10:39:12AM +0200, Stefan Hajnoczi wrote:
> On Mon, Sep 02, 2013 at 01:10:34PM +0200, Aurelien Jarno wrote:
> > Now that the memory subsystem is propagating the endianness correctly,
> > the ne2000 device should have its I/O ports marked as LITTLE_ENDIAN, as
> > PCI devices are little endian.
> > 
> > This makes the ne2000 NIC to work again on PowerPC.
> > 
> > Cc: qemu-stable@nongnu.org
> > Cc: Stefan Hajnoczi <stefanha@redhat.com>
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> >  hw/net/ne2000.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
> > index 31afd28..c961258 100644
> > --- a/hw/net/ne2000.c
> > +++ b/hw/net/ne2000.c
> > @@ -693,7 +693,7 @@ static void ne2000_write(void *opaque, hwaddr addr,
> >  static const MemoryRegionOps ne2000_ops = {
> >      .read = ne2000_read,
> >      .write = ne2000_write,
> > -    .endianness = DEVICE_NATIVE_ENDIAN,
> > +    .endianness = DEVICE_LITTLE_ENDIAN,
> >  };
> 
> This is also used by hw/net/ne2000-isa.c:isa_ne2000_realizefn().  Is it
> correct to explicitly say little-endian there?

Paolo has confirmed that ISA devices should be little-endian anyway.

Thanks, applied to my net tree.

Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-06 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02 11:10 [Qemu-devel] [PATCH] ne2000: mark I/O as LITTLE_ENDIAN Aurelien Jarno
2013-09-04  8:39 ` Stefan Hajnoczi
2013-09-06 15:28   ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).