]> git.proxmox.com Git - mirror_qemu.git/commitdiff
i.MX: reset TX/RX descriptors when FEC is disabled.
authorJean-Christophe Dubois <jcd@tribudubois.net>
Mon, 30 May 2016 17:26:00 +0000 (19:26 +0200)
committerJason Wang <jasowang@redhat.com>
Thu, 2 Jun 2016 02:42:46 +0000 (10:42 +0800)
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>
hw/net/imx_fec.c

index 768181e3c10e7c7fdb3df8faca8d4a5567daa813..7369cfafe5c2387395055e2253ffdd80f36f1437 100644 (file)
@@ -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 */