summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-06-10 15:12:45 +0300
committerEduardo Habkost <ehabkost@redhat.com>2009-06-16 11:15:42 -0300
commit66b2fa19157cbf207801bf0122cdcc6999847c4b (patch)
tree7a1b2de01163811e936421284a9a10faa686d226
parent3e56c0c469c02fb67e61d6d307927074f0ab533a (diff)
Add reset to rtl8139 nic.
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Message-Id: <1244635966-21609-3-git-send-email-gleb@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> RH-Upstream-status: applied(qemu/master) Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: john cooper <john.cooper@redhat.com> Acked-by: Avi Kivity <avi@redhat.com> Bugzilla: 504237
-rw-r--r--qemu/hw/rtl8139.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/qemu/hw/rtl8139.c b/qemu/hw/rtl8139.c
index 2527d9bf..d1d50ee7 100644
--- a/qemu/hw/rtl8139.c
+++ b/qemu/hw/rtl8139.c
@@ -1170,8 +1170,9 @@ static void rtl8139_reset_rxring(RTL8139State *s, uint32_t bufferSize)
s->RxBufAddr = 0;
}
-static void rtl8139_reset(RTL8139State *s)
+static void rtl8139_reset(void *opaque)
{
+ RTL8139State *s = opaque;
int i;
/* restore MAC address */
@@ -3454,6 +3455,7 @@ PCIDevice *pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn)
s->pci_dev = (PCIDevice *)d;
memcpy(s->macaddr, nd->macaddr, 6);
+ qemu_register_reset(rtl8139_reset, s);
rtl8139_reset(s);
s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
rtl8139_receive, rtl8139_can_receive, s);