aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/net/xilinx_ethlite.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c
index 3a2a6c21c9..6cbd95dde2 100644
--- a/hw/net/xilinx_ethlite.c
+++ b/hw/net/xilinx_ethlite.c
@@ -204,6 +204,13 @@ static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size)
return size;
}
+static void xilinx_ethlite_reset(DeviceState *dev)
+{
+ struct xlx_ethlite *s = XILINX_ETHLITE(dev);
+
+ s->rxbuf = 0;
+}
+
static void eth_cleanup(NetClientState *nc)
{
struct xlx_ethlite *s = qemu_get_nic_opaque(nc);
@@ -225,7 +232,6 @@ static int xilinx_ethlite_init(SysBusDevice *sbd)
struct xlx_ethlite *s = XILINX_ETHLITE(dev);
sysbus_init_irq(sbd, &s->irq);
- s->rxbuf = 0;
memory_region_init_io(&s->mmio, OBJECT(s), &eth_ops, s,
"xlnx.xps-ethernetlite", R_MAX * 4);
@@ -251,6 +257,7 @@ static void xilinx_ethlite_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = xilinx_ethlite_init;
+ dc->reset = xilinx_ethlite_reset;
dc->props = xilinx_ethlite_properties;
}