debuggers.hg

view tools/ioemu/patches/ioemu-save-restore-rtl8139 @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
1 Index: ioemu/hw/rtl8139.c
2 ===================================================================
3 --- ioemu.orig/hw/rtl8139.c 2007-05-09 14:08:41.000000000 +0100
4 +++ ioemu/hw/rtl8139.c 2007-05-09 14:09:34.000000000 +0100
5 @@ -3414,6 +3414,7 @@
6 PCIRTL8139State *d;
7 RTL8139State *s;
8 uint8_t *pci_conf;
9 + int instance;
11 d = (PCIRTL8139State *)pci_register_device(bus,
12 "RTL8139", sizeof(PCIRTL8139State),
13 @@ -3464,8 +3465,8 @@
14 s->cplus_txbuffer_len = 0;
15 s->cplus_txbuffer_offset = 0;
17 - /* XXX: instance number ? */
18 - register_savevm("rtl8139", 0, 3, rtl8139_save, rtl8139_load, s);
19 + instance = pci_bus_num(bus) << 8 | s->pci_dev->devfn;
20 + register_savevm("rtl8139", instance, 3, rtl8139_save, rtl8139_load, s);
22 #if RTL8139_ONBOARD_TIMER
23 s->timer = qemu_new_timer(vm_clock, rtl8139_timer, s);