aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Christophe Dubois <jcd@tribudubois.net>2016-05-30 19:26:00 +0200
committerJason Wang <jasowang@redhat.com>2016-06-02 10:42:46 +0800
commitff4b325f5e1d68cd089e71edcaa3fe3432ca18dc (patch)
tree59a956e44e7a44f95a80704cda43d1e6f28fc872
parentccdb81d3274d281d770703417257bd40bcdf4c0e (diff)
downloadqemu-ff4b325f5e1d68cd089e71edcaa3fe3432ca18dc.zip
qemu-ff4b325f5e1d68cd089e71edcaa3fe3432ca18dc.tar.gz
qemu-ff4b325f5e1d68cd089e71edcaa3fe3432ca18dc.tar.bz2
i.MX: reset TX/RX descriptors when FEC is disabled.
According to the FEC chapter of i.MX25 reference manual RX adn TX descriptors are reseted when the FEC device is disabled through ECR. Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net> Signed-off-by: Jason Wang <jasowang@redhat.com>
-rw-r--r--hw/net/imx_fec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
index 768181e..7369cfa 100644
--- a/hw/net/imx_fec.c
+++ b/hw/net/imx_fec.c
@@ -454,6 +454,8 @@ static void imx_fec_write(void *opaque, hwaddr addr,
}
if ((s->ecr & FEC_EN) == 0) {
s->rx_enabled = 0;
+ s->rx_descriptor = s->erdsr;
+ s->tx_descriptor = s->etdsr;
}
break;
case 0x040: /* MMFR */