aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/net/sunhme.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/net/sunhme.c b/hw/net/sunhme.c
index e3a488e..14e7eff 100644
--- a/hw/net/sunhme.c
+++ b/hw/net/sunhme.c
@@ -373,10 +373,20 @@ static void sunhme_mac_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
SunHMEState *s = SUNHME(opaque);
+ uint64_t oldval = s->macregs[addr >> 2];
trace_sunhme_mac_write(addr, val);
s->macregs[addr >> 2] = val;
+
+ switch (addr) {
+ case HME_MACI_RXCFG:
+ if (!(oldval & HME_MAC_RXCFG_ENABLE) &&
+ (val & HME_MAC_RXCFG_ENABLE)) {
+ qemu_flush_queued_packets(qemu_get_queue(s->nic));
+ }
+ break;
+ }
}
static uint64_t sunhme_mac_read(void *opaque, hwaddr addr,