> static void lance_cleanup(VLANClientState *nc)
> @@ -117,13 +116,11 @@ static int lance_init(SysBusDevice *dev)
> SysBusPCNetState *d = FROM_SYSBUS(SysBusPCNetState, dev);
> PCNetState *s =&d->state;
>
> - s->mmio_index =
> - cpu_register_io_memory(lance_mem_read, lance_mem_write, d,
> - DEVICE_NATIVE_ENDIAN);
> + memory_region_init_io(&s->mmio,&lance_mem_ops, s, "lance-mmio", 4);
You've switched up d and s here, so anything that tries to talk to the
ethernet, such as a sparc32 guest, will now cause Qemu to segfault.