[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Status of user-mode networking for win32
From: |
Renzo Davoli |
Subject: |
Re: [Qemu-devel] Status of user-mode networking for win32 |
Date: |
Mon, 7 Jun 2004 16:45:51 +0200 |
User-agent: |
Mutt/1.3.28i |
On Mon, Jun 07, 2004 at 05:01:35PM +0300, Elefterios Stamatogiannakis wrote:
> The problem is that it doesn't seem to connect to the outside world.
I have seen with a packet sniffer that the packet payload was 16 bits
misaligned.
I have tried the workaround here included as a patch and
Win98+vdeqemu pci works.
I am trying to figure out if this is a correct patch or it is the
writel/readl call parameter to be wrong. (word sized transfers should be
aligned...)
renzo
---------------
--- hw/ne2000.c.orig 2004-06-07 16:14:28.000000000 +0200
+++ hw/ne2000.c 2004-06-07 16:27:14.000000000 +0200
@@ -401,7 +401,8 @@
static inline void ne2000_mem_writel(NE2000State *s, uint32_t addr,
uint32_t val)
{
- addr &= ~3; /* XXX: check exact behaviour if not even */
+ /*addr &= ~3; XXX: check exact behaviour if not even */
+ addr &= ~1; /* XXX: check exact behaviour if not even */
if (addr < 32 ||
(addr >= NE2000_PMEM_START && addr < NE2000_MEM_SIZE)) {
*(uint32_t *)(s->mem + addr) = cpu_to_le32(val);
@@ -431,7 +432,8 @@
static inline uint32_t ne2000_mem_readl(NE2000State *s, uint32_t addr)
{
- addr &= ~3; /* XXX: check exact behaviour if not even */
+ /*addr &= ~3; XXX: check exact behaviour if not even */
+ addr &= ~1; /* XXX: check exact behaviour if not even */
if (addr < 32 ||
(addr >= NE2000_PMEM_START && addr < NE2000_MEM_SIZE)) {
return le32_to_cpu(*(uint32_t *)(s->mem + addr));